/* =================================================================
   RED EYE MEDIA, homepage
   Loads after styles.css and reuses its tokens. Everything here is
   namespaced h- so it never collides with the inner pages.
   ================================================================= */

:root {
  --h-plate-paper: #E9E4DC;
  --h-on-red: rgb(30, 4, 2);                    /* secondary text tinted from the red */
  --h-dim: rgba(236, 233, 227, 0.62);
  --h-wrap: 1440px;
  interpolate-size: allow-keywords;
}

.page-home { background: var(--ink); caret-color: var(--red); accent-color: var(--red); scrollbar-color: #3a3a3f var(--ink); }
.page-home ::selection { background: var(--red-bright); color: var(--ink); }

/* grain over everything, printed not glowing */
.page-home::after {
  content: ""; position: fixed; inset: -60px; z-index: 300; pointer-events: none;
  background: url("../img/grain.png") repeat; background-size: 192px;
  opacity: 0.05;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .page-home::after { animation: h-grain 0.9s steps(4) infinite; }
}
@keyframes h-grain {
  0% { transform: translate3d(0, 0, 0); } 25% { transform: translate3d(-23px, 11px, 0); }
  50% { transform: translate3d(17px, -19px, 0); } 75% { transform: translate3d(-9px, 27px, 0); }
}

.h-svc__rows, .h-work__track, .h-method__line, .h-start__alt { margin: 0; padding-left: 0; }
.h-wrap { width: 100%; max-width: var(--h-wrap); margin-inline: auto; padding-inline: var(--gutter); }
.h-h2 {
  font-family: var(--display); font-weight: 900; font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.93; letter-spacing: -0.038em; text-wrap: balance;
}
.i { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: square; }

/* ---------- Buttons ---------- */
.h-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 52px; padding: 0 1.45rem; border-radius: var(--radius);
  font: 600 1rem/1 var(--sans); letter-spacing: -0.005em; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
  transition: transform 160ms var(--ease), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.h-btn:active { transform: scale(0.97); transition-duration: 60ms; }
.h-btn .i { transition: transform 220ms var(--ease); }
.h-btn--red { background: var(--red); color: #fff; }
.h-btn--line { border: 1px solid rgba(236, 233, 227, 0.34); color: var(--paper); }
.h-btn--sm { min-height: 42px; padding: 0 1.1rem; font-size: 0.92rem; }
.h-btn--lg { min-height: 60px; padding: 0 2rem; font-size: 1.05rem; }
@media (hover: hover) and (pointer: fine) {
  .h-btn--red:hover { background: #B80500; }
  .h-btn--line:hover { border-color: var(--paper); }
  .h-btn:hover .i { transform: translateX(3px); }
}

.h-tlink {
  display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600; font-size: 0.98rem;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.32em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .h-tlink:hover { text-decoration-color: currentColor; } }

/* ---------- Header on the homepage ---------- */
.page-home .header { background: transparent; }
.page-home .header.is-scrolled::before { background: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.page-home .footer { background: var(--ink); }
.page-home .nav { gap: clamp(1.2rem, 2.2vw, 2.2rem); }

/* =================================================================
   HERO
   ================================================================= */
.h-hero { position: relative; height: 240svh; background: var(--ink); }
.h-hero.is-static { height: 100svh; }
@media (prefers-reduced-motion: reduce) { .h-hero { height: 100svh; } }

.h-hero__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; }
.h-hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 700ms var(--ease);
}
.h-hero__stage.is-live .h-hero__canvas { opacity: 1; }
.h-hero__fallback {
  position: absolute; left: 50%; top: 40%; width: min(58vw, 920px); height: auto;
  transform: translate(-50%, -50%) rotate(-1.5deg);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
}
.h-hero__stage.is-live .h-hero__fallback { display: none; }

.h-hero__copy {
  position: absolute; left: 0; right: 0; bottom: clamp(1.75rem, 5vh, 3.5rem); z-index: 2;
  padding-inline: var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: end; gap: 2.5rem;
  will-change: opacity, transform;
}
.h-hero__title {
  font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 7.4vw, 6rem);
  line-height: 0.9; letter-spacing: -0.04em; color: var(--paper);
}
.h-hero__title .ln { display: block; overflow: hidden; padding-bottom: 0.07em; margin-bottom: -0.07em; }
.h-hero__title .ln > span { display: inline-block; animation: h-rise 1100ms var(--ease) both; }
.h-hero__title .ln:nth-child(1) > span { animation-delay: 240ms; }
.h-hero__title .ln:nth-child(2) > span { animation-delay: 320ms; }
@keyframes h-rise { from { transform: translate3d(0, 104%, 0); } }

.h-hero__side { display: grid; gap: 1.5rem; justify-items: start; max-width: 34rem; justify-self: end; padding-bottom: 0.35rem; animation: h-fade 900ms var(--ease) 520ms both; }
@keyframes h-fade { from { opacity: 0; transform: translate3d(0, 14px, 0); } }
.h-hero__lead { font-size: clamp(0.98rem, 1.05vw, 1.08rem); line-height: 1.55; color: var(--h-dim); max-width: 46ch; text-wrap: pretty; }
.h-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.h-hero__cue {
  position: absolute; right: var(--gutter); top: 50%; z-index: 2;
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver);
  writing-mode: vertical-rl; transform: translateY(-50%);
}
.h-hero__cue-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red-bright); animation: h-pulse 2.4s var(--ease) infinite; }
@keyframes h-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  .h-hero__title .ln > span, .h-hero__side { animation: none; }
  .h-hero__cue { display: none; }
  .page-home::after { animation: none; }
}

