/* =========================================================
   El Coach Nour. Coming soon: the Plan Composer.
   A calm coaching instrument in light and dark. One teal light
   means "yours": the visitor's choices, their plan, their send.
   The coach photo column stays dark in both themes.
   ========================================================= */

@font-face { font-family: "Big Shoulders Display"; src: url("../fonts/bigshoulders-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* Zahra Arabic ships one weight; the full range stops faux bold. */
@font-face { font-family: "Zahra Arabic"; src: url("../fonts/zahra-arabic.otf") format("opentype"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E; }
@font-face { font-family: "Readex Pro"; src: url("../fonts/readex-arabic.woff2") format("woff2"); font-weight: 160 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E; }

/* ---------- theme tokens ---------- */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0d0f;
  --card: #15171a;
  --card-2: #1c1f23;
  --card-3: #23272c;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.15);
  --text: #f0f1f2;
  --text-2: #a7abb1;
  --text-3: #868b93;
  --teal: #3ad6c4;
  --teal-hot: #5fe3d4;
  --teal-ink: #3ad6c4;          /* teal used as text or icon */
  --teal-soft: rgb(58 214 196 / 0.1);
  --teal-line: rgb(58 214 196 / 0.28);
  --on-teal: #04211d;
  --carb: #8a93a0;
  --fat: #4b525c;
  --err: #ff8a7a;
  --cta-hover: #ffffff;
  --shadow: 0 40px 80px -30px rgb(0 0 0 / 0.85);
  --shadow-sm: 0 14px 30px -18px rgb(0 0 0 / 0.9);
  --gold: #d4b04a;
  --silver: #aeb5bd;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f2;
  --card: #ffffff;
  --card-2: #f4f6f8;
  --card-3: #e2e6ea;
  --line: rgb(16 20 24 / 0.09);
  --line-2: rgb(16 20 24 / 0.17);
  --text: #12161a;
  --text-2: #4a525b;
  --text-3: #69717a;
  --teal: #2fc4b2;
  --teal-hot: #3ad6c4;
  --teal-ink: #0b7f72;
  --teal-soft: rgb(47 196 178 / 0.12);
  --teal-line: rgb(11 127 114 / 0.3);
  --on-teal: #04211d;
  --carb: #a9b2bd;
  --fat: #5d6670;
  --err: #c2412f;
  --cta-hover: #000000;
  --shadow: 0 30px 60px -30px rgb(20 30 40 / 0.28);
  --shadow-sm: 0 12px 24px -16px rgb(20 30 40 / 0.3);
  --gold: #a8841c;
  --silver: #7c848d;
}
:root {
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  --gut: clamp(16px, 3vw, 40px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --display: "Big Shoulders Display", "Zahra Arabic", sans-serif;
  --body: "Archivo", "Zahra Arabic", system-ui, sans-serif;
  --ar: "Zahra Arabic", "Readex Pro", system-ui, sans-serif;
}
/* Zahra draws small: lift the whole Arabic page. */
html[lang="ar"] { font-size: 112.5%; }
/* a soft crossfade while the theme changes */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease, fill 300ms ease !important; }

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; background: var(--bg); scrollbar-color: var(--card-3) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); line-height: 1.55; -webkit-font-smoothing: antialiased; caret-color: var(--teal-ink); }
html[lang="ar"] body { font-family: var(--ar); }
::selection { background: var(--teal); color: var(--on-teal); }
img, svg { display: block; max-width: 100%; }
svg { fill: currentColor; }
a { color: inherit; }
button, input, output { font: inherit; color: inherit; }
a, button, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 3px; border-radius: var(--r-sm); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; inset-inline-start: 16px; z-index: 60; padding: 10px 14px; border-radius: var(--r-sm); background: var(--teal); color: var(--on-teal); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* =========================================================
   LAYOUT
   ========================================================= */
.page { display: grid; grid-template-columns: 1fr; min-height: 100svh; }

