/*
 * Equine8 home page (/ and /ar/), markup from tools/site/home.js.
 * Tokens come from /assets/site.css. Motion runs only when the visitor has not
 * asked for reduced motion: html.h-motion is set in the page head, and
 * /assets/home.js drives the scroll effects.
 */

.h {
  --h-ink: #1F1E1B;
  --h-gold-text: #8A6A24;
  --h-faint: rgba(52, 50, 45, 0.14);
  --h-section: clamp(104px, 12vw, 184px);
  --h-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --h-ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --h-dir: 1;
  margin: 0;
  background: #FFFFFF;
  color: var(--e8-ink);
  font-family: var(--e8-font);
  font-size: 18px;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.h:lang(ar) {
  --h-dir: -1;
  font-family: var(--e8-font-ar);
}

.h ::selection {
  background: var(--e8-green);
  color: var(--e8-cream);
}

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

.h main img {
  display: block;
  max-width: 100%;
  height: auto;
}

:where(.h main) a {
  color: inherit;
}

.h :focus-visible {
  outline: 2px solid var(--e8-green);
  outline-offset: 4px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.h) {
    scroll-behavior: smooth;
  }
}

.h-wrap {
  max-width: var(--e8-max);
  margin: 0 auto;
  padding: 0 var(--e8-gutter);
  box-sizing: content-box !important;
}

/* ---------- Shared type ---------- */
.h-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 20px;
  color: var(--e8-muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
}

.h-label__num {
  color: var(--h-gold-text);
  font-variant-numeric: tabular-nums;
}

.h-label--light {
  color: var(--e8-gold-light);
}

.h-title {
  margin: 0;
  color: var(--h-ink);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h-sub {
  max-width: 34ch;
  margin: 20px 0 0;
  color: var(--e8-muted);
  font-size: 18px;
  text-wrap: pretty;
}

.h-dot {
  color: var(--e8-gold);
}

.h-placeholder {
  color: var(--e8-muted) !important;
  font-style: italic;
}

.h-arrow {
  display: inline-block;
  transition: transform 0.5s var(--h-ease);
}

.h-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--e8-green);
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(30, 91, 55, 0.3);
  text-underline-offset: 6px;
  transition: text-decoration-color 0.4s ease;
}

.h-link:hover {
  color: var(--e8-green);
  text-decoration-color: currentColor;
}

.h-link:hover .h-arrow,
.h-door:hover .h-arrow,
.h-product:hover .h-arrow,
.h-guide:hover .h-arrow,
.h-link:focus-visible .h-arrow,
.h-door:focus-visible .h-arrow,
.h-product:focus-visible .h-arrow,
.h-guide:focus-visible .h-arrow {
  transform: translateX(calc(6px * var(--h-dir)));
}

/* Arabic: no tracking, a little more air */
.h:lang(ar) .h-label,
.h:lang(ar) .h-title,
.h:lang(ar) .h-hero__title,
.h:lang(ar) .h-door__title,
.h:lang(ar) .h-pillar__word,
.h:lang(ar) .h-pillar__lead,
.h:lang(ar) .h-route__title,
.h:lang(ar) .h-product__title,
.h:lang(ar) .h-guide__title,
.h:lang(ar) .h-quote,
.h:lang(ar) .h-contact__title,
.h:lang(ar) .h-fact__value {
  letter-spacing: 0;
}

/* ---------- Hero ---------- */
.h-hero {
  padding-top: clamp(64px, 8.5vw, 128px);
}

.h-hero__title {
  margin: 0;
  color: var(--h-ink);
  font-size: clamp(60px, 10.2vw, 156px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.h:lang(ar) .h-hero__title {
  font-size: clamp(60px, 9.4vw, 140px);
  font-weight: 600;
  line-height: 1.12;
}

.h-word {
  display: inline-block;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
  overflow: hidden;
  vertical-align: top;
}

.h-word > span {
  display: inline-block;
}

.h-hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px 64px;
  margin-top: clamp(36px, 4vw, 56px);
  padding-top: 28px;
  border-top: 1px solid var(--h-faint);
}

.h-hero__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--e8-muted);
  font-size: 15px;
  font-weight: 500;
}