@media (max-width: 900px) {
  .h-hero { height: 205svh; }
  .h-hero__copy { grid-template-columns: 1fr; gap: 1.1rem; bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
  .h-hero__title { font-size: clamp(2.7rem, 13.4vw, 4.6rem); }
  .h-hero__side { justify-self: stretch; max-width: none; gap: 1.1rem; }
  .h-hero__lead { font-size: 0.95rem; }
  .h-hero__actions { display: grid; grid-template-columns: 1.35fr 1fr; width: 100%; }
  .h-hero__actions .h-btn { padding-inline: 1rem; }
  .h-hero__cue { display: none; }
  .h-hero__fallback { width: 94vw; top: 33%; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .h-hero__lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* =================================================================
   WORK, dealt on the red
   ================================================================= */
.h-work { position: relative; z-index: 2; margin-top: -58svh; background: var(--red-bright); color: var(--ink); }
.h-hero.is-static + .h-work { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .h-work { margin-top: 0; } }
.h-work__pin {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); gap: clamp(1rem, 3vh, 2.2rem);
  padding: calc(var(--nav-h) + clamp(0.5rem, 2vh, 1.5rem)) 0 clamp(1.25rem, 3.5vh, 2.25rem);
}
.h-work__head {
  width: 100%; max-width: var(--h-wrap); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: auto minmax(0, 30rem); justify-content: space-between; align-items: end; gap: 2rem;
}
.h-work__title { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 9vw, 6rem); line-height: 0.88; letter-spacing: -0.04em; }
.h-work__lead { font-size: 1.02rem; line-height: 1.5; color: var(--h-on-red); max-width: 44ch; }

.h-work__viewport { position: relative; min-width: 0; width: 100%; perspective: 1500px; perspective-origin: 50% 45%; display: flex; align-items: center; min-height: 0; }
.h-work__track {
  display: flex; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.25rem);
  padding-inline: var(--gutter); list-style: none; will-change: transform; transform-style: preserve-3d;
  flex: 0 0 auto; width: max-content;
}
.h-work__foot {
  width: 100%; max-width: var(--h-wrap); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 2rem;
}
.h-work__bar { display: block; width: min(240px, 30vw); height: 2px; background: rgba(11, 11, 12, 0.2); overflow: hidden; }
.h-work__bar > span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }

/* cards: printed pieces, not tiles */
.h-card {
  flex: 0 0 auto; width: clamp(248px, 25vw, 390px); height: min(calc(100svh - 21rem), 520px); min-height: 330px;
  transform-style: preserve-3d;
}
.h-card__in {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.45rem;
  height: 100%; padding: clamp(1.1rem, 1.6vw, 1.5rem); border-radius: 3px; overflow: hidden; isolation: isolate;
  box-shadow: 0 34px 50px -28px rgba(0, 0, 0, 0.6), 0 10px 18px -12px rgba(0, 0, 0, 0.5);
  transition: transform 260ms var(--ease);
}
.h-card__in::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-color: currentColor; opacity: 0.9;
  -webkit-mask: url("../img/dots-burst.png") center / cover no-repeat; mask: url("../img/dots-burst.png") center / cover no-repeat;
}
.h-card:nth-child(3n+2) .h-card__in::before { -webkit-mask-image: url("../img/dots-sweep.png"); mask-image: url("../img/dots-sweep.png"); }
.h-card:nth-child(3n) .h-card__in::before { -webkit-mask-image: url("../img/dots-ring.png"); mask-image: url("../img/dots-ring.png"); }
.h-card__mark {
  position: absolute; left: clamp(1rem, 1.4vw, 1.4rem); top: clamp(0.8rem, 1.2vw, 1.2rem);
  font-family: var(--display); font-weight: 900; font-size: clamp(4.5rem, 7vw, 6rem); line-height: 0.82; letter-spacing: -0.04em;
}
.h-card__name { font-family: var(--display); font-weight: 800; font-size: clamp(1.55rem, 2.1vw, 2.1rem); line-height: 0.98; letter-spacing: -0.022em; text-wrap: balance; overflow-wrap: anywhere; hyphens: auto; }
.h-card__what { font-size: 0.92rem; line-height: 1.4; max-width: 30ch; }
.h-card__go { display: inline-flex; align-items: center; gap: 0.35em; margin-top: 0.5rem; max-width: 100%; overflow-wrap: anywhere; font-weight: 600; font-size: 0.92rem; }

