/* MHM Libya
   Layout concept: a walk through Libya at dusk. Full-bleed photographs open the page and its chapters,
   the text sits on the deep green of Ghadames doors at night, and warm sand marks decisions and
   actions only. One bold moment: the full-screen slideshow of real places. */

:root {
  --ground: #0F1B17;
  --ground-2: #162620;
  --ground-3: #1C302A;
  --ground-4: #243B34;
  --text: #F1EEE6;
  --mist: #A9B5AE;
  --mist-2: #95A29B;
  --sand: #D8B680;
  --sand-2: #E8CB98;
  --sand-ink: #0F1B17;
  --sand-wash: rgba(216, 182, 128, 0.1);
  --clay: #C4493B;
  --scrim: 15, 27, 23;

  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;

  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  --fs-h3: clamp(1.1875rem, 1.05rem + 0.55vw, 1.5rem);
  --fs-h2: clamp(1.875rem, 1.3rem + 2.3vw, 3.25rem);
  --fs-h1: clamp(2.5rem, 1.4rem + 4.6vw, 5.5rem);

  --lh-body: 1.9;
  --lh-head: 1.35;
  --lh-h1: 1.25;
  --track-head: 0;

  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(84px, 10vw, 148px);
  --radius: 6px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --slide-ms: 7000ms;

  color-scheme: dark;
}

:root[lang="en"] {
  --lh-body: 1.65;
  --lh-head: 1.12;
  --lh-h1: 1.04;
  --track-head: -0.02em;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--sand); color: var(--sand-ink); }

:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--sand);
  color: var(--sand-ink);
  border-radius: var(--radius);
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.section { padding-block: var(--section); }
.surface { background: var(--ground-2); }

.h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: var(--track-head);
  text-wrap: balance;
}
:root[lang="en"] .h2 { font-weight: 600; }
.lead {
  font-size: var(--fs-lead);
  color: var(--mist);
  max-width: 62ch;
}
.section-head { display: grid; gap: 1.1rem; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head .h2 { max-width: 20ch; }
:root[lang="en"] .section-head .h2 { max-width: 26ch; }
:root[lang="en"] .intro-copy .h2 { max-width: 20ch; }

.num {
  font-variant-numeric: tabular-nums;
  color: var(--sand);
  font-weight: 300;
  line-height: 1;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.7rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--sand); color: var(--sand-ink); }
.btn-ghost { border-color: rgba(241, 238, 230, 0.35); background: transparent; color: var(--text); }
.btn-small { min-height: 42px; padding: 0.45rem 1.15rem; font-size: var(--fs-small); }
.btn-wide { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-gold:hover { background: var(--sand-2); }
  .btn-ghost:hover { border-color: var(--text); background: rgba(241, 238, 230, 0.06); }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 300ms ease;
}
.site-header.is-solid { background: rgba(var(--scrim), 0.96); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: var(--header-h);
}
.wordmark { display: grid; gap: 0.1rem; text-decoration: none; white-space: nowrap; }
.wordmark-name { font-size: 1.375rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; }
.wordmark-name span { color: var(--sand); font-weight: 500; }
.wordmark-tag { font-size: 0.8125rem; color: var(--mist); line-height: 1.3; }
.menu { display: flex; align-items: center; gap: 1.75rem; flex: 1; }
.nav { display: flex; gap: 1.75rem; margin-inline: auto; }
.nav a, .lang {
  font-size: 0.9375rem;
  color: var(--mist);
  text-decoration: none;
  transition: color 180ms ease;
}
.nav a:hover, .lang:hover { color: var(--text); }
.lang { font-weight: 500; }
.menu-toggle {
  display: none;
  margin-inline-start: auto;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid rgba(241, 238, 230, 0.35);
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-small);
  font-weight: 500;
  cursor: pointer;
}

/* ---------- Hero: full-screen slideshow ---------- */

