/* ==========================================================================
   KHL Transportes Madrid
   Built to the KHL website brief. Do not introduce colours, fonts, radii or
   components that are not defined here.
   ========================================================================== */

:root {
  /* Brand */
  --khl-navy: #0F1C3F;
  --khl-navy-hover: #0A142E;
  --khl-red: #E31C23;
  --khl-red-hover: #C1141A;
  --khl-white: #FFFFFF;

  /* Navy tints, the only neutrals. No true greys. */
  --khl-100: #F4F5F8;
  --khl-200: #E4E7EE;
  --khl-300: #D8DBE4;
  --khl-500: #9AA2B8;
  --khl-700: #6B7590;
  --khl-900: #0F1C3F;

  --font: "Archivo", system-ui, sans-serif;

  --s1: 4px;  --s2: 8px;  --s3: 16px; --s4: 24px;
  --s5: 40px; --s6: 64px; --s7: 96px;

  --radius: 0;
  --rule: 2px solid var(--khl-navy);
  --max-width: 1120px;
  --gutter: 40px;
  --tap-min: 48px;
  --ease: cubic-bezier(.2,.8,.2,1);

  --header-h: 76px;
}

@media (max-width: 768px) {
  :root { --gutter: 20px; --header-h: 64px; }
}

/* ---------- reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--khl-white);
  color: var(--khl-navy);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; max-width: 75ch; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border-radius: var(--radius);
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--khl-red);
  outline-offset: 2px;
}
/* On red ground the red ring would vanish. */
.is-red-ground :focus-visible,
.close :focus-visible { outline-color: var(--khl-navy); }

::selection { background: var(--khl-red); color: var(--khl-white); }

/* ---------- type scale ---------- */

.h1 {
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: .92;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.h2 {
  font-weight: 900;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.h3 {
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.label {
  font-weight: 700;
  font-size: .75rem;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.lead { font-size: 1.25rem; line-height: 1.45; }
.muted { color: var(--khl-700); }
.is-red { color: var(--khl-red); }

/* ---------- layout ---------- */

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

.section { padding-block: clamp(56px, 8vw, 96px); }
.section + .section { border-top: var(--rule); }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s5);
}
.section__head .label { color: var(--khl-red); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--khl-navy);
  color: var(--khl-white);
  padding: 12px 18px;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* ==========================================================================
   Logo — the real card artwork (assets/logo*.png, transparent background).
   Height is driven by --lg; logo-rev swaps in on navy grounds.
   ========================================================================== */

.khl-logo { --lg: 56px; display: inline-block; line-height: 0; }
.khl-logo img { display: block; height: var(--lg); width: auto; }

.khl-logo--bar { --lg: 46px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 14px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background-color .22s var(--ease), border-color .22s var(--ease),
              color .22s var(--ease);
}
.btn svg { flex: 0 0 auto; width: 18px; height: 18px; }

.btn--primary {
  background: var(--khl-red);
  border-color: var(--khl-red);
  color: var(--khl-white);
}
.btn--primary:hover { background: var(--khl-red-hover); border-color: var(--khl-red-hover); }

.btn--secondary {
  background: var(--khl-navy);
  border-color: var(--khl-navy);
  color: var(--khl-white);
}
.btn--secondary:hover { background: var(--khl-navy-hover); border-color: var(--khl-navy-hover); }

.btn--outline { border-color: var(--khl-navy); color: var(--khl-navy); }
.btn--outline:hover { background: var(--khl-200); }

.btn--light {
  background: var(--khl-white);
  border-color: var(--khl-white);
  color: var(--khl-navy);
}
.btn--light:hover { background: var(--khl-200); border-color: var(--khl-200); }

.btn--ghost {
  min-height: 0;
  padding: 4px 0;
  border: 0;
  letter-spacing: .06em;
}
.btn--ghost:hover { color: var(--khl-red); }

.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ==========================================================================
   Tags
   ========================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 2px solid transparent;
}
.tag--red { background: var(--khl-red); color: var(--khl-white); border-color: var(--khl-red); }
.tag--navy { background: var(--khl-navy); color: var(--khl-white); border-color: var(--khl-navy); }
.tag--soft { background: var(--khl-200); color: var(--khl-navy); border-color: var(--khl-200); }
.tag--outline { border-color: var(--khl-navy); color: var(--khl-navy); }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--khl-white);
  border-bottom: var(--rule);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  height: var(--header-h);
  transition: height .28s var(--ease);
}

.header.is-stuck .header__inner { height: 64px; }
.header.is-stuck .khl-logo--bar { --lg: 38px; }
.khl-logo--bar { transition: none; }