.h-card--paper .h-card__in { background: var(--h-plate-paper); color: var(--ink); }
.h-card--paper .h-card__in::before { color: var(--red-bright); }
.h-card--paper .h-card__mark { color: var(--ink); }
.h-card--paper .h-card__what { color: #3b3936; }
.h-card--ink .h-card__in { background: var(--ink); color: var(--paper); }
.h-card--ink .h-card__in::before { color: #5a0b06; }
.h-card--ink .h-card__mark { color: var(--red-bright); }
.h-card--ink .h-card__what { color: var(--h-dim); }
.h-card--red .h-card__in { background: var(--red-deep); color: var(--paper); }
.h-card--red .h-card__in::before { color: #c41a0e; }
.h-card--red .h-card__mark { color: var(--ink); }
.h-card--red .h-card__what { color: rgba(236, 233, 227, 0.86); }
.h-card--shot .h-card__in { background: var(--h-plate-paper); color: var(--ink); justify-content: flex-start; }
.h-card--shot .h-card__in::before { color: var(--red-bright); opacity: 0.85; }
.h-card--shot .h-card__shot { display: block; margin: -0.2rem -0.2rem auto; border: 1px solid rgba(11, 11, 12, 0.85); overflow: hidden; background: var(--ink); }
.h-card--shot .h-card__shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.h-card--shot .h-card__what { color: #3b3936; }
.h-card--next { width: clamp(248px, 22vw, 340px); }
.h-card--next .h-card__in { background: var(--ink); color: var(--paper); justify-content: center; }
.h-card--next .h-card__in::before { color: var(--red-deep); }
.h-card--next .h-card__name { font-size: clamp(2.4rem, 3.6vw, 3.4rem); color: var(--red-bright); font-weight: 900; }
.h-card--next .h-card__what { color: var(--h-dim); }
.h-card--next .h-card__go { color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  a.h-card__in:hover { transform: translate3d(0, -8px, 0); }
}

@media (max-width: 900px) {
  .h-work { height: auto !important; }
  .h-work__pin { position: relative; height: auto; overflow: visible; padding-top: clamp(4.5rem, 14vw, 6rem); padding-bottom: 2.5rem; }
  .h-work__head { grid-template-columns: 1fr; gap: 1rem; }
  .h-work__title { font-size: clamp(3.2rem, 17vw, 5rem); }
  .h-work__viewport {
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-block: 1.5rem 2rem; perspective: 1100px;
  }
  .h-work__viewport::-webkit-scrollbar { display: none; }
  .h-work__track { transform: none !important; }
  .h-work__track { padding-inline: 11vw; }
  .h-card { width: 78vw; height: auto; min-height: 0; aspect-ratio: 4 / 5; scroll-snap-align: center; }
  .h-card--shot { aspect-ratio: auto; height: calc(78vw * 1.25); }
  .h-card--next { width: 70vw; }
  .h-work__foot { flex-direction: column-reverse; align-items: flex-start; gap: 1.25rem; }
}

/* =================================================================
   SERVICES, the lens
   ================================================================= */
.h-svc { padding-block: clamp(5.5rem, 12vw, 10rem); background: var(--ink); }
.h-svc__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); align-items: end; gap: 2rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.h-svc__lead { font-size: 1.02rem; line-height: 1.55; color: var(--h-dim); max-width: 42ch; }
.h-svc__list { position: relative; margin-bottom: clamp(2rem, 4vw, 3rem); }
.h-svc__rows { list-style: none; border-top: 1px solid var(--line); }
.h-svc__row {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  padding-block: clamp(0.95rem, 1.6vw, 1.4rem); border-bottom: 1px solid var(--line); color: var(--paper);
}
.h-svc__name { min-width: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.55rem, 3.4vw, 3.1rem); line-height: 1; letter-spacing: -0.032em; overflow-wrap: anywhere; hyphens: auto; }
.h-svc__desc { font-size: 0.97rem; line-height: 1.45; color: rgba(236, 233, 227, 0.6); max-width: 46ch; }
.h-svc__lens {
  position: absolute; inset: 0; pointer-events: none; background-color: var(--red-bright);
  background-image: radial-gradient(circle, rgba(120, 10, 4, 0.55) 0 1.7px, transparent 2.1px);
  background-size: 7px 7px;
  clip-path: circle(0px at 50% 50%); will-change: clip-path;
}
.h-svc__lens .h-svc__rows { border-top-color: rgba(11, 11, 12, 0.25); }
.h-svc__lens .h-svc__row { color: var(--ink); border-bottom-color: rgba(11, 11, 12, 0.25); }
.h-svc__lens .h-svc__desc { color: var(--ink); }
.h-svc__ring {
  position: absolute; left: 0; top: 0; width: 264px; height: 264px; pointer-events: none;
  border-radius: 50%; border: 1px solid rgba(236, 233, 227, 0.5); will-change: transform;
}
@media (max-width: 900px) {
  .h-svc__head { grid-template-columns: 1fr; }
  .h-svc__row { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .h-svc__name { font-size: clamp(1.6rem, 7.4vw, 2.2rem); letter-spacing: -0.022em; }
  .h-svc__lens, .h-svc__ring { display: none; }
}
.h-svc__row:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 4px; }

/* =================================================================
   METHOD
   ================================================================= */
.h-method { padding-block: clamp(3rem, 6vw, 5rem) clamp(5rem, 10vw, 8.5rem); background: var(--ink); }
.h-method__track { position: relative; margin-top: clamp(4rem, 8vw, 6rem); }
.h-method__line { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2.5rem); }
.h-method__step { position: relative; padding-top: 2.6rem; opacity: 0.4; transition: opacity 400ms ease; }
.h-method__step.is-on { opacity: 1; }
.h-method__n { display: block; font-family: var(--display); font-weight: 900; font-size: 1rem; color: var(--red-bright); margin-bottom: 0.7rem; font-variant-numeric: tabular-nums; }
.h-method__step h3 { font-family: var(--display); font-weight: 800; font-size: clamp(1.35rem, 2vw, 1.9rem); letter-spacing: -0.018em; line-height: 1; margin-bottom: 0.75rem; overflow-wrap: anywhere; hyphens: auto; }
.h-method__step p { font-size: 0.95rem; line-height: 1.5; color: var(--h-dim); max-width: 30ch; }
.h-method__rail { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.h-method__pupil {
  position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--red-bright); box-shadow: 0 0 0 5px var(--ink), 0 0 0 6px rgba(236, 233, 227, 0.4);
  will-change: transform;
}
@media (max-width: 900px) {
  .h-method__track { margin-top: 3rem; }
  .h-method__line { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; padding-left: 2.4rem; }
  .h-method__step { padding-top: 0; }
  .h-method__rail { left: 8px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .h-method__pupil { left: 0; margin-left: -8.5px; }
}

/* =================================================================
   START, the brief
   ================================================================= */
.h-start { position: relative; padding-block: clamp(5rem, 11vw, 9rem); background: var(--h-plate-paper); color: var(--ink); }
.h-start::before {
  content: ""; position: absolute; left: 0; right: 0; top: -44px; height: 46px; pointer-events: none;
  background: url("../img/torn-edge.png") repeat-x 0 100% / auto 90px;
}
.h-start .h-h2 { font-size: clamp(2.4rem, 4.6vw, 4.6rem); max-width: 11ch; }
.h-start ::selection { background: var(--ink); color: var(--paper); }
.h-start__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.h-start__intro { position: sticky; top: calc(var(--nav-h) + 2rem); }
.h-start__lead { margin-top: 1.5rem; font-size: 1.05rem; line-height: 1.55; color: #3b3936; max-width: 40ch; }
.h-start__alt { list-style: none; display: grid; gap: 0.6rem; margin-top: 2rem; }

.h-form { display: grid; gap: 2.25rem; }
.h-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.h-form__q { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 0.9rem; padding: 0; }
.h-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.h-doors { display: grid; gap: 0.6rem; }
.h-door {
  position: relative; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); column-gap: 1rem; row-gap: 0.25rem; align-items: baseline;
  padding: 1.15rem 1.25rem 1.15rem 3.1rem; border: 1px solid rgba(11, 11, 12, 0.2); border-radius: 3px; cursor: pointer;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease, transform 160ms var(--ease);
}
.h-door:active { transform: scale(0.99); }
.h-door input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.h-door::before {
  content: ""; position: absolute; left: 1.25rem; top: 1.45rem; width: 14px; height: 14px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor; transition: box-shadow 220ms var(--ease), background-color 220ms ease;
}
.h-door__name { min-width: 0; font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.015em; overflow-wrap: anywhere; hyphens: auto; }
.h-door__what { grid-column: 1 / -1; font-size: 0.95rem; line-height: 1.45; color: #3b3936; transition: color 220ms ease; }
.h-door { overflow: hidden; isolation: isolate; }
.h-door::after {
  content: ""; position: absolute; right: -4%; top: -38%; width: 30%; aspect-ratio: 1; z-index: -1; pointer-events: none;
  background: var(--red-bright); opacity: 0; transform: scale(0.94) rotate(-6deg);
  -webkit-mask: url("../img/dots-burst.png") center / cover no-repeat; mask: url("../img/dots-burst.png") center / cover no-repeat;
  transition: opacity 260ms var(--ease), transform 420ms var(--ease);
}
.h-door:has(input:checked)::after { opacity: 0.85; transform: scale(1) rotate(0deg); }
@media (min-width: 901px) { .h-door__what { max-width: 64%; } }
@media (max-width: 900px) { .h-door::after { right: -6%; top: -46%; width: 36%; } }
.h-door:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.h-door:has(input:checked)::before { background: var(--red-bright); box-shadow: inset 0 0 0 1.5px var(--red-bright); }
.h-door:has(input:checked) .h-door__what { color: var(--h-dim); }
.h-door:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .h-door:hover { border-color: var(--ink); } }

.h-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.h-chips .h-form__q { width: 100%; }
.h-chip { position: relative; max-width: 100%; cursor: pointer; }
.h-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.h-chip span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0.45rem 1rem; line-height: 1.3; overflow-wrap: anywhere; border-radius: var(--radius-pill);
  border: 1px solid rgba(11, 11, 12, 0.24); font-size: 0.93rem; font-weight: 500;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ease);
}
.h-chip:active span { transform: scale(0.97); }
.h-chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.h-chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 3px; }

