/* ==========================================================================
   MEDSOCIA — main stylesheet
   Structure:
     1. Fonts            5. Header & navigation     9. Contact & form
     2. Design tokens    6. Hero                   10. Footer
     3. Base & reset     7. (hero certifications live in 6)  11. Motion
     4. Layout & buttons 8. About
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */
/* Self-hosted variable fonts, Latin subset (covers French accents). */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-opsz.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Arabic: only downloaded by pages that actually contain Arabic characters (unicode-range). */
@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("../fonts/noto-naskh-arabic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "Tajawal";
  src: url("../fonts/tajawal-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "Tajawal";
  src: url("../fonts/tajawal-arabic-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "Tajawal";
  src: url("../fonts/tajawal-arabic-700.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 2. Design tokens -------------------------------------------------------- */
:root {
  /* Brand — mandatory, do not change */
  --color-primary: #0d4026; /* Deep Forest Green */
  --color-secondary: #f7f1e4; /* Warm Ivory */

  /* Supporting neutrals, all derived from the two brand colors */
  --color-primary-deep: #082e1b; /* footer, button hover on green */
  --color-primary-tint: #829985; /* 50% forest green / 50% ivory: second segment of the acquisition split */
  --color-secondary-deep: #eadfc5; /* hover on ivory, quiet surfaces */
  --color-ink: #17251d; /* body text on ivory */
  --color-muted-on-light: #4b5e53; /* secondary text on ivory (6.2:1) */
  --color-muted-on-dark: #c8ccbc; /* secondary text on green (7.2:1) */
  --color-line-on-light: rgba(13, 64, 38, 0.2);
  --color-line-on-dark: rgba(247, 241, 228, 0.18);
  --color-field-bg: #fffdf8;
  --color-field-border: #cbc2aa;
  --color-error: #a12b2b; /* functional only (6.4:1 on ivory) */

  /* Typography */
  --font-serif: "Fraunces", "Noto Naskh Arabic", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Hanken Grotesk", "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --text-base: 1.0625rem;
  --text-small: 0.9375rem;
  --text-h1: clamp(2rem, 0.8rem + 2.6vw, 3.1rem);
  --text-h2: clamp(1.8rem, 1.2rem + 1.8vw, 2.4rem);
  --text-quote: clamp(1.3rem, 1.05rem + 0.9vw, 1.65rem);

  /* Spacing & layout */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --container: 75rem;
  --section-space: clamp(3.5rem, 7vw, 5.75rem);
  --header-h: 4.75rem;
  --radius: 3px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --focus: var(--color-primary);
}

/* 3. Base & reset --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* The sticky header covers the top of the viewport: anchors, focus and keyboard
     navigation all treat that strip as unavailable, so nothing lands underneath it. */
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--color-secondary);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-optical-sizing: auto;
  text-wrap: balance;
}

p {
  margin: 0 0 1.25rem;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

strong {
  font-weight: 650;
}


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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-weight: 600;
  border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0.75rem;
  outline-color: var(--color-primary);
}

/* 4. Layout & buttons ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-title {
  font-size: var(--text-h2);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  margin-bottom: 1.75rem;
}

.section-title--light {
  color: var(--color-secondary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.7rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 0.98rem/1.2 var(--font-sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--light {
  background: var(--color-secondary);
  color: var(--color-primary);
}

.btn--light:hover {
  background: var(--color-secondary-deep);
}

.btn--outline-light {
  border-color: rgba(247, 241, 228, 0.5);
  color: var(--color-secondary);
}

.btn--outline-light:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-primary);
}

.btn--dark {
  background: var(--color-primary);
  color: var(--color-secondary);
}

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

/* 5. Header & navigation -------------------------------------------------- */
.site-header {
  --focus: var(--color-secondary);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-primary);
  color: var(--color-secondary);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--color-line-on-dark);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  height: 3.35rem;
  width: auto;
}

.primary-nav__list {
  display: flex;
  gap: 2.5rem;
}