.hero {
  position: relative;
  min-height: max(640px, 94svh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  overflow: hidden;
}
.slides { position: absolute; inset: 0; z-index: -2; background: var(--ground-3); }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1600ms ease;
}
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(var(--scrim), 0.97) 0%, rgba(var(--scrim), 0.72) 34%, rgba(var(--scrim), 0.28) 66%, rgba(var(--scrim), 0.6) 100%);
}
.hero-inner {
  display: grid;
  gap: 1.5rem;
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 32px;
}
.hero-title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-h1);
  letter-spacing: var(--track-head);
  max-width: 16ch;
}
:root[lang="en"] .hero-title { font-weight: 600; letter-spacing: -0.03em; }
.hero-sub { font-size: var(--fs-lead); color: #DDD9CF; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 0.5rem; }

.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-block: 28px 36px;
}
.hero-place {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--fs-small);
  color: var(--mist);
}
.hero-place::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sand);
}
.hero-controls { display: flex; align-items: center; gap: 1.25rem; }
.dots { display: flex; gap: 8px; }
.dot {
  display: grid;
  align-items: center;
  width: 44px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.dot span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(241, 238, 230, 0.25);
  overflow: hidden;
  position: relative;
}
.dot span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: var(--origin, left);
}
:root[dir="rtl"] .dot span::after { --origin: right; }
.dot[aria-current="true"] span::after { transform: scaleX(1); }
.pause {
  min-height: 36px;
  padding: 0 0.9rem;
  border: 1px solid rgba(241, 238, 230, 0.3);
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-small);
  color: var(--mist);
  cursor: pointer;
}
.pause:hover { color: var(--text); border-color: var(--text); }

.lines .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.lines [data-line] { display: block; }

/* ---------- Photographs ---------- */

.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ground-3);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame figcaption {
  position: absolute;
  inset-inline-start: 14px;
  bottom: 12px;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(var(--scrim), 0.72);
  font-size: var(--fs-small);
  color: var(--text);
}

/* ---------- Intro ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.intro-copy { display: grid; gap: 1.5rem; justify-items: start; }
.intro-copy .h2 { max-width: 14ch; }
.text-link {
  color: var(--sand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
  transition: color 180ms ease;
}
.text-link:hover { color: var(--sand-2); }

.photo-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.photo-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ground-3);
  text-decoration: none;
  isolation: isolate;
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: scale 900ms var(--ease-soft); }
.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(var(--scrim), 0.92), rgba(var(--scrim), 0.15) 62%);
}
.photo-card-text {
  position: absolute;
  inset-inline: 18px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  gap: 0.1rem;
}
.photo-card-text b { font-size: var(--fs-h3); font-weight: 600; line-height: 1.35; }
.photo-card-text span { font-size: var(--fs-small); color: #D6DDD8; }
@media (hover: hover) and (pointer: fine) {
  .photo-card:hover img { scale: 1.05; }
  .photo-card:hover .photo-card-text b { color: var(--sand-2); }
}

.compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(56px, 7vw, 96px);
}
.compare-col {
  display: grid;
  align-content: start;
  gap: 1.25rem;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--ground-2);
}
.compare-col h3 { font-size: var(--fs-h3); font-weight: 600; color: var(--mist); }
.compare-col ul { display: grid; gap: 1rem; }
.compare-col li { display: grid; gap: 0.15rem; color: var(--mist); line-height: 1.6; }
.compare-k { font-size: var(--fs-small); color: var(--mist); }
.compare-col.is-us { background: var(--ground-3); box-shadow: inset 0 3px 0 var(--sand); }
.compare-col.is-us h3 { color: var(--sand); }
.compare-col.is-us li { color: var(--text); font-weight: 500; }

/* ---------- Services: statement and numbered accordion ---------- */

.services-head { display: grid; gap: 1.25rem; justify-items: center; text-align: center; margin-bottom: clamp(40px, 5vw, 72px); }
.statement-h {
  font-size: clamp(2.25rem, 1.3rem + 3.8vw, 4.75rem);
  font-weight: 700;
  line-height: var(--lh-h1);
  letter-spacing: var(--track-head);
}
.statement-h span { display: block; }
:root[lang="en"] .statement-h { font-weight: 600; letter-spacing: -0.03em; }
.services-head .lead { max-width: 52ch; }

