/* ==========================================================================
   AURA Athlete Coach — Enriched Minimal Design System (site.css)
   Single source of truth for EN (LTR) and AR (RTL). Zero !important hacks.
   ========================================================================== */

:root {
    --bg: #0a0d12;
    --bg-elevated: #11161d;
    --bg-recessed: #070a0e;
    --surface: #151c26;
    --border: #1f2733;
    --border-strong: #2c3748;
    --text: #f3f5f8;
    --text-muted: #97a3b4;
    --text-subtle: #647084;
    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-soft: rgba(16, 185, 129, 0.12);
    --cyan: #2fd6e8;
    --cyan-soft: rgba(47, 214, 232, 0.12);
    --rose: #f43f5e;
    --rose-soft: rgba(244, 63, 94, 0.12);
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.14);

    --font-sans: "Inter", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --container: 1180px;
    --container-narrow: 780px;
    --nav-h: 66px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 20px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    background:
        radial-gradient(ellipse 80% 45% at 50% -8%, rgba(16, 185, 129, 0.11), transparent 70%),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

img,
svg,
canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
    color: inherit;
}

.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* Accessibility skip link */
.skip-link {
    position: absolute;
    inset-block-start: -100px;
    inset-inline-start: 16px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--accent);
    color: #04130d;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    inset-block-start: 12px;
}

/* ==========================================================================
   Layout & Typography
   ========================================================================== */

.container {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.container-narrow {
    width: min(var(--container-narrow), calc(100% - 40px));
}

.section {
    padding-block: clamp(68px, 9vw, 116px);
    border-block-start: 1px solid var(--border);
}

.section-head {
    max-width: 700px;
    margin-block-end: clamp(36px, 5vw, 56px);
}

.eyebrow {
    margin: 0 0 12px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

html[dir="rtl"] .eyebrow {
    letter-spacing: 0;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text);
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
    letter-spacing: 0;
    line-height: 1.28;
}

h1 {
    font-size: clamp(2.25rem, 4.6vw, 3.65rem);
}

h1 span {
    display: block;
}

h1 .accent {
    color: var(--accent);
}

h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}

h3 {
    font-size: clamp(1.12rem, 1.55vw, 1.32rem);
}

.section-sub {
    margin: 14px 0 0;
    font-size: 1.03rem;
    color: var(--text-muted);
    max-width: 62ch;
}

.lead {
    margin: 20px 0 0;
    font-size: clamp(1.03rem, 1.35vw, 1.16rem);
    color: var(--text-muted);
    max-width: 56ch;
}

/* ==========================================================================
   Buttons & Dots
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: #04130d;
    font-size: 0.94rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    background: var(--surface);
    border-color: var(--text-subtle);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.86rem;
}

.btn-block {
    width: 100%;
}

.dot-emerald,
.dot-cyan,
.dot-rose,
.dot-amber {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-emerald {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.dot-cyan {
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(47, 214, 232, 0.6);
}

.dot-rose {
    background: var(--rose);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.6);
}

.dot-amber {
    background: var(--amber);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

/* ==========================================================================
   Navigation Header
   ========================================================================== */

.nav {
    position: sticky;
    inset-block-start: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(10, 13, 18, 0.84);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-block-end: 1px solid var(--border);
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.04em;
}