/* ---- coach column: a dark island in both themes ---- */
.coach { --text: #f0f1f2; --text-2: #c7cacf; --line-2: rgb(255 255 255 / 0.18); color-scheme: dark; color: var(--text); background: #0c0d0f; position: relative; min-height: 50svh; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; }
.coach__photo { position: absolute; inset: -3%; z-index: -2; will-change: transform; }
.coach__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.coach::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(12 13 15 / 0.55), rgb(12 13 15 / 0) 26%, rgb(12 13 15 / 0.15) 55%, #0c0d0f); }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) var(--gut) 16px; }
.brand { display: flex; align-items: baseline; gap: 8px; font-family: "Big Shoulders Display", sans-serif; font-weight: 900; font-size: 1.25rem; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; }
.brand small { font-family: var(--ar); font-weight: 400; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--text-2); }
.topbar__actions { display: flex; gap: 6px; }
.chip { display: inline-flex; align-items: center; justify-content: center; height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgb(12 13 15 / 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer; text-decoration: none; font-family: var(--ar); font-size: 1rem; transition: transform 140ms var(--ease-out), border-color 160ms ease; user-select: none; }
html[lang="ar"] .chip { font-family: "Archivo", sans-serif; font-size: 0.875rem; font-weight: 500; }
.chip--icon { padding: 0; }
.chip--icon svg { width: 19px; height: 19px; }
.chip:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: rgb(255 255 255 / 0.4); } }
[data-theme="dark"] #themeToggle .ico-moon, [data-theme="light"] #themeToggle .ico-sun { display: none; }
#themeToggle svg { transition: transform 500ms var(--spring); }
#themeToggle:active svg { transform: rotate(-30deg); }

.headline { padding: 0 var(--gut) 24px; }
.headline h1 { margin: 0; max-width: 12ch; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.6rem, 10vw, 5.5rem); line-height: 0.9; text-wrap: balance; }
html[lang="ar"] .headline h1 { font-family: var(--ar); font-weight: 400; text-transform: none; font-size: clamp(2.3rem, 8vw, 4.4rem); line-height: 1.25; max-width: 14ch; }
.headline p { margin: 12px 0 0; max-width: 42ch; color: var(--text-2); font-size: clamp(1rem, 1.2vw, 1.0625rem); text-wrap: pretty; }

/* ---- composer column ---- */
.composer { display: grid; align-content: center; justify-items: center; gap: 16px; padding: 18px 14px calc(44px + env(safe-area-inset-bottom)); perspective: 1400px; }
.flipper { display: grid; width: min(100%, 500px); transform-style: preserve-3d; will-change: transform; }
.face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face--back { transform: rotateY(180deg); }
.card { display: grid; gap: 14px; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), var(--shadow); }
.card__head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transform: scale(1.6); transform-origin: 52% 28%; }
.who { display: grid; gap: 1px; font-size: 0.8125rem; color: var(--text-2); }
.who b { color: var(--text); font-weight: 600; font-size: 0.9375rem; }
.sample { margin-inline-start: auto; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.6875rem; font-weight: 600; color: var(--text-3); white-space: nowrap; }

.block { display: grid; gap: 6px; min-width: 0; }
.block__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-3); }
html[lang="ar"] .label { font-size: 0.8125rem; }
.hint { margin: 0; font-size: 0.75rem; color: var(--text-3); }
.hint--inline { font-size: 0.6875rem; }

/* ---- tabs: plan / body ---- */
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card-2); }
.tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border: 0; border-radius: var(--r-sm); background: none; cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--text-2); transition: color 220ms ease; user-select: none; }
html[lang="ar"] .tabs button { font-weight: 400; font-size: 0.9375rem; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button[aria-selected="true"] { color: var(--on-teal); }
.tabs__pill { position: absolute; top: 4px; bottom: 4px; inset-inline-start: 4px; width: calc((100% - 8px) / 2); border-radius: var(--r-sm); background: var(--teal); transition: transform 520ms var(--spring); }
.panels { display: grid; }
.panel { grid-area: 1 / 1; display: grid; gap: 14px; align-content: start; min-width: 0; transition: opacity 280ms ease, transform 420ms var(--ease-out), visibility 0s linear 0s; }
.panel:not(.is-active) { visibility: hidden; opacity: 0; transform: translateX(var(--off, 14px)); pointer-events: none; transition: opacity 200ms ease, transform 300ms var(--ease-out), visibility 0s linear 300ms; }
.nudge { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px dashed var(--line-2); background: transparent; cursor: pointer; color: var(--text-2); font-size: 0.8125rem; text-align: start; transition: border-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out); }
.nudge svg { width: 18px; height: 18px; flex: none; color: var(--teal-ink); }
.nudge .nudge__arrow { margin-inline-start: auto; width: 16px; height: 16px; transition: transform 300ms var(--ease-out); }
html[dir="rtl"] .nudge .nudge__arrow { transform: scaleX(-1); }
.nudge:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .nudge:hover { border-color: var(--teal-line); color: var(--text); } .nudge:hover .nudge__arrow { transform: translateX(3px); } html[dir="rtl"] .nudge:hover .nudge__arrow { transform: scaleX(-1) translateX(3px); } }