.h-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 1.75rem; }
.h-field { display: grid; gap: 0.45rem; }
.h-field--wide { grid-column: 1 / -1; }
.h-field__label { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.01em; }
.h-field__label em { font-style: normal; font-weight: 400; color: #5d5a55; margin-left: 0.3em; }
.h-field input, .h-field select, .h-field textarea {
  width: 100%; font: 400 1.05rem/1.4 var(--sans); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1.5px solid rgba(11, 11, 12, 0.35); border-radius: 0;
  padding: 0.55rem 0; transition: border-color 200ms ease;
}
.h-field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%230B0B0C' stroke-width='1.75'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0 center; background-size: 18px; padding-right: 1.6rem; }
.h-field textarea { resize: vertical; min-height: 5.2rem; }
.h-field input:focus, .h-field select:focus, .h-field textarea:focus { outline: none; border-bottom-color: var(--red); }
.h-field__err { display: none; font-size: 0.85rem; color: var(--red-deep); }
.h-field.is-invalid input { border-bottom-color: var(--red-deep); }
.h-field.is-invalid .h-field__err { display: block; }
.h-form__err, .h-form__fail { font-size: 0.95rem; color: var(--red-deep); font-weight: 500; }
.h-form__fail a { text-decoration: underline; text-underline-offset: 0.25em; }
.h-form__send { display: flex; }
.h-form__send .h-btn { min-width: 15rem; }
.h-btn[aria-busy="true"] { pointer-events: none; opacity: 0.8; }
.h-form__done { padding: 2rem; background: var(--ink); color: var(--paper); border-radius: 3px; outline: none;
  transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.h-form__done[hidden] { display: none; }
@starting-style { .h-form__done { opacity: 0; transform: translate3d(0, 10px, 0); } }
.h-form__done-title { font-family: var(--display); font-weight: 900; font-size: 2.6rem; letter-spacing: -0.04em; color: var(--red-bright); margin-bottom: 0.4rem; }
.h-form.is-sent > :not(.h-form__done) { display: none; }

@media (max-width: 900px) {
  .h-start__grid { grid-template-columns: 1fr; }
  .h-start__intro { position: static; }
  .h-fields { grid-template-columns: 1fr; }
  .h-form__send .h-btn { width: 100%; }
}

/* =================================================================
   FAQ
   ================================================================= */
.h-faq { padding-block: clamp(5rem, 10vw, 8.5rem); background: var(--ink); }
.h-faq__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.h-faq__grid > .h-h2 { position: sticky; top: calc(var(--nav-h) + 2rem); font-size: clamp(2.2rem, 4.4vw, 4rem); }
.h-faq__list { border-top: 1px solid var(--line); }
.h-q { border-bottom: 1px solid var(--line); }
.h-q summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; cursor: pointer; list-style: none;
  padding-block: 1.35rem; font-weight: 600; font-size: clamp(1.02rem, 1.3vw, 1.18rem); line-height: 1.35;
}
.h-q summary::-webkit-details-marker { display: none; }
.h-q summary .i { color: var(--red-bright); transition: transform 220ms var(--ease); }
.h-q[open] summary .i { transform: rotate(45deg); }
.h-q p { padding-bottom: 1.5rem; color: var(--h-dim); line-height: 1.6; max-width: 62ch; }
.h-q::details-content { block-size: 0; overflow: hidden; transition: block-size 320ms var(--ease), content-visibility 320ms allow-discrete; }
.h-q[open]::details-content { block-size: auto; }
.h-q summary:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 4px; }
@media (max-width: 900px) {
  .h-faq__grid { grid-template-columns: 1fr; }
  .h-faq__grid > .h-h2 { position: static; }
}