.primary-nav__link {
  position: relative;
  padding: 0.4rem 0;
  color: var(--color-muted-on-dark);
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.primary-nav__link:hover,
.primary-nav__link[aria-current="true"] {
  color: var(--color-secondary);
}

.primary-nav__link:hover::after,
.primary-nav__link[aria-current="true"]::after {
  transform: scaleX(1);
}

.primary-nav__link--cta {
  padding: 0.55rem 1.15rem;
  background: var(--color-secondary);
  border-radius: var(--radius);
  color: var(--color-primary);
  font-weight: 600;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}

.primary-nav__link--cta::after {
  display: none;
}

.primary-nav__link--cta:hover,
.primary-nav__link--cta[aria-current="true"] {
  background: var(--color-secondary-deep);
  color: var(--color-primary);
}

@media (max-width: 62.49rem) {
  .primary-nav__list {
    gap: 1.5rem;
  }
}

@media (min-width: 75rem) {
  .primary-nav {
    display: flex;
    align-items: center;
  }
}

.nav-toggle {
  display: none;
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.nav-toggle__bar {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  height: 1.5px;
  background: currentColor;
  transition:
    transform 0.35s var(--ease),
    top 0.35s var(--ease);
}

.nav-toggle__bar:nth-child(1) {
  top: calc(50% - 5px);
}

.nav-toggle__bar:nth-child(2) {
  top: calc(50% + 4px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  top: 50%;
  transform: rotate(-45deg);
}

@media (max-width: 1199.98px) {
  .js .nav-toggle {
    display: block;
  }

  .js .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    padding: 1.5rem var(--gutter) 2rem;
    overflow-y: auto;
    background: var(--color-primary);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s var(--ease),
      visibility 0.3s;
  }

  .js .site-header.is-open .primary-nav {
    opacity: 1;
    visibility: visible;
  }

  .js .primary-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .js .primary-nav__link {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--color-line-on-dark);
    color: var(--color-secondary);
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
  }

  /* In the phone menu Contact becomes a full-width button at the end of the list. */
  .js .primary-nav__link.primary-nav__link--cta {
    margin-top: 1.25rem;
    padding: 0.95rem 1.25rem;
    border-bottom: 0;
    background: var(--color-secondary);
    color: var(--color-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
  }

  .js .primary-nav__link::after {
    display: none;
  }

  /* Without JS the links simply wrap under the logo. */
  .site-header__inner {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
  }

  .js .site-header__inner {
    height: var(--header-h);
  }

  .primary-nav__list {
    gap: 1.5rem;
  }
}

/* 6. Hero ----------------------------------------------------------------- */
.hero {
  --focus: var(--color-secondary);
  background: var(--color-primary);
  color: var(--color-secondary);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 3rem;
  padding-top: clamp(3rem, 8vw, 6rem);
}

.hero__copy {
  padding-bottom: 0.5rem;
}

.hero__title {
  font-size: var(--text-h1);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

/* The heading is one sentence made of three phrases. From tablet width up the
   phrases never split mid-way; on wide screens each gets its own line. */
@media (min-width: 37.5rem) {
  .hero__line {
    display: inline-block;
  }
}

@media (min-width: 50rem) {
  .hero__line {
    display: block;
  }
}

.hero__lead {
  max-width: 30rem;
  margin-bottom: 2.25rem;
  color: var(--color-muted-on-dark);
  font-size: 1.1875rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* Professional certifications: small, discreet trust indicators, flush-left
   close under the CTAs. Badges sit directly on the green: no boxes, borders,
   shadows or filters, and their original colours and proportions. */
.hero__certs {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
}

.hero__certs-label {
  margin: 0 0 0.65rem;
  color: var(--color-muted-on-dark);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero__certs-list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero__certs-list li {
  line-height: 0;
}

.hero__certs-badge {
  width: auto;
  height: 3rem;
}

@media (min-width: 62.5rem) {
  .hero__certs-list {
    gap: 1.5rem;
  }

  .hero__certs-badge {
    height: 3.5rem;
  }
}

@media (max-width: 30rem) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

.hero__art {
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  aspect-ratio: 600 / 674; /* photo frame (94% wide, 0.9 ratio) + a little air above for the arch's roof line */
}

.hero__mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero__mark-line {
  stroke: rgba(247, 241, 228, 0.34);
  stroke-width: 2.2;
  stroke-linejoin: miter;
  stroke-linecap: butt;
}

.hero__mark-line--inner {
  stroke: rgba(247, 241, 228, 0.2);
}

/* Large arch: 94% of the column, ratio 0.9 = the photograph's own proportions,
   so object-fit never has to crop the person or the laptop. */
.hero__photo {
  position: absolute;
  left: 3%;
  width: 94%;
  top: 7%;
  bottom: 0;
  margin: 0;
  overflow: hidden;
  background: var(--color-secondary-deep);
  border-radius: 999px 999px 0 0;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 40%;
}

@media (min-width: 62.5rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: end;
    gap: 3rem;
    min-height: min(calc(100svh - var(--header-h)), 46rem);
    padding-top: 2.5rem;
  }

  .hero__copy {
    align-self: center;
    padding-bottom: 5rem;
  }

  .hero__art {
    max-width: none;
    margin-inline: auto 0;
  }
}

@media (min-width: 50rem) {
  .hero__inner {
    gap: 4rem;
  }
}

/* 8. About ---------------------------------------------------------------- */
.about {
  padding-block: var(--section-space);
}

.about__inner {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}

.about__figure {
  position: relative;
  max-width: 28rem; /* portrait photo: keep it from growing huge in a single column */
  margin: 0 1.1rem 1.1rem 0;
}

.about__figure::before {
  content: "";
  position: absolute;
  inset: 1.1rem -1.1rem -1.1rem 1.1rem;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
}

.about__figure img {
  position: relative;
  width: 100%;
  height: auto; /* the photo is shown whole, at its own proportions */
  border-radius: var(--radius);
}

.about__copy p {
  max-width: 35rem;
}

.about__label {
  margin: 0 0 0.75rem;
  color: var(--color-muted-on-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.about__quote {
  margin-top: 2rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--color-primary);
  font-family: var(--font-serif);
  font-size: var(--text-quote);
  line-height: 1.4;
  color: var(--color-primary);
}

@media (min-width: 56.25rem) {
  .about__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(3rem, 7vw, 6.5rem);
  }

  .about__figure {
    max-width: none;
  }
}

/* 8a. Services ------------------------------------------------------------
   A forest-green band. Hairline-separated entries (no boxed cards): the top rule
   draws in and the icon fills on hover. Five items sit on a 6-column grid so the
   last row is balanced (3 + 2 wide) instead of leaving a hole.                 */
.services {
  --focus: var(--color-secondary);
  padding-block: clamp(3.25rem, 6.5vw, 5rem);
  background: var(--color-primary);
  color: var(--color-secondary);
}

.services__title {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.services__grid {
  display: grid;
  gap: 2.25rem 2rem;
  grid-template-columns: minmax(0, 1fr);
}

.service {
  position: relative;
  padding-top: 1.4rem;
  border-top: 1px solid var(--color-line-on-dark);
}

.service::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: left;
}

.service__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.service__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(247, 241, 228, 0.3);
  border-radius: 50%;
  color: var(--color-secondary);
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.service__num {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--color-muted-on-dark);
}

.service__title {
  margin: 0 0 0.9rem;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-secondary);
  text-wrap: balance;
}

.service__list li {
  position: relative;
  padding: 0.28rem 0 0.28rem 1.35rem;
  color: var(--color-muted-on-dark);
  font-size: 0.975rem;
  line-height: 1.5;
  transition: color 0.3s var(--ease);
}

.service__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 0.75rem;
  height: 1px;
  background: var(--color-muted-on-dark);
}

@media (hover: hover) {
  .service:hover::after {
    transform: scaleX(1);
  }

  .service:hover .service__icon {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-primary);
  }

  .service:hover .service__list li {
    color: var(--color-secondary);
  }
}

