/* Midan home — "night match under floodlights".
   One idea carries the page: the site is a court at night. Chalk-white
   markings on the real surface of each sport Midan books, under warm
   floodlight; brand turf green is a surface, never a neon accent. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Readex Pro', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.75;
    overflow-x: clip;
}

h1, h2, h3, h4 {
    font-family: 'Changa', 'Readex Pro', sans-serif;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
    outline: 2px solid rgb(var(--flood));
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    width: min(1220px, 100%);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 40px);
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100svh;
    padding-top: clamp(120px, 18vh, 180px);
    isolation: isolate;
    overflow: clip;
}
.hero-stage { position: absolute; inset: 0 0 auto; height: max(100svh, 760px); z-index: -1; pointer-events: none; overflow: clip; }
.hero-sky {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 70% at 50% 100%, color-mix(in srgb, var(--turf) 45%, transparent), transparent 70%),
        linear-gradient(to bottom, var(--sky-top), var(--bg) 70%);
}
.pitch-frame {
    position: absolute;
    inset-inline: -12%;
    top: 30%;
    height: 100%;
    perspective: 1100px;
    perspective-origin: 50% 0%;
}
.pitch-hero {
    width: 100%;
    height: 100%;
    transform: rotateX(58deg) translateZ(0);
    transform-origin: 50% 0%;
}
/* One court per sport; only the active one shows. Surfaces are the
   sport's own (turf, padel blue, maple, hard court, sand), dimmed for
   night so the chalk lines stay the brightest thing on them. */