/* The visual plate stays the designed 44px, but the tappable link itself
   grows to the brief's 48px minimum via invisible height, not visible size. */
.header__brand { margin-right: auto; min-height: var(--tap-min); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--s4);
}
.nav a {
  position: relative;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 0;
}
/* The underline sweeps in the direction of travel. */
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--khl-red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }

.header__cta {
  /* Navy while the hero owns the single red button, red once past it. */
  background: var(--khl-navy);
  border-color: var(--khl-navy);
  color: var(--khl-white);
  padding: 12px 18px;
  /* Brief requires 48px tap targets everywhere; this used to read 44px. */
  min-height: var(--tap-min);
}
.header__cta:hover { background: var(--khl-navy-hover); border-color: var(--khl-navy-hover); }
body.is-past-hero .header__cta { background: var(--khl-red); border-color: var(--khl-red); }
body.is-past-hero .header__cta:hover { background: var(--khl-red-hover); border-color: var(--khl-red-hover); }

/* Scroll progress, a 2px red rule on the header's bottom edge. */
.header__progress {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--khl-red);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  pointer-events: none;
}

.burger {
  display: none;
  width: var(--tap-min);
  height: var(--tap-min);
  align-items: center;
  justify-content: center;
  border: 2px solid var(--khl-navy);
  background: transparent;
  cursor: pointer;
}
.burger svg { width: 22px; height: 22px; }
.burger .icon-x { display: none; }
.burger[aria-expanded="true"] .icon-x { display: block; }
.burger[aria-expanded="true"] .icon-menu { display: none; }

.menu { display: contents; }

@media (max-width: 900px) {
  /* The artwork carries Transportes Madrid inside itself. */
  .khl-logo--bar { --lg: 40px; }
  .burger { display: inline-flex; }
  .menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--khl-white);
    border-bottom: var(--rule);
    /* The one shadow allowed by the charter. */
    box-shadow: 0 24px 40px rgba(22, 38, 92, .18);
    padding: var(--s3) var(--gutter) var(--s4);
    clip-path: inset(0 0 100% 0);
    transition: clip-path .32s var(--ease);
  }
  .menu[data-open="false"] { pointer-events: none; }
  .menu[data-open="true"] { clip-path: inset(0 0 0 0); }
  .menu .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .menu .nav a {
    padding: 16px 0;
    font-size: 15px;
    border-bottom: 2px solid var(--khl-200);
  }
  .menu .nav a::after { display: none; }
}

@media (max-width: 480px) {
  .header__cta span { display: none; }
  .header__cta { padding: 12px 14px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.hero__top {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s5);
}
.hero__top .khl-hairline {
  flex: 1;
  height: 2px;
  background: var(--khl-navy);
  transform: scaleX(0);
  transform-origin: left center;
}

.hero h1 { margin-bottom: var(--s5); }
/* The mask only needs to hide the slide from below. Extending it upward keeps
   Spanish diacritics (the Ñ of PEQUEÑAS) from being clipped by line-height .92. */
.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-top: .22em;
  margin-top: -.22em;
}
.hero h1 .line > span { display: block; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
  padding-top: var(--s4);
  border-top: var(--rule);
}

.hero__aside { display: flex; flex-direction: column; gap: var(--s4); }

.hero__data {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px var(--s3);
  font-size: .9375rem;
}
.hero__data dt { font-weight: 700; color: var(--khl-700); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; align-self: center; }
.hero__data dd { margin: 0; font-weight: 700; }

/* Livery slashes bleeding off the right edge. */
.hero__slashes {
  position: absolute;
  top: -8%;
  right: calc(var(--gutter) * -1);
  bottom: -8%;
  width: min(320px, 26vw);
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  pointer-events: none;
  z-index: -1;
  will-change: transform;
}
.hero__slashes i {
  display: block;
  width: 26px;
  background: var(--khl-200);
  transform: skewX(-14deg);
}
.hero__slashes i:nth-child(2) { width: 12px; background: var(--khl-300); }
.hero__slashes i:nth-child(3) { width: 34px; background: var(--khl-red); }
.hero__slashes i:nth-child(4) { width: 14px; background: var(--khl-red); }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--s4); }
  .hero__slashes { display: none; }
}

/* Bottom-of-hero scroll cue: a gentle nudge toward the next section, in the
   same direction-of-travel language as the rest of the site's motion. */
.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--khl-700);
  transform: translateX(-50%);
  animation: khl-bob 1.8s ease-in-out infinite;
}
.hero__cue svg { width: 22px; height: 22px; }
.hero__cue:hover { color: var(--khl-navy); }
.hero__cue:focus-visible { outline-offset: 4px; }