@media (min-width: 40rem) {
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 62.5rem) {
  .services__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2.5rem 2.5rem;
  }

  .service {
    grid-column: span 2;
  }

  .service:nth-child(n + 4) {
    grid-column: span 3;
  }

  /* Six bullets as two even columns of three. */
  .service:nth-child(4) .service__list {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    column-gap: 2.5rem;
  }
}

/* 8b. Client success story ------------------------------------------------
   Reads top to bottom: client identity → partnership → six stages → real Search
   Console evidence → patient acquisition. One shared 4 / 7 column grid keeps the
   whole section aligned on desktop; everything stacks on small screens.       */
.story {
  padding-block: var(--section-space);
  border-top: 1px solid var(--color-line-on-light);
}

.story__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 8vw, 6.5rem);
}

.story__opener,
.story__build,
.story__impact {
  display: grid;
  gap: 2.25rem;
}

/* 1–2. Client identity: logo, "client partner", "3 years of trust" */
.story__identity {
  position: relative;
  align-self: start;
  max-width: 20rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--color-line-on-light);
  border-bottom: 1px solid var(--color-line-on-light);
}

/* Hover: a forest-green rule draws along the bottom edge. The logo is never filtered or resized. */
.story__identity::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
}

.story__logo {
  display: block;
  width: 12rem;
  height: auto;
}

.story__meta-row {
  display: flex;
  margin-top: 1.1rem;
}

.story__meta {
  margin: 0;
  color: var(--color-muted-on-light);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.story__meta + .story__meta {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--color-line-on-light);
}

/* 3. Partnership introduction */
.story__intro .section-title {
  margin-bottom: 1.25rem;
}

.story__lead {
  max-width: 36rem;
  margin: 0;
}

/* Shared sub-heading style (levels 3) */
.story__title {
  margin: 0 0 1.1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.1rem);
  font-weight: 400;
  font-optical-sizing: auto;
  text-wrap: balance;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-primary);
}

.story__title span {
  display: block;
}

.story__title-sub {
  margin-top: 0.4rem;
  font-size: 0.74em;
  line-height: 1.25;
  color: var(--color-muted-on-light);
}

.story__build-lead,
.story__impact-text {
  max-width: 30rem;
  margin: 0;
}

/* 4. Six stages: numbered rows separated by hairlines, not cards */
.story__stages {
  border-top: 1px solid var(--color-line-on-light);
}

.story__stage {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  column-gap: 0.85rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--color-line-on-light);
}

.story__stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
}

.story__num {
  padding-top: 0.15rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--color-muted-on-light);
}

.story__stage-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-primary);
}

.story__stage-text {
  max-width: 38rem;
  margin: 0;
}

/* 5. Evidence: the real screenshot in a forest-green panel */
.story__evidence {
  --focus: var(--color-secondary);
  padding: clamp(1rem, 3vw, 2.5rem);
  background: var(--color-primary);
  color: var(--color-secondary);
  border-radius: 4px;
}