/* ---- goal deck ---- */
.deck-nav { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card-2); cursor: pointer; transition: transform 120ms var(--ease-out), border-color 160ms; user-select: none; }
.icon-btn svg { width: 14px; height: 14px; }
html[dir="rtl"] .icon-btn svg { transform: scaleX(-1); }
.icon-btn:active { transform: scale(0.92); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width 300ms var(--ease-out), background-color 200ms; }
.dots i.on { width: 16px; background: var(--teal); }
.deck { position: relative; height: 96px; margin-bottom: 12px; outline-offset: 6px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gcard { position: absolute; inset: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 16px; border: 1px solid var(--line-2); cursor: grab; background: linear-gradient(135deg, var(--teal-soft), transparent 55%), var(--card-2); box-shadow: var(--shadow-sm); transform-origin: 50% 120%; will-change: transform, opacity; }
.gcard:active { cursor: grabbing; }
.gcard svg { width: 34px; height: 34px; color: var(--teal-ink); }
.gcard h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.75rem; line-height: 1; text-transform: uppercase; }
html[lang="ar"] .gcard h3 { font-family: var(--ar); font-weight: 400; font-size: 1.5rem; line-height: 1.3; text-transform: none; }
.gcard p { margin: 4px 0 0; font-size: 0.8125rem; color: var(--text-2); }

