/* Midan public site — shared shell: night tokens, buttons, nav, footer,
   phone dock and the touchline progress bar. Loaded by the home page and by
   every inner page, before the page's own stylesheet. */

:root,
[data-theme="dark"] {
    --bg: #07130D;
    --bg-2: #0A1A11;
    --raise: #0E2117;
    --turf: #0F4D2A;
    --turf-deep: #0B3A24;
    --stripe-a: #0F3F24;
    --stripe-b: #0C351E;
    --chalk: #EEF3EA;
    --ink: #EEF3EA;
    --ink-2: #AEBDB3;
    --ink-3: #75887D;
    --line: rgba(238, 243, 234, .13);
    --line-strong: rgba(238, 243, 234, .32);
    --flood: 255, 236, 186;
    --cta-bg: #EEF3EA;
    --cta-ink: #0B3A24;
    --sky-top: #040C08;
    --padel: #1B4A78; --padel-apron: #10304F;
    --hoops: #6A4526; --hoops-apron: #3B2717; --hoops-paint: #7A3A22;
    --tennis: #1E4E72; --tennis-apron: #1D4434;
    --sand: #7D6440; --sand-apron: #4E3E28;
    --lit: #8FD3A6;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #EEF3EC;
    --bg-2: #E4ECE2;
    --raise: #F8FAF6;
    --stripe-a: #2F7A49;
    --stripe-b: #2A6F42;
    --ink: #0E1A14;
    --ink-2: #44544A;
    --ink-3: #6C7C72;
    --line: rgba(14, 26, 20, .12);
    --line-strong: rgba(14, 26, 20, .3);
    --flood: 255, 248, 222;
    --cta-bg: #0F4D2A;
    --cta-ink: #FFFFFF;
    --sky-top: #C9DCCB;
    --padel: #2E6DB0; --padel-apron: #1F4F82;
    --hoops: #B57E46; --hoops-apron: #8A5C33; --hoops-paint: #A4502F;
    --tennis: #2F6E9E; --tennis-apron: #3C7A5A;
    --sand: #CFAE78; --sand-apron: #B08F5C;
    --lit: #0F4D2A;
    color-scheme: light;
}

[hidden] { display: none !important; }

.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--cta-bg);
    color: var(--cta-ink);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 22px;
    border-radius: 999px;
    font: 500 15px/1.2 'Readex Pro', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .25s cubic-bezier(.2, .7, .2, 1), background-color .25s, box-shadow .25s, color .25s;
}
.btn-lg { min-height: 54px; padding-inline: 28px; font-size: 16px; }
.btn-lit {
    background: var(--cta-bg);
    color: var(--cta-ink);
    box-shadow: 0 0 0 0 rgba(var(--flood), 0);
}
.btn-lit:hover { transform: translateY(-2px); box-shadow: 0 10px 34px -8px rgba(var(--flood), .55); }
.btn-line {
    border: 1px solid var(--line-strong);
    color: var(--ink);
}
.btn-line:hover { background: var(--line); }

/* ── Nav ─────────────────────────────────────────────── */
.nv {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 50;
    transition: background-color .35s, backdrop-filter .35s, border-color .35s;
    border-bottom: 1px solid transparent;
}
.nv.is-scrolled {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}
.nv-bar { display: flex; align-items: center; gap: 24px; height: 72px; }
.nv-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font: 700 22px/1 'Changa', sans-serif;
}
.nv-brand img { width: 36px; height: 36px; border-radius: 9px; }
.nv-links { display: flex; gap: 22px; margin-inline-start: auto; font-size: 14.5px; font-weight: 400; }
.nv-links a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nv-links a:hover { color: var(--ink); }
.nv-tools { display: flex; align-items: center; gap: 8px; }
.nv-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font: 500 13px/1 'Readex Pro', sans-serif;
    cursor: pointer;
}
.nv-icon:hover { background: var(--line); }
.nv-cta { min-height: 40px; padding-inline: 18px; font-size: 14px; }
.nv-menu { display: none; gap: 5px; align-content: center; }
.nv-menu span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .3s; }
.nv-menu[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nv-menu[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.nv-sheet {
    padding: 8px 16px 20px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nv-sheet nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin-bottom: 14px; }
.nv-sheet nav a { padding: 10px 0; text-decoration: none; font-size: 16px; border-bottom: 1px solid var(--line); }
.nv-sheet .btn { width: 100%; }

/* ── Footer ──────────────────────────────────────────── */
.ft { border-top: 1px solid var(--line); padding-top: 64px; }
.ft-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.ft-brand p { margin-block: 16px 10px; color: var(--ink-3); max-width: 30ch; }
.ft-mail { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.ft-col { display: grid; align-content: start; gap: 10px; }
.ft-col h2 { font: 600 15px/1.4 'Readex Pro', sans-serif; color: var(--ink-3); margin-bottom: 4px; }
.ft-col a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.ft-col a:hover, .ft-mail:hover { color: var(--ink); }
.ft-base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    margin-top: 48px;
    padding-block: 22px 30px;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--ink-3);
}
.ft-social { display: flex; gap: 18px; }
.ft-social a { text-decoration: none; }

/* ── Sticky dock (phones) and touchline progress ────── */
.dock {
    position: fixed;
    inset-inline: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 60;
    display: none;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .6);
    transform: translateY(140%);
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.dock .btn { flex: 1; min-height: 44px; padding-inline: 12px; font-size: 14.5px; }
.dock.is-up { transform: none; }
.touchline { position: fixed; top: 0; inset-inline: 0; z-index: 70; height: 3px; pointer-events: none; }
.touchline span { position: absolute; inset: 0; background: var(--chalk); opacity: .85; transform: scaleX(0); transform-origin: left center; }
[dir="rtl"] .touchline span { transform-origin: right center; }
[data-theme="light"] .touchline span { background: var(--turf); }
.touchline i {
    position: absolute;
    top: -3.5px;
    left: 0;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(var(--flood), .9);
    opacity: 0;
}

@media (max-width: 1100px) {
    .nv-links { display: none; }
    .nv-tools { margin-inline-start: auto; }
    .nv-menu { display: inline-grid; }
}

@media (max-width: 860px) {
    .dock { display: flex; }
}

@media (max-width: 820px) {
    .nv-cta { display: none; }
    .ft-grid { grid-template-columns: 1fr 1fr; }
    .ft-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .ft { padding-bottom: 96px; }
}