.brand img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.brand-tag {
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-lang {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-lang:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

@media (max-width: 920px) {
    .nav-links {
        display: none;
    }
}

@media (max-width: 480px) {
    .brand-tag {
        display: none;
    }
}

/* ==========================================================================
   1 · Hero + System Pillars + Floating Telemetry HUD
   ========================================================================== */

.hero {
    padding-block: clamp(44px, 7vw, 88px) clamp(56px, 8vw, 96px);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    align-items: center;
    gap: clamp(32px, 5vw, 64px);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    margin-block-end: 18px;
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* 3 System Pillars */
.hero-pillars {
    margin-block-start: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pillar-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.pillar-chip:hover {
    border-color: rgba(16, 185, 129, 0.45);
    background: var(--surface);
    transform: translateY(-2px);
}

.pillar-code {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.pillar-chip strong {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.pillar-chip small {
    font-size: 0.76rem;
    color: var(--text-subtle);
}

.hero-actions {
    margin-block-start: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-note {
    margin: 14px 0 0;
    font-size: 0.82rem;
    color: var(--text-subtle);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-inline: 24px;
}

.hud-card {
    position: absolute;
    z-index: 4;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: rgba(17, 22, 29, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.75);
    min-width: 215px;
}

.hud-top {
    inset-block-start: 10%;
    inset-inline-start: -24px;
}

.hud-bottom {
    inset-block-end: 12%;
    inset-inline-end: -24px;
}

.hud-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
    margin-block-end: 4px;
}

.hud-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hud-row strong {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    color: var(--text);
}

.hud-tag {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
}

/* Hardware Phone Frame */
.phone {
    position: relative;
    width: min(300px, 78vw);
    aspect-ratio: 1080 / 2348;
    border-radius: 38px;
    padding: 9px;
    background: linear-gradient(160deg, #242e3d 0%, #10151d 100%);
    border: 1px solid var(--border-strong);
    box-shadow:
        0 28px 68px -18px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
}

.phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .lead {
        margin-inline: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-pillars {
        text-align: start;
    }
}

@media (max-width: 640px) {
    .hero-pillars {
        grid-template-columns: 1fr;
    }

    .hud-card {
        display: none;
    }
}

/* ==========================================================================
   2 · Proof Strip
   ========================================================================== */

.proof {
    padding-block: 30px;
    border-block-start: 1px solid var(--border);
    background: var(--bg-elevated);
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.proof-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.proof-item strong {
    font-size: clamp(1.35rem, 2.1vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.proof-item span {
    font-size: 0.87rem;
    color: var(--text-muted);
}

@media (max-width: 780px) {
    .proof-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .proof-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   3 · Interactive Daily Decision Simulator (#simulator)
   ========================================================================== */

.sim-shell {
    padding: clamp(22px, 3.2vw, 34px);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.sim-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-block-end: 26px;
    padding-block-end: 20px;
    border-block-end: 1px solid var(--border);
}

.sim-preset {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.sim-preset:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.sim-preset.is-active {
    background: var(--surface);
    color: var(--text);
    border-color: var(--accent);
}

.sim-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
    align-items: stretch;
}

.sim-panel {
    padding: 22px;
    border-radius: var(--radius-md);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
}

.sim-gauge-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sim-ring-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    flex-shrink: 0;
}

.sim-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.sim-ring-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 9;
}

.sim-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 9;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s ease, stroke 0.35s ease;
}

.sim-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sim-ring-label strong {
    font-family: var(--font-mono);
    font-size: 1.38rem;
    line-height: 1.1;
}

.sim-ring-label span {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
}

.sim-zone-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    margin-block-end: 6px;
}

.sim-zone-badge.is-steady {
    background: var(--cyan-soft);
    color: var(--cyan);
}

.sim-zone-badge.is-protect {
    background: var(--amber-soft);
    color: var(--amber);
}

.sim-gauge-copy h3 {
    font-size: 1.08rem;
    margin-block-end: 4px;
}

.sim-gauge-copy p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.sim-sliders {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sim-slider {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sim-slider-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sim-slider-top strong {
    color: var(--text);
    font-size: 0.9rem;
}

.sim-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--border-strong);
    outline: none;
    cursor: pointer;
}

.sim-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    cursor: pointer;
}

.sim-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
    cursor: pointer;
}

.companion-brief {
    padding: 18px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.companion-brief-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-block-end: 10px;
}

.companion-orb {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-soft);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.companion-brief-head h4 {
    font-size: 1rem;
}

.companion-quote {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.sim-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sim-out-card {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sim-out-card strong {
    font-size: 0.96rem;
    color: var(--text);
}

.sim-out-card small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .sim-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .sim-gauge-row {
        flex-direction: column;
        text-align: center;
    }

    .sim-cards-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   4 · Live Pulse Telemetry Dashboard (#pulse)
   ========================================================================== */

.pulse-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.pulse-card {
    padding: 24px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.pulse-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pulse-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.live-dot-rose {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rose);
    box-shadow: 0 0 10px var(--rose);
}

.pulse-badge {
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Card 1: Heart Rate & EKG */
.hr-readout {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.hr-bpm {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--rose);
}

.hr-unit {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-inline-start: 4px;
}

.hr-meta {
    font-size: 0.74rem;
    color: var(--text-subtle);
}

.ekg-well {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
}

.ekg-well-top {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-subtle);
    margin-block-end: 8px;
}

#ekg-canvas {
    width: 100%;
    height: 64px;
}

.zones-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zones-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
}

.zones-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.zone-btn {
    padding: 8px 0;
    border-radius: 8px;
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.zone-btn:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.zone-btn.is-active {
    background: var(--rose-soft);
    border-color: var(--rose);
    color: var(--rose);
}

/* Card 2: Concentric Rings */
.rings-wrap {
    position: relative;
    width: 176px;
    height: 176px;
    margin-inline: auto;
}

.rings-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 11;
}

.ring-stroke {
    fill: none;
    stroke-width: 11;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.4s ease;
}

.ring-emerald {
    stroke: var(--accent);
}

.ring-cyan {
    stroke: var(--cyan);
}

.ring-rose {
    stroke: var(--rose);
}

.rings-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.rings-center strong {
    font-size: 1.35rem;
    line-height: 1.1;
}

.rings-center span {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-subtle);
    letter-spacing: 0.05em;
}

.rings-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ring-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 11px;
    border-radius: 8px;
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.ring-row:hover,
.ring-row.is-active {
    border-color: var(--border-strong);
    color: var(--text);
}

.ring-key {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Card 3: 7-Day Biometric Trends */
.trend-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px;
    border-radius: var(--radius-sm);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
}

.trend-tab {
    padding: 7px 8px;
    border-radius: 7px;
    background: transparent;
    border: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.trend-tab.is-active {
    background: var(--surface);
    color: var(--accent);
}

.trend-well {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
}

.trend-y {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 108px;
    font-size: 0.68rem;
    color: var(--text-subtle);
}

.trend-canvas {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trend-svg {
    width: 100%;
    height: 108px;
    overflow: visible;
}

.trend-grid-line {
    stroke: var(--border);
    stroke-dasharray: 3 3;
    stroke-width: 1;
}

.trend-days {
    display: flex;
    justify-content: space-between;
    padding-inline: 8px;
    font-size: 0.68rem;
    color: var(--text-subtle);
}

.trend-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.trend-summary strong {
    color: var(--accent);
}

@media (max-width: 980px) {
    .pulse-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   5 · 9-Module Interactive App Ecosystem (#ecosystem)
   ========================================================================== */

.story-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}

.story-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.story-step {
    padding: 20px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.story-step:hover {
    border-color: var(--border-strong);
}

.story-step.is-active {
    background: var(--surface);
    border-color: var(--accent);
}

.step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block-end: 6px;
}

.step-index {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--accent);
}

.step-tag {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

.story-step h3 {
    margin-block-end: 6px;
}

.story-step p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.story-shot {
    display: none;
    margin-block-start: 18px;
    border-radius: 22px;
    border: 1px solid var(--border-strong);
}

.story-visual {
    position: sticky;
    inset-block-start: calc(var(--nav-h) + 28px);
    display: flex;
    justify-content: center;
}

.story-phone-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.story-visual .phone {
    position: relative;
}

.story-visual .phone img {
    position: absolute;
    inset: 9px;
    width: calc(100% - 18px);
    height: calc(100% - 18px);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

.story-visual .phone img.is-active {
    opacity: 1;
}

.story-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: var(--radius-pill);
    background: var(--border-strong);
    border: 0;
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.story-dot.is-active {
    width: 24px;
    background: var(--accent);
}

@media (max-width: 900px) {
    .story-grid {
        grid-template-columns: 1fr;
    }

    .story-visual {
        display: none;
    }

    .story-step {
        cursor: default;
    }

    .story-shot {
        display: block;
        width: min(290px, 100%);
        margin-inline: auto;
    }
}

/* ==========================================================================
   6 · Deep-Look Bento Grid + Interactive Science Models (#features)
   ========================================================================== */

.bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(24px, 3vw, 32px);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    overflow: hidden;
}

.tile-lg {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 32px;
}

.tile-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-block-end: 8px;
}

.tile-copy h3 {
    margin-block-end: 8px;
}

.tile-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.chip-row {
    margin-block-start: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.tile-shot {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    max-height: 320px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    padding: 18px 18px 0;
}

.tile-shot img {
    width: min(230px, 100%);
    border-start-start-radius: 20px;
    border-start-end-radius: 20px;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.5);
}

/* Interactive Science & Privacy Tile */
.tile-science {
    grid-template-columns: 1.35fr 0.65fr;
    align-items: stretch;
}

.science-pills {
    margin-block: 16px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sci-pill {
    padding: 7px 13px;
    border-radius: var(--radius-pill);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.sci-pill:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.sci-pill.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.sci-card {
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
}

.sci-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block-end: 8px;
}

.sci-card-top strong {
    font-size: 0.95rem;
    color: var(--text);
}

.sci-card-top code {
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 0.8rem;
}

.sci-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.privacy-box {
    padding: 22px;
    border-radius: var(--radius-md);
    background: var(--bg-recessed);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.tile-icon {
    color: var(--accent);
}

.privacy-box h4 {
    font-size: 1.05rem;
}

@media (max-width: 860px) {
    .bento {
        grid-template-columns: 1fr;
    }

    .tile-lg,
    .tile-science {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   7 · Pricing + Expandable Tier Matrix (#pricing)
   ========================================================================== */

.currency {
    display: inline-flex;
    padding: 4px;
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    margin-block-end: 28px;
}

.currency button {
    padding: 7px 16px;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

html[data-currency="usd"] .currency button[data-currency-set="usd"],
html[data-currency="egp"] .currency button[data-currency-set="egp"] {
    background: var(--surface);
    color: var(--text);
}

html[data-currency="egp"] .usd-only {
    display: none;
}

html[data-currency="usd"] .egp-only {
    display: none;
}

.plans {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 20px;
    align-items: stretch;
}

.plan {
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 3.2vw, 34px);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.plan-pro {
    border-color: rgba(16, 185, 129, 0.45);
    background:
        radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.1), transparent 55%),
        var(--bg-elevated);
}

.plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 600;
}

.badge-muted {
    background: var(--surface);
    color: var(--text-muted);
}

.plan-price {
    margin: 18px 0 22px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price {
    font-size: clamp(2rem, 3.4vw, 2.65rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.price-was {
    font-size: 1.1rem;
    color: var(--text-subtle);
}

.per {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checks {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.privacy-box .checks {
    margin: 0;
}

.checks-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 18px;
}

.checks li {
    position: relative;
    padding-inline-start: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checks li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    color: var(--accent);
    font-weight: 700;
}

/* Expandable Tier Matrix Drawer */
.matrix-drawer {
    margin-block-start: 20px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    overflow: hidden;
}

.matrix-drawer summary {
    list-style: none;
    padding: 16px 22px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.matrix-drawer summary::-webkit-details-marker {
    display: none;
}

.matrix-drawer summary::after {
    content: "+";
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--accent);
}

.matrix-drawer[open] summary::after {
    content: "−";
}

.matrix-table-wrap {
    overflow-x: auto;
    border-block-start: 1px solid var(--border);
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: start;
}

.matrix-table th,
.matrix-table td {
    padding: 13px 22px;
    border-block-end: 1px solid var(--border);
}

.matrix-table th {
    background: var(--bg-recessed);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.matrix-table tbody tr:last-child td {
    border-block-end: 0;
}

.cell-pro {
    color: var(--accent);
    font-weight: 600;
}

.fine {
    margin-block-start: 18px;
    font-size: 0.8rem;
    color: var(--text-subtle);
}

@media (max-width: 860px) {
    .plans {
        grid-template-columns: 1fr;
    }

    .checks-2col {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   8 · FAQ Accordion
   ========================================================================== */

.faq {
    display: flex;
    flex-direction: column;
    border-block-start: 1px solid var(--border);
}

.faq details {
    border-block-end: 1px solid var(--border);
    padding-block: 18px;
}

.faq summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.18s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details p {
    margin: 12px 0 4px;
    color: var(--text-muted);
    font-size: 0.94rem;
    max-width: 65ch;
}

/* ==========================================================================
   9 · Final CTA & Footer
   ========================================================================== */

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: clamp(28px, 4.5vw, 48px);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.cta-sub {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer {
    padding-block: 32px;
    border-block-start: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-subtle);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a:hover {
    color: var(--text);
}

/* ==========================================================================
   Progressive Reveal Animation
   ========================================================================== */

html.js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    html.js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