@keyframes khl-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@media (max-width: 620px) { .hero__cue { display: none; } }

/* Both labels need the full width here, so the rule becomes a divider between
   them instead of a flex filler that collapses to zero. */
@media (max-width: 620px) {
  .hero__top { flex-wrap: wrap; gap: 10px; }
  .hero__top .label { flex: 1 0 100%; }
  .hero__top .khl-hairline { flex: 1 0 100%; height: 2px; }
}

/* ==========================================================================
   Ticker
   ========================================================================== */

.ticker {
  background: var(--khl-navy);
  color: var(--khl-white);
  overflow: hidden;
  border-block: var(--rule);
  padding-block: 18px;
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 34s linear infinite;
  will-change: transform;
}
.ticker__group { display: flex; align-items: center; flex: 0 0 auto; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-right: 22px;
  font-weight: 900;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker__item i {
  display: block;
  width: 10px;
  height: 1.5em;
  background: var(--khl-red);
  transform: skewX(-14deg);
}
.ticker:hover .ticker__track { animation-play-state: paused; }

@keyframes ticker { to { transform: translateX(-50%); } }

/* ==========================================================================
   Service cards
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .cards { grid-template-columns: 1fr; } }

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--s4);
  border: var(--rule);
  overflow: hidden;
  transition: color .26s var(--ease);
}
/* Hover fills the card navy from the left, like the plate wipe. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--khl-navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .34s var(--ease);
}
.card:hover::before, .card:focus-within::before { transform: scaleX(1); }
.card:hover, .card:focus-within { color: var(--khl-white); }
.card:hover .card__kicker, .card:focus-within .card__kicker { color: var(--khl-white); }
.card:hover .card__body, .card:focus-within .card__body { color: var(--khl-200); }
.card:hover .card__link, .card:focus-within .card__link { color: var(--khl-white); }

.card__icon { color: inherit; }
.card__icon svg { width: 28px; height: 28px; }
.card__icon svg path { transition: stroke-dashoffset .6s var(--ease); }
.card__kicker {
  font-weight: 700; font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--khl-700);
  transition: color .26s var(--ease);
}
.card h3 { text-transform: uppercase; font-weight: 900; font-size: 1.25rem; letter-spacing: -.01em; }
.card__body { font-size: .9375rem; color: var(--khl-navy); transition: color .26s var(--ease); }
.card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--khl-red);
  transition: color .26s var(--ease);
}
.card__link svg { width: 16px; height: 16px; transition: transform .26s var(--ease); }
.card:hover .card__link svg, .card:focus-within .card__link svg { transform: translateX(6px); }

/* The urgencias card: red fill, one per page. */
.card--red {
  background: var(--khl-red);
  border-color: var(--khl-red);
  color: var(--khl-white);
}
.card--red .card__kicker { color: var(--khl-white); }
.card--red .card__body { color: var(--khl-white); }
.card--red .card__link { color: var(--khl-white); }
.card--red::before { background: var(--khl-navy); }
.card--red:hover, .card--red:focus-within { border-color: var(--khl-navy); }

/* Slashes riding the card's right edge on hover. */
/* The 14deg skew throws the foot of a full-height slash ~53px to the left, which
   walks over the body copy. Pushing the group past the right edge keeps the whole
   diagonal inside the last ~60px, cropped by the card's overflow. */
.card__slashes {
  position: absolute;
  top: -10px; bottom: -10px; right: -34px;
  display: flex; gap: 9px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .3s var(--ease), transform .42s var(--ease);
}
.card__slashes i { display: block; width: 14px; background: var(--khl-red); transform: skewX(-14deg); }
.card__slashes i + i { width: 7px; }
.card--red .card__slashes i { background: var(--khl-white); }
.card:hover .card__slashes, .card:focus-within .card__slashes { opacity: 1; transform: translateX(0); }

/* ==========================================================================
   Steps
   ========================================================================== */

.steps { border-top: var(--rule); }
.step {
  display: grid;
  grid-template-columns: minmax(88px, .18fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--s4);
  align-items: start;
  padding-block: var(--s5);
  border-bottom: var(--rule);
}
.step__n {
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: .82;
  letter-spacing: -.04em;
  /* khl-300 read at 1.38:1 on white. khl-700 keeps the numeral secondary to the
     heading while clearing AA for large text. */
  color: var(--khl-700);
  transition: color .3s var(--ease);
}
.step:hover .step__n { color: var(--khl-red); }
.step h3 { text-transform: uppercase; font-weight: 900; letter-spacing: -.01em; }
@media (max-width: 760px) {
  .step { grid-template-columns: 1fr; gap: var(--s2); }
  .step__n { margin-bottom: var(--s1); }
}

/* ==========================================================================
   Zonas
   ========================================================================== */

.zonas__photo {
  margin: 0 0 var(--s5);
  border: var(--rule);
  overflow: hidden;
  line-height: 0;
}
.zonas__photo img {
  display: block;
  width: 100%;
  filter: grayscale(1);
}

.zonas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s5) var(--s4);
}
@media (max-width: 860px) { .zonas { grid-template-columns: 1fr; } }