.service-list { display: grid; }
.service { border-top: 1px solid rgba(241, 238, 230, 0.12); }
.service:last-child { border-bottom: 1px solid rgba(241, 238, 230, 0.12); }
.service summary {
  display: grid;
  grid-template-columns: clamp(4rem, 7vw, 6.5rem) minmax(0, 1fr) 48px;
  align-items: center;
  gap: 1rem;
  padding-block: clamp(22px, 2.6vw, 34px);
  cursor: pointer;
  list-style: none;
}
.service summary::-webkit-details-marker { display: none; }
.service-num {
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.75rem);
  font-weight: 300;
  line-height: 1;
  color: var(--sand);
  font-variant-numeric: tabular-nums;
}
.service-title { display: grid; gap: 0.3rem; min-width: 0; }
.service-title b { font-size: clamp(1.375rem, 1.1rem + 1.1vw, 2rem); font-weight: 700; line-height: var(--lh-head); transition: color 180ms ease; }
:root[lang="en"] .service-title b { font-weight: 600; }
.service-title > span { color: var(--mist); font-size: 0.9375rem; line-height: 1.6; }
.service[open] .service-title > span { display: none; }
.service-plus {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ground-3);
  transition: background-color 200ms ease;
}
.service-plus::before,
.service-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  margin: -1px 0 0 -8px;
  background: var(--sand);
}
.service-plus::after { transform: rotate(90deg); transition: transform 300ms var(--ease-out); }
.service[open] .service-plus { background: var(--sand); }
.service[open] .service-plus::before,
.service[open] .service-plus::after { background: var(--sand-ink); }
.service[open] .service-plus::after { transform: rotate(0deg); }
.service summary:hover .service-title b { color: var(--sand-2); }
.service-panel {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding-bottom: clamp(28px, 3vw, 44px);
  padding-inline-start: calc(clamp(4rem, 7vw, 6.5rem) + 1rem);
}
.service-photo { aspect-ratio: 16 / 10; }
.service-body { display: grid; gap: 1rem; justify-items: start; }
.service-body p { color: #D6DDD8; font-size: var(--fs-lead); }
.service-body .fit {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--ground-2);
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.75;
}
.service-body .fit strong { color: var(--sand); font-weight: 600; }

/* ---------- Method ---------- */

.flow-scroll { overflow-x: auto; scrollbar-width: thin; }
.flow svg { display: block; width: 100%; min-width: 860px; height: auto; color: var(--mist); }
.flow figcaption, .tree-figure figcaption { margin-top: 0.75rem; font-size: var(--fs-small); color: var(--mist-2); }

.flow { margin-bottom: clamp(40px, 5vw, 64px); }

.stages { display: grid; gap: 8px; }
.stage {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--ground-3);
}
.stage .num { font-size: 2rem; padding-top: 0.15rem; }
.stage h3 { font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-head); }
.stage-main p { color: var(--mist); margin-top: 0.35rem; }
.stage-out { display: grid; gap: 0.2rem; font-size: 0.9375rem; line-height: 1.7; padding-top: 0.3rem; }
.stage-out strong { color: var(--sand); font-weight: 600; font-size: var(--fs-small); }
.stage.is-key { background: var(--ground-4); box-shadow: inset 0 0 0 1px rgba(216, 182, 128, 0.5); }
.stage-note {
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  background: var(--sand-wash);
  color: var(--sand-2);
  font-size: 0.9375rem;
}

