/* Alegreya Sans, self-hosted (SIL Open Font License, see assets/fonts/OFL.txt) */
@font-face { font-family: "Alegreya Sans"; src: url("assets/fonts/AlegreyaSans-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("assets/fonts/AlegreyaSans-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("assets/fonts/AlegreyaSans-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("assets/fonts/AlegreyaSans-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("assets/fonts/AlegreyaSans-ExtraBold.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }

/* TWR brand tokens, sampled from the TWR branding guideline */
:root {
  --navy: #0f2740;        /* headlines, primary buttons */
  --navy-deep: #0b1e31;   /* accent section */
  --blue: #0b4f8a;        /* brand blue: links, hover */
  --gold: #b0952c;        /* single accent */
  --gold-light: #d2b85a;  /* gold on navy */

  --bg: #f8f7f4;
  --surface: #ffffff;
  --tint: #eef1f4;
  --ink: #26323f;
  --muted: #5b6876;
  --line: #d9dee4;
  --line-strong: #b9c2cc;

  --font: "Nexa", "Alegreya Sans", system-ui, sans-serif;
  --font-body: "Alegreya Sans", system-ui, sans-serif;
  --font-ar: "SF Arabic", "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;

  --wrap: 1720px;
  --gutter: clamp(20px, 4vw, 64px);
  --radius: 4px;
  --header-h: 84px;
}
@media (max-width: 960px) { :root { --header-h: 68px; } }
@media (min-width: 2200px) { :root { --wrap: 2040px; } html { font-size: 112.5%; } }

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font);
  color: var(--navy);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 4.25rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.95rem, 3.4vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
p { margin: 0; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

/* Facts only TWR can supply. Remove the class once confirmed. */
.tbc { background: rgba(176, 149, 44, 0.14); border-bottom: 1px dashed var(--gold); padding: 0 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-weight: 700; font-size: 1.0625rem;
  padding: 14px 26px; border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--blue); color: #fff; }
.btn--small { padding: 10px 18px; font-size: 1rem; }

.link-arrow {
  font-family: var(--font); font-weight: 700; color: var(--navy);
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover { color: var(--blue); }
.link-arrow:hover::after { transform: translateX(3px); }

.eyebrow {
  font-family: var(--font); font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
  padding-top: 0.9rem;
}
.eyebrow::before {
  content: ""; display: block; width: 28px; height: 2px; background: var(--gold); margin-bottom: 14px;
}

/* Header: navy, sits on top of the hero */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { background: rgba(15, 39, 64, .97); box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 8px 24px rgba(4, 14, 26, .25); }
.site-header__inner { display: flex; align-items: center; gap: 32px; height: 100%; }

.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }

.nav { margin-inline-start: auto; }
.nav__list { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; }
.nav__list a { color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 500; font-size: 1.0625rem; }
.nav__list a:hover { color: #fff; }

/* Logo */
.brand { color: #fff; }
.brand picture { display: block; }
.brand__logo { display: block; height: 64px; width: auto; max-width: none; }
.brand--footer .brand__logo { height: auto; width: min(380px, 100%); }

.nav-toggle { display: none; }

@media (max-width: 1380px) {
  .nav__list { gap: 20px; }
  .nav__list a { font-size: 1rem; }
  .brand__logo { height: 54px; }
}
@media (max-width: 960px) {
  .site-header__inner { gap: 16px; }
  .brand__logo { height: 46px; }
}
@media (max-width: 560px) {
  .brand__logo { height: 46px; }
  .brand--footer .brand__logo { width: auto; height: 64px; }
}
@media (max-width: 440px) {
  .site-header__inner { gap: 10px; }
  .brand__logo { height: 44px; }
}
@media (max-width: 350px) {
  .site-header__inner { gap: 8px; }
  .brand__logo { height: 38px; }
}
@media (max-width: 1200px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-inline-start: auto; margin-inline-end: -10px;
    background: none; border: 0; cursor: pointer; color: #fff;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s, opacity .2s;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; margin: 0; }
  .nav__list {
    display: none; flex-direction: column; gap: 0;
    background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.12); padding: 8px var(--gutter) 16px;
  }
  .nav__list.is-open { display: flex; }
  .nav__list a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .site-header__cta { margin-inline-start: auto; }
  .site-header__cta + .nav-toggle { margin-inline-start: 4px; }
}
@media (max-width: 720px) {
  .site-header__cta { display: none; }
  .site-header__cta + .nav-toggle { margin-inline-start: auto; }

}

.btn--gold { background: var(--gold-light); color: var(--navy); }
.btn--gold:hover { background: #e2c96c; color: var(--navy); }
.site-header .btn--gold { white-space: nowrap; }

/* Hero: header + hero = exactly one viewport, at any size.
   The clause panel takes whatever height is left. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--navy); color: #fff;
  min-height: max(520px, calc(100vh - var(--header-h)));
  min-height: max(520px, calc(100svh - var(--header-h)));
  display: flex;
}

/* Skyline photo (optional file), then a navy wash so text always has contrast */
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero::before {
  background: url("assets/hero-skyline.jpg") center 30% / cover no-repeat;
}
.hero::after {
  background:
    linear-gradient(90deg, rgba(15,39,64,.88) 0%, rgba(15,39,64,.62) 45%, rgba(15,39,64,.25) 100%),
    linear-gradient(180deg, rgba(15,39,64,0) 40%, rgba(15,39,64,.85) 78%, var(--navy) 100%);
}

.hero__inner {
  width: 100%; display: flex; flex-direction: column; justify-content: center; min-width: 0;
  padding-top: clamp(24px, 6vh, 96px); padding-bottom: clamp(24px, 6vh, 96px);
}
.hero__content { flex-shrink: 0; }
.hero__eyebrow {
  font-size: clamp(.75rem, 1.6vh, .875rem); letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-bottom: clamp(12px, 2.4vh, 28px);
}
.hero h1 {
  color: #fff; max-width: 14ch; font-weight: 700; line-height: 1.04;
  font-size: clamp(2.25rem, min(6vw, 7.4vh), 5.75rem);
}
.hero .lead {
  margin-top: clamp(12px, 2.6vh, 28px); max-width: 40em;
  font-size: clamp(1.05rem, min(1.7vw, 2.4vh), 1.375rem); color: rgba(255,255,255,.86);
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; margin-top: clamp(18px, 3.6vh, 40px); }
.hero__link { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 5px; font-weight: 500; }
.hero__link:hover { color: #fff; text-decoration-color: var(--gold-light); }
.hero__standards {
  margin-top: clamp(14px, 2.6vh, 28px); font-size: .9375rem; color: rgba(255,255,255,.62); letter-spacing: .02em;
}
.hero__standards a { color: var(--gold-light); text-underline-offset: 3px; }
.hero__standards a:hover { color: #fff; }
.hero__standards span { white-space: nowrap; }

/* Clause panel: sized to its content; the hero centres text + panel together */
.clauses {
  margin: clamp(28px, 6vh, 72px) 0 0; flex: 0 0 auto;
  display: flex; flex-direction: column;
}
.clauses__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding-bottom: 14px; flex-shrink: 0;
}
.clauses__title { font-family: var(--font); font-weight: 700; font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: #fff; }
.clauses__sub { font-size: clamp(.9375rem, 1.1vw, 1.0625rem); color: rgba(255,255,255,.7); }
.clauses__row {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14);
  transition: opacity .8s ease;
}
.clause {
  position: relative; overflow: hidden; min-width: 0;
  background: rgba(15, 39, 64, .9);
  display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(10px, 1.6vh, 18px);
  padding: clamp(12px, 1.3vw, 20px) clamp(10px, 1.3vw, 20px) clamp(16px, 1.8vw, 24px);
}
.clause__fill {
  position: absolute; inset: 0; background: rgba(255,255,255,.08);
  transform: scaleX(0); transform-origin: var(--start, left) center;
}
.clause__fill::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold-light);
}
.clause__num {
  position: relative; font-family: var(--font); font-weight: 500; line-height: 1;
  font-size: clamp(1.5rem, min(3vw, 5.5vh), 3.25rem);
  color: rgba(255,255,255,.35); font-variant-numeric: lining-nums tabular-nums;
  transition: color .8s ease;
}
.clause__text { position: relative; display: flex; flex-direction: column; gap: 6px; }
.clause__name {
  font-family: var(--font); font-weight: 700; line-height: 1.15;
  font-size: clamp(.95rem, 1.25vw, 1.25rem); color: rgba(255,255,255,.55);
  transition: color .7s ease;
}
.clause__desc {
  font-size: clamp(.8125rem, .95vw, 1rem); line-height: 1.3; color: rgba(255,255,255,.82);
  opacity: 0; transform: translateY(6px); transition: opacity .7s ease, transform .7s ease;
}

.clause.is-active .clause__num, .clause.is-done .clause__num { color: var(--gold-light); }
.clause.is-active .clause__name, .clause.is-done .clause__name { color: #fff; }
.clause.is-active .clause__fill { transform: scaleX(1); transition: transform 1.4s cubic-bezier(.45, 0, .25, 1); }
.clause.is-active .clause__desc { opacity: 1; transform: none; transition-delay: .4s; }
.clause.is-done .clause__fill { transform: scaleX(1); }
.clause.is-done .clause__desc { opacity: 1; transform: none; }

.clauses__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 48px; padding-top: 12px; flex-shrink: 0;
}
.clauses__caption { font-size: 1rem; color: #fff; transition: opacity .4s; display: none; }
.clauses__pause {
  background: none; border: 1px solid rgba(255,255,255,.22); white-space: nowrap; color: rgba(255,255,255,.75);
  font: inherit; font-size: .875rem; padding: 6px 12px; border-radius: var(--radius); cursor: pointer;
}
.clauses__pause:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.clauses__ready {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font); font-weight: 700; font-size: 1.05rem; color: #fff;
  padding: 7px 14px; border: 1px solid var(--gold-light); border-radius: var(--radius);
  opacity: 0; transform: translateX(-6px); transition: opacity .9s ease, transform .9s ease; white-space: nowrap;
  margin-inline-start: auto;
}
.clauses__ready svg { width: 16px; height: 16px; color: var(--gold-light); }

.clauses.is-ready .clauses__ready { opacity: 1; transform: none; }
.clauses.is-ready .clauses__caption { opacity: 0; }
.clauses.is-resetting .clauses__row, .clauses.is-resetting .clauses__ready { opacity: 0; }
.clauses.no-anim, .clauses.no-anim * { transition: none !important; }

/* Mid widths: names only in the cells, the active step's description below */
@media (max-width: 1100px) {
  .clause__desc { display: none; }
  .clauses__caption { display: block; flex: 1 1 100%; min-height: 3.2em; line-height: 1.6; }
}
@media (max-width: 760px) {
  .clause__text { display: none; }
  .clauses__sub { display: none; }
  .hero .lead { max-width: none; }
  .clauses__title { font-size: 1rem; }
  .clauses__caption { font-size: .9375rem; }
}
/* Short laptop screens (e.g. 1280x720, 1366x768): tighten so everything fits above the fold */
@media (max-height: 920px) and (min-width: 761px) {
  .hero__standards { margin-top: 14px; }
  .hero__inner { padding-top: clamp(18px, 4vh, 48px); padding-bottom: clamp(14px, 3vh, 32px); }
  .clauses { margin-top: clamp(16px, 3.4vh, 40px); }
  .clauses__head { padding-bottom: 10px; }
  .clause { padding: 10px 12px; gap: 6px; }
  .clause__num { font-size: clamp(1.4rem, 4.2vh, 2.25rem); }
  .clauses__foot { min-height: 40px; padding-top: 8px; }
}

/* Short phones (e.g. iPhone SE, browser bars showing) */
@media (max-height: 720px) and (max-width: 760px) {
  .hero__inner { padding-top: 20px; padding-bottom: 8px; }
  .hero__eyebrow { margin-bottom: 10px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
  .hero .lead { font-size: 1rem; line-height: 1.5; margin-top: 12px; }
  .hero__actions { margin-top: 16px; }
  .hero__standards { display: none; }
  .clauses { margin-top: 20px; }
  .clauses__foot { min-height: 40px; padding-top: 6px; }
}
/* Landscape phones: there is no room for the panel, so show the text only */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { min-height: calc(100svh - var(--header-h)); }
  .clauses { display: none; }
  .hero__inner { justify-content: center; }
}

/* Large monitors: use more of the width so the hero does not look marooned */
@media (min-width: 1800px) and (min-height: 1000px) {
  .hero h1 { font-size: clamp(5rem, 7vh, 7rem); }
  .hero .lead { font-size: 1.5rem; }
}

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--rule .split {
  padding-top: clamp(48px, 6vw, 72px);
  background: linear-gradient(var(--line), var(--line)) no-repeat top center / calc(100% - 2 * var(--gutter)) 1px;
}
.section--rule { padding-top: 0; }
.section--tint { background: var(--tint); }

.split {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px clamp(32px, 5vw, 80px);
}
.split > * { min-width: 0; }
.split > div > h2 { max-width: 30ch; }
#what h2 { max-width: none; }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .eyebrow { padding-top: 0; }
}

.prose { margin-top: 24px; max-width: 52em; }
.prose p + p { margin-top: 1em; }

/* Standards table */
.table-scroll { margin-top: 36px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.standards { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 1.0625rem; }
.standards th, .standards td { text-align: start; padding-block: 18px; padding-inline: 0 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.standards thead th {
  font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  font-weight: 700; padding-top: 0; border-bottom-color: var(--line-strong);
}
.standards tbody th { font-family: var(--font); color: var(--navy); font-weight: 700; white-space: nowrap; }
.standards td:last-child { color: var(--muted); }
@media (max-width: 640px) {
  .table-scroll { overflow: visible; }
  .standards, .standards tbody, .standards tr, .standards th, .standards td { display: block; min-width: 0; }
  .standards thead { display: none; }
  .standards tr { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .standards th, .standards td { border: 0; padding: 0; }
  .standards tbody th { font-size: 1.15rem; margin-bottom: 6px; }
  .standards td + td { margin-top: 4px; }
  .standards td::before {
    content: attr(data-label); display: block; font-size: 0.75rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: 8px;
  }
}
.note { margin-top: 24px; max-width: 40em; color: var(--ink); }

/* Stages */
.stages { list-style: none; margin: 40px 0 0; padding: 0; counter-reset: stage; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; }
@media (max-width: 1100px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stages li { counter-increment: stage; padding-block: 28px; padding-inline: 64px 0; position: relative; border-top: 1px solid var(--line); }
.stages li::before {
  content: counter(stage, decimal-leading-zero);
  position: absolute; inset-inline-start: 0; top: 26px;
  font-family: var(--font); font-weight: 700; font-size: 1.15rem; color: var(--gold);
  font-variant-numeric: lining-nums tabular-nums;
}
.stages p { margin-top: 8px; color: var(--ink); }
@media (max-width: 760px) { .stages { grid-template-columns: 1fr; } }

/* Reasons */
.reasons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 48px; margin-top: 40px; }
@media (max-width: 1200px) { .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.reason p { margin-top: 10px; }
.reason h3::after { content: ""; display: block; width: 28px; height: 2px; background: var(--line-strong); margin-top: 14px; }
@media (max-width: 760px) { .reasons { grid-template-columns: 1fr; gap: 32px; } }

/* Commitment: accent section */
.commitment {
  background: var(--navy-deep); color: #d6dde5;
  padding: clamp(72px, 10vw, 128px) 0; position: relative; overflow: hidden;
}
.commitment__inner > * { min-width: 0; }
.commitment__inner { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px clamp(32px, 5vw, 72px); position: relative; z-index: 1; }
.commitment h2 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: none; }
.commitment__body { font-size: clamp(1.2rem, 1.8vw, 1.5rem); margin-top: 24px; max-width: 40em; color: #e5eaf0; }
.commitment__small { margin-top: 28px; font-size: 0.9375rem; color: #9fb0c2; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); max-width: 34em; }
.eyebrow--light { color: var(--gold-light); }
@media (max-width: 800px) { .commitment__inner { grid-template-columns: 1fr; }  }

/* FAQ */
.faq { margin-top: 32px; border-top: 1px solid var(--line); max-width: 64em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding-block: 22px; padding-inline: 0 40px; position: relative;
  font-family: var(--font); font-weight: 700; font-size: 1.2rem; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; inset-inline-end: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--blue); }
.faq details p { padding: 0 0 24px; padding-inline-end: 40px; max-width: 56em; }

/* Form */
.contact__intro { margin-top: 20px; }
.form { margin-top: 36px; max-width: 960px; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { margin-top: 24px; }
fieldset.field { border: 0; padding: 0; margin-inline: 0; }
.field label, .field legend { font-weight: 500; color: var(--navy); font-size: 1rem; padding: 0; }
.req { color: var(--gold); }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1.0625rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field select {
  appearance: none; padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230f2740' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 39, 64, .12);
}
.field__error { display: none; color: #a3261b; font-size: 0.9375rem; }
.field.has-error input { border-color: #a3261b; }
.field.has-error .field__error { display: block; }

.checks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.check { position: relative; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check span {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); font-size: 1rem; color: var(--ink); transition: background-color .15s, border-color .15s, color .15s;
}
.check:hover span { border-color: var(--navy); }
.check input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.check input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.form__submit { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.form__privacy { font-size: 0.9375rem; color: var(--muted); max-width: 32em; }
.form__legend { font-size: 0.9375rem; color: var(--muted); margin-bottom: 20px; }

.form__done {
  margin-top: 36px; max-width: 760px; background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 3px solid var(--gold); padding: 24px 28px; font-size: 1.15rem; color: var(--navy);
}
.form__done:focus { outline: none; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 1rem; }
.site-footer__top { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 1200px) { .site-footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.site-footer address { font-style: normal; }
.site-footer__brand p { margin-top: 16px; color: var(--muted); max-width: 26em; }
.site-footer__h {
  font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* UK and Lebanon share one set of rows, so each line sits level with its counterpart */
.site-footer__offices {
  grid-column: span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(6, auto); column-gap: 40px; row-gap: 8px;
}
.site-footer__offices > .site-footer__col { display: grid; grid-row: 1 / span 6; grid-template-rows: subgrid; }
.site-footer__offices address, .site-footer__offices ul { display: contents; }
.site-footer__offices .site-footer__h { margin-bottom: 8px; }
.site-footer__col a { color: var(--ink); text-decoration: none; }
.site-footer__col a:hover { color: var(--blue); text-decoration: underline; }
.site-footer__col .tbc { justify-self: start; }
.social { list-style: none; margin: 20px 0 0; padding: 0; display: flex !important; gap: 8px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-start: -10px; color: var(--navy); }
.social li + li a { margin-inline-start: 0; }
.social svg { width: 24px; height: 24px; }
.social a:hover { color: var(--blue); }
.site-footer__bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; color: var(--muted); font-size: 0.9375rem;
}
.site-footer__bottom a, .linklike { color: var(--muted); }
.site-footer__legal { display: flex !important; flex-wrap: wrap; gap: 8px 20px !important; }
.linklike {
  background: none; border: 0; padding: 0; font: inherit; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
.linklike:hover { color: var(--navy); }
@media (max-width: 860px) {
  .site-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .site-footer__top { grid-template-columns: 1fr; }
  .site-footer__offices { grid-column: 1 / -1; column-gap: 20px; }
}

/* Cookie consent */
.cc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 760px; margin: 0 auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 12px 40px rgba(11, 30, 49, .22);
  padding: 22px 24px; font-size: 1rem;
}
.cc-banner[hidden] { display: none; }
.cc-banner h2 { font-size: 1.15rem; }
.cc-banner p { margin-top: 8px; color: var(--ink); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
/* Accept and reject carry equal weight on purpose: no nudging */
.cc-btn {
  font: inherit; font-family: var(--font); font-weight: 700; font-size: 1rem;
  padding: 10px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--navy); background: var(--navy); color: #fff; flex: 1 1 auto;
}
.cc-btn:hover { background: var(--blue); border-color: var(--blue); }
.cc-btn--ghost { background: transparent; color: var(--navy); }
.cc-btn--ghost:hover { background: var(--tint); color: var(--navy); border-color: var(--navy); }

.cc-dialog {
  width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  border: 1px solid var(--line); border-radius: 6px; padding: 28px; color: var(--ink);
  box-shadow: 0 20px 60px rgba(11, 30, 49, .3);
}
.cc-dialog::backdrop { background: rgba(11, 30, 49, .55); }
.cc-dialog h2 { font-size: 1.4rem; }
.cc-dialog > p { margin-top: 10px; }
.cc-cat { border-top: 1px solid var(--line); padding: 16px 0; margin-top: 16px; }
.cc-cat__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cc-cat__head label, .cc-cat__head strong { font-family: var(--font); font-weight: 700; color: var(--navy); }
.cc-cat p { margin-top: 6px; font-size: .9375rem; color: var(--muted); }
.cc-switch { appearance: none; width: 44px; height: 24px; border-radius: 12px; background: var(--line-strong); position: relative; cursor: pointer; flex-shrink: 0; margin: 0; transition: background-color .2s; }
.cc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.cc-switch:checked { background: var(--navy); }
.cc-switch:checked::after { transform: translateX(20px); }
.cc-switch:disabled { opacity: .6; cursor: not-allowed; }
.cc-always { font-size: .875rem; color: var(--muted); }

/* Legal pages */
.legal { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); }
.legal__body { max-width: 46em; }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.legal__meta { margin-top: 12px; color: var(--muted); }
.legal h2 { font-size: 1.5rem; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal h3 { margin-top: 28px; font-size: 1.15rem; }
.legal p, .legal ul, .legal ol { margin-top: 14px; }
.legal li + li { margin-top: 6px; }
.legal .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 24px; margin-top: 32px; }
.legal .toc ol { margin: 8px 0 0; padding-inline-start: 1.2em; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .legal .toc ol { columns: 1; } }
.legal table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 1rem; }
.legal th, .legal td { text-align: start; vertical-align: top; padding-block: 12px; padding-inline: 0 14px; border-bottom: 1px solid var(--line); }
.legal thead th { font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line-strong); }
.legal code { font-size: .9em; background: var(--tint); padding: 1px 5px; border-radius: 3px; }
.legal .callout { margin-top: 20px; border-inline-start: 3px solid var(--gold); background: var(--surface); padding: 16px 20px; }
.legal .table-scroll { margin-top: 0; overflow-x: auto !important; }
.legal .table-scroll table { min-width: 620px; }

/* Signature */
.signature { display: block; width: min(300px, 70%); height: auto; }
.commitment__signature {
  position: absolute; z-index: 0; pointer-events: none; height: auto;
  inset-inline-end: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  bottom: clamp(20px, 4vw, 56px);
  width: clamp(180px, 22vw, 380px);
  opacity: .2;
}
@media (max-width: 800px) { .commitment__signature { opacity: .14; width: 200px; } }

/* Story teaser on the home page */
.story-teaser {
  background-color: #f3eee2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border-top: 1px solid #e3dccb; border-bottom: 1px solid #e3dccb;
}
.story-teaser h2 { max-width: 22ch; }
.story-teaser__lead { margin-top: 20px; max-width: 40em; font-size: clamp(1.15rem, 1.6vw, 1.35rem); color: #3a3428; }
.story-teaser .btn { margin-top: 32px; }

/* Story page: paper */
.paper-page {
  background-color: #e9e4d8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.paper-wrap { padding: clamp(24px, 6vw, 88px) var(--gutter) clamp(48px, 8vw, 120px); }
.paper {
  max-width: 820px; margin: 0 auto; position: relative;
  background-color: #fbf8f1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .33 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at center, rgba(255,255,255,0) 60%, rgba(160,130,80,.08) 100%);
  box-shadow: 0 1px 2px rgba(60,45,20,.12), 0 12px 40px rgba(60,45,20,.14);
  padding: clamp(32px, 7vw, 96px) clamp(24px, 7vw, 100px);
  color: #2c2a25;
}
.paper__kicker { font-size: .8125rem; letter-spacing: .2em; text-transform: uppercase; color: #8a7d62; }
.paper h1 { margin-top: 14px; color: var(--navy); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; }
.paper__dates { margin-top: 10px; font-size: 1.15rem; color: #6b6150; font-style: italic; }
.paper__rule { border: 0; height: 1px; background: #d9cfb9; margin: clamp(28px, 4vw, 44px) 0; }
.paper__body p { font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.75; margin-top: 1.1em; color: #2c2a25; }
.paper__body p:first-child { margin-top: 0; }
.paper__body p:first-child::first-letter {
  float: inline-start; font-family: var(--font); font-weight: 700; color: var(--navy);
  font-size: 4.2em; line-height: .82; margin: .08em .1em 0 0;
}
.paper__quote {
  margin: 1.8em 0; padding-block: 4px; padding-inline: 24px 0; border-inline-start: 3px solid var(--gold);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.4; color: var(--navy); font-style: italic;
}
.paper__sign { margin-top: clamp(32px, 5vw, 56px); }
.paper__sign .signature { width: min(300px, 75%); }
.paper__sign p { margin-top: 8px; color: #6b6150; font-size: .9375rem; }
.paper__back { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; max-width: 820px; margin: 32px auto 0; }
.paper__back a:not(.btn) { color: var(--navy); }
@media print {
  .site-header, .site-footer, .paper__back, .cc-banner { display: none !important; }
  .paper-page, .paper { background: #fff; box-shadow: none; }
}

/* Arabic (right to left) */
[dir="rtl"] {
  --start: right;
  --font: "Alegreya Sans", var(--font-ar);
  --font-body: "Alegreya Sans", var(--font-ar);
}
[dir="rtl"] body { line-height: 1.8; }
/* Arabic letters must join, so no letter-spacing on Arabic text */
[dir="rtl"] :is(h1, h2, h3, .eyebrow, .hero__eyebrow, .site-footer__h, .standards thead th, .standards td::before, .legal thead th, .paper__kicker, .clauses__title, .clause__name) { letter-spacing: 0; }
[dir="rtl"] .hero h1 { line-height: 1.25; }
[dir="rtl"] .link-arrow::after { content: "←"; }
[dir="rtl"] .link-arrow:hover::after { transform: translateX(-3px); }
[dir="rtl"] .clauses__ready { transform: translateX(6px); }
[dir="rtl"] .clauses.is-ready .clauses__ready { transform: none; }
[dir="rtl"] .field select { background-position: left 14px center; }
[dir="rtl"] .cc-switch:checked::after { transform: translateX(-20px); }
[dir="rtl"] .cc-switch::after { left: auto; right: 3px; }
[dir="rtl"] .paper__body p:first-child::first-letter { float: none; font-size: inherit; margin: 0; line-height: inherit; font-weight: inherit; color: inherit; }
[dir="rtl"] .paper__quote { font-style: normal; }
[dir="rtl"] .commitment__signature { transform: none; }
[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Phones: comfortable sizes and tap targets */
@media (max-width: 560px) {
  .hero__inner { padding-top: 28px; padding-bottom: 24px; }
  .hero h1 { font-size: clamp(2.1rem, 9.4vw, 2.6rem); line-height: 1.08; }
  .hero .lead { font-size: 1.0625rem; line-height: 1.6; }
  .hero__actions { gap: 4px 24px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__link { display: inline-flex; align-items: center; min-height: 44px; }
  .clauses { margin-top: 28px; }
  .clauses__head { padding-bottom: 10px; }
  .clause { padding: 10px 6px 12px; align-items: center; }
  .clause__num { font-size: 1.5rem; }
  .clauses__foot { padding-top: 10px; }
  .clauses__pause { min-height: 40px; }

  .eyebrow, .site-footer__h, .standards thead th, .standards td::before, .paper__kicker, .legal thead th { font-size: .875rem; }
  h2 { font-size: clamp(1.75rem, 7.6vw, 2.1rem); }
  .commitment h2 { font-size: clamp(1.85rem, 8vw, 2.3rem); }
  .section { padding: 56px 0; }
  .section--rule .split { padding-top: 48px; }

  .site-footer { padding-top: 48px; }
  .site-footer ul { gap: 0; }
  .site-footer__col a, .site-footer__legal a, .site-footer .linklike { display: inline-flex; align-items: center; min-height: 40px; }
  .site-footer__col li:not(:has(a)) { padding: 6px 0; }
  .site-footer__legal { gap: 0 20px !important; }
  .site-footer__bottom { margin-top: 32px; }
  .standards__more a, .paper__back a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
  .form__submit .btn { width: 100%; }
  .cc-actions .cc-btn { flex: 1 1 100%; min-height: 46px; }
}

/* Short phones (iPhone SE, Android with browser bars): keep the hero to one screen */
@media (max-width: 560px) and (max-height: 800px) {
  .hero__inner { padding-top: 18px; padding-bottom: 14px; }
  .hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.25rem); }
  .hero .lead { font-size: 1rem; line-height: 1.5; margin-top: 10px; }
  .hero__actions { margin-top: 16px; }
  .hero__actions .btn { flex: 0 0 auto; }
  .hero__standards { display: none; }
  .clauses { margin-top: 18px; }
  .clauses__head { display: none; }
}
@media (max-width: 560px) and (max-height: 600px) {
  .hero .lead { display: none; }
  .clauses__foot { padding-top: 6px; }
  .clauses__caption { min-height: 0; }
}