/* ---- plan title + summary ---- */
.title { display: flex; flex-wrap: wrap; min-height: 2.25rem; font-family: var(--display); font-weight: 800; font-size: 2.25rem; line-height: 1; text-transform: uppercase; }
html[lang="ar"] .title { font-family: var(--ar); font-weight: 400; font-size: 1.875rem; line-height: 1.3; text-transform: none; }
.title .ch { display: inline-block; white-space: pre; animation: ch-in 520ms var(--ease-out) both; animation-delay: calc(var(--k) * 22ms); }
@keyframes ch-in { from { opacity: 0; transform: translateY(0.5em); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
.summary { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--teal-soft); border: 1px solid var(--teal-line); color: var(--text); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.pill-chip.bump { animation: bump 420ms var(--spring); }
@keyframes bump { 40% { transform: scale(1.08); } }

/* ---- week ---- */
.count { display: inline-flex; align-items: baseline; gap: 6px; font-size: 0.8125rem; color: var(--text-2); }
.ticker { display: inline-flex; justify-content: center; width: 1.2ch; height: 1.9rem; overflow: hidden; font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.9rem; line-height: 1.9rem; font-variant-numeric: tabular-nums; color: var(--text); }
.ticker__col { display: flex; flex-direction: column; transition: transform 600ms var(--spring); }
.ticker__col span { height: 1.9rem; text-align: center; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { position: relative; display: grid; align-content: space-between; justify-items: center; aspect-ratio: 1 / 1.05; padding: 5px 2px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card-2); cursor: pointer; overflow: hidden; isolation: isolate; color: var(--text-3); transition: color 200ms ease, border-color 200ms ease, transform 120ms var(--ease-out); user-select: none; }
.day::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--teal); transform: scale(0.4); opacity: 0; transition: transform 460ms var(--spring), opacity 200ms ease; }
.day .d { font-size: 0.75rem; font-weight: 600; }
.day .s { font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; opacity: 0; transform: translateY(4px); transition: opacity 260ms ease, transform 360ms var(--ease-out); }
html[lang="ar"] .day .s { font-size: 0.625rem; letter-spacing: 0; text-transform: none; font-weight: 400; }
.day[aria-pressed="true"] { color: var(--on-teal); border-color: transparent; }
.day[aria-pressed="true"]::after { transform: none; opacity: 1; }
.day[aria-pressed="true"] .s { opacity: 1; transform: none; }
.day:active { transform: scale(0.94); }
.day.deny { animation: deny 320ms var(--ease-out); }
@keyframes deny { 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
@media (hover: hover) and (pointer: fine) { .day[aria-pressed="false"]:hover { border-color: var(--line-2); color: var(--text-2); } }
.sessions { margin: 0; min-height: 1.3em; font-size: 0.8125rem; color: var(--text-2); }

/* ---- macro balance (two handles) ---- */
.mbar { position: relative; display: flex; gap: 3px; height: 48px; touch-action: none; user-select: none; -webkit-user-select: none; }
html[dir="rtl"] .mbar { direction: ltr; }
.seg { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 10px; overflow: hidden; border-radius: 12px; }
.seg .k { font-size: 0.6875rem; font-weight: 600; white-space: nowrap; opacity: 0.85; }
html[lang="ar"] .seg .k { font-size: 0.8125rem; font-weight: 400; }
.seg .v { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.375rem; line-height: 1; font-variant-numeric: tabular-nums; }
.seg--p { background: var(--teal); color: var(--on-teal); }
.seg--c { background: var(--carb); color: #0d1014; }
.seg--f { background: var(--fat); color: #f0f1f2; }
.handle { position: absolute; top: -6px; bottom: -6px; z-index: 2; width: 28px; margin-left: -14px; padding: 0; border: 0; background: transparent; cursor: ew-resize; display: grid; place-items: center; }
.handle::before { content: ""; width: 6px; height: 100%; border-radius: 6px; background: var(--text); box-shadow: 0 0 0 3px var(--card); transition: transform 160ms var(--ease-out); }
.handle.drag::before, .handle:active::before { transform: scaleX(1.6); }

/* ---- body panel: intake ---- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); }
.seg2--3 { grid-template-columns: repeat(3, 1fr); }
.seg2 button { height: 36px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); transition: background-color 220ms ease, color 220ms ease, transform 120ms var(--ease-out); user-select: none; }
html[lang="ar"] .seg2 button { font-weight: 400; font-size: 0.9375rem; }
.seg2 button[aria-checked="true"] { background: var(--teal); color: var(--on-teal); }
.seg2 button:active { transform: scale(0.96); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); }
.stepper button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; transition: transform 120ms var(--ease-out); user-select: none; }
.stepper button svg { width: 14px; height: 14px; }
.stepper button:active { transform: scale(0.92); }
.stepper__v { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.mini-out { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.range { --p: 35%; width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
html[dir="rtl"] .range { direction: ltr; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--teal) var(--p), var(--card-3) var(--p)); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--teal) var(--p), var(--card-3) var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 4px var(--card), 0 4px 10px rgb(0 0 0 / 0.35); transition: transform 140ms var(--ease-out); }
.range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 4px var(--card); }
.range:active::-webkit-slider-thumb { transform: scale(1.15); }
.chips { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 24px), transparent); padding-inline: 2px; position: relative; }
html[dir="rtl"] .chips { -webkit-mask-image: linear-gradient(270deg, transparent, #000 14px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(270deg, transparent, #000 14px, #000 calc(100% - 24px), transparent); }
.chips button { flex: none; display: grid; gap: 1px; min-width: 96px; padding: 7px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; text-align: start; scroll-snap-align: start; transition: background-color 220ms ease, border-color 220ms ease, transform 120ms var(--ease-out); user-select: none; }
.chips b { font-size: 0.8125rem; font-weight: 700; color: var(--text); }
html[lang="ar"] .chips b { font-weight: 400; font-size: 0.9375rem; }
.chips span { font-size: 0.6875rem; color: var(--text-3); }
.chips button[aria-checked="true"] { background: var(--teal); border-color: transparent; }
.chips button[aria-checked="true"] b, .chips button[aria-checked="true"] span { color: var(--on-teal); }
.chips button:active { transform: scale(0.97); }
.text { width: 100%; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); font: 400 16px "Archivo", "Zahra Arabic", sans-serif; outline: none; -webkit-appearance: none; appearance: none; transition: border-color 160ms ease; }
.text::placeholder { color: var(--text-3); }
.text:focus { border-color: var(--teal-ink); }

.results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { display: grid; gap: 1px; align-content: start; padding: 9px 10px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); min-width: 0; }
.stat__k { font-size: 0.6875rem; font-weight: 700; color: var(--text-3); }
.stat__v { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat__s { font-size: 0.625rem; color: var(--text-2); line-height: 1.3; }
html[lang="ar"] .stat__s { font-size: 0.6875rem; }
.stat--hero { background: var(--teal-soft); border-color: var(--teal-line); }
.stat--hero .stat__v { color: var(--teal-ink); }
.grams { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 0.8125rem; color: var(--text-2); }
.grams b { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--text); font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 4px; vertical-align: 1px; }
.sw--p { background: var(--teal); } .sw--c { background: var(--carb); } .sw--f { background: var(--fat); }
.gkg { margin-inline-start: auto; font-size: 0.75rem; color: var(--text-3); }
.method { margin: 0; font-size: 0.6875rem; color: var(--text-3); }

/* ---- reserve: button morphs into the field ---- */
.morph { position: relative; height: 56px; }
.cta, .field { position: absolute; inset: 0; border-radius: var(--r-md); transition: opacity 260ms ease, transform 420ms var(--ease-out), filter 260ms ease; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; background: var(--text); color: var(--bg); font-weight: 700; font-size: 0.9375rem; cursor: pointer; text-decoration: none; user-select: none; }
html[lang="ar"] .cta { font-weight: 400; font-size: 1.0625rem; }
.cta:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .cta:hover { background: var(--cta-hover); } }
.field { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--teal-ink); background: var(--card-2); opacity: 0; transform: scale(0.96); filter: blur(4px); pointer-events: none; }
.field input { flex: 1; min-width: 0; padding: 0 12px; border: 0; background: transparent; font: 400 16px "Archivo", sans-serif; outline: none; -webkit-appearance: none; appearance: none; }
.field input::placeholder { color: var(--text-3); }
.field button { display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; border: 0; border-radius: var(--r-sm); background: var(--teal); color: var(--on-teal); font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform 140ms var(--ease-out), background-color 160ms; }
html[lang="ar"] .field button { font-weight: 400; font-size: 1.0625rem; }
.field button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .field button:hover { background: var(--teal-hot); } }
.field .spin { display: none; width: 16px; height: 16px; animation: spin 700ms linear infinite; }
.field button.is-loading { pointer-events: none; }
.field button.is-loading .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.morph.open .cta { opacity: 0; transform: scale(1.04); filter: blur(4px); pointer-events: none; }
.morph.open .field { opacity: 1; transform: none; filter: blur(0); pointer-events: auto; }
.morph.invalid .field { border-color: var(--err); animation: shake 360ms var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.note { margin: 0; text-align: center; font-size: 0.75rem; color: var(--text-3); }
.note.err { color: var(--err); }

/* ---- ticket (card back) ---- */
.face--back { align-content: start; gap: 14px; background: linear-gradient(160deg, var(--teal-soft), transparent 45%), var(--card); }
.ticket__badge { display: inline-flex; align-items: center; gap: 8px; justify-self: start; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--teal); color: var(--on-teal); font-weight: 700; font-size: 0.8125rem; }
html[lang="ar"] .ticket__badge { font-weight: 400; font-size: 0.9375rem; }
.ticket__badge svg { width: 16px; height: 16px; }
.ticket__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 0.95; text-transform: uppercase; }
html[lang="ar"] .ticket__title { font-family: var(--ar); font-weight: 400; font-size: 2rem; line-height: 1.3; text-transform: none; }
.ticket__rows { margin: 0; display: grid; border-top: 1px dashed var(--line-2); }
.ticket__rows div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 0.8125rem; }
.ticket__rows dt { color: var(--text-3); flex: none; }
.ticket__rows dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; }
.ticket__msg { margin: 0; font-size: 0.875rem; color: var(--text-2); }
.ticket__actions { display: grid; gap: 8px; }
.ticket__actions .cta { position: relative; height: 54px; }
.cta--wa { background: var(--teal); color: var(--on-teal); }
.cta--wa svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .cta--wa:hover { background: var(--teal-hot); } }
.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: transparent; cursor: pointer; color: var(--text-2); text-decoration: none; transition: border-color 160ms, color 160ms, transform 140ms var(--ease-out); }
.ghost svg { width: 16px; height: 16px; }
.ghost:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .ghost:hover { color: var(--text); border-color: var(--text-3); } }