/* =================================================================
   CLOSE
   ================================================================= */
.h-close { padding-block: clamp(5.5rem, 12vw, 10rem); background: var(--ink); border-top: 1px solid var(--line-soft); overflow: hidden; }
.h-close__eyes { width: clamp(180px, 20vw, 280px); height: auto; margin-bottom: 2.5rem; transform: rotate(-2deg); filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.55)); }
.h-close__title { font-family: var(--display); font-weight: 900; font-size: clamp(2.4rem, 6.2vw, 6rem); line-height: 0.93; letter-spacing: -0.04em; max-width: 16ch; text-wrap: balance; }
.h-close__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; }

/* =================================================================
   Mobile dock: the action stays in the thumb
   ================================================================= */
.h-dock { display: none; }
@media (max-width: 900px) {
  .h-dock {
    display: flex; position: fixed; z-index: 98; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom));
    min-height: 54px; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.6);
    transform: translate3d(0, calc(100% + 30px), 0); transition: transform 320ms var(--ease), background-color 200ms ease;
  }
  .h-dock.is-on { transform: translate3d(0, 0, 0); }
  .page-home .header .nav > .h-btn { transition: opacity 200ms ease; }
  .page-home.dock-on .header .nav > .h-btn { opacity: 0; pointer-events: none; }
  .h-dock.is-on:active { transform: scale(0.98); transition-duration: 80ms; }
  .page-home .footer { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
}

/* =================================================================
   OPENING: the live makeover
   ================================================================= */
.h-top { position: relative; padding: calc(var(--nav-h) + clamp(1.5rem, 5vh, 3.5rem)) 0 clamp(3.5rem, 8vw, 6.5rem); background: var(--ink); overflow: clip; }
.h-top__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "side side"; align-items: end; gap: 1.6rem 2.5rem; margin-bottom: clamp(2rem, 4.5vw, 3.5rem); }
.h-top__title { grid-area: title; }
.h-top__side { grid-area: side; }
.h-top__title {
  font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 0.92; letter-spacing: -0.04em; color: var(--paper); text-wrap: balance;
}
.h-top__title .ln { display: block; overflow: hidden; padding-bottom: 0.07em; margin-bottom: -0.07em; }
.h-top__title .ln > span { display: inline-block; animation: h-rise 1100ms var(--ease) both; }
.h-top__title .ln:nth-child(1) > span { animation-delay: 120ms; }
.h-top__title .ln:nth-child(2) > span { animation-delay: 200ms; }
.h-top__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2.5rem; animation: h-fade 900ms var(--ease) 380ms both; }
.h-top__lead { font-size: clamp(1rem, 1.1vw, 1.1rem); line-height: 1.55; color: var(--h-dim); max-width: 44ch; text-wrap: pretty; }
.h-top__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.h-top__stage { position: relative; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.h-top__stage::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  right: max(2vw, calc(50% - 680px)); top: -6%; width: min(36vw, 460px); aspect-ratio: 1;
  background: var(--red-bright); opacity: 0.9;
  -webkit-mask: url("../img/dots-burst.png") center / cover no-repeat; mask: url("../img/dots-burst.png") center / cover no-repeat;
}
.h-top__tilt { position: relative; z-index: 1; max-width: 1180px; margin-inline: auto; transform-origin: 50% 0%; will-change: transform; animation: h-fade 1000ms var(--ease) 260ms both; }
@media (prefers-reduced-motion: reduce) { .h-top__title .ln > span, .h-top__side, .h-top__tilt { animation: none; } }
@media (max-width: 900px) {
  .h-top { padding-top: calc(var(--nav-h) + 1rem); }
  .h-top__head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "side"; gap: 1.1rem; }
  .h-top__title { font-size: clamp(2.5rem, 11.2vw, 3.8rem); }
  .h-top__side { display: grid; gap: 1.1rem; }
  .h-top__lead { font-size: 0.98rem; }
  .h-top__actions { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); width: 100%; }
  .h-top__actions .h-btn { padding-inline: 0.9rem; white-space: normal; text-align: center; }
  .h-top__stage::before { width: 62vw; right: -8vw; top: -4%; }
}