.story__labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem 1.5rem;
  margin-bottom: 1.1rem;
}

.story__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.story__label--secondary {
  color: var(--color-muted-on-dark);
  font-weight: 500;
}

/* The screenshot is shown whole and unaltered, never cropped. */
.story__shot {
  display: block;
  text-decoration: none;
  cursor: zoom-in;
}

.story__shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.story__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin-top: 0.85rem;
  color: var(--color-muted-on-dark);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.story__hint {
  transition: color 0.25s var(--ease);
}

.story__shot:focus-visible .story__hint {
  color: var(--color-secondary);
}

.story__note {
  margin: 1.1rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--color-line-on-dark);
  color: var(--color-muted-on-dark);
  font-size: 0.75rem;
  line-height: 1.55;
}

/* 6. Patient acquisition: reported 50 / 50 split */
.story__split {
  padding-block: 1.75rem;
  border-top: 1px solid var(--color-line-on-light);
  border-bottom: 1px solid var(--color-line-on-light);
}

.story__channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.story__channel:last-child {
  text-align: right;
}

.story__pct {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 1.9rem + 1.8vw, 3.25rem);
  font-optical-sizing: auto;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-primary);
}

.story__channel-name {
  margin: 0.55rem 0 0;
  color: var(--color-muted-on-light);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.story__bar {
  display: flex;
  gap: 0.35rem;
}

.story__bar-seg {
  flex: 1;
  height: 0.6rem;
  border-radius: 1px;
}

.story__bar-seg--organic {
  background: var(--color-primary);
  transform-origin: left;
}

.story__bar-seg--paid {
  background: var(--color-primary-tint);
  transform-origin: right;
}

.story__split-note {
  margin: 1.25rem 0 0;
  color: var(--color-muted-on-light);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Enlarged view (native <dialog>: focus handling and Esc come for free). */
.lightbox {
  width: min(96vw, 2144px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(8, 46, 27, 0.92);
}

.lightbox__scroll {
  max-height: 94vh;
  overflow: auto;
  border-radius: 4px;
  background: #fff;
}

/* On narrow screens the report keeps a readable width and scrolls sideways inside the viewer. */
.lightbox__img {
  display: block;
  width: max(100%, 56rem);
  max-width: none;
  height: auto;
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-secondary);
  color: var(--color-primary);
  font: 400 1.6rem/1 var(--font-sans);
  cursor: pointer;
}

.lightbox__close:hover {
  background: var(--color-secondary-deep);
}

body.lightbox-open {
  overflow: hidden;
}

/* Touch devices have no hover, so the enlarge hint is always clearly visible. */
@media (hover: none) {
  .story__hint {
    color: var(--color-secondary);
    text-decoration: underline;
    text-underline-offset: 0.25em;
  }
}

@media (hover: hover) {
  .story__identity:hover::after,
  .story__stage:hover::after {
    transform: scaleX(1);
  }

  .story__stage:hover .story__num {
    color: var(--color-primary);
  }

  /* A hairline ivory ring appears around the screenshot. */
  .story__shot:hover img {
    box-shadow: 0 0 0 1px rgba(247, 241, 228, 0.6);
  }

  .story__shot:hover .story__hint {
    color: var(--color-secondary);
  }
}

@media (min-width: 40rem) {
  .story__stage {
    grid-template-columns: 3.75rem minmax(0, 1fr);
    column-gap: 1.5rem;
    padding-block: 1.9rem;
  }

  .story__num {
    font-size: 1.65rem;
  }
}

@media (min-width: 56.25rem) {
  .story__opener,
  .story__build,
  .story__impact {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: clamp(3rem, 5vw, 4.5rem);
  }

  /* The sub-heading stays in view while the six stages scroll past. */
  .story__build-head {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    align-self: start;
  }

  .story__impact {
    align-items: center;
  }
}

/* 9. Contact & form -------------------------------------------------------
   Compact, premium spacing: the section is only as tall as its content needs.  */
.contact {
  --focus: var(--color-secondary);
  padding-block: clamp(3rem, 6vw, 4.75rem);
  background: var(--color-primary);
  color: var(--color-secondary);
}

.contact__inner {
  display: grid;
  gap: 2.25rem;
  align-items: start;
}

.contact__kicker {
  margin-bottom: 0.75rem;
  color: var(--color-muted-on-dark);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact .section-title {
  margin-bottom: 1rem;
}

.contact__text {
  max-width: 30rem;
  margin-bottom: 1.5rem;
  color: var(--color-muted-on-dark);
}

/* Email as a proper contact detail: icon, small label, linked address. */
.contact__channel {
  max-width: 30rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-line-on-dark);
}

.contact__detail {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  max-width: 100%;
  color: var(--color-secondary);
  text-decoration: none;
}

.contact__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(247, 241, 228, 0.35);
  border-radius: 50%;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.contact__detail-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.contact__detail-label {
  color: var(--color-muted-on-dark);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.contact__detail-value {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: rgba(247, 241, 228, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.3s var(--ease);
}

/* Hover / keyboard focus: the icon fills with ivory and the underline sharpens. */
.contact__detail:focus-visible .contact__icon {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-primary);
}

.contact__detail:focus-visible .contact__detail-value {
  text-decoration-color: var(--color-secondary);
}

@media (hover: hover) {
  .contact__detail:hover .contact__icon {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-primary);
  }

  .contact__detail:hover .contact__detail-value {
    text-decoration-color: var(--color-secondary);
  }
}

.contact__panel {
  --focus: var(--color-primary);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--color-secondary);
  color: var(--color-ink);
  border-radius: 4px;
}

/* Introduction inside the panel */
.form__intro {
  margin-bottom: 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-line-on-light);
}

