/* ============================================================
   EBF Academy · Applied Human Mechanics
   Mobile-first. Brand: royal blue #003B94, dark navy, white. No other hues.
   Type: Changa (Arabic display) · Almarai (Arabic body) · Archivo (Latin + numerals)
   ============================================================ */

:root {
  --bg: #060B18;
  --bg-2: #0C1529;
  --bg-3: #131E38;
  --line: rgba(191, 214, 255, .14);
  --line-strong: rgba(191, 214, 255, .3);
  --text: #EEF2FA;
  --muted: #A9B4CD;
  --faint: #7D8AA6;

  --blue: #003B94;
  --blue-deep: #002A6B;
  --blue-bright: #3B82F6;
  --blue-tint: #BFD6FF;
  --blue-soft: rgba(59, 130, 246, .14);
  --on-blue-muted: #DCE7FF;

  --white: #FFFFFF;
  --white-hover: #E6EEFF;
  --focus: #9CC2FF;

  --error: #FF8A8C;

  --font-body: "Almarai", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Changa", "Almarai", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-latin: "Archivo", "Segoe UI", system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --gutter: 20px;
  --wrap: 1100px;
  --dock-h: 78px;
  --overlap: 72px; /* how far the booking card hangs below the hero */

  --z-bar: 20;
  --z-dock: 30;

  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.8 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
img { display: block; max-width: 100%; }
strong { font-weight: 700; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }

.num {
  font-family: var(--font-latin);
  font-weight: 800;
  font-stretch: 110%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--r-md);
  font: 700 1.0625rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .7; cursor: progress; }

.btn-primary { background: var(--white); color: var(--blue-deep); }
.btn-primary:hover { background: var(--white-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }

.btn-sm { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

/* ---------- Top bar ---------- */
.topbar { position: relative; z-index: var(--z-bar); background: var(--blue); }
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
/* White reversed EBF logo: blue shows through the letters, so it works on the blue and the dark */
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { display: block; width: auto; height: 32px; }
.topbar .btn-ghost { color: #FFFFFF; border-color: rgba(255, 255, 255, .38); }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Hero: copy on the brand blue, booking card hanging over the edge ---------- */
.hero {
  position: relative;
  padding-top: 20px;
  background: var(--blue);
  color: #FFFFFF;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 55% at 85% 0%, rgba(255, 255, 255, .14), transparent 60%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 30px; }

.hero-copy { container-type: inline-size; }

.hero-from {
  color: var(--blue-tint);
  font: 600 1.0625rem/1.5 var(--font-display);
}
.hero-from .brand-name {
  color: #FFFFFF;
  font: 800 1em/1 var(--font-latin);
  font-stretch: 118%;
}

.hero-title {
  margin-top: 10px;
  color: #FFFFFF;
  font-family: var(--font-latin);
  font-weight: 800;
  font-stretch: 110%;
  font-size: clamp(2rem, 9vw, 3.6rem);
  font-size: clamp(2rem, 9.6cqi, 3.6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-align: right;
}
.hero-title span { display: block; }

.hero-headline {
  margin-top: 18px;
  font: 700 clamp(1.3rem, 5.4vw, 1.75rem)/1.5 var(--font-display);
  text-wrap: balance;
}
.hero-lead {
  max-width: 34em;
  margin-top: 8px;
  color: var(--on-blue-muted);
  font-size: 1.0625rem;
  line-height: 1.8;
  text-wrap: pretty;
}

.hero-coaches {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--on-blue-muted);
  font-size: .95rem;
  line-height: 1.5;
}
.hero-coaches strong { color: #FFFFFF; }
.avatars { display: flex; flex: none; }
.avatars img {
  width: 42px;
  height: 42px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--blue-deep);
  object-fit: cover;
}
.avatars img + img { margin-inline-start: -12px; }

.hero-offer {
  position: relative;
  z-index: 1;
  margin-bottom: calc(var(--overlap) * -1);
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--text);
}
.offer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.offer-price { font-weight: 700; line-height: 1.2; }
.offer-price .num { font-size: 2.1rem; }
.offer-split { color: var(--muted); font-size: .9rem; }
.hero-offer .btn { margin-top: 16px; }
.offer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: .875rem;
}
.offer-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

/* Page-load choreography: the copy settles first, then the booking card. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero-from, .hero-title, .hero-headline, .hero-lead, .hero-coaches, .hero-offer {
  animation: rise .7s var(--ease-out) both;
}
.hero-title { animation-delay: .06s; }
.hero-headline { animation-delay: .14s; }
.hero-lead { animation-delay: .2s; }
.hero-coaches { animation-delay: .26s; }
.hero-offer { animation-delay: .36s; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 11vw, 104px); }
.details { padding-top: calc(var(--overlap) + clamp(44px, 9vw, 80px)); }
.h2 {
  font: 800 clamp(1.75rem, 6.4vw, 2.5rem)/1.25 var(--font-display);
  text-wrap: balance;
}
.lead { max-width: 36em; margin-top: 8px; color: var(--muted); font-size: 1.0625rem; text-wrap: pretty; }

/* ---------- Details: a spec sheet, not cards ---------- */
.spec { margin-top: 26px; border-top: 1px solid var(--line); }
.spec-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.spec dt { color: var(--blue-tint); font: 700 1rem/1.7 var(--font-display); }
.spec dd { line-height: 1.75; text-wrap: pretty; }
.spec dd.has-hours { display: flex; align-items: flex-start; gap: 14px; }

.tag {
  display: inline-block;
  margin-inline-end: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  color: var(--blue-tint);
  font-size: .78rem;
  font-weight: 700;
  vertical-align: middle;
}

/* 16 hours = 4 days × 4 hours, drawn as what it is. */
.hours {
  display: grid;
  flex: none;
  grid-template-columns: repeat(4, 10px);
  gap: 3px;
  margin-top: 6px;
}
.hours i { display: block; width: 10px; height: 10px; border-radius: 2px; background: var(--blue-bright); }

.price {
  margin-top: 32px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--blue);
  color: #FFFFFF;
}
.price-eyebrow { color: var(--blue-tint); font: 700 1rem/1.4 var(--font-display); }
.price-amount { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; line-height: 1; }
.price-amount .num { font-size: 4.25rem; font-weight: 900; }
.price-amount .cur { font: 700 1.25rem/1 var(--font-display); }
.price-or { margin-top: 20px; font-weight: 700; }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--r-md);
  overflow: hidden;
}
.split li { padding: 12px 14px; }
.split li + li { border-inline-start: 1px solid rgba(255, 255, 255, .3); }
.split .num { display: block; font-size: 1.5rem; line-height: 1.2; }
.split small { color: var(--blue-tint); font-size: .85rem; }
.price-pay { margin-top: 16px; color: var(--blue-tint); font-size: .95rem; }
.price .btn { margin-top: 18px; }