/* Diagram marks (inline SVG): neutral parts take the text colours, gold marks what the reader acts on */
.fl-node { fill: var(--ground-3); stroke: rgba(241, 238, 230, 0.2); stroke-width: 1; }
.fl-node.is-scope { fill: var(--ground-4); stroke: var(--sand); stroke-width: 1.5; }
.fl-node.is-root { fill: var(--ground-4); stroke: rgba(241, 238, 230, 0.32); }
.fl-node.is-out { fill: var(--ground-3); stroke: rgba(241, 238, 230, 0.16); stroke-dasharray: 4 4; }
.fl-node.is-cause,
.fl-node.is-answer { fill: rgba(216, 182, 128, 0.12); stroke: var(--sand); stroke-width: 1.5; }
.fl-label { fill: var(--text); font-size: 15px; font-weight: 600; }
.fl-line { fill: none; stroke: currentColor; stroke-width: 1.5; }
.fl-gate { fill: var(--ground-2); stroke: var(--sand); stroke-width: 1.5; }
.fl-gold { fill: var(--sand); font-size: 13px; font-weight: 600; }
.fl-gold-line { stroke: var(--sand); stroke-width: 1.5; }
.fl-gold-fill { fill: var(--sand); }
.fl-loop { fill: none; stroke: var(--sand); stroke-width: 1.5; stroke-dasharray: 6 5; }
.fl-note { fill: var(--mist); font-size: 13px; }
.tr-small { fill: var(--mist); font-size: 12px; }
.tr-small.is-gold { fill: var(--sand); font-weight: 600; }
.tr-quote { fill: var(--mist); font-size: 16px; font-weight: 600; text-decoration: line-through; }
.tr-root { fill: var(--text); font-size: 16px; font-weight: 700; }
.tr-src-bg { fill: var(--ground-2); }
.tr-src { fill: var(--mist); font-size: 11.5px; }
.tr-name { fill: var(--text); font-size: 15px; font-weight: 600; }
.tr-name.is-cause { fill: var(--sand-2); }
.tr-desc { fill: var(--mist); font-size: 12.5px; }
.tr-tag { fill: var(--mist-2); font-size: 12px; }
.tr-tag.is-cause { fill: var(--sand); font-weight: 700; }
.tr-answer { fill: var(--text); font-size: 15px; font-weight: 600; }

/* ---------- Tools ---------- */

.tools-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}
.card {
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius);
  background: var(--ground-2);
  min-width: 0;
}
.tree-figure .tree-scroll { overflow-x: auto; scrollbar-width: thin; }
.tree-figure svg { display: block; width: 100%; min-width: 560px; height: auto; color: var(--mist); }

.calc h3 { font-size: var(--fs-h3); font-weight: 600; }
.calc-intro { color: var(--mist); margin-top: 0.35rem; }
.calc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 1.5rem;
}
.calc-fields label:last-child { grid-column: 1 / -1; }
label { display: grid; gap: 0.4rem; min-width: 0; }
label > span { font-size: 0.875rem; color: var(--mist); }
label i { color: var(--sand); font-style: normal; }
input, select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(241, 238, 230, 0.14);
  border-radius: var(--radius);
  background: var(--ground);
  color: var(--text);
  transition: border-color 180ms ease;
}
input:hover, select:hover, textarea:hover { border-color: rgba(241, 238, 230, 0.3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--sand); outline-offset: 1px; border-color: transparent; }
input[type="number"] { direction: ltr; font-variant-numeric: tabular-nums; }
:root[dir="rtl"] input[type="number"] { text-align: right; }
textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
[aria-invalid="true"] { border-color: var(--clay); }

.calc-out {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 1.25rem;
}
.calc-out div { padding: 1rem; border-radius: var(--radius); background: var(--ground-3); min-width: 0; }
.calc-out span { display: block; font-size: var(--fs-small); color: var(--mist); }
.calc-out output {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 600;
  color: var(--sand);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.calc-verdict {
  margin-top: 10px;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: var(--ground-3);
  line-height: 1.75;
}
.calc-verdict[data-state="good"] { box-shadow: inset 0 0 0 1px rgba(120, 190, 150, 0.6); }
.calc-verdict[data-state="warn"] { box-shadow: inset 0 0 0 1px rgba(216, 182, 128, 0.6); }
.calc-verdict[data-state="bad"] { box-shadow: inset 0 0 0 1px rgba(196, 73, 59, 0.8); }
.calc-note { margin-top: 0.75rem; font-size: var(--fs-small); color: var(--mist-2); }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.5rem; }

/* ---------- Libya: photo background ---------- */