.court { opacity: 0; visibility: hidden; }
.court.is-active { opacity: 1; visibility: visible; }
.court-lines { stroke: var(--chalk); stroke-width: 3; opacity: .72; }
[data-theme="light"] .court-lines { stroke: #FFFFFF; opacity: .9; }
.court-lines .net { stroke-width: 5; opacity: .9; }
.court-lines .glass { stroke-width: 1.5; stroke-dasharray: 2 9; opacity: .6; }
.court-lines .dash { stroke-dasharray: 6 8; }
.court-spots { fill: var(--chalk); }
.court-spots .hoop { fill: none; stroke: #E58A3A; stroke-width: 3; }
.court-football .apron, .court-football .stripe-b { fill: var(--stripe-b); }
.court-football .stripe-a { fill: var(--stripe-a); }
.court-padel .apron { fill: var(--padel-apron); }
.court-padel .field { fill: var(--padel); }
.court-basketball .apron { fill: var(--hoops-apron); }
.court-basketball .field { fill: var(--hoops); }
.court-basketball .paint { fill: var(--hoops-paint); }
.court-tennis .apron { fill: var(--tennis-apron); }
.court-tennis .field { fill: var(--tennis); }
.court-volleyball .apron { fill: var(--sand-apron); }
.court-volleyball .field { fill: var(--sand); }

/* Sports rail: picks the court on show; the hero cycles it on its own. */
.sports { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.sport {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    color: var(--ink-2);
    font: 400 14px/1 'Readex Pro', sans-serif;
    cursor: pointer;
    transition: color .3s, border-color .3s, background-color .3s;
}
.sport:hover { color: var(--ink); border-color: var(--line-strong); }
.sport.is-active { color: var(--cta-ink); background: var(--cta-bg); border-color: var(--cta-bg); }
.flood {
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--flood), .38) 0%, rgba(var(--flood), .12) 28%, transparent 62%);
    mix-blend-mode: screen;
    opacity: .9;
}
[data-theme="light"] .flood { mix-blend-mode: soft-light; }
.flood-1 { top: -32vmax; inset-inline-start: -26vmax; }
.flood-2 { top: -34vmax; inset-inline-start: 18%; width: 52vmax; height: 52vmax; }
.flood-3 { top: -34vmax; inset-inline-end: 18%; width: 52vmax; height: 52vmax; }
.flood-4 { top: -32vmax; inset-inline-end: -26vmax; }
.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, color-mix(in srgb, var(--bg) 82%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 45%, transparent 70%);
}
[dir="ltr"] .hero-scrim { background: linear-gradient(to right, color-mix(in srgb, var(--bg) 82%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 45%, transparent 70%); }
.hero-haze {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 30%;
    background: linear-gradient(to bottom, transparent, var(--bg) 96%);
}

.hero-copy { position: relative; }
.hero-where {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    color: var(--ink-2);
    margin-bottom: 22px;
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(var(--flood));
    box-shadow: 0 0 0 0 rgba(var(--flood), .6);
    animation: live 2.4s ease-out infinite;
}
@keyframes live {
    0% { box-shadow: 0 0 0 0 rgba(var(--flood), .55); }
    80%, 100% { box-shadow: 0 0 0 12px rgba(var(--flood), 0); }
}
.hero-title {
    font-size: clamp(46px, 8.6vw, 124px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.01em;
    max-width: 14ch;
}
[dir="rtl"] .hero-title { line-height: 1.16; letter-spacing: 0; }
.hero-line { display: block; }
.hero-line-2 { color: var(--lit); }
.hero-title .w { display: inline-block; overflow: clip; overflow-clip-margin: .12em; padding-bottom: .04em; vertical-align: top; }
.hero-title .w > span { display: inline-block; }
.hero-sub {
    max-width: 52ch;
    margin-top: 26px;
    font-size: clamp(17px, 1.6vw, 20px);
    color: var(--ink-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-actions.center { justify-content: center; }

.hero-shot {
    position: relative;
    width: min(1220px, calc(100% - 32px));
    margin: clamp(56px, 9vh, 96px) auto 0;
    border-radius: clamp(14px, 2vw, 26px);
    overflow: hidden;
    box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .75), 0 0 0 1px var(--line);
    transform-origin: 50% 0%;
}
.hero-shot img { width: 100%; }

/* ── Section scaffolding ─────────────────────────────── */
section { position: relative; }
.halves, .how, .features, .showcase, .pricing, .faq { padding-block: clamp(80px, 12vw, 150px); }
.sec-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.sec-head.center, .sec-title.center { margin-inline: auto; text-align: center; }
.sec-head.center .sec-sub { margin-inline: auto; }
.sec-title { font-size: clamp(32px, 4.6vw, 58px); font-weight: 700; max-width: 20ch; }
.sec-sub { margin-top: 16px; max-width: 58ch; color: var(--ink-2); font-size: clamp(16px, 1.4vw, 18px); }

.chalk-list { display: grid; gap: 12px; margin-block: 26px 32px; }
.chalk-list li { display: flex; align-items: baseline; gap: 14px; color: var(--ink-2); }
.chalk-list li::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--chalk);
    transform: translateY(-2px);
}
[data-theme="light"] .chalk-list li::before { border-color: var(--turf); }
.chalk-list.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }

/* ── Halves (players | owners) ───────────────────────── */
.halves { background: var(--bg-2); overflow-x: clip; }
.halves .sec-title { margin-bottom: clamp(48px, 7vw, 80px); }
.halves-field {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(80px, 12vw, 180px);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: clamp(36px, 5vw, 64px);
}
.halves-mark {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 50%;
    width: 200px;
    height: 100%;
    translate: -50% 0;
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}
[dir="rtl"] .halves-mark { translate: 50% 0; }
.halves-mark circle { vector-effect: non-scaling-stroke; }
.halves-mark .spot { fill: var(--line-strong); stroke: none; }
.half { position: relative; background: var(--bg-2); }
.half-who { font-size: 14.5px; color: var(--ink-3); margin-bottom: 12px; }
.half h3 { font-size: clamp(24px, 2.6vw, 34px); max-width: 16ch; }

