/* Stackly website.
   Palette and typography follow mezanyah.com so the two sites read as one family:
   deep navy, gold accent, IBM Plex Sans Arabic. */

:root {
    --bg: #0b1626;
    --bg-deep: #070f1b;
    --panel: #132538;
    --panel-2: #182c42;
    --edge: #1e3550;
    --text: #e7edf5;
    --muted: #9ca3af;
    --gold: #c9a227;
    --gold-soft: #e0bd45;
    --teal: #34b3a0;
    --radius: 16px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "IBM Plex Sans Arabic", "Inter", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 22px;
}

/* Icons inherit the colour and size of whatever they sit in, so a single set of
   paths serves the gold feature tiles and the muted nav alike. */
.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* ---------- top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(7, 15, 27, 0.88);
    border-bottom: 1px solid var(--edge);
    backdrop-filter: blur(12px);
}

.topbar .wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text);
    font-size: 18px;
}

.brand:hover { text-decoration: none; }

.brand .mark {
    width: 26px;
    height: 26px;
    flex: none;
}

.nav-links {
    display: flex;
    gap: 4px;
    margin-inline-start: auto;
    flex-wrap: wrap;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    padding: 8px 13px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1;
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.nav-links a[aria-current="page"] {
    color: var(--gold);
    background: rgba(201, 162, 39, 0.12);
}

.lang-switch {
    display: flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--edge);
    border-radius: 10px;
}

.lang-switch button {
    background: none;
    border: 0;
    color: var(--muted);
    padding: 5px 11px;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.4;
}

.lang-switch button:hover { color: var(--text); }

.lang-switch button.active {
    background: var(--gold);
    color: #14202f;
    font-weight: 700;
}

/* ---------- hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 76px 0 68px;
    border-bottom: 1px solid var(--edge);
    background:
        radial-gradient(900px 380px at 50% -60px, rgba(201, 162, 39, 0.16), transparent 70%),
        linear-gradient(180deg, #0e1c30 0%, var(--bg) 100%);
}

.tower {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin-bottom: 26px;
}

.tower span {
    height: 24px;
    border-radius: 7px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

.tower span:nth-child(1) { width: 118px; background: linear-gradient(180deg, #e0bd45, #c9a227); transform: translateX(13px); }
.tower span:nth-child(2) { width: 150px; background: linear-gradient(180deg, #4ec4b1, #2f9e8e); transform: translateX(-15px); }
.tower span:nth-child(3) { width: 182px; background: linear-gradient(180deg, #56a9e0, #3b7fb8); }

h1 {
    margin: 0;
    font-size: 52px;
    letter-spacing: 3px;
    font-weight: 700;
}

.tagline {
    margin: 12px auto 0;
    max-width: 560px;
    font-size: 20px;
    color: var(--muted);
}

.page-title {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    font-size: 38px;
    font-weight: 700;
}

.page-title .icon { width: 34px; height: 34px; color: var(--gold); }

/* ---------- content ---------- */

main { padding: 54px 0 30px; }

section { margin-bottom: 48px; }

h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    margin: 0 0 16px;
    font-weight: 700;
    color: var(--text);
}

h2 .icon { color: var(--gold); width: 24px; height: 24px; }

h3 {
    font-size: 18px;
    margin: 26px 0 4px;
    color: var(--text);
    font-weight: 700;
}

p { color: var(--muted); }

ul { padding-inline-start: 24px; }
li { color: var(--muted); margin-bottom: 9px; }

.card {
    background: var(--panel);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    padding: 24px 26px;
}

.card p:last-child { margin-bottom: 0; }

.callout {
    border-inline-start: 3px solid var(--gold);
}

.callout strong { color: var(--text); }

/* Feature tiles */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.features li {
    background: var(--panel);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    padding: 22px;
    margin: 0;
    transition: border-color 0.18s, transform 0.18s;
}

.features li:hover {
    border-color: rgba(201, 162, 39, 0.45);
    transform: translateY(-2px);
}

.features .icon {
    width: 26px;
    height: 26px;
    color: var(--gold);
    margin-bottom: 10px;
}

.features strong {
    display: block;
    color: var(--text);
    font-size: 17px;
    margin-bottom: 3px;
}

/* Numbered how-to-play steps */
.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-inline-start: 46px;
    margin-bottom: 16px;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: 2px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(201, 162, 39, 0.14);
    border: 1px solid rgba(201, 162, 39, 0.4);
    color: var(--gold);
    font-size: 15px;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
}

.updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--edge);
    border-radius: 999px;
    padding: 6px 16px;
    margin: 0 0 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--gold);
    color: #14202f;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: 12px;
    margin-top: 6px;
}

.button:hover { background: var(--gold-soft); text-decoration: none; }

/* ---------- footer ---------- */

footer {
    border-top: 1px solid var(--edge);
    background: var(--bg-deep);
    padding: 30px 0;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 9px;
}

.footer-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); text-decoration: none; }

footer p { margin: 0; font-size: 14px; }

@media (max-width: 640px) {
    body { font-size: 16px; }
    .hero { padding: 56px 0 50px; }
    h1 { font-size: 38px; }
    .tagline { font-size: 17px; }
    .page-title { font-size: 29px; }
    .page-title .icon { width: 27px; height: 27px; }
    .nav-links a { padding: 7px 10px; font-size: 14px; }
    /* The labels would wrap the bar onto three lines on a narrow phone; the icons
       still say which page each link is. */
    .nav-links a span { display: none; }
}