.libya { position: relative; isolation: isolate; overflow: hidden; }
.libya-bg { position: absolute; inset: 0; z-index: -2; }
.libya-bg img { width: 100%; height: 120%; object-fit: cover; }
.libya::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(var(--scrim), 0.86), rgba(var(--scrim), 0.93) 40%, rgba(var(--scrim), 0.97));
}
.factors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.factors li {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(22, 38, 32, 0.88);
}
.factors h3 { font-size: var(--fs-h3); font-weight: 600; color: var(--sand); }
.factors p { margin-top: 0.5rem; color: #CAD0CB; }
.callout {
  margin-top: clamp(40px, 5vw, 64px);
  max-width: 34ch;
  font-size: clamp(1.375rem, 1.05rem + 1.3vw, 2.125rem);
  font-weight: 600;
  line-height: 1.5;
}
:root[lang="en"] .callout { line-height: 1.25; }
.seasons { margin-top: clamp(56px, 7vw, 96px); }
.seasons-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; margin-bottom: 1.5rem; }
.seasons-head h3 { font-size: var(--fs-h3); font-weight: 600; }
.seasons-head p { font-size: var(--fs-small); color: var(--mist); }
.season-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.season-list li {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: rgba(22, 38, 32, 0.88);
  box-shadow: inset 0 2px 0 var(--sand);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.season-list b { font-weight: 600; }
.season-date { color: var(--sand); font-variant-numeric: tabular-nums; }
.season-list span:last-child { color: var(--mist); font-size: var(--fs-small); }

/* ---------- Packages ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 36px 32px 32px;
  border-radius: var(--radius);
  background: var(--ground-3);
}
.plan h3 { font-size: var(--fs-h3); font-weight: 600; }
.plan-dur { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 300; color: var(--sand); line-height: 1.3; }
.plan ul { display: grid; gap: 0.65rem; color: var(--mist); }
.plan li { display: grid; grid-template-columns: 14px 1fr; gap: 0.6rem; align-items: baseline; line-height: 1.65; }
.plan li::before { content: ""; width: 10px; height: 2px; background: var(--sand); transform: translateY(-0.3em); }
.plan-model { margin-top: auto; padding-top: 1rem; font-size: var(--fs-small); color: var(--mist-2); }
.plan .btn { margin-top: 0.25rem; }
.plan.is-featured { background: var(--ground-4); box-shadow: inset 0 0 0 1px rgba(216, 182, 128, 0.55); }
.plan-flag {
  position: absolute;
  top: -14px;
  inset-inline-start: 28px;
  padding: 0.15rem 0.85rem;
  border-radius: 999px;
  background: var(--sand);
  color: var(--sand-ink);
  font-size: var(--fs-small);
  font-weight: 600;
}
.terms { margin-top: 2rem; color: var(--mist); max-width: 75ch; }

/* ---------- Academy ---------- */

.academy-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.academy-photo { position: sticky; top: calc(var(--header-h) + 32px); aspect-ratio: 3 / 4; }
.academy-body { display: grid; gap: 1.5rem; justify-items: start; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-block: 0.5rem;
}
.facts div { display: grid; gap: 0.25rem; padding: 18px; border-radius: var(--radius); background: var(--ground-2); }
.facts b { font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); font-weight: 300; color: var(--sand); line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts span { font-size: var(--fs-small); color: var(--mist); line-height: 1.5; }
.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  width: 100%;
}
.modules li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: 0.5rem;
  padding: 0.7rem 0;
}
.modules .num { grid-row: span 2; font-size: 1.125rem; padding-top: 0.3rem; }
.modules b { font-weight: 600; line-height: 1.6; }
.modules li > span:last-child { font-size: var(--fs-small); color: var(--mist); line-height: 1.6; }

/* ---------- Principles and FAQ ---------- */

.principles { padding-block: clamp(64px, 7vw, 104px); }
.h3-title { font-size: var(--fs-h3); font-weight: 600; margin-bottom: 2rem; color: var(--mist); }
.principle-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.principle-list h3 { font-size: var(--fs-h3); font-weight: 600; color: var(--sand); }
.principle-list p { margin-top: 0.5rem; color: var(--mist); }