/* ── How it works ────────────────────────────────────── */
.how-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.switch button {
    min-height: 40px;
    padding: 6px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-2);
    font: 500 14.5px/1 'Readex Pro', sans-serif;
    cursor: pointer;
    transition: background-color .25s, color .25s;
}
.switch button[aria-selected="true"] { background: var(--cta-bg); color: var(--cta-ink); }
.how-run { position: relative; }
.pass {
    position: absolute;
    inset-inline: 0;
    top: 0;
    width: 100%;
    height: 140px;
    fill: none;
    overflow: visible;
}
[dir="rtl"] .pass { transform: scaleX(-1); }
.pass-ghost { stroke: var(--line); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pass-line { stroke: var(--chalk); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; }
[data-theme="light"] .pass-line { stroke: var(--turf); }
.ball {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #fff 0 30%, #d9dfd7 60%, #9aa69d 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .45), 0 0 26px rgba(var(--flood), .55);
    opacity: 0;
    will-change: transform;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); padding-top: 170px; }
.step-n {
    display: block;
    font: 800 clamp(64px, 8vw, 104px)/.9 'Changa', sans-serif;
    color: transparent;
    -webkit-text-stroke: 1.2px var(--line-strong);
    margin-bottom: 18px;
}
.step h3 { font-size: clamp(21px, 2vw, 26px); margin-bottom: 10px; }
.step p { color: var(--ink-2); max-width: 32ch; }

/* ── Features board ──────────────────────────────────── */
.features { background: var(--bg-2); }
.board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-inline-start: 1px solid var(--line);
}
.board-cell {
    padding: clamp(22px, 2.6vw, 34px);
    border-bottom: 1px solid var(--line);
    border-inline-end: 1px solid var(--line);
    transition: background-color .3s;
}
.board-cell:hover { background: var(--raise); }
.board-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    margin-bottom: 22px;
}
.board-cell h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.board-cell p { font-size: 15px; color: var(--ink-2); }

/* ── Showcase ────────────────────────────────────────── */
.show {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.show + .show { margin-top: clamp(90px, 13vw, 170px); }
.show-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.show-flip .show-media { order: 2; }
.show-media {
    margin: 0;
    border-radius: clamp(14px, 1.8vw, 22px);
    overflow: hidden;
    box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
}
.show-media img { width: 100%; transform-origin: 50% 50%; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 8px 20px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    text-decoration: none;
    font: 600 16px/1.15 'Readex Pro', sans-serif;
    transition: background-color .25s;
}
.store:hover { background: var(--line); }
.store small { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }

/* ── Pricing scoreboard ──────────────────────────────── */
.scoreboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background:
        radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.5px) 0 0 / 8px 8px,
        var(--raise);
    overflow: hidden;
}
.plan {
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 2.6vw, 34px);
    border-inline-start: 1px solid var(--line);
}
.plan:first-child { border-inline-start: 0; }
.plan.is-featured {
    background: linear-gradient(to bottom, color-mix(in srgb, var(--turf) 70%, transparent), transparent 85%);
}
[data-theme="light"] .plan.is-featured { background: linear-gradient(to bottom, rgba(15, 77, 42, .12), transparent 85%); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.plan-head h3 { font-size: 22px; }
.plan-flag {
    padding: 3px 12px;
    border-radius: 999px;
    background: rgb(var(--flood));
    color: #1D1A0E;
    font-size: 12px;
    font-weight: 500;
}
.plan-for { color: var(--ink-3); font-size: 14.5px; margin-top: 2px; }
.plan-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 26px;
    direction: ltr;
    justify-content: flex-end;
}
[dir="ltr"] .plan-price { justify-content: flex-start; }
.digits {
    /* Readex, not Changa: Changa draws the Arabic decimal separator like a
       comma, so ٢٠٫٠٠٠ read as twenty thousand. */
    font: 600 clamp(38px, 3.8vw, 54px)/1 'Readex Pro', sans-serif;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    text-shadow: 0 0 24px rgba(var(--flood), .25);
}
.plan-cur { font-size: 15px; color: var(--ink-2); }
.plan-per { margin-top: 6px; color: var(--ink-3); font-size: 14.5px; }
.plan-per s { margin-inline-end: 6px; }
.plan-vat { margin-top: 4px; color: var(--ink-2); font-size: 13px; font-weight: 400; }
.plan-limits { display: grid; gap: 8px; margin-block: 24px 28px; padding-top: 22px; border-top: 1px dashed var(--line-strong); font-size: 15px; }
.plan .btn { margin-top: auto; }