.zonas__col h3 {
  text-transform: uppercase; font-weight: 900; font-size: 1.125rem;
  letter-spacing: .02em; padding-bottom: 12px; border-bottom: var(--rule);
  margin-bottom: var(--s3);
}
.zonas__list { columns: 2; column-gap: var(--s4); font-size: .9375rem; }
.zonas__list li { break-inside: avoid; padding: 3px 0; }
@media (max-width: 480px) { .zonas__list { columns: 1; } }

.zonas__col--wide .zonas__list { columns: 1; }
.zonas__note {
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 2px solid var(--khl-200);
  font-size: .9375rem;
}

/* ==========================================================================
   Confianza
   ========================================================================== */

.trust {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
}
@media (max-width: 860px) { .trust { grid-template-columns: 1fr; gap: var(--s4); } }

.trust__figure { margin: 0; border: var(--rule); overflow: hidden; }
/* A very slow drift gives the still the feel of footage without shipping any.
   Scaled slightly so the pan never exposes an edge. */
@keyframes khl-drift {
  from { transform: scale(1.07) translate3d(1.4%, 0, 0); }
  to   { transform: scale(1.07) translate3d(-1.4%, 0, 0); }
}
.trust__figure img {
  filter: grayscale(1);
  width: 100%;
  will-change: transform;
  animation: khl-drift 22s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .trust__figure img { animation: none; transform: none; }
}
.trust__figure figcaption {
  border-top: var(--rule);
  padding: 12px var(--s3);
  font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--khl-700);
}

.ficha { border-top: var(--rule); margin-top: var(--s4); }
.ficha div {
  display: flex; justify-content: space-between; gap: var(--s3);
  padding: 12px 0; border-bottom: 2px solid var(--khl-200);
  font-size: .9375rem;
}
.ficha dt { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--khl-700); }
.ficha dd { margin: 0; font-weight: 700; text-align: right; }

.trust__points { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
.trust__points li { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; }
.trust__points svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; color: var(--khl-red); }

/* ==========================================================================
   Trabajos reales
   ========================================================================== */

.fotos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4);
}
@media (max-width: 900px) { .fotos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .fotos { grid-template-columns: 1fr; } }

.fotos__item { margin: 0; border: var(--rule); overflow: hidden; line-height: 0; }
.fotos__item img { display: block; width: 100%; filter: grayscale(1); }
.fotos__item figcaption {
  border-top: var(--rule);
  padding: 10px 14px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--khl-700); line-height: 1.3;
}

/* ==========================================================================
   Form
   ========================================================================== */

.quote {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
}
@media (max-width: 860px) { .quote { grid-template-columns: 1fr; gap: var(--s4); } }

.form { display: flex; flex-direction: column; gap: var(--s4); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--khl-700); }

.input {
  width: 100%;
  min-height: var(--tap-min);
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--khl-navy);
  caret-color: var(--khl-red);
  background: var(--khl-white);
  border: var(--rule);
  transition: border-color .2s var(--ease);
}
.input::placeholder { color: var(--khl-500); }
.input:hover { border-color: var(--khl-navy-hover); }
textarea.input { min-height: 108px; resize: vertical; }

.field[data-invalid="true"] .input { border-color: var(--khl-red); }
.error {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--khl-red);
  min-height: 0;
}
.error:empty { display: none; }

fieldset { margin: 0; padding: 0; border: 0; }
legend { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--khl-700); padding: 0; margin-bottom: 6px; }

.seg { display: flex; flex-wrap: wrap; border: var(--rule); width: 100%; }
.seg-opt {
  position: relative;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 10px 14px;
  font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.seg-opt + .seg-opt { border-left: var(--rule); }
.seg-opt input {
  position: absolute;
  opacity: 0; width: 0; height: 0; pointer-events: none;
}
.seg-opt:has(input:checked) { background: var(--khl-navy); color: var(--khl-white); }
.seg-opt:not(:has(input:checked)):hover { background: var(--khl-200); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--khl-red); outline-offset: -4px; }

.form__note { font-size: .8125rem; color: var(--khl-700); }