.form__eyebrow {
  margin: 0 0 0.5rem;
  color: var(--color-muted-on-light);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.form__heading {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.6rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-primary);
  text-wrap: balance;
}

.form__lead {
  margin: 0;
  color: var(--color-muted-on-light);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  margin-bottom: 1rem;
  /* When focus jumps to an invalid field, keep it (and its label) clear of the sticky header. */
  scroll-margin-top: 1.5rem;
}

.field__label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.875rem;
}

.field__input {
  display: block;
  width: 100%;
  padding: 0.65rem 0.9rem; /* ~47px tall: compact but still a comfortable touch target */
  background-color: var(--color-field-bg);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius);
  color: var(--color-ink);
  font: 400 1rem/1.5 var(--font-sans); /* 16px: prevents iOS focus zoom */
  outline: 2px solid transparent; /* becomes visible in forced-colours / high-contrast modes */
  outline-offset: 2px;
  transition:
    border-color 0.25s var(--ease),
    background-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

/* Fields start neutral. Required-but-empty fields are natively :invalid from the first
   paint, and Firefox paints its own red glow on them once touched, so that built-in
   styling is switched off: red only ever comes from our own aria-invalid state below. */
.field__input:-moz-ui-invalid {
  box-shadow: none;
}

.field__input:user-invalid {
  box-shadow: none;
}

.field__input::placeholder {
  color: #66756b; /* 4.8:1 on the field background */
  opacity: 1;
}

.field__input--area {
  min-height: 6.75rem;
  resize: vertical;
}

/* Hover: the border deepens toward forest green and the field brightens slightly. */
.field__input:hover {
  border-color: rgba(13, 64, 38, 0.55);
  background-color: #fff;
}

/* Focus: border becomes forest green with a soft halo, so the active field is unmistakable but calm. */
.field__input:focus,
.field__input:focus-visible {
  border-color: var(--color-primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(13, 64, 38, 0.16);
}

.field:focus-within .field__label {
  color: var(--color-primary-deep);
}

/* The only place red appears: after a failed submit, or after leaving a field invalid. */
.field__input[aria-invalid="true"] {
  border-color: var(--color-error);
}

.field__input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(161, 43, 43, 0.16);
}

.field__error {
  margin: 0.3rem 0 0;
  color: var(--color-error);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.form__status {
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--color-primary);
  background: var(--color-secondary-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 500;
  line-height: 1.5;
}

.form__status--error {
  border-left-color: var(--color-error);
}

.form__status a {
  color: var(--color-primary);
  font-weight: 650;
}

.form__submit {
  position: relative;
  min-width: 11.5rem;
  text-align: center;
}

.btn__arrow {
  flex: none;
  transition: transform 0.3s var(--ease);
}

/* The arrow nudges forward on hover and keyboard focus. */
.form__submit:hover .btn__arrow,
.form__submit:focus-visible .btn__arrow {
  transform: translateX(4px);
}

.form__submit[aria-busy="true"] .btn__arrow {
  display: none;
}

.form__submit:disabled {
  cursor: progress;
  opacity: 0.85;
  transform: none;
}

.btn__spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(247, 241, 228, 0.35);
  border-top-color: var(--color-secondary);
  border-radius: 50%;
}

.form__submit[aria-busy="true"] .btn__spinner {
  display: block;
}

.form.is-sent .form__intro,
.form.is-sent .field,
.form.is-sent .form__submit {
  display: none;
}

/* Phones: the long button label gets the full width of the panel. */
@media (max-width: 39.99rem) {
  .form__submit {
    width: 100%;
  }
}

@media (min-width: 56.25rem) {
  .contact__inner {
    grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
    gap: clamp(3rem, 6vw, 5.5rem);
    align-items: center;
  }
}

/* Reduced motion: the form keeps its colour changes but nothing slides or fades. */
@media (prefers-reduced-motion: reduce) {
  .field__input,
  .form__submit,
  .btn__arrow,
  .contact__icon,
  .contact__detail-value {
    transition: none;
  }

  .form__submit:hover,
  .form__submit:hover .btn__arrow,
  .form__submit:focus-visible .btn__arrow {
    transform: none;
  }
}