/* =================================================================
   REAL CLIENTS
   ================================================================= */
.h-names {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2rem;
  padding-block: clamp(1.4rem, 3vw, 2.1rem); border-block: 1px solid var(--line); background: var(--ink);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: 0;
}
.h-names__lead { font-size: 0.9rem; font-weight: 500; color: var(--silver); white-space: nowrap; }
.h-names__rail { display: flex; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.h-names__track { display: flex; flex: 0 0 auto; gap: 2.6rem; padding-right: 2.6rem; margin: 0; list-style: none; animation: h-marquee 46s linear infinite; }
.h-names__track li { display: inline-flex; align-items: center; gap: 2.6rem; font-family: var(--display); font-weight: 800; font-size: clamp(1.1rem, 1.6vw, 1.45rem); letter-spacing: -0.02em; color: var(--paper); white-space: nowrap; }
.h-names__track li::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red-bright); }
@keyframes h-marquee { to { transform: translate3d(-100%, 0, 0); } }
@media (hover: hover) and (pointer: fine) { .h-names__rail:hover .h-names__track { animation-play-state: paused; } }
@media (prefers-reduced-motion: reduce) {
  .h-names__track { animation: none; }
  .h-names__track[aria-hidden="true"] { display: none; }
  .h-names__rail { overflow-x: auto; }
}
@media (max-width: 900px) { .h-names { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; } }

/* =================================================================
   BEFORE AND AFTER
   ================================================================= */
.h-fix { padding-block: clamp(5rem, 10vw, 8.5rem); background: var(--ink); }
.h-fix__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); align-items: end; gap: 2rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.h-fix__lead { font-size: 1.02rem; line-height: 1.55; color: var(--h-dim); max-width: 44ch; }
.h-fix__tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.h-fix__tabs::-webkit-scrollbar { display: none; }
.h-fix__tab {
  flex: 0 0 auto; min-height: 44px; padding: 0 1.15rem; border: 1px solid rgba(236, 233, 227, 0.22); border-radius: var(--radius);
  font: 600 0.95rem/1 var(--sans); color: var(--h-dim); background: transparent; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ease);
}
.h-fix__tab:active { transform: scale(0.97); transition-duration: 60ms; }
.h-fix__tab[aria-selected="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.h-fix__tab:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .h-fix__tab[aria-selected="false"]:hover { color: var(--paper); border-color: rgba(236, 233, 227, 0.5); } }

.h-fix__panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.h-fix__panel[hidden] { display: none; }
.h-ba {
  position: relative; width: 100%; aspect-ratio: var(--ar); border-radius: 4px; overflow: hidden; isolation: isolate;
  background: var(--graphite); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  box-shadow: 0 40px 60px -40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(236, 233, 227, 0.08);
}
.h-ba--social { width: min(100%, calc(76svh * 0.8)); justify-self: center; }
.h-ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.h-ba__after { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.h-ba__tag {
  position: absolute; top: 0.9rem; z-index: 2; padding: 0.35rem 0.6rem; border-radius: var(--radius);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(11, 11, 12, 0.78); color: var(--paper);
}
.h-ba__tag--b { left: 0.9rem; }
.h-ba__tag--a { right: 0.9rem; background: var(--red-bright); color: var(--ink); }
.h-ba__handle { position: absolute; top: 0; bottom: 0; left: 50%; z-index: 3; width: 2px; margin-left: -1px; background: var(--red-bright); outline: none; }
.h-ba__grip {
  position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: var(--paper);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.6); transition: transform 180ms var(--ease);
}
.h-ba__grip svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.h-ba.is-drag .h-ba__grip { transform: scale(1.08); }
.h-ba__handle:focus-visible .h-ba__grip { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--paper); }

.h-fix__note { display: grid; gap: 0.55rem; align-content: start; padding-top: 0.25rem; }
.h-fix__who { font-size: 0.88rem; color: var(--silver); margin-bottom: 0.9rem; }
.h-fix__problem { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; margin-bottom: 1.1rem; }
.h-fix__changed { list-style: none; margin: 0.4rem 0 1.6rem; padding: 1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: 0.55rem; }
.h-fix__changed li { position: relative; padding-left: 1.2rem; font-size: 0.98rem; line-height: 1.45; color: var(--h-dim); }
.h-fix__changed li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; background: var(--red-bright); }
.h-fix__note .h-btn { justify-self: start; }
@media (max-width: 900px) {
  .h-fix__head { grid-template-columns: minmax(0, 1fr); }
  .h-fix__panel { grid-template-columns: minmax(0, 1fr); }
  .h-ba--social { width: 100%; }
  .h-fix__tabs { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
}

/* =================================================================
   Touch, text direction, safe areas
   ================================================================= */
.nav-toggle, .h-door, .h-chip, .h-q summary, .h-card__in, .mobile-menu a, .h-btn, .h-fix__tab { touch-action: manipulation; -webkit-touch-callout: none; }
.h-tlink:active, .h-q summary:active { opacity: 0.6; transition-duration: 0ms; }
@media (hover: none) { a.h-card__in:active { transform: scale(0.985); transition-duration: 80ms; } }
.h-card__name, .h-card__what, .h-svc__name, .h-svc__desc, .h-door__name, .h-chip span, .h-names__track li { unicode-bidi: plaintext; }
.page-home .header__inner, .page-home .h-wrap { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
body:has(.mobile-menu.is-open) .h-dock { visibility: hidden; }

/* the eyes now sit mid-page, between the fixes and the real work */
.h-hero { border-top: 1px solid var(--line-soft); }
.mobile-menu .h-btn { width: 100%; min-height: 56px; padding: 0 1.45rem; justify-content: center; border-bottom: 0; font: 600 1.05rem/1 var(--sans); letter-spacing: 0; color: #fff; }
body:has(.mobile-menu.is-open) .header .nav > .h-btn { opacity: 0; pointer-events: none; }

/* =================================================================
   FLAGSHIP: the resort changes as you scroll
   ================================================================= */
@property --h-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.h-flag { position: relative; background: var(--ink); border-top: 1px solid var(--line-soft); }
.h-flag__track { position: relative; height: 260svh; }
.h-flag__pin {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 25rem) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 4vw, 4rem);
  padding: calc(var(--nav-h) + 1rem) max(var(--gutter), env(safe-area-inset-right, 0px)) 2rem max(var(--gutter), env(safe-area-inset-left, 0px));
}
.h-flag__title { font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 3.8vw, 3.9rem); line-height: 0.95; letter-spacing: -0.035em; text-wrap: balance; }
.h-flag__lead { margin-top: 1.1rem; font-size: 1.02rem; line-height: 1.55; color: var(--h-dim); max-width: 40ch; }
.h-flag__case { display: grid; gap: 0.5rem; margin-top: clamp(1.5rem, 4vh, 2.5rem); padding-top: clamp(1.2rem, 3vh, 1.8rem); border-top: 1px solid var(--line); }
.h-flag__case .h-fix__who { margin-bottom: 0.5rem; }
.h-flag__case .h-fix__changed { margin-bottom: 0; }
.h-flag__problem { font-family: var(--display); font-weight: 800; font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; margin-bottom: 0.8rem; }