.faq-grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { display: grid; gap: 8px; }
.faq-list details { border-radius: var(--radius); background: var(--ground-2); }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ground-3);
  color: var(--sand);
  font-weight: 400;
  transition: transform 200ms var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 1.4rem 1.4rem; color: var(--mist); max-width: 64ch; }

/* ---------- Stats band and sectors strip ---------- */

.stats-band { background: var(--sand); color: var(--sand-ink); }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-block: clamp(28px, 3.5vw, 44px);
}
.stats li { display: flex; align-items: center; gap: 1rem; }
.stats b {
  font-size: clamp(2.5rem, 1.8rem + 2.4vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats span { font-size: 0.9375rem; font-weight: 500; line-height: 1.5; max-width: 16ch; }

.sectors {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 22px;
  padding-inline-start: max(var(--gutter), env(safe-area-inset-left, 0px));
  background: var(--ground);
  overflow: hidden;
}
.sectors-label { flex: none; font-size: var(--fs-small); color: var(--mist); font-weight: 500; }
.sectors-window {
  display: flex;
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.sectors-track { display: flex; flex: none; gap: 2.25rem; padding-inline-end: 2.25rem; }
.sectors-track li { display: flex; align-items: center; gap: 2.25rem; white-space: nowrap; font-size: 1.0625rem; font-weight: 500; color: var(--text); }
.sectors-track li::after { content: ""; width: 7px; height: 7px; background: var(--sand); transform: rotate(45deg); }

/* ---------- CTA band ---------- */

.cta-band { background: var(--sand); color: var(--sand-ink); }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-block: clamp(56px, 7vw, 96px);
}
.cta-inner .h2 { max-width: 18ch; }
.cta-inner p { margin-top: 0.75rem; max-width: 52ch; font-size: var(--fs-lead); line-height: 1.7; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-dark { background: var(--sand-ink); color: var(--text); }
.btn-dark-ghost { border-color: rgba(15, 27, 23, 0.45); background: transparent; color: var(--sand-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-dark:hover { background: var(--ground-3); }
  .btn-dark-ghost:hover { border-color: var(--sand-ink); background: rgba(15, 27, 23, 0.06); }
}

/* ---------- Photo strip ---------- */

.strip { overflow: hidden; direction: ltr; padding-block: 12px; background: var(--ground); }
.strip-track { display: flex; gap: 12px; width: max-content; }
.strip-track li { flex: none; }
.strip-track img { height: 180px; width: auto; border-radius: var(--radius); filter: saturate(0.9) brightness(0.88); transition: filter 300ms ease; }
.strip-track img:hover { filter: none; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-info { display: grid; gap: 1.5rem; align-content: start; }
.next-steps { display: grid; gap: 12px; counter-reset: step; }
.next-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.75rem;
  color: var(--mist);
  line-height: 1.7;
}
.next-steps li::before {
  content: counter(step);
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ground-3);
  color: var(--sand);
  font-weight: 600;
  font-size: 0.9375rem;
}
.wa-direct { color: var(--sand); font-weight: 500; text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.wa-direct span { display: inline-block; font-variant-numeric: tabular-nums; }
.contact-form { display: grid; gap: 18px; background: var(--ground-3); overflow: hidden; }
.form-head {
  margin: calc(-1 * clamp(24px, 3vw, 40px)) calc(-1 * clamp(24px, 3vw, 40px)) 0.5rem;
  padding: clamp(22px, 2.6vw, 32px) clamp(24px, 3vw, 40px);
  background: var(--ground-4);
  box-shadow: inset 0 -2px 0 var(--sand);
}
.form-head h3 { font-size: var(--fs-h3); font-weight: 700; color: var(--sand); }
.form-head p { margin-top: 0.25rem; color: var(--mist); font-size: 0.9375rem; }
.contact-form input, .contact-form select, .contact-form textarea { background: var(--ground-2); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-small { font-size: var(--fs-small); color: var(--mist-2); }
/* Honeypot: hidden from people, filled only by spam bots */
.hp {
  /* clipped in place: an offset like left:-10000px widens right-to-left pages and makes phones scroll sideways */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.form-status { min-height: 1.5em; font-weight: 500; }
.form-status:empty { display: none; }
.form-status[data-state="error"] { color: #F08A7E; }
.form-status[data-state="ok"] { color: var(--sand-2); }
.form-next {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--sand-wash);
}

/* ---------- Requests inbox (shown to the page's editors only) ---------- */

.inbox { background: var(--ground-2); }
.inbox-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; }
.inbox-head h2 { font-size: var(--fs-h3); font-weight: 600; }
.inbox-head p { font-size: var(--fs-small); color: var(--mist); }
.inbox-scroll { overflow-x: auto; }
.inbox table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 0.9375rem; }
.inbox th { text-align: start; font-weight: 500; color: var(--mist); padding: 0.6rem 0.75rem; font-size: var(--fs-small); }
.inbox td { padding: 0.8rem 0.75rem; vertical-align: top; background: var(--ground-3); line-height: 1.6; }
.inbox tr + tr td { border-top: 6px solid var(--ground-2); }
.inbox td:first-child { font-weight: 600; }
.inbox time { font-variant-numeric: tabular-nums; color: var(--mist); white-space: nowrap; }
.inbox-empty { padding: 1.5rem; border-radius: var(--radius); background: var(--ground-3); color: var(--mist); }

/* ---------- Footer ---------- */

.site-footer { background: #0A1310; padding-block: 64px 32px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; align-items: start; }
.footer-brand { display: grid; gap: 0.75rem; justify-items: start; }
.footer-mark { font-size: 1.75rem; font-weight: 700; }
.footer-mark span { color: var(--sand); font-weight: 500; }
.footer-tag { color: var(--mist); font-size: 0.9375rem; max-width: 34ch; margin-bottom: 0.5rem; }
.footer-col h2 { font-size: var(--fs-body); font-weight: 600; color: var(--sand); margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: 0.65rem; color: var(--mist); font-size: 0.9375rem; line-height: 1.6; }
.footer-col a { color: var(--mist); text-decoration: none; transition: color 180ms ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 48px;
  padding-top: 24px;
  font-size: var(--fs-small);
  color: var(--mist-2);
}
.credits { max-width: 72ch; }
.credits summary { cursor: pointer; color: var(--mist); }
.credits p { margin-top: 0.5rem; }
.credits ul { margin-top: 0.5rem; display: grid; gap: 0.25rem; font-size: var(--fs-small); line-height: 1.5; }
.credits a { color: var(--mist); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* The one loud moment: headline lines rise out of their mask, the photographs drift */
  .js .lines [data-line] {
    transform: translateY(110%);
    animation: line-up 1000ms var(--ease-out) forwards;
    animation-delay: calc(var(--i) * 120ms + 200ms);
  }
  .js [data-rise] {
    opacity: 0;
    animation: rise 800ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 100ms + 450ms);
  }
  .slide.is-active img,
  .slide.is-leaving img { animation: drift var(--slide-ms) linear forwards; }
  .slide:nth-child(even).is-active img,
  .slide:nth-child(even).is-leaving img { animation-name: drift-alt; }
  .dot[aria-current="true"] span::after { animation: progress var(--slide-ms) linear forwards; }
  .is-paused .slide.is-active img,
  .is-paused .dot[aria-current="true"] span::after,
  .is-hidden .slide.is-active img,
  .is-hidden .dot[aria-current="true"] span::after { animation-play-state: paused; }

  .strip-track { animation: marquee 110s linear infinite; }
  .strip:hover .strip-track,
  .is-hidden .strip-track { animation-play-state: paused; }

  .sectors-track { animation: marquee-track 40s linear infinite; }
  :root[dir="rtl"] .sectors-track { animation-name: marquee-track-rtl; }
  .sectors:hover .sectors-track,
  .is-hidden .sectors-track,
  .motion-paused .sectors-track,
  .motion-paused .strip-track { animation-play-state: paused; }

  .hero-rotator span { display: inline-block; transition: opacity 350ms ease, transform 450ms var(--ease-out); }
  .hero-rotator.is-swapping span { opacity: 0; transform: translateY(10px); }

  .service[open] .service-panel { animation: panel-in 500ms var(--ease-out); }
}

/* Photographs move a little against the scroll (browsers with scroll timelines only) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .frame img.parallax {
      height: 116%;
      margin-top: -8%;
      animation: parallax linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    .parallax-strong { animation: parallax-strong linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  }
}

@keyframes line-up { to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
@keyframes drift-alt { from { transform: scale(1.12) translate3d(1.5%, 0, 0); } to { transform: scale(1.02); } }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-track { to { transform: translateX(-100%); } }
@keyframes marquee-track-rtl { to { transform: translateX(100%); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes parallax { from { transform: translateY(-5%); } to { transform: translateY(5%); } }
@keyframes parallax-strong { from { transform: translateY(-12%); } to { transform: translateY(0); } }

/* ---------- Tablet ---------- */

@media (max-width: 1080px) {
  .nav { gap: 1rem; }
  .nav a { font-size: 0.875rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .season-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .principle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro-grid { grid-template-columns: 1fr; }
  .service-panel { padding-inline-start: 0; }
}

/* ---------- Phone ---------- */

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .site-header { background: rgba(var(--scrim), 0.9); }
  .menu-toggle { display: inline-flex; align-items: center; }
  .menu {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 24px max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--ground);
  }
  .menu.is-open { display: flex; }
  .nav { flex-direction: column; gap: 0; margin: 0; }
  .nav a { padding: 0.9rem 0; font-size: 1.0625rem; color: var(--text); }
  .lang { padding: 0.9rem 0; font-size: 1.0625rem; }
  .menu .btn { margin-top: 0.75rem; min-height: 52px; font-size: var(--fs-body); }

  .hero { min-height: max(600px, 92svh); }
  .hero-inner { padding-top: calc(var(--header-h) + 48px); }
  .hero-actions .btn { flex: 1 1 auto; }
  :root[lang="en"] .hero-title { font-size: 2.125rem; max-width: none; }
  .hero-foot { padding-block: 20px 28px; }

  .intro-grid, .academy-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .photo-cards { gap: 10px; }
  .photo-card-text { inset-inline: 12px; bottom: 10px; }
  .compare-col.is-us { order: -1; }

  .statement-h { font-size: 1.75rem; }
  .service summary { grid-template-columns: 3rem minmax(0, 1fr) 40px; gap: 0.75rem; }
  .service-plus { width: 40px; height: 40px; }
  .service-panel { grid-template-columns: 1fr; }
  .service-title > span { display: none; }
  .stats { gap: 18px 12px; }
  .stats li { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .sectors { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .sectors-window { width: 100%; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1 1 auto; }

  .stage { grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.5rem 1rem; padding: 20px; }
  .stage .num { font-size: 1.5rem; }
  .stage-out { grid-column: 2; padding-top: 0; }

  .factors { grid-template-columns: 1fr; }
  .season-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .plans { grid-template-columns: 1fr; gap: 28px; }

  .academy-photo { position: relative; top: auto; aspect-ratio: 16 / 10; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts div { padding: 14px 12px; }
  .modules { grid-template-columns: 1fr; }

  .principle-list { grid-template-columns: 1fr; gap: 24px; }
  .strip-track img { height: 120px; }
  .row { grid-template-columns: 1fr; }
  .calc-out { grid-template-columns: 1fr; }
  .calc-out div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .h2 { font-size: 1.625rem; }
  .statement-h { font-size: 1.5rem; }
  .hero-title { font-size: 2.125rem; }
  :root[lang="en"] .hero-title { font-size: 1.75rem; }
  .callout { font-size: 1.25rem; }
}

@media (max-width: 420px) {
  .calc-fields { grid-template-columns: 1fr; }
  .season-list { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}

/* Rotating service line under the hero headline */
.hero-rotator {
  min-height: 1.6em;
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--sand);
  line-height: 1.5;
}

/* 404 page */
.not-found { min-height: 100svh; display: grid; align-content: center; }
.not-found .wrap { display: grid; gap: 1.25rem; justify-items: start; }
.not-found-en { margin-top: 2rem; }