.addons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
    gap: clamp(24px, 4vw, 56px);
    margin-top: clamp(56px, 8vw, 96px);
}
.addons-title { font-size: clamp(24px, 2.6vw, 32px); }
.addon-group h4 { font-size: 15px; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
.addon-group li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}
.addon-group li svg { flex: none; color: var(--ink-3); }
.addon-name { flex: 1; }
.addon-price { direction: ltr; unicode-bidi: isolate; font-weight: 500; white-space: nowrap; text-align: end; }
.addon-price small { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.addons { grid-template-areas: "head cap feat"; }
.addons-head { grid-area: head; }
.addon-group:nth-of-type(1) { grid-area: cap; }
.addon-group:nth-of-type(2) { grid-area: feat; }

/* ── FAQ ─────────────────────────────────────────────── */
.faq { background: var(--bg-2); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: 22px;
    cursor: pointer;
    list-style: none;
    font: 600 clamp(17px, 1.6vw, 20px)/1.4 'Changa', sans-serif;
}
.qa summary::-webkit-details-marker { display: none; }
.qa-x { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); }
.qa-x::before, .qa-x::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 11px;
    height: 1.5px;
    margin: -.75px 0 0 -5.5px;
    background: currentColor;
    transition: transform .3s;
}
.qa-x::after { transform: rotate(90deg); }
.qa[open] .qa-x::after { transform: rotate(0deg); }
.qa-a p { padding-bottom: 24px; max-width: 62ch; color: var(--ink-2); }

/* ── Kickoff ─────────────────────────────────────────── */
.kickoff {
    padding-block: clamp(110px, 16vw, 200px);
    text-align: center;
    overflow: clip;
    background: radial-gradient(60% 70% at 50% 50%, color-mix(in srgb, var(--turf) 55%, transparent), transparent 75%);
}
.kickoff-circle {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(640px, 120vw);
    translate: -50% -50%;
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 1.5;
    overflow: visible;
    pointer-events: none;
}
.kickoff-circle path { stroke-width: 1.5; }
.kickoff-circle .spot { fill: var(--line-strong); stroke: none; }
.kickoff-copy { position: relative; }
.kickoff-title { font-size: clamp(36px, 5.6vw, 72px); font-weight: 800; max-width: 18ch; margin-inline: auto; }
.kickoff .sec-sub { margin-inline: auto; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
    .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plan:nth-child(3) { border-inline-start: 0; }
    .plan:nth-child(n+3) { border-top: 1px solid var(--line); }
    .addons { grid-template-columns: 1fr 1fr; grid-template-areas: "head head" "cap feat"; }
}