.contact { display: inline-flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 0.875rem; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.25em; transition: color 160ms, text-decoration-color 160ms; }
.contact svg { width: 19px; height: 19px; flex: none; }
@media (hover: hover) and (pointer: fine) { .contact:hover { color: var(--text); text-decoration-color: var(--teal-ink); } }

/* ---- motion helpers created by JS ---- */
.flight { position: fixed; z-index: 70; top: 0; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); pointer-events: none; }
.spark { position: fixed; z-index: 70; top: 0; left: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 2px; pointer-events: none; }

/* =========================================================
   MEET YOUR COACH
   ========================================================= */
.bio { max-width: 1240px; margin: 0 auto; padding: clamp(80px, 11vw, 140px) var(--gut) 0; display: grid; gap: clamp(24px, 3vw, 36px); }
.bio__intro h2, .coming h2 { margin: 0; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.2rem, 7vw, 4.25rem); line-height: 0.92; text-wrap: balance; }
html[lang="ar"] .bio__intro h2, html[lang="ar"] .coming h2 { font-family: var(--ar); font-weight: 400; text-transform: none; font-size: clamp(2rem, 5.4vw, 3.4rem); line-height: 1.3; }
.bio__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 14px 0 0; font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1; text-transform: uppercase; color: var(--teal-ink); }
.bio__name span { font-family: var(--ar); font-weight: 400; font-size: 0.75em; text-transform: none; color: var(--text-2); }
.roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.roles li { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 0.8125rem; font-weight: 600; }
html[lang="ar"] .roles li { font-weight: 400; font-size: 0.9375rem; }
.roles svg { width: 16px; height: 16px; color: var(--teal-ink); }
.bio__intro p:not(.bio__name) { margin: 14px 0 0; max-width: 62ch; color: var(--text-2); }
.bio__cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.bio__book { position: relative; inset: auto; height: 50px; padding: 0 22px; }