/* ---------- Coaches ---------- */
.coaches { background: var(--bg-2); }
.coach-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 26px; }
.coach {
  min-width: 0;
  padding: 24px 12px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  text-align: center;
}
.portrait {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--blue);
  color: #FFFFFF;
  font: 800 2rem/1 var(--font-display);
  outline: 1px solid var(--line-strong);
  outline-offset: 5px;
  overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.coach-name { font: 800 1.125rem/1.35 var(--font-display); }
.coach-name small { display: block; color: var(--muted); font: 400 .85rem/1.6 var(--font-body); }
.coach-hours {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: .9rem;
}
.coach-hours .num { color: var(--text); font-size: 1.05rem; }
.blocks { display: flex; gap: 3px; }
.blocks i { display: block; width: 7px; height: 12px; border-radius: 2px; background: var(--blue-bright); }

/* ---------- Perks: a ledger plus the certificate itself ---------- */
.perk-list { margin-top: 22px; border-top: 1px solid var(--line); }
.perk-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 2px 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.perk-list .icon { width: 22px; height: 22px; margin-top: 3px; color: var(--blue-bright); stroke-width: 2.4; }
.perk-list strong { font: 700 1.0625rem/1.5 var(--font-display); }
.perk-list span { grid-column: 2; color: var(--muted); font-size: .95rem; }

.cert { margin: 34px 0 0; }
.cert-img {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin-inline: auto;
  border-radius: 8px;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .75);
  transform: rotate(-1.5deg);
}
.cert-caption { margin-top: 18px; color: var(--muted); font-size: .9rem; text-align: center; }

/* ---------- Register (back on the blue) ---------- */
.register { background: var(--blue); color: #FFFFFF; }
.register .lead { color: var(--on-blue-muted); }
.form-card {
  margin-top: 24px;
  padding: 22px 18px;
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--text);
}

.field { margin-bottom: 20px; }
.label { display: block; margin-bottom: 8px; font: 700 1rem/1.5 var(--font-body); }
.optional { color: var(--faint); font-size: .875rem; font-weight: 400; }
.hint { margin-top: 6px; color: var(--faint); font-size: .8125rem; line-height: 1.5; }
.error-msg { margin-top: 6px; color: var(--error); font-size: .875rem; font-weight: 700; line-height: 1.5; }