.aside-cta { border: var(--rule); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.aside-cta h3 { text-transform: uppercase; font-weight: 900; font-size: 1.125rem; }
.aside-cta p { font-size: .9375rem; }

.phone-big {
  display: inline-block;
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -.02em;
  line-height: 1;
}

/* ==========================================================================
   Cierre
   ========================================================================== */

.cierre {
  background: var(--khl-red);
  color: var(--khl-white);
  padding-block: clamp(56px, 8vw, 96px);
  overflow: hidden;
}
.cierre h2 { margin-bottom: var(--s4); }
.cierre .phone-big { font-size: clamp(2.25rem, 6vw, 4rem); }
.cierre a.phone-big:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 4px; }
.cierre__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5);
  padding-top: var(--s4); margin-top: var(--s4);
  border-top: 2px solid rgba(255,255,255,.4);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { background: var(--khl-navy); color: var(--khl-white); padding-block: var(--s6) var(--s5); }
.footer__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5) var(--s4); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: var(--s4); } }
.footer h3 {
  font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--khl-500); margin-bottom: var(--s3);
  padding-bottom: 10px; border-bottom: 2px solid rgba(255,255,255,.25);
}
.footer li { padding: 5px 0; font-size: .9375rem; }
.footer a:hover { color: var(--khl-red); }
.footer__brand { margin-bottom: var(--s5); }
.footer__legal {
  margin-top: var(--s5); padding-top: var(--s3);
  border-top: 2px solid rgba(255,255,255,.25);
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4);
  font-size: .8125rem; color: var(--khl-300);
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.doc { max-width: 75ch; }
.doc h2 { margin-top: var(--s5); margin-bottom: var(--s3); font-size: clamp(1.25rem, 2.4vw, 1.5rem); }
.doc h2:first-of-type { margin-top: 0; }
.doc p { margin-bottom: var(--s3); }
.doc ul { margin-bottom: var(--s3); }
.doc li { padding: 4px 0 4px 18px; position: relative; }
.doc li::before { content: ""; position: absolute; left: 0; top: 14px; width: 8px; height: 2px; background: var(--khl-red); }
.doc a { color: var(--khl-red); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Intro curtain, plays once per session
   ========================================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--khl-navy);
  display: flex;
  align-items: center;
  padding-inline: var(--gutter);
  clip-path: inset(0 0 0 0);
  transition: clip-path .62s var(--ease);
}
.intro__inner { width: 100%; max-width: var(--max-width); margin-inline: auto; }
.intro .khl-logo { --lg: clamp(80px, 16vw, 170px); }
.intro[data-done="true"] { clip-path: inset(0 0 100% 0); pointer-events: none; }

html.no-intro .intro,
html.reduce-motion .intro { display: none; }

/* Body is locked while the curtain is up. */
html.intro-lock, html.intro-lock body { overflow: hidden; }

/* Intro build, two beats. The mark is swept in along a slanted edge that follows
   the logo's own italic, then the tagline slides in under it. */
.intro-lockup { display: block; width: clamp(230px, 40vw, 520px); }
.intro-lockup picture { display: block; }
.intro-lockup img { display: block; width: 100%; height: auto; }

@keyframes khl-sweep {
  from { clip-path: polygon(0 0, 0 0, -26% 100%, -26% 100%); }
  to   { clip-path: polygon(0 0, 126% 0, 100% 100%, -26% 100%); }
}
@keyframes khl-tag-in {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: none; }
}

.intro-mark { display: block; animation: khl-sweep .74s var(--ease) .16s both; }
.intro-tag  { display: block; animation: khl-tag-in .46s var(--ease) .72s both; }

/* ==========================================================================
   Scroll reveals
   Only transform, opacity and clip-path. Nothing that triggers layout.
   ========================================================================== */

.js [data-reveal] {
  transition:
    opacity .55s var(--ease),
    transform .62s var(--ease),
    clip-path .72s var(--ease);
  transition-delay: var(--d, 0s);
}

.js [data-reveal="wipe"] { clip-path: inset(0 100% 0 0); }
.js [data-reveal="up"]   { opacity: 0; transform: translateY(20px); }
.js [data-reveal="rule"] { transform: scaleX(0); transform-origin: left center; }
.js [data-reveal="slide"]{ opacity: 0; transform: translateX(-18px); }

.js [data-reveal].is-in {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: none;
}
.js [data-reveal="rule"].is-in { transform: scaleX(1); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { clip-path: none !important; opacity: 1 !important; transform: none !important; }
  .ticker__track { animation: none; transform: none; }
  .intro { display: none; }
}