.bio__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bstat { display: grid; gap: 4px; align-content: start; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); }
.bstat svg { width: 24px; height: 24px; color: var(--teal-ink); }
.bstat b { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.bstat > span { font-size: 0.875rem; color: var(--text-2); }

.bio__grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.bcard { display: grid; gap: 14px; align-content: start; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); }
.bcard h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1; text-transform: uppercase; }
html[lang="ar"] .bcard h3 { font-family: var(--ar); font-weight: 400; font-size: 1.375rem; line-height: 1.3; text-transform: none; }
.bcard h3 svg { width: 22px; height: 22px; color: var(--teal-ink); flex: none; }
.bcard p { margin: 0; color: var(--text-2); }
.certs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.certs li { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; }
.badge { flex: none; display: inline-grid; place-items: center; min-width: 74px; height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--teal-line); background: var(--teal-soft); color: var(--teal-ink); font: 700 0.6875rem/1 "Archivo", sans-serif; letter-spacing: 0.05em; }
.badge--icon svg { width: 15px; height: 15px; }
.timeline { position: relative; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 44px 22px 1fr; align-items: center; gap: 10px; font-size: 0.9375rem; }
.timeline .year { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.125rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.timeline svg { width: 22px; height: 22px; }
.timeline .m-gold svg { color: var(--gold); }
.timeline .m-silver svg { color: var(--silver); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 7px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 0.8125rem; }
html[lang="ar"] .tags li { font-size: 0.9375rem; }
.bcard--split { grid-template-columns: 1fr; gap: 18px; }
.bcard--split > div { display: grid; gap: 8px; }

/* =========================================================
   WHAT'S COMING
   ========================================================= */
.coming { max-width: 1240px; margin: 0 auto; padding: clamp(80px, 11vw, 140px) var(--gut) clamp(64px, 8vw, 110px); }
.coming h2 { margin-bottom: clamp(26px, 4vw, 44px); max-width: 16ch; }
.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tile { position: relative; display: flex; align-items: flex-end; min-height: 200px; padding: 24px; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); }
.tile h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 800; font-size: 1.875rem; line-height: 1; text-transform: uppercase; }
html[lang="ar"] .tile h3 { font-family: var(--ar); font-weight: 400; font-size: 1.75rem; line-height: 1.3; text-transform: none; }
.tile p { margin: 0; max-width: 38ch; color: var(--text-2); }
.tile--photo { min-height: 380px; color: #f0f1f2; }
.tile--photo img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: brightness(0.75); transition: transform 1200ms var(--ease-out); }
.tile--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(12 13 15 / 0) 35%, rgb(12 13 15 / 0.92)); }
.tile--photo p { color: #d2d5d9; }
.tile--accent { background: linear-gradient(135deg, var(--teal-soft), transparent 60%), var(--card); border-color: var(--teal-line); }
@media (hover: hover) and (pointer: fine) { .tile--photo:hover img { transform: scale(1.04); } }

/* =========================================================
   FOOTER + DOCK
   ========================================================= */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; max-width: 1240px; margin: 0 auto; padding: 22px var(--gut) calc(96px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--text-3); }