/* 11. FAQ -----------------------------------------------------------------
   Accessible accordion (buttons + aria-expanded). The panel height animates with
   a 0fr → 1fr grid row; closed panels are visibility:hidden so their content is
   not focusable. Without JavaScript every answer is simply shown.              */
.faq {
  padding-block: clamp(3.25rem, 6.5vw, 5rem);
}

.faq__inner {
  display: grid;
  gap: 1.75rem;
}

.faq__list {
  border-top: 1px solid var(--color-line-on-light);
}

.faq__item {
  position: relative;
  border-bottom: 1px solid var(--color-line-on-light);
}

.faq__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
}

.faq__q {
  margin: 0;
}

.faq__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 1.05rem 0;
  border: 0;
  background: none;
  color: var(--color-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.faq__btn > span:first-child {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.35;
}

.faq__icon {
  position: relative;
  flex: none;
  width: 1rem;
  height: 1rem;
}

/* Plus sign: the vertical bar rotates onto the horizontal one to become a minus. */
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1.5px;
  background: var(--color-primary);
  transform: translateY(-50%);
}

.faq__icon::after {
  transform: translateY(-50%) rotate(90deg);
}

.faq__btn[aria-expanded="true"] .faq__icon::after {
  transform: translateY(-50%) rotate(0deg);
}

.faq__panel {
  display: grid;
  grid-template-rows: 1fr;
}

.js.faq-ready .faq__panel {
  grid-template-rows: 0fr;
}

.js .faq__panel.is-open {
  grid-template-rows: 1fr;
}

.faq__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.js.faq-ready .faq__panel-inner {
  visibility: hidden;
}

.js .faq__panel.is-open .faq__panel-inner {
  visibility: visible;
}

.faq__answer {
  max-width: 42rem;
  margin: 0;
  padding: 0 2.5rem 1.4rem 0;
}

/* Without JavaScript there is nothing to toggle: hide the plus sign. */
html:not(.js) .faq__icon {
  display: none;
}

@media (hover: hover) {
  .faq__item:hover::after {
    transform: scaleX(1);
  }
}

@media (min-width: 56.25rem) {
  .faq__inner {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: clamp(3rem, 5vw, 4.5rem);
  }

  .faq__head {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    align-self: start;
  }
}

/* 10. Footer -------------------------------------------------------------- */
.site-footer {
  --focus: var(--color-secondary);
  padding-top: clamp(3.5rem, 7vw, 5rem);
  background: var(--color-primary-deep);
  color: var(--color-muted-on-dark);
  font-size: var(--text-small);
}

.site-footer__inner {
  display: grid;
  gap: 2.75rem;
  padding-bottom: 3.5rem;
}

.site-footer__brand img {
  height: 6.25rem;
  width: auto;
  margin-bottom: 1.5rem;
}

.site-footer__brand p {
  max-width: 34rem;
  margin: 0;
  line-height: 1.7;
}

.site-footer strong {
  color: var(--color-secondary);
}

.site-footer li + li {
  margin-top: 0.55rem;
}

.site-footer a {
  color: var(--color-secondary);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s var(--ease);
}

.site-footer a:hover {
  background-size: 100% 1px;
}

.site-footer__label {
  margin-bottom: 0.4rem;
}

.site-footer__bar p {
  margin: 0;
  padding-block: 1.5rem;
  border-top: 1px solid var(--color-line-on-dark); /* aligned with the content, not the padded container */
}

@media (min-width: 56.25rem) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 4rem;
  }
}