/* stage > box (a size container) > frame. The frame is as wide as it can be without outgrowing the height. */
.h-flag__stage { position: relative; min-width: 0; height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); }
.h-flag__box { position: relative; min-height: 0; container-type: size; display: grid; place-items: center start; padding-top: 2.4rem; }
.h-flag__frame {
  position: relative; margin: 0; width: min(100cqw, 160cqh); aspect-ratio: 1600 / 1000; justify-self: start;
  border-radius: 6px; background: var(--graphite);
  box-shadow: 0 60px 90px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(236, 233, 227, 0.08);
  transform-origin: 50% 50%; will-change: transform;
}
.h-flag__screen { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.h-flag__img, .h-flag__img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.h-flag__img img { object-fit: cover; object-position: top center; }
.h-flag__img--after { clip-path: inset(100% 0 0 0); will-change: clip-path; }

/* the rebuild edge is printed: a band of halftone ink rides the seam */
.h-flag__seam { position: absolute; left: 0; right: 0; top: 100%; height: 26px; transform: translate3d(0, -50%, 0); pointer-events: none; transition: opacity 200ms ease; }
.h-flag__seam::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, var(--red-bright) 1.7px, transparent 2.2px) 0 0 / 7px 7px;
  -webkit-mask: linear-gradient(to bottom, transparent, #000 45%, #000 55%, transparent);
  mask: linear-gradient(to bottom, transparent, #000 45%, #000 55%, transparent);
}
.h-flag__seam::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--red-bright); }

/* the BEFORE / AFTER chip rides just above the frame, never on the work */
.h-flag__state {
  position: absolute; left: 0; bottom: calc(100% + 0.6rem); display: grid; overflow: hidden; height: 1.75rem;
  padding: 0 0.6rem; border-radius: var(--radius); background: var(--graphite);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper); line-height: 1.75rem;
}
.h-flag__state > span { grid-area: 1 / 1; transition: transform 300ms var(--ease), opacity 300ms ease; }
.h-flag__state [data-flag-a] { transform: translate3d(0, 100%, 0); opacity: 0; }
.h-flag.is-after .h-flag__state [data-flag-b] { transform: translate3d(0, -100%, 0); opacity: 0; }
.h-flag.is-after .h-flag__state [data-flag-a] { transform: none; opacity: 1; }