.h-rule {
  width: 32px;
  height: 2px;
  background: var(--e8-gold);
}

.h-hero__lede {
  max-width: 34ch;
  justify-self: end;
  margin: 0;
  color: var(--e8-muted);
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- The two doors ---------- */
.h-doors {
  padding: clamp(40px, 5vw, 72px) clamp(10px, 2.2vw, 32px) 0;
}

.h-doors__frame {
  display: flex;
  max-width: calc(var(--e8-max) + 96px);
  height: clamp(520px, 46vw, 680px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  isolation: isolate;
}

.h-door {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  padding: clamp(28px, 3.4vw, 52px);
  overflow: hidden;
  text-decoration: none;
  transition: flex-grow 0.9s var(--h-ease-io);
}

.h-door--eq8 {
  background: var(--e8-cream);
  color: var(--h-ink);
}

.h-door--sw {
  background: var(--e8-green);
  color: var(--e8-cream);
}

/* A whisper of texture on the colour fields */
.h-door::before,
.h-route__band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: 0.07;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.h-door--sw::before,
.h-route__band::before {
  mix-blend-mode: soft-light;
  opacity: 0.16;
}

.h-door__head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.h-door__logo {
  width: auto !important;
  height: 32px !important;
}

.h-door__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  font-size: 17px;
  font-weight: 600;
}

.h-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(242, 239, 231, 0.36);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.h-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--e8-gold-light);
  box-shadow: 0 0 0 0 rgba(228, 211, 168, 0.6);
}

.h-motion .h-chip__dot {
  animation: h-pulse 2.4s ease-out infinite;
}

@keyframes h-pulse {
  0% { box-shadow: 0 0 0 0 rgba(228, 211, 168, 0.55); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(228, 211, 168, 0); }
}

.h-door__title {
  max-width: 15ch;
  font-size: clamp(26px, 2.5vw, 38px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h-door__cta {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
}

.h-door--eq8 .h-door__cta {
  color: var(--e8-green);
}

.h-door--sw .h-door__cta {
  color: var(--e8-gold-light);
}

.h-door__media {
  position: absolute;
  z-index: 1;
  transform: translate3d(0, var(--h-py, 0px), 0);
  will-change: transform;
  pointer-events: none;
}

.h-door__media img {
  width: 100%;
  transition: transform 1.2s var(--h-ease);
}

.h-door--eq8 .h-door__media {
  inset-inline-end: 3%;
  bottom: 2%;
  width: min(94%, 680px);
}

.h-door--eq8 .h-door__media img {
  filter: drop-shadow(0 26px 30px rgba(52, 50, 45, 0.16));
  transform-origin: 50% 100%;
}

.h-door--sw .h-door__media {
  inset-inline-end: 15%;
  bottom: 0;
  width: min(40%, 290px);
  margin-bottom: -46%;
}

.h-door--sw .h-door__media img {
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.35));
}

@media (hover: hover) and (pointer: fine) {
  .h-doors__frame:hover .h-door {
    flex-grow: 0.84;
  }

  .h-doors__frame .h-door:hover,
  .h-doors__frame .h-door:focus-visible {
    flex-grow: 1.16;
  }

  .h-door:hover .h-door__media img,
  .h-door:focus-visible .h-door__media img {
    transform: scale(1.04);
  }

  .h-door--sw:hover .h-door__media img,
  .h-door--sw:focus-visible .h-door__media img {
    transform: translateY(-4%) scale(1.02);
  }
}

.h-door:focus-visible {
  outline-offset: -6px;
  border-radius: 28px;
}

/* ---------- Clean, Protect, Perform ---------- */
.h-pillars {
  padding-top: var(--h-section);
}

.h-pillar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px clamp(32px, 5vw, 80px);
  padding: clamp(36px, 4vw, 56px) 0 clamp(56px, 6vw, 88px);
}

