/* One signature sequence. The rest of the page keeps its reading rhythm. */
:root {
  --motion-out: cubic-bezier(.23, 1, .32, 1);
  --motion-in-out: cubic-bezier(.77, 0, .175, 1);
  --statement-size: clamp(64px, 8.5vw, 150px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hero-content { animation: none; }
.hero-line { display: block; overflow: hidden; padding: .08em .04em; margin: -.04em; }
.hero-line > span { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .hero-line > span { animation: title-unfold 1000ms var(--motion-out) both; }
  .hero-line:nth-child(2) > span { animation-delay: 100ms; }
  .hero-intro { animation: soft-arrival 700ms var(--motion-out) both; }
  .hero-signature { animation: soft-arrival 800ms 260ms var(--motion-out) both; }
  .hero-description { animation: soft-arrival 800ms 330ms var(--motion-out) both; }
  .hero-content > .button { animation: soft-arrival 800ms 390ms var(--motion-out) backwards; }
  .hero-content > .button:focus { animation: none; }
}

@keyframes title-unfold {
  from { opacity: 0; transform: translate3d(0, 105%, 0) rotate(2deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
}
@keyframes soft-arrival {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.signature { position: relative; margin-top: 40px; background: var(--red); color: var(--cream); }
.signature-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: min(860px, calc(100svh - var(--header-height)));
  min-height: 620px;
  display: grid;
  place-items: center;
}
.signature-horizon { position: absolute; inset: 0; z-index: -2; }
.signature-horizon img { height: 100%; width: 100%; object-fit: cover; }
.signature-horizon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35, 13, 12, .56), rgba(35, 13, 12, .2) 45%, rgba(35, 13, 12, .7));
}
.signature-reveal { width: 100%; padding: 100px 28px 120px; text-align: center; }
.signature-crest { width: 52px; height: 68px; object-fit: contain; margin: 0 auto 24px; }
.signature-fallback { font-family: var(--serif); font-size: 32px; line-height: 1.1; margin-bottom: 18px; }
.signature-statement, .signature-gate-copy p {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--statement-size);
  letter-spacing: -.055em;
  line-height: .92;
}
.signature-statement { max-width: 100%; text-wrap: balance; }
.signature-promise { margin-top: 32px; font-size: 1.125rem; font-weight: 400; line-height: 1.75; }
.signature-gate { display: none; position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; background: var(--red); }
.signature-gate-left { left: 0; }
.signature-gate-right { right: 0; }
.signature-gate-copy { position: absolute; width: 200%; height: 100%; display: grid; place-items: center; text-align: center; }
.signature-gate-left .signature-gate-copy { left: 0; }
.signature-gate-right .signature-gate-copy { right: 0; }
.signature-gate-copy p { padding-bottom: 22px; }
.signature-top, .signature-bottom {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.5;
}
.signature-top { top: 38px; }
.signature-top > span { font-size: 1.125rem; }
.signature-top a { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.signature-top a .down-arrow { height: 13px; }
.signature-bottom { bottom: 40px; }
.signature-progress { width: 120px; height: 1px; background: rgba(242,238,232,.3); overflow: hidden; }
.signature-progress > span { height: 100%; width: 100%; display: block; background: var(--cream); transform-origin: left; }
.signature.is-enhanced .signature-gate { display: block; }
.signature.is-enhanced .signature-fallback { display: none; }
.signature.is-pinned { height: 220svh; }
.signature.is-pinned .signature-stage { position: sticky; top: var(--header-height); height: calc(100svh - var(--header-height)); max-height: none; min-height: 0; }

@media (max-width: 900px) {
  /* The extra travel is intentional: the visitor, not a timer, sets the pace. */
  .signature.is-pinned { height: 250svh; }
  .signature.is-pinned .signature-bottom-copy { display: none; }
  .signature-top, .signature-bottom { font-size: .875rem; }
  .signature-bottom { gap: 18px; }
  .signature-progress { width: 70px; flex-shrink: 0; }
}
@media (max-width: 640px) {
  :root {
    --statement-size: clamp(44px, 11.5vw, 68px);
    --hero-size: clamp(36px, 11.6vw, 52px);
  }
  /* Each sentence fits on one line, including the 320px phone layout. */
  .hero h1 { font-size: var(--hero-size); }
  .hero { min-height: max(660px, calc(100svh - var(--header-height) - 16px)); }
  .hero-content { padding: 42px 21px 100px; }
  .hero-intro { margin-bottom: 25px; }
  .hero-signature { margin-top: 20px; }
  .hero-description { margin-top: 20px; margin-bottom: 25px; }
  .signature { margin-top: 24px; }
  .signature-stage { height: 600px; min-height: 560px; }
  .signature-reveal { padding: 100px 20px 110px; }
  .signature-crest { width: 42px; height: 57px; margin-bottom: 28px; }
  .signature-fallback { font-size: 26px; }
  .signature-promise { margin-top: 27px; font-size: 1rem; }
  .signature-gate-copy p { font-size: clamp(44px, 11.5vw, 68px); }
  .signature-top { top: 25px; flex-wrap: wrap; gap: 8px; }
  .signature-top > span { flex-basis: 100%; font-size: 1rem; }
  .signature-top a { gap: 10px; font-size: .875rem; }
  .signature-bottom { bottom: 27px; flex-direction: column; gap: 13px; text-align: center; }
  .signature-progress { width: 64px; }
  .signature.is-pinned .signature-reveal { padding-block: 85px; }
  .signature.is-pinned .signature-crest { width: 32px; height: 42px; margin-bottom: 18px; }
  .signature.is-pinned .signature-promise { margin-top: 18px; }
  .signature.is-pinned .signature-top { top: 16px; }
  .signature.is-pinned .signature-bottom { bottom: 18px; }
}
@media (max-width: 360px) {
  .hero-content { padding-inline: 15px; }
  .hero h1 { font-size: var(--hero-size); }
}
@media (prefers-reduced-motion: reduce) {
  .signature.is-enhanced .signature-gate { display: none; }
  .signature.is-enhanced .signature-fallback { display: block; }
  .signature.is-pinned { height: auto; }
  .signature.is-pinned .signature-stage { position: relative; top: auto; min-height: 580px; }
}