.h-flag__offer { position: relative; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(5rem, 10vw, 8rem); display: grid; gap: clamp(2rem, 4vw, 3rem); justify-items: start; }
.h-flag__offer .h-flag__case { display: none; margin-top: 0; padding-top: 0; border-top: 0; width: 100%; max-width: 40rem; }
.h-flag__list { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.h-flag__list li { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.h-flag__list h3 { font-family: var(--display); font-weight: 800; font-size: clamp(1.15rem, 1.5vw, 1.4rem); letter-spacing: -0.015em; line-height: 1.1; margin-bottom: 0.6rem; }
.h-flag__list p { font-size: 0.95rem; line-height: 1.5; color: var(--h-dim); max-width: 32ch; }

/* tablets and phones: one column, the case notes move below the stage */
@media (max-width: 1100px) {
  .h-flag__pin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; gap: 1.2rem; }
  .h-flag__pin .h-flag__case { display: none; }
  .h-flag__lead { margin-top: 0.7rem; }
  .h-flag__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-flag__offer .h-flag__case { display: grid; }
}
@media (max-width: 1100px) and (orientation: portrait) {
  .h-flag__box { place-items: start center; }
  .h-flag__frame { justify-self: center; }
  .h-flag__state { left: 50%; transform: translateX(-50%); }
}
@media (max-width: 900px) and (min-width: 701px) {
  .h-flag__pin { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 700px) {
  .h-flag__track { height: 200svh; }
  .h-flag__pin { padding-top: calc(var(--nav-h) + 0.5rem); padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
  .h-flag__title { font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
  .h-flag__lead { font-size: 0.95rem; }
  .h-flag__list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) and (orientation: portrait) {
  .h-flag__frame { width: min(100cqw, 46.2cqh); aspect-ratio: 390 / 844; border-radius: 22px; }
}
@media (max-width: 700px) and (max-height: 720px) and (orientation: portrait) {
  .h-flag__title { font-size: 1.7rem; }
  .h-flag__lead { display: none; }
  .h-flag__pin { gap: 0.9rem; }
}
/* landscape phones: copy beside the frame */
@media (orientation: landscape) and (max-height: 520px) {
  .h-flag__track { height: 240svh; }
  .h-flag__pin { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: 1.5rem; padding-top: calc(var(--nav-h) + 0.5rem); padding-bottom: 0.9rem; }
  .h-flag__title { font-size: clamp(1.5rem, 3.6vw, 2rem); }
  .h-flag__lead { font-size: 0.88rem; line-height: 1.45; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 700px) {
  .h-flag__track { height: 200svh; }
}
/* reduced motion: no pin, a still half-and-half comparison */
@media (prefers-reduced-motion: reduce) {
  .h-flag__track { height: auto; }
  .h-flag__pin { position: relative; }
  .h-flag__img--after { clip-path: inset(0 0 0 50%) !important; }
  .h-flag__seam { display: none; }
  .h-flag__frame { transform: none !important; }
}

/* =================================================================
   LOGOS, REDRAWN: a halftone dissolve between before and after
   ================================================================= */
.h-logos { padding-block: clamp(4rem, 9vw, 7.5rem); background: var(--ink); border-top: 1px solid var(--line-soft); }
.h-logos .h-wrap { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); justify-items: start; }
.h-logos .h-fix__head { margin-bottom: 0; width: 100%; }
.h-logos__row { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
.h-logo { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
.h-logo__tile {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 4px; overflow: hidden;
  background: var(--graphite); cursor: pointer; isolation: isolate;
  box-shadow: 0 30px 50px -36px rgba(0, 0, 0, 0.9);
  transition: transform 160ms var(--ease);
}
.h-logo__tile:active { transform: scale(0.985); transition-duration: 60ms; }
.h-logo__tile:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; }
.h-logo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.h-logo__after {
  --h-r: 0px;
  -webkit-mask: radial-gradient(circle, #000 var(--h-r), transparent calc(var(--h-r) + 0.6px)) 0 0 / 14px 14px;
  mask: radial-gradient(circle, #000 var(--h-r), transparent calc(var(--h-r) + 0.6px)) 0 0 / 14px 14px;
  transition: --h-r 900ms var(--ease);
}
.h-logo.is-after .h-logo__after { --h-r: 10.5px; }
.h-logo__state {
  position: absolute; left: 0.75rem; top: 0.75rem; z-index: 2; display: grid; overflow: hidden; height: 1.6rem; padding: 0 0.55rem;
  border-radius: var(--radius); background: rgba(11, 11, 12, 0.72); color: var(--paper);
  font: 600 0.7rem/1.6rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
}
.h-logo__state > span { grid-area: 1 / 1; transition: transform 300ms var(--ease), opacity 300ms ease; }
.h-logo__a { transform: translate3d(0, 100%, 0); opacity: 0; }
.h-logo.is-after .h-logo__b { transform: translate3d(0, -100%, 0); opacity: 0; }
.h-logo.is-after .h-logo__a { transform: none; opacity: 1; }
/* the chip flips once most of the dots have opened */
.h-logo.is-after .h-logo__state { background: var(--red-bright); color: var(--ink); transition: background-color 200ms ease 600ms, color 200ms ease 600ms; }
.h-logo.is-after .h-logo__state > span { transition-delay: 600ms; }
.h-logo__note { display: grid; gap: 0.4rem; }
.h-logo__name { font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.015em; }
.h-logo__note .h-fix__who { margin-bottom: 0.2rem; }
.h-logo__problem { font-size: 1rem; line-height: 1.45; color: var(--paper); margin-bottom: 0.3rem; }
.h-logo__note .h-fix__changed { margin-bottom: 0.6rem; padding-top: 0.8rem; }
.h-logo__ctx { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
@media (max-width: 900px) { .h-logos__row { grid-template-columns: minmax(0, 1fr); gap: 3rem; } }
@media (min-width: 600px) and (max-width: 900px) and (orientation: portrait) {
  .h-logos__row { gap: 2.5rem; }
  .h-logo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .h-logos__row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .h-logo__after { transition: none; } }

/* =================================================================
   Small-screen and landscape extras
   ================================================================= */
/* landscape phones are too short for a bottom bar: the header keeps its own Start a project button instead */
@media (orientation: landscape) and (max-height: 520px) {
  .h-dock { display: none; }
  .page-home.dock-on .header .nav > .h-btn { opacity: 1; pointer-events: auto; }
}
@media (max-width: 374px) {
  .h-top__actions { grid-template-columns: minmax(0, 1fr); }
  .h-top__actions .h-btn { white-space: nowrap; }
}
@media (pointer: coarse) {
  .h-tlink { display: inline-flex; align-items: center; min-height: 44px; }
}
/* on the narrowest phones the header keeps only the logo and the menu: the hero and the dock carry the action */
@media (max-width: 359px) {
  .page-home .header .nav > .h-btn { display: none; }
}
/* phones: the four example tabs sit in a 2 by 2 grid, all visible, none cut off at the edge */
@media (max-width: 560px) {
  .h-fix__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: 0; padding-inline: 0; overflow: visible; }
  .h-fix__tab { width: 100%; justify-content: center; text-align: center; white-space: normal; }
}