@media (max-width: 820px) {
    body { font-size: 16px; }
    .halves-field { grid-template-columns: 1fr; gap: 72px; padding: 32px 22px; }
    .halves-mark { display: none; }
    .half + .half { padding-top: 56px; border-top: 1px solid var(--line-strong); }
    .steps { grid-template-columns: 1fr; padding-top: 0; gap: 36px; }
    .pass { display: none; }
    .steps { position: relative; }
    .steps::before {
        content: "";
        position: absolute;
        inset-block: 20px 30px;
        inset-inline-start: 25px;
        border-inline-start: 2px dashed var(--line-strong);
    }
    .step-n { position: relative; }
    .step { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; }
    .step-n { grid-row: span 2; font-size: 56px; margin: 0; }
    .show, .show-flip { grid-template-columns: 1fr; }
    .show-flip .show-media { order: 0; }
    .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .scoreboard { grid-template-columns: 1fr; }
    .plan { border-inline-start: 0; }
    .plan + .plan { border-top: 1px solid var(--line); }
    .addons { grid-template-columns: 1fr; grid-template-areas: "head" "cap" "feat"; }
    .chalk-list.cols { grid-template-columns: 1fr; }
    .hero-actions .btn { flex: 1 1 100%; }
    .pitch-frame { inset-inline: -70%; top: 64%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Steps light up as the pass reaches them (desktop, motion on). */
@media (min-width: 821px) {
    .motion .step { opacity: .32; transition: opacity .5s ease; }
    .motion .step.is-reached { opacity: 1; }
}

/* ── Perimeter LED boards ────────────────────────────── */
.led {
    position: relative;
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: #050D09;
    padding-block: 18px;
    direction: ltr;
}
[data-theme="light"] .led { background: #0B1D13; }
.led::after {
    /* the dot matrix of a stadium board */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 1.5px 1.5px, transparent 1px, rgba(0, 0, 0, .55) 1.6px) 0 0 / 4px 4px;
    pointer-events: none;
}
.led-track { display: flex; width: max-content; will-change: transform; }
.led-run { display: flex; align-items: center; flex: none; }
.led-item {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding-inline: 34px;
    font: 800 clamp(26px, 3.4vw, 44px)/1 'Changa', sans-serif;
    color: #8FD3A6;
    text-shadow: 0 0 18px rgba(143, 211, 166, .55);
    white-space: nowrap;
}
.led-line { color: rgb(255, 236, 186); text-shadow: 0 0 18px rgba(255, 236, 186, .5); }
.led-lit .led-item { color: rgb(255, 236, 186); text-shadow: 0 0 18px rgba(255, 236, 186, .5); }
.led-lit .led-line { color: #8FD3A6; text-shadow: 0 0 18px rgba(143, 211, 166, .55); }

/* ── Booking demo ────────────────────────────────────── */
.demo { position: relative; padding-block: clamp(80px, 12vw, 150px); overflow: clip; }
.demo-stage {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 420px);
    justify-content: center;
    align-items: center;
    gap: clamp(28px, 6vw, 90px);
}
.phone {
    position: relative;
    border-radius: 44px;
    padding: 12px;
    background: linear-gradient(160deg, #26332C, #0B140F);
    box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08), 0 0 80px -30px rgba(var(--flood), .35);
}
.phone-notch { position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 92px; height: 24px; border-radius: 20px; background: #000; z-index: 2; }
.phone-screen {
    position: relative;
    border-radius: 34px;
    background: #0A1711;
    color: #EEF3EA;
    padding: 52px 16px 18px;
    min-height: 600px;
    overflow: hidden;
}
.app-venue { font: 700 20px/1.2 'Changa', sans-serif; }
.app-place { font-size: 13px; color: #8AA095; }
.app-court {
    position: relative;
    height: 86px;
    margin-block: 14px 6px;
    border-radius: 14px;
    background: var(--c, #0F4D2A);
    transition: background-color .5s;
    overflow: hidden;
}
.app-court span { position: absolute; inset: 12px 16px; border: 1.5px solid rgba(255, 255, 255, .75); border-radius: 2px; }
.app-court span::before { content: ""; position: absolute; inset: 0 50%; border-inline-start: 1.5px solid rgba(255, 255, 255, .75); }
.app-court[data-demo-court="football"] { --c: #1E6B3C; }
.app-court[data-demo-court="padel"] { --c: #2B5C93; }
.app-court[data-demo-court="basketball"] { --c: #9A6634; }
.app-court[data-demo-court="tennis"] { --c: #2D5F86; }
.app-court[data-demo-court="volleyball"] { --c: #A88A57; }
.app-label { margin-top: 12px; margin-bottom: 6px; font-size: 12.5px; color: #8AA095; }
.chips, .days, .slots { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .day, .slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(238, 243, 234, .14);
    border-radius: 999px;
    background: transparent;
    color: #D7E1DA;
    font: 400 12.5px/1 'Readex Pro', sans-serif;
    cursor: pointer;
    transition: background-color .25s, color .25s, border-color .25s, transform .2s;
}
.chip { min-height: 32px; padding: 4px 10px; }
.day { flex-direction: column; gap: 3px; width: calc((100% - 24px) / 5); min-height: 50px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.day small { font-size: 10.5px; font-weight: 400; color: inherit; opacity: .75; }
.slot { width: calc((100% - 12px) / 3); min-height: 40px; border-radius: 10px; flex-direction: column; gap: 2px; }
.slot small { font-size: 9.5px; opacity: .8; }
.slot:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.chip.is-on, .day.is-on, .slot.is-on { background: #EEF3EA; color: #0B3A24; border-color: #EEF3EA; }
.chip:active, .day:active, .slot:not(:disabled):active { transform: scale(.94); }
.app-book {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 50px;
    margin-top: 16px;
    padding: 8px 18px;
    border: 0;
    border-radius: 16px;
    background: #1F7A45;
    color: #fff;
    font: 600 15px/1 'Readex Pro', sans-serif;
    cursor: pointer;
    transition: opacity .25s, transform .2s;
}
.app-book:disabled { opacity: .4; cursor: not-allowed; }
.app-book:not(:disabled):active { transform: scale(.97); }
.app-price { font-weight: 400; direction: ltr; }
.app-done {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    background: radial-gradient(circle at 50% 40%, #145232, #0A1711 70%);
}
.app-done svg { width: 84px; height: 84px; fill: none; stroke: #8FD3A6; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.app-done-title { font: 800 30px/1.1 'Changa', sans-serif; }
.app-done-line { color: #B9C8BF; font-size: 14px; }
.app-again { margin-top: 10px; min-height: 40px; padding: 6px 18px; border-radius: 999px; border: 1px solid rgba(238, 243, 234, .3); background: transparent; color: #EEF3EA; font: 500 13px/1 'Readex Pro', sans-serif; cursor: pointer; }

.board-panel {
    position: relative;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid var(--line-strong);
    background: var(--raise);
}
.bp-head { display: flex; justify-content: space-between; align-items: center; font: 600 17px/1.3 'Changa', sans-serif; }
.bp-live { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 'Readex Pro', sans-serif; color: var(--ink-2); }
.bp-live i { width: 8px; height: 8px; border-radius: 50%; background: #3FD07A; box-shadow: 0 0 0 0 rgba(63, 208, 122, .6); animation: live 2s ease-out infinite; }
.bp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 18px; }
.bp-stats div { padding: 14px; border-radius: 14px; border: 1px solid var(--line); }
.bp-stats small { display: block; font-size: 12.5px; color: var(--ink-3); }
.bp-stats b { display: block; margin-top: 4px; font: 600 28px/1.1 'Readex Pro', sans-serif; font-variant-numeric: tabular-nums; direction: ltr; text-align: end; }
[dir="ltr"] .bp-stats b { text-align: start; }
.bp-stats em { font-size: 13px; font-style: normal; color: var(--ink-3); }
.bp-label { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.bp-list li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    align-items: center;
    padding-block: 11px;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}
.bp-list li.is-new { background: linear-gradient(90deg, transparent, rgba(63, 208, 122, .12), transparent); }
.paid { padding: 3px 10px; border-radius: 999px; background: rgba(63, 208, 122, .14); color: #6FDC9A; font-size: 12px; }
[data-theme="light"] .paid { color: #0F4D2A; }
.bp-toast {
    position: absolute;
    top: -18px;
    inset-inline-end: 18px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgb(255, 236, 186);
    color: #1D1A0E;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 12px 30px -10px rgba(255, 236, 186, .6);
}
.demo-note { margin-top: 28px; text-align: center; font-size: 13px; color: var(--ink-3); }
.demo .hero-actions { margin-top: 18px; }
.tapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .28);
    border: 2px solid rgba(255, 255, 255, .85);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .08);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

@media (max-width: 860px) {
    .demo-stage { grid-template-columns: minmax(0, 360px); }
    .board-panel { max-width: 360px; width: 100%; margin-inline: auto; }
    .phone-screen { min-height: 0; }
}

/* ── Phone refinements ───────────────────────────────── */
@media (max-width: 560px) {
    .hero { padding-top: 104px; min-height: 0; }
    .hero-title { font-size: clamp(40px, 11.5vw, 52px); }
    .hero-sub { font-size: 16px; margin-top: 18px; }
    .hero-actions { margin-top: 24px; }
    .hero-stage { height: 100%; }
    .pitch-frame { inset-inline: -55%; top: auto; bottom: -6%; height: 62%; }
    .sports { margin-top: 26px; gap: 6px; }
    .sport { min-height: 36px; padding: 5px 11px; font-size: 13px; }
    .hero-shot { margin-top: 40px; }
    .board { grid-template-columns: 1fr 1fr; }
    .board-cell { padding: 18px 14px; }
    .board-icon { width: 38px; height: 38px; margin-bottom: 12px; }
    .board-cell h3 { font-size: 16.5px; }
    .board-cell p { font-size: 13px; line-height: 1.6; }
    .halves-field { padding: 26px 18px; gap: 48px; }
    .half + .half { padding-top: 40px; }
    .led-item { padding-inline: 22px; gap: 10px; }
}

.fleck {
    position: absolute;
    top: 0;
    left: 0;
    width: 7px;
    height: 3px;
    border-radius: 2px;
    background: #EEF3EA;
    pointer-events: none;
    z-index: 6;
}

/* ── Capacity explainer: a venue and the courts inside it ── */
.cap {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    margin-bottom: clamp(48px, 7vw, 88px);
    padding: clamp(24px, 3.4vw, 44px);
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background:
        radial-gradient(60% 80% at 85% 10%, rgba(var(--flood), .09), transparent 70%),
        var(--raise);
}
.cap-eyebrow { color: var(--lit); font-size: 14px; font-weight: 500; }
.cap-title { margin-top: 8px; font: 700 clamp(24px, 2.6vw, 34px)/1.3 'Changa', 'Readex Pro', sans-serif; color: var(--ink); }
.cap-sub { margin-top: 12px; color: var(--ink-2); font-size: 15.5px; line-height: 1.8; }
.cap-legend { display: grid; gap: 10px; margin-top: 26px; }
.cap-key {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: default;
    transition: border-color .35s, background-color .35s, transform .35s;
}
.cap-key strong { display: block; color: var(--ink); font-weight: 600; font-size: 16px; }
.cap-key > span:last-child > span { display: block; margin-top: 2px; color: var(--ink-3); font-size: 14px; line-height: 1.7; }
.cap-key-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--line);
    color: var(--ink-2);
    transition: background-color .35s, color .35s;
}
.cap-key.is-on { border-color: color-mix(in srgb, var(--lit) 55%, transparent); background: color-mix(in srgb, var(--lit) 7%, transparent); }
.cap-key.is-on .cap-key-icon { background: var(--lit); color: var(--bg, #07130D); }
[data-theme="light"] .cap-key.is-on .cap-key-icon { color: #fff; }

.cap-stage { margin: 0; position: relative; }
.cap-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cap-svg text { font: 500 13px 'Readex Pro', sans-serif; }
.cap-ground { fill: #0B2416; }
[data-theme="light"] .cap-ground { fill: #DCEED5; }
.cap-fence { fill: none; stroke: rgb(var(--flood)); stroke-width: 2.5; stroke-dasharray: 2 0; }
.cap-chip { fill: rgb(var(--flood)); }
.cap-venue-label text { fill: #1D1A0E; font-weight: 600; }
[data-theme="light"] .cap-fence { stroke: var(--turf); }
[data-theme="light"] .cap-chip { fill: var(--turf); }
[data-theme="light"] .cap-venue-label text { fill: #fff; }
[data-theme="light"] .plan-venue { border-color: var(--turf); }
[data-theme="light"] .is-featured .plan-venue i { background: var(--turf); }
.cap-court { stroke: rgba(0, 0, 0, .25); stroke-width: 1; }
.cap-f-a { fill: #1C5E36; }
.cap-f-b { fill: #19552F; }
.cap-sport rect { fill: rgba(7, 19, 13, .55); stroke: rgb(var(--flood)); stroke-width: 1.5; }
.cap-sport text { fill: #EEF3EA; font-weight: 600; }
.cap-sport circle { fill: #EEF3EA; }
.cap-sport path { fill: #0E1A14; }
[data-theme="light"] .cap-sport rect { fill: #fff; stroke: var(--turf); }
[data-theme="light"] .cap-sport text { fill: var(--turf); }
[data-theme="light"] .cap-sport circle { fill: var(--turf); }
[data-theme="light"] .cap-sport path { fill: #fff; }
.cap-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px dashed var(--line-strong);
    color: var(--ink-2, var(--ink));
    font-size: 14px;
    line-height: 1.7;
}
.cap-note svg { flex: none; margin-top: 3px; color: var(--lit); }
.cap-lines { fill: none; stroke: rgba(238, 243, 234, .75); stroke-width: 2; }
.cap-tag rect { fill: rgba(7, 19, 13, .78); }
.cap-tag text { fill: #EEF3EA; font-size: 12px; }
.cap-area { transition: opacity .35s, filter .35s; }
.cap-booked rect { fill: #EEF3EA; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.cap-booked circle { fill: #2F9A5C; }
.cap-booked { pointer-events: none; }
.cap-booked text { fill: #0E1A14; font-size: 12px; font-weight: 600; }

/* Pointing at a legend row lights its layer and dims the rest. */
.cap[data-focus="venue"] .cap-area { opacity: .35; }
.cap[data-focus="venue"] .cap-fence { stroke-width: 4; }
.cap[data-focus="area"] .cap-area { filter: drop-shadow(0 0 10px rgba(var(--flood), .55)); }
.cap[data-focus="area"] .cap-venue-label { opacity: .4; }

.cap-sum { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.cap-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 500;
}
.cap-pill-venue { background: rgba(var(--flood), .14); }
.cap-pill-area { background: color-mix(in srgb, var(--lit) 14%, transparent); }
.cap-plus { color: var(--ink-3); font-size: 18px; }

/* ── Plan cards: a mini map of venues and their courts ── */
.plan-map { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; min-height: 30px; }
.plan-venue {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 5px;
    border: 1.5px solid rgba(var(--flood), .7);
    border-radius: 7px;
    max-width: 74px;
}
.plan-venue i { width: 11px; height: 16px; border-radius: 2px; background: var(--lit); opacity: .9; }
.is-featured .plan-venue i { background: rgb(var(--flood)); }
.plan-limits { gap: 12px; }
.plan-limit { display: flex; gap: 10px; align-items: flex-start; }
.plan-limit svg { flex: none; margin-top: 2px; color: var(--lit); }
.plan-limit b { display: block; font-weight: 500; color: var(--ink); }
.plan-limit small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }

@media (max-width: 960px) {
    /* Phones and tablets: title, then the drawing, then what each word means. */
    .cap { grid-template-columns: 1fr; row-gap: 0; }
    .cap-copy { display: contents; }
    .cap-stage { order: 1; margin-top: 26px; }
    .cap-legend { order: 2; }
    .cap-note { order: 3; }
}
@media (max-width: 560px) {
    .cap { padding: 20px 16px; border-radius: 18px; }
    .cap-venue-label text { font-size: 15px; }
    .cap-tag { display: none; }
    .cap-key { padding: 12px; }
}