.footer p { margin: 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--text); } }
.dock { position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; transition: transform 420ms var(--ease-out), opacity 260ms ease; }
.dock.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
.dock button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border: 0; border-radius: 999px; background: var(--teal); color: var(--on-teal); font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.6); user-select: none; transition: transform 140ms var(--ease-out); }
html[lang="ar"] .dock button { font-weight: 400; font-size: 1.0625rem; }
.dock button:active { transform: scale(0.98); }
.dock svg { width: 18px; height: 18px; }
html[dir="rtl"] .dock svg { transform: scaleX(-1); }

/* =========================================================
   BREAKPOINTS
   ========================================================= */
@media (min-width: 700px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile--photo { grid-row: span 2; }
  .bio__grid { grid-template-columns: 1fr 1fr; }
  .bcard--split { grid-template-columns: 1fr 1fr; }
  .bio__stats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .page { grid-template-columns: 1.05fr 1fr; }
  .coach { position: sticky; top: 0; height: 100svh; min-height: 100svh; }
  .coach::after { background: linear-gradient(180deg, rgb(12 13 15 / 0.5), rgb(12 13 15 / 0) 24%, rgb(12 13 15 / 0) 52%, rgb(12 13 15 / 0.88)); }
  .headline { padding-bottom: 48px; }
  .composer { padding: 32px 40px; min-height: 100svh; }
  .bio { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .bio__stats { grid-template-columns: repeat(2, 1fr); }
  .bio__grid { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .bcard--split { grid-column: 1 / -1; }
  .tiles { grid-template-columns: 1.2fr 1fr 1fr; }
  .tile--photo { grid-row: span 2; min-height: 520px; }
  .tile--accent { grid-column: span 2; }
  .dock { display: none; }
  .footer { padding-bottom: 28px; }
}
@media (max-width: 460px) {
  .results { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 16px; }
  .gcard h3 { font-size: 1.5rem; }
}

/* =========================================================
   MOTION: entrance, reveals, reduced motion
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .js .coach__photo img { animation: settle 2000ms var(--ease-out) both; }
  .js .rise { animation: rise 900ms var(--ease-out) both; animation-delay: calc(200ms + var(--i, 0) * 90ms); }
  .js .face--front { animation: card-in 1100ms var(--ease-out) 450ms both; }
  .js .step { animation: rise 800ms var(--ease-out) both; animation-delay: calc(700ms + var(--i, 0) * 80ms); }
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out); }
  .js .bio__stats .reveal:nth-child(2), .js .tiles .reveal:nth-child(2), .js .bio__grid .reveal:nth-child(2) { transition-delay: 80ms; }
  .js .bio__stats .reveal:nth-child(3), .js .tiles .reveal:nth-child(3), .js .bio__grid .reveal:nth-child(3) { transition-delay: 160ms; }
  .js .bio__stats .reveal:nth-child(4), .js .tiles .reveal:nth-child(4), .js .bio__grid .reveal:nth-child(4) { transition-delay: 240ms; }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes settle { from { transform: scale(1.12); filter: brightness(0.4); } to { transform: none; filter: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes card-in { from { opacity: 0; transform: translateY(40px) rotateX(14deg) scale(0.96); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ticker__col, .day::after, .day .s, .seg, .cta, .field, .dock, .dots i, .tabs__pill, .panel { transition-duration: 1ms !important; }
  .title .ch, .pill-chip.bump, .day.deny, .morph.invalid .field { animation: none !important; }
  .field .spin { animation-duration: 1.6s; }
}
@media (prefers-reduced-transparency: reduce) {
  .chip { background: #15171a; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.stat.bump { animation: bump 420ms var(--spring); }