/* :where() keeps this low-specificity so focus/error states below win. */
.field :where(input:not([type="radio"]), textarea) {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-3);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 112px; resize: vertical; line-height: 1.7; }
.field input[dir="ltr"] { text-align: right; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 4px var(--blue-soft);
}
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(255, 138, 140, .18); }

/* Stacked on narrow phones so neither answer wraps; side by side from 480px. */
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: flex; cursor: pointer; }
.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-3);
  font-weight: 700;
  line-height: 1.4;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice-box::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.choice input:checked + .choice-box { border-color: var(--blue-bright); background: var(--blue-soft); }
.choice input:checked + .choice-box::before {
  border-color: var(--blue-bright);
  background: var(--blue-bright);
  box-shadow: inset 0 0 0 4px var(--bg-3);
}
.choice input:focus-visible + .choice-box { outline: 2px solid var(--focus); outline-offset: 2px; }
.field.has-error .choice-box { border-color: var(--error); }

/* Follow-up question slides open once a level is picked. */
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.reveal > div { min-height: 0; margin: 0 -6px -6px; padding: 0 6px 6px; overflow: hidden; }
.reveal.is-open { grid-template-rows: 1fr; }
.reveal .field { margin-bottom: 14px; }

.form-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 138, 140, .4);
  border-radius: var(--r-md);
  background: rgba(255, 138, 140, .1);
  color: #FFC1C2;
  font-weight: 700;
}
.form-foot { margin-top: 12px; color: var(--faint); font-size: .8125rem; text-align: center; }

/* Honeypot: no offscreen offset (a negative left adds horizontal scroll in RTL). */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-success { outline: none; }
.ticket { padding: 10px 4px 0; text-align: center; }
.ticket-check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue-deep);
}
.ticket-check .icon { width: 30px; height: 30px; stroke-width: 2.8; }
.ticket h3 { font: 800 1.5rem/1.3 var(--font-display); }
.ticket p { margin-top: 8px; color: var(--muted); text-wrap: pretty; }
.ticket .demo-note {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--blue-tint);
  font-size: .8125rem;
}
.ticket-stub {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: .9rem;
}
.ticket-stub [dir="ltr"] {
  color: var(--text);
  font: 800 .95rem/1.5 var(--font-latin);
  font-stretch: 112%;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.footer {
  padding-block: 28px calc(28px + var(--dock-h) + env(safe-area-inset-bottom));
  color: var(--faint);
  font-size: .875rem;
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}
.footer .wordmark img { height: 25px; opacity: .8; }

/* ---------- Sticky booking dock (mobile) ---------- */
.dock {
  position: fixed;
  inset: auto 0 0;
  z-index: var(--z-dock);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(6, 11, 24, .88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transform: translateY(110%);
  transition: transform .35s var(--ease-out);
}
.dock.is-visible { transform: none; }
.dock .btn { min-height: 52px; padding: 0 26px; }
.dock-price { display: flex; flex-direction: column; line-height: 1.3; }
.dock-amount { font-weight: 700; }
.dock-amount .num { font-size: 1.35rem; }
.dock-split { color: var(--muted); font-size: .8125rem; }

/* ---------- Larger screens ---------- */
@media (min-width: 480px) {
  .choices { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .hero-offer { max-width: 460px; width: 100%; margin-inline: auto; }
  .coach-list { grid-template-columns: repeat(2, minmax(0, 320px)); }
}

@media (min-width: 900px) {
  :root { --overlap: 0px; } /* on wide screens the card sits beside the copy instead of hanging below */

  .topbar {
    position: sticky;
    top: 0;
    background: rgba(0, 59, 148, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .topbar-in { min-height: 68px; }

  .hero { padding: 72px 0 88px; }
  .hero-grid {
    grid-template-columns: 1.15fr minmax(0, 440px);
    column-gap: 72px;
    align-items: center;
  }
  .hero-from { font-size: 1.2rem; }
  .hero-lead { font-size: 1.125rem; }
  .hero-offer { margin: 0; padding: 28px; }
  .details { padding-top: 96px; }

  .details-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: start; }
  .spec-row { grid-template-columns: 140px 1fr; padding: 18px 0; }
  .price { position: sticky; top: 92px; margin-top: 0; padding: 32px; }

  .perks-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
  .cert { margin-top: 0; }
  .cert-img { transform: rotate(-2.5deg); }

  .register-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
  .register { scroll-margin-top: 68px; } /* sticky top bar height */
  .register-copy { position: sticky; top: 100px; }
  .form-card { margin-top: 0; padding: 32px; }

  .footer { padding-bottom: 28px; }
  .dock { display: none; }
}

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