/* 11. Motion --------------------------------------------------------------
   Everything below only applies when the visitor has not asked for reduced
   motion. The default (static) state of every element is its final state.   */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* One orchestrated moment: the logo's triangle draws itself while the
     headline settles and the photograph rises into its arch. */
  .hero__title,
  .hero__lead,
  .hero__actions,
  .hero__certs {
    animation: rise 0.9s var(--ease) both;
  }

  .hero__title {
    animation-delay: 0.1s;
  }

  .hero__lead {
    animation-delay: 0.3s;
  }

  .hero__actions {
    animation-delay: 0.45s;
  }

  .hero__certs {
    animation-delay: 0.6s;
  }

  .hero__mark-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 2s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
  }

  .hero__mark-line--inner {
    animation-delay: 0.55s;
  }

  .hero__photo {
    animation: arch-rise 1.3s cubic-bezier(0.65, 0, 0.2, 1) 0.35s both;
  }

  .hero__photo img {
    animation: settle 1.8s var(--ease) 0.35s both;
  }

  /* Quiet reveal for the two content blocks below the fold. */
  .js.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 0.9s var(--ease),
      transform 0.9s var(--ease);
  }

  .js.reveal-ready .reveal.is-visible,
  .js.reveal-ready .reveal:focus-within {
    opacity: 1;
    transform: none;
  }

  .btn__spinner {
    animation: spin 0.8s linear infinite;
  }

  .story__identity::after,
  .story__stage::after,
  .service::after,
  .faq__item::after {
    transition: transform 0.5s var(--ease);
  }

  .faq__panel {
    transition: grid-template-rows 0.4s var(--ease);
  }

  .faq__panel-inner {
    transition: visibility 0s linear 0.4s;
  }

  .faq__panel.is-open .faq__panel-inner {
    transition-delay: 0s;
  }

  .faq__icon::before,
  .faq__icon::after {
    transition: transform 0.35s var(--ease);
  }

  .js .service.reveal:nth-child(2) {
    transition-delay: 0.06s;
  }

  .js .service.reveal:nth-child(3) {
    transition-delay: 0.12s;
  }


  .story__stage .story__num,
  .story__shot img,
  .story__hint {
    transition:
      color 0.3s var(--ease),
      box-shadow 0.3s var(--ease);
  }

  /* The 50 / 50 bar draws in from both ends when it scrolls into view.
     The percentages themselves are static text and are never animated. */
  .js .story__bar-seg {
    transform: scaleX(0);
  }

  .js .story__split.is-visible .story__bar-seg {
    transform: scaleX(1);
    transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .js .story__split.is-visible .story__bar-seg--organic {
    transition-delay: 0.25s;
  }

  .js .story__split.is-visible .story__bar-seg--paid {
    transition-delay: 0.45s;
  }

  .lightbox[open] {
    animation: lightbox-in 0.3s var(--ease);
  }

  .lightbox[open]::backdrop {
    animation: fade-in 0.3s var(--ease);
  }

  .lightbox.is-closing {
    animation: lightbox-out 0.22s var(--ease) forwards;
  }

  .lightbox.is-closing::backdrop {
    animation: fade-out 0.22s var(--ease) forwards;
  }

  @keyframes lightbox-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }

  @keyframes lightbox-out {
    to {
      opacity: 0;
      transform: translateY(10px);
    }
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }
  }

  @keyframes fade-out {
    to {
      opacity: 0;
    }
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }

  @keyframes draw {
    to {
      stroke-dashoffset: 0;
    }
  }

  @keyframes arch-rise {
    from {
      clip-path: inset(100% 0 0 0);
    }
    to {
      clip-path: inset(0);
    }
  }

  @keyframes settle {
    from {
      transform: scale(1.08);
    }
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
}

/* 12. Thank-you page (no-JavaScript form fallback) ------------------------ */
.thanks-page {
  background: var(--color-primary);
  color: var(--color-secondary);
  --focus: var(--color-secondary);
}

.thanks {
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-h));
  padding-block: 4rem;
}

/* 13. Arabic typography and right-to-left layout ---------------------------
   Everything above is direction-neutral except the rules mirrored here, so the
   Arabic page keeps the same design, mirrored.                                */
html[lang|="ar"] {
  --text-base: 1.15rem;
  --text-small: 1rem;
}

/* Arabic joins its letters: spacing between letters would break the words. */
html[lang|="ar"] *,
html[lang|="ar"] *::before,
html[lang|="ar"] *::after {
  letter-spacing: 0 !important;
}

html[lang|="ar"] body {
  line-height: 1.9;
}

html[lang|="ar"] :is(h1, h2, h3, h4) {
  line-height: 1.4;
  font-weight: 500;
}

html[lang|="ar"] .hero__title {
  line-height: 1.35;
}

html[lang|="ar"] :is(.faq__btn > span:first-child, .story__stage-title, .service__title) {
  line-height: 1.5;
}

html[dir="rtl"] .skip-link {
  left: auto;
  right: var(--gutter);
}

html[dir="rtl"] .primary-nav__link::after,
html[dir="rtl"] .service::after,
html[dir="rtl"] .story__identity::after,
html[dir="rtl"] .story__stage::after,
html[dir="rtl"] .faq__item::after,
html[dir="rtl"] .story__bar-seg--organic {
  transform-origin: right;
}

html[dir="rtl"] .story__bar-seg--paid {
  transform-origin: left;
}

html[dir="rtl"] .nav-toggle {
  margin-right: 0;
  margin-left: -0.5rem;
}

html[dir="rtl"] .about__figure {
  margin: 0 0 1.1rem 1.1rem;
}

html[dir="rtl"] .about__figure::before {
  inset: 1.1rem 1.1rem -1.1rem -1.1rem;
}

html[dir="rtl"] .about__quote {
  padding-left: 0;
  padding-right: 1.25rem;
  border-left: 0;
  border-right: 2px solid var(--color-primary);
}

html[dir="rtl"] .service__list li {
  padding: 0.28rem 1.35rem 0.28rem 0;
}

html[dir="rtl"] .service__list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .story__meta + .story__meta {
  margin-left: 0;
  margin-right: 1rem;
  padding-left: 0;
  padding-right: 1rem;
  border-left: 0;
  border-right: 1px solid var(--color-line-on-light);
}

html[dir="rtl"] .story__channel:last-child {
  text-align: left;
}

html[dir="rtl"] .lightbox__close {
  right: auto;
  left: 0.75rem;
}

html[dir="rtl"] .form__trap {
  left: auto;
  right: -9999px;
}