.h-pillar::before,
.h-pillar--3::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: var(--h-ink);
  transform-origin: left center;
}

.h:lang(ar) .h-pillar::before,
.h:lang(ar) .h-pillar--3::after {
  transform-origin: right center;
}

.h-pillar--3::after {
  top: auto;
  bottom: 0;
  background: var(--h-faint);
}

.h-pillar__word {
  margin: 0;
  margin-inline-start: -0.04em;
  font-size: clamp(84px, 11.2vw, 172px);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: -0.055em;
}

.h:lang(ar) .h-pillar__word {
  margin-inline-start: 0;
  font-weight: 600;
  line-height: 1.15;
}

.h-pillar--1 .h-pillar__word { color: var(--e8-green); }
.h-pillar--2 .h-pillar__word { color: var(--h-gold-text); }
.h-pillar--3 .h-pillar__word { color: var(--h-ink); }

.h-mask {
  display: inline-block;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  overflow: hidden;
  vertical-align: top;
}

.h-mask > span {
  display: inline-block;
}

.h-pillar__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: clamp(4px, 1.2vw, 18px);
}

.h-pillar__lead {
  max-width: 30ch;
  margin: 0;
  color: var(--h-ink);
  font-size: clamp(21px, 1.8vw, 26px);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.h-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.h-fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-inline-end: 20px;
  margin-inline-end: 20px;
  border-inline-end: 1px solid var(--h-faint);
}

.h-fact:last-child {
  padding-inline-end: 0;
  margin-inline-end: 0;
  border: 0;
}

.h-fact__value {
  color: var(--h-ink);
  font-size: clamp(32px, 2.8vw, 42px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.h-fact__label {
  margin: 0;
  color: var(--e8-muted);
  font-size: 14px;
  line-height: 1.45;
}

.h-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0;
}

/* ---------- From the trailer to the start gate ---------- */
.h-route {
  margin-top: var(--h-section);
}

.h-route__band {
  position: relative;
  padding: var(--h-section) 0 clamp(96px, 10vw, 152px);
  background: var(--e8-green-deep);
  color: var(--e8-cream);
  clip-path: inset(0 var(--h-band-inset, 0px) round var(--h-band-radius, 0px));
}

.h-route__band > .h-wrap {
  position: relative;
  z-index: 1;
}

.h-route__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 64px;
}

