/* myForma landing — tokens taken from design/gen.js (dark, monochrome, athletic). */
:root {
  --bg: #0B0B0B;
  --bg-alt: #101010;
  --card: #151515;
  --line: #232323;
  --line-2: #2A2A2A;
  --text: #FFFFFF;
  --text-2: #CFCFCF;
  --muted: #8E8E8E;
  --verified: #2F8CFF;
  --radius-card: 20px;
  --radius-pill: 28px;
  --wrap: 1120px;
  --gutter: 20px;
  --section-y: 88px;
  --font: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
html[lang="ar"] { --font: Cairo, Inter, "Segoe UI", Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50;
  background: #fff; color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.center { text-align: center; }
.narrow { max-width: 620px; margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Type (gen.js: h1 34/800/-.03em, h2 26/800, h3 18/700, body 15/1.5) */
.display { font-size: clamp(40px, 9vw, 72px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.display-sm { font-size: clamp(32px, 6vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.h2 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--text-2); line-height: 1.6; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
html[lang="ar"] .display, html[lang="ar"] .display-sm, html[lang="ar"] .h2 { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }

/* Buttons (gen.js .btn: 56px tall, 28px radius, 16/700) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px; border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 700; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn-primary { background: #fff; color: var(--bg); }
.btn-primary:hover { background: #E8E8E8; }
.btn-ghost { border: 1.5px solid #3A3A3A; color: #fff; }
.btn-ghost:hover { border-color: #6A6A6A; }
.btn-sm { height: 44px; padding: 0 20px; font-size: 14px; }
.btn .arrow { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 11, 11, .82);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: #1D1D1D; }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 6px; direction: ltr; }
.wordmark { font-family: Inter, sans-serif; font-size: 22px; font-weight: 800; font-style: italic; letter-spacing: -.04em; }
.wordmark b { font-weight: 900; }
.nav { display: none; gap: 32px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.nav a:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  height: 44px; min-width: 44px; padding: 0 14px; border-radius: 22px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.lang-toggle:hover { color: #fff; background: #161616; }
.lang-toggle[lang="ar"] { font-family: Cairo, sans-serif; }
.lang-toggle[lang="en"] { font-family: Inter, sans-serif; }

/* Sections */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); border-block: 1px solid #161616; }
.section .h2 + * { margin-top: 20px; }

/* Hero */
.hero { padding-block: 24px 64px; overflow: hidden; }
.hero-grid { display: grid; gap: 8px; align-items: center; }
.hero-copy { position: relative; z-index: 1; order: 2; margin-top: -96px; }
.hero-copy .lead { max-width: 460px; margin-top: 20px; }
.hero-media { order: 1; position: relative; justify-self: center; width: min(100%, 360px); }
.hero-media img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 60% 8%;
  /* the photo's black point is lifted to the page colour (#0B0B0B) at export; only the bottom needs a fade */
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 98%), linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, #000 60%, transparent 98%), linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
          mask-composite: intersect;
}
html[dir="rtl"] .hero-media img { transform: scaleX(-1); }

/* Values */
.values { display: grid; gap: 40px; margin-top: 56px; }
.values li { max-width: 340px; }
.icon {
  width: 48px; height: 48px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.icon svg, .note svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.values .h3, .steps .h3 { margin-bottom: 8px; }

/* Steps */
.steps { display: grid; gap: 16px; margin-top: 56px; counter-reset: s; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #3A3A3A;
  font-weight: 700; font-size: 15px; margin-bottom: 20px; font-family: Inter, sans-serif;
}

/* App preview */
.preview-grid { display: grid; gap: 48px; align-items: center; }
.tabs { display: flex; flex-direction: column; gap: 4px; margin-top: 32px; }
.tabs [role="tab"] {
  text-align: start; padding: 16px 20px; border-radius: 16px;
  border: 1px solid transparent; display: flex; flex-direction: column; gap: 2px;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.tab-title { font-size: 16px; font-weight: 700; color: var(--muted); transition: color .25s var(--ease); }
.tab-body { font-size: 14px; color: var(--muted); line-height: 1.5; display: none; }
.tabs [role="tab"]:hover .tab-title { color: var(--text-2); }
.tabs [aria-selected="true"] { background: var(--card); border-color: var(--line); }
.tabs [aria-selected="true"] .tab-title { color: #fff; }
.tabs [aria-selected="true"] .tab-body { display: block; }

.phone-stage { display: flex; justify-content: center; }
.phone {
  width: min(78vw, 320px); padding: 8px; border-radius: 48px;
  background: #1A1A1A; border: 1px solid #2A2A2A;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9);
}
.phone img {
  width: 100%; height: auto; aspect-ratio: 393 / 852;
  /* the source screens have a 44px corner on a 393×852 canvas; clip a touch more to hide the light corners */
  border-radius: 11.6% / 5.4%;
  transition: opacity .35s var(--ease);
}
.phone img.swapping { opacity: 0; }
.phone-sm { width: min(70vw, 280px); }

/* AI */
.ai-grid { display: grid; gap: 48px; align-items: center; }
.ai-grid .lead { margin-top: 20px; max-width: 520px; }
.note {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; max-width: 520px;
  padding: 16px; border-radius: 16px; border: 1px dashed #333; color: var(--text-2); font-size: 15px;
}
.note svg { flex-shrink: 0; margin-top: 2px; }
.chat-demo {
  background: var(--bg); border: 1px solid var(--line); border-radius: 28px;
  padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; max-width: 460px; width: 100%; justify-self: center;
}
.msg { max-width: 86%; padding: 12px 16px; border-radius: 20px; font-size: 15px; line-height: 1.5; }
.msg-me { align-self: flex-end; background: #fff; color: var(--bg); border-end-end-radius: 6px; }
.msg-ai { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-end-start-radius: 6px; display: flex; flex-direction: column; gap: 4px; }
.msg-flag { border-color: #3A3A3A; }
.ai-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.demo-caption { font-size: 12px; color: #6E6E6E; text-align: center; margin-top: 4px; }

/* Coaches */
.placeholder-flag { font-size: 13px; color: var(--muted); margin-top: 12px; }
.coaches { display: grid; gap: 20px; margin-top: 48px; }
.coach { background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.coach img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #1A1A1A; }
.coach-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.coach-name { display: flex; align-items: center; gap: 6px; }
.verified { width: 18px; height: 18px; flex-shrink: 0; }
.coach .muted { font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { height: 26px; padding: 0 10px; border-radius: 13px; background: #262626; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }

/* For coaches */
.fc-grid { display: grid; gap: 48px; align-items: center; }
.fc-grid .phone { justify-self: center; }
.checklist { margin: 28px 0 32px; display: flex; flex-direction: column; gap: 14px; }
.checklist li { position: relative; padding-inline-start: 32px; color: var(--text-2); }
.checklist li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B0B0B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Testimonial placeholder */
.quote { position: relative; max-width: 680px; margin: 40px auto 0; text-align: center; padding: 48px 28px 36px; border-radius: 24px; }
.quote blockquote { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; line-height: 1.45; letter-spacing: -.01em; }
.quote figcaption { margin-top: 16px; font-size: 14px; }
.placeholder { border: 1.5px dashed #3A3A3A; }
.placeholder-tag {
  position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%);
  background: var(--bg); padding: 2px 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
html[dir="rtl"] .placeholder-tag { transform: translateX(50%); letter-spacing: 0; }

/* Download */
.cta .lead { margin-top: 20px; }
.store-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 22px 0 18px; min-width: 190px;
  border-radius: 16px; border: 1.5px dashed #3A3A3A; color: var(--text-2); cursor: not-allowed;
}
.store svg { width: 26px; height: 26px; }
.store span { display: flex; flex-direction: column; line-height: 1.2; text-align: start; }
.store small { font-size: 11px; color: var(--muted); }
.store b { font-size: 17px; font-family: Inter, sans-serif; }

/* Footer */
.site-footer { border-top: 1px solid #1D1D1D; padding: 48px 0 32px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-start; }
.site-footer .logo + p { margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 14px; color: var(--text-2); }
.footer-links a:hover { color: #fff; }
.footer-links .lang-toggle { padding: 0; height: auto; min-width: 0; }
.footer-links .lang-toggle:hover { background: none; }
.copy { margin-top: 32px; }

/* Restrained motion: one soft fade-up, once */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ≥ 640px */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .values { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .coaches { grid-template-columns: repeat(3, 1fr); }
}

/* ≥ 900px */
@media (min-width: 900px) {
  :root { --section-y: 128px; }
  .nav { display: flex; }
  .hero { padding-block: 48px 96px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .hero-copy { order: 1; margin-top: 0; }
  .hero-media { order: 2; width: 100%; max-width: 460px; justify-self: end; }
  .hero-media img { aspect-ratio: 2 / 3; object-position: center; }
  .preview-grid { grid-template-columns: 1fr 1fr; gap: 80px; }
  .ai-grid { grid-template-columns: 1.05fr .95fr; gap: 80px; }
  .fc-grid { grid-template-columns: .8fr 1.2fr; gap: 80px; }
  .phone { width: 320px; }
  .phone-sm { width: 280px; }
}

@media (max-width: 380px) {
  .header-actions .btn-sm { padding: 0 14px; }
  .btn { padding: 0 22px; }
}

/* ---- Refinements after the 393px review ---- */
.msg { font-weight: 400; }
.values li { margin-inline: auto; text-align: center; }
.values .icon { margin-inline: auto; }
@media (max-width: 639px) {
  .coach { display: grid; grid-template-columns: 112px 1fr; align-items: center; border-radius: 20px; }
  .coach img { aspect-ratio: 1; height: 100%; }
  .coach-body { padding: 16px; }
  .fc-grid .phone { order: 2; }
}
@media (max-width: 899px) {
  .phone-sm { width: min(60vw, 240px); }
}
section[id] { scroll-margin-top: 72px; }
.demo-caption { color: var(--muted); }