html[dir="rtl"] .form__status {
  border-left: 0;
  border-right: 3px solid var(--color-primary);
  border-radius: var(--radius) 0 0 var(--radius);
}

html[dir="rtl"] .form__status--error {
  border-right-color: var(--color-error);
}

html[dir="rtl"] .faq__answer {
  padding: 0 0 1.4rem 2.5rem;
}

html[dir="rtl"] .faq__btn {
  text-align: right;
}

html[dir="rtl"] .site-footer a {
  background-position: right bottom;
}

/* The arrow on the submit button points the way the text reads. */
html[dir="rtl"] .btn__arrow {
  transform: scaleX(-1);
}

html[dir="rtl"] .form__submit:hover .btn__arrow,
html[dir="rtl"] .form__submit:focus-visible .btn__arrow {
  transform: translateX(-4px) scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
  html[dir="rtl"] .form__submit:hover .btn__arrow,
  html[dir="rtl"] .form__submit:focus-visible .btn__arrow {
    transform: scaleX(-1);
  }
}

/* 14. Launch refinements ------------------------------------------------ */
.form__privacy { font-size: .875rem; line-height: 1.5; margin: .25rem 0 1rem; color: var(--color-muted-on-light); }
.form__privacy a { color: var(--color-primary); text-decoration: underline; }
.form.is-sent .form__privacy { display: none; }
.brand { flex-shrink: 0; }
.primary-nav__link { white-space: nowrap; }
@media (min-width: 75rem) {
  .primary-nav__list { gap: clamp(.85rem, 1.55vw, 2rem); }

}
@media (max-width: 1199.98px) {
  html:not(.js) .site-header { position: static; }
  html:not(.js) .primary-nav { width: 100%; padding-block: .5rem; }
  html:not(.js) .primary-nav__list { flex-wrap: wrap; gap: .75rem 1rem; }

  .js .primary-nav__link { white-space: normal; }
}
html:not(.faq-ready) .faq__icon { display: none; }
.utility-page { min-height: 100vh; }
.utility-content { padding-block: clamp(2.5rem, 7vw, 5rem); max-width: 52rem; }
.utility-content h1 { font-size: var(--text-h1); line-height: 1.2; }
.utility-content h2 { font-size: 1.55rem; margin-top: 2rem; }
.utility-content a:not(.btn) { color: var(--color-primary); text-decoration: underline; overflow-wrap: anywhere; }
.utility-content .btn { margin-top: 1.5rem; }
.error-links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; padding: 0; list-style: none; }

@media (max-width: 1199.98px) and (max-height: 700px) {
  .js .primary-nav { padding-block: .75rem 1rem; }
  .js .primary-nav__link { padding: .55rem 0; font-size: 1.3rem; line-height: 1.3; }
  .js .primary-nav__link.primary-nav__link--cta { margin-top: .9rem; padding: .8rem 1rem; }

}

/* V13 — accessible native language disclosure, outside the mobile menu. */
.header-controls { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.lang-switch { position: relative; z-index: 5; color: var(--color-secondary); }
.lang-switch summary { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .5rem .65rem; border: 1px solid var(--color-line-on-dark); border-radius: 6px; cursor: pointer; list-style: none; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::marker { content: ""; }
.lang-switch summary:hover, .lang-switch[open] summary { background: rgba(247,241,228,.10); }
.lang-switch__code { font: 600 .8rem var(--font-sans); direction: ltr; }
.lang-switch__panel { position: absolute; inset-block-start: calc(100% + .5rem); inset-inline-end: 0; min-width: 10.5rem; padding: .35rem; background: var(--color-secondary); color: var(--color-primary); border: 1px solid var(--color-line-on-light); border-radius: 8px; box-shadow: 0 10px 24px #0003; }
.lang-switch__panel a { display: flex; justify-content: space-between; align-items: center; gap: .75rem; min-height: 44px; padding: .45rem .7rem; border-radius: 4px; color: var(--color-primary); text-decoration: none; font-size: 1rem; white-space: nowrap; }
.lang-switch__panel a:hover, .lang-switch__panel a:focus-visible, .lang-switch__panel a[aria-current] { background: var(--color-secondary-deep); }
.lang-switch__check { visibility: hidden; }
.lang-switch__panel a[aria-current] .lang-switch__check { visibility: visible; }
.lang-switch__panel a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
@media (min-width: 75rem) { .site-header__inner { gap: 1rem; } .primary-nav { margin-inline-start: auto; } }
@media (max-width: 1199.98px) { .site-header__inner { gap: .5rem; } .primary-nav { order: 3; } .header-controls { margin-inline-start: auto; } .header-controls .nav-toggle { margin: 0; } .js .site-header__inner { flex-wrap: nowrap; } }
html[lang|="ar"] .hero__lead { line-height: 1.8; }
html[lang|="ar"] .field__input[dir="ltr"] { text-align: left; }
html[lang|="ar"] .story__pct { direction: ltr; unicode-bidi: isolate; }