.h-route__title {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(44px, 5.6vw, 84px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.h-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.h-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.h-legend__dot,
.h-stop__dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.h-legend__dot--eq8,
.h-stop--eq8 .h-stop__dot {
  background: var(--e8-gold);
}

.h-legend__dot--sw,
.h-stop--sw .h-stop__dot {
  background: var(--e8-green-deep);
  box-shadow: inset 0 0 0 3px var(--e8-cream);
}

.h-route__track {
  position: relative;
  margin-top: clamp(64px, 8vw, 112px);
}

.h-route__rail {
  position: absolute;
  inset-inline: 0;
  top: 66px;
  height: 2px;
  background: rgba(242, 239, 231, 0.18);
}

.h-route__fill {
  position: absolute;
  inset: 0;
  background: var(--e8-gold);
  transform: scaleX(var(--h-route, 1));
  transform-origin: left center;
}

.h:lang(ar) .h-route__fill {
  transform-origin: right center;
}

.h-route__stops {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h-stop {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.6s ease;
}

.h-stop__time {
  min-height: 44px;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.h-stop__dot {
  width: 20px;
  height: 20px;
  margin: 1px 0 14px;
  transition: transform 0.7s var(--h-ease), background-color 0.4s ease;
}

.h-stop--sw .h-stop__dot {
  box-shadow: inset 0 0 0 4px var(--e8-cream);
}

.h-stop__title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.h-stop__text {
  color: #D3CDBE;
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- The EQ8 range ---------- */
.h-range {
  padding: var(--h-section) 0;
  background: var(--e8-cream);
}

.h-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  margin-bottom: clamp(36px, 4vw, 56px);
}

.h-btn {
  min-height: 52px;
  padding: 0 28px;
}

.h-range__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(52, 50, 45, 0.22);
}

.h-range__list > li {
  border-bottom: 1px solid rgba(52, 50, 45, 0.22);
}

.h-product {
  display: grid;
  grid-template-columns: 96px minmax(0, 2.3fr) minmax(0, 1fr) minmax(0, 0.8fr) 32px;
  align-items: center;
  gap: 28px;
  margin: 6px -20px;
  padding: 14px 20px;
  border-radius: 18px;
  color: var(--h-ink);
  text-decoration: none;
  transition: background-color 0.45s ease;
}

.h-product:hover,
.h-product:focus-visible {
  background: rgba(255, 255, 255, 0.72);
  color: var(--h-ink);
}

.h-product__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
}

.h-product__thumb img {
  max-height: 96px;
  width: auto;
  transition: transform 0.8s var(--h-ease);
}

.h-product:hover .h-product__thumb img {
  transform: scale(1.1) rotate(-4deg);
}

.h-product__name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h-product__brand {
  align-self: flex-start;
  color: var(--e8-green);
  font-family: var(--e8-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.h-product__title {
  font-size: clamp(21px, 2vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.h-product__spec,
.h-product__for {
  color: var(--e8-muted);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.h-product .h-arrow {
  color: var(--e8-green);
  font-size: 22px;
}

/* Product picture that follows the pointer across the list (wide screens only) */
.h-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: none;
  width: 260px;
  height: 300px;
  padding: 28px;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 30px 60px rgba(52, 50, 45, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(var(--h-px, 0px), var(--h-pyy, 0px), 0) scale(0.86) rotate(-2deg);
  transition: opacity 0.35s ease, transform 0.5s var(--h-ease);
}

.h-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.h-preview.is-on {
  opacity: 1;
  transform: translate3d(var(--h-px, 0px), var(--h-pyy, 0px), 0) scale(1) rotate(0deg);
}

@media (hover: hover) and (pointer: fine) and (min-width: 1000px) {
  .h-motion .h-preview {
    display: block;
  }
}

/* ---------- Evidence library ---------- */
.h-library {
  padding-top: var(--h-section);
}

.h-library__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 40px clamp(48px, 7vw, 112px);
  align-items: start;
}

.h-library__aside {
  position: sticky;
  top: calc(var(--e8-head-h) + 48px);
}

.h-guides,
.h-contact__routes {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--h-ink);
}

.h-guides > li,
.h-contact__routes > li {
  border-bottom: 1px solid var(--h-faint);
}

.h-guide {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  padding: 30px 0;
  color: var(--h-ink);
  text-decoration: none;
}

.h-contact__routes .h-guide {
  grid-template-columns: minmax(0, 1fr) auto;
}

.h-guide__num {
  color: var(--h-gold-text);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.h-guide__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.h-guide__title {
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size 0.7s var(--h-ease), color 0.3s ease;
  justify-self: start;
  width: fit-content;
}

.h:lang(ar) .h-guide__title {
  background-position: 100% 100%;
}

.h-guide:hover .h-guide__title,
.h-guide:focus-visible .h-guide__title {
  color: var(--e8-green);
  background-size: 100% 1px;
}

.h-guide__meta {
  color: var(--e8-muted);
  font-size: 14px;
}

.h-guide .h-arrow {
  color: var(--e8-green);
  font-size: 22px;
}

/* ---------- Our story ---------- */
.h-story {
  padding-top: var(--h-section);
}

.h-quote {
  margin: 0;
}

.h-quote p {
  max-width: 19ch;
  margin: 0;
  color: var(--h-ink);
  font-size: clamp(40px, 5.6vw, 88px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.h:lang(ar) .h-quote p {
  font-weight: 600;
  line-height: 1.3;
}

.h-quote__w--accent {
  color: var(--e8-green);
}

.h-story__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(32px, 4vw, 64px);
  margin-top: clamp(48px, 5vw, 80px);
}

.h-story__cols p {
  margin: 0;
  color: var(--e8-muted);
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
}

/* A single paragraph sits in the right-hand two thirds, under the end of the quote */
.h-story__cols p:only-child {
  grid-column: 2 / -1;
  max-width: 38ch;
  color: var(--h-ink);
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.55;
}

.h-eco {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) repeat(3, minmax(0, 1fr));
  gap: 20px 0;
  margin-top: clamp(56px, 6vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--h-faint);
}

.h-eco p {
  margin: 0;
}

.h-eco__label {
  padding-inline-end: 24px;
  color: var(--e8-muted);
  font-size: 15px;
  font-weight: 500;
}

.h-eco__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-inline: 28px;
  border-inline-start: 1px solid var(--h-faint);
}

.h-eco__name {
  color: var(--h-ink);
  font-size: 18px;
  font-weight: 600;
}

.h-eco__text {
  color: var(--e8-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Contact ---------- */
.h-contact {
  padding: var(--h-section) 0 clamp(72px, 8vw, 120px);
}

.h-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px clamp(48px, 6vw, 96px);
  align-items: end;
}

.h-contact__title {
  margin: 0;
  color: var(--h-ink);
  font-size: clamp(64px, 9.4vw, 148px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.h:lang(ar) .h-contact__title {
  font-weight: 600;
  line-height: 1.2;
}

.h-contact__email {
  display: inline-block;
  margin-top: 32px;
  color: var(--e8-green);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
  transition: background-size 0.6s var(--h-ease);
}

.h-contact__email:hover {
  color: var(--e8-green);
  background-size: 0 1px;
  background-position: 100% 100%;
}

.h-contact .h-sub {
  margin-top: 12px;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: words rise out of their own lines, then the rest settles in */
  .h-motion .h-word > span {
    animation: h-rise 1.15s var(--h-ease) both;
    animation-delay: calc(0.12s + var(--i) * 0.09s);
  }

  .h-motion .h-dot {
    display: inline-block;
  }

  .h-motion .h-word .h-dot {
    animation: h-pop 0.7s var(--h-ease) both;
    animation-delay: calc(0.55s + var(--i) * 0.09s);
  }

  .h-motion .h-hero__foot {
    animation: h-fade-up 1s var(--h-ease) 0.55s both;
  }

  .h-motion .h-doors__frame {
    animation: h-open 1.4s var(--h-ease) 0.45s both;
  }

  @keyframes h-rise {
    from { transform: translateY(105%); }
    to { transform: none; }
  }

  @keyframes h-pop {
    from { transform: scale(0); }
    to { transform: none; }
  }

  @keyframes h-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes h-open {
    from { clip-path: inset(7% 5% 0 5% round 28px); transform: translateY(48px); }
    to { clip-path: inset(0 0 0 0 round 28px); transform: none; }
  }

  /* Sections reveal as they scroll in (home.js adds .is-in) */
  .h-motion [data-h-reveal] .h-mask > span {
    transform: translateY(105%);
    transition: transform 1.2s var(--h-ease);
  }

  .h-motion [data-h-reveal].is-in .h-mask > span {
    transform: none;
  }

  .h-motion .h-pillar::before {
    transform: scaleX(0);
    transition: transform 1.4s var(--h-ease);
  }

  .h-motion .h-pillar.is-in::before {
    transform: scaleX(1);
  }

  .h-motion .h-pillar__body,
  .h-motion .h-route__head,
  .h-motion .h-section-head,
  .h-motion .h-library__aside,
  .h-motion .h-guides > li,
  .h-motion .h-story__cols,
  .h-motion .h-eco,
  .h-motion .h-contact__main > :not(.h-contact__title),
  .h-motion .h-contact__routes {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--h-ease), transform 1.1s var(--h-ease);
  }

  .h-motion .h-pillar__body {
    transition-delay: 0.18s;
  }

  .h-motion .h-pillar.is-in .h-pillar__body,
  .h-motion .h-route__head.is-in,
  .h-motion .h-section-head.is-in,
  .h-motion .h-library__aside.is-in,
  .h-motion .h-guides > li.is-in,
  .h-motion .h-story__cols.is-in,
  .h-motion .h-eco.is-in,
  .h-motion .h-contact__main.is-in > :not(.h-contact__title),
  .h-motion .h-contact__routes.is-in {
    opacity: 1;
    transform: none;
  }

  .h-motion .h-contact__main.is-in > .h-sub {
    transition-delay: 0.2s;
  }

  .h-motion .h-range__list > li {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--h-ease), transform 1s var(--h-ease);
    transition-delay: calc(var(--n, 0) * 0.08s);
  }

  .h-motion .h-range__list.is-in > li {
    opacity: 1;
    transform: none;
  }

  /* The route: the gold line follows the scroll, each stop lights up as it is reached */
  .h-motion .h-route__fill {
    transform: scaleX(var(--h-route, 0));
  }

  .h-motion .h-stop {
    opacity: 0.38;
  }

  .h-motion .h-stop .h-stop__dot {
    transform: scale(0.6);
  }

  .h-motion .h-stop.is-reached {
    opacity: 1;
  }

  .h-motion .h-stop.is-reached .h-stop__dot {
    transform: scale(1);
  }

  /* The quote lights up word by word */
  .h-motion .h-quote__w {
    color: #D5CFC2;
    transition: color 0.5s ease;
  }

  .h-motion .h-quote__w.is-lit {
    color: var(--h-ink);
  }

  .h-motion .h-quote__w--accent.is-lit {
    color: var(--e8-green);
  }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .h-route__stops {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px 24px;
  }

  .h-route__rail {
    display: none;
  }

  .h-eco {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .h-eco__label {
    grid-column: 1 / -1;
  }

  .h-eco__item:nth-child(2) {
    padding-inline-start: 0;
    border: 0;
  }
}

@media (max-width: 900px) {
  .h-hero__foot,
  .h-pillar,
  .h-library__grid,
  .h-contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .h-hero__lede {
    justify-self: start;
  }

  .h-br {
    display: none;
  }

  .h-doors__frame {
    flex-direction: column;
    height: auto;
  }

  .h-door {
    min-height: 460px;
  }

  .h-door--sw .h-door__media {
    width: min(52%, 260px);
    margin-bottom: -58%;
  }

  .h-library__aside {
    position: static;
  }

  .h-story__cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .h-story__cols p:only-child {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .h {
    font-size: 17px;
  }

  .h-route__stops {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-inline-start: 36px;
  }

  .h-route__rail {
    display: block;
    inset-inline: auto;
    inset-inline-start: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
  }

  .h-route__fill {
    transform: scaleY(var(--h-route, 1));
    transform-origin: center top;
  }

  .h-motion .h-route__fill {
    transform: scaleY(var(--h-route, 0));
  }

  .h-stop {
    position: relative;
    gap: 6px;
  }

  .h-stop__time {
    min-height: 0;
    font-size: 22px;
  }

  .h-stop__dot {
    position: absolute;
    inset-inline-start: -36px;
    top: 8px;
    margin: 0;
  }

  .h-product {
    grid-template-columns: 64px minmax(0, 1fr) 24px;
    grid-template-areas: 'thumb name arrow' 'thumb spec arrow';
    gap: 2px 18px;
    margin: 4px -12px;
    padding: 12px;
  }

  .h-product__thumb {
    grid-area: thumb;
    width: 64px;
    height: 72px;
  }

  .h-product__thumb img {
    max-height: 72px;
  }

  .h-product__name { grid-area: name; }
  .h-product__spec { grid-area: spec; font-size: 14px; }
  .h-product__for { display: none; }
  .h-product .h-arrow { grid-area: arrow; }

  .h-guide {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 24px 0;
  }

  .h-fact {
    padding-inline-end: 12px;
    margin-inline-end: 12px;
  }

  .h-fact__value {
    font-size: 28px;
  }

  .h-fact__label {
    font-size: 13px;
  }

  .h-eco {
    grid-template-columns: minmax(0, 1fr);
  }

  .h-eco__item {
    padding-inline: 0;
    border: 0;
  }
}
