/* ==========================================================================
   Cartage — Sections: hero, manifesto, services, network, process, cases,
   voices, quote, footer (+ responsive rules per section)
   ========================================================================== */

main { position: relative; z-index: 1; }
section { position: relative; }

/* ---- 01 Hero ------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: calc(var(--nav-h) + 6vh) var(--gutter) 14vh;
}
.hero__inner { max-width: 820px; }
.hero__title {
  font-size: var(--fs-hero);
  max-width: 11ch;
  margin-bottom: clamp(24px, 3vw, 40px);
  text-wrap: balance;
}
.hero__lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 30em;
  margin-bottom: clamp(28px, 3.4vw, 44px);
  text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 5vh;
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 24px;
  color: var(--fg-3);
}
.hero__scroll { display: flex; align-items: center; gap: 12px; }
.hero__scroll i { width: 48px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform-origin: left; animation: scrollLine 2.2s var(--ease-in-out) infinite; }
@keyframes scrollLine {
  0%   { transform: scaleX(0); transform-origin: left; }
  45%  { transform: scaleX(1); transform-origin: left; }
  55%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
.hero__handled { text-align: center; }
.hero__handled b { color: var(--fg-2); font-weight: 500; transition: color 1.2s var(--ease-soft); }
.hero__handled b.is-bump { color: var(--accent); transition-duration: .15s; }
.hero__coords { text-align: right; line-height: 1.7; }
.hero .seal { position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 2.5vh); }

/* ---- 02 Manifesto -------------------------------------------------------- */
.manifesto {
  padding: clamp(120px, 16vw, 220px) var(--gutter) clamp(160px, 20vw, 280px);
  max-width: var(--max);
  margin: 0 auto;
}
.manifesto__text {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 3.7rem);
  font-weight: 340;
  font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 1;
  letter-spacing: -.02em;
  line-height: 1.16;
  max-width: 22em;
  text-wrap: pretty;
}

/* ---- 03 Services (sticky, four faces) ------------------------------------ */
.services { height: 420vh; }
.services__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  padding: var(--nav-h) var(--gutter) 0;
  overflow: hidden;
}
.services__head { position: absolute; top: calc(var(--nav-h) + 3vh); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; align-items: center; }
.services__head .eyebrow { margin: 0; }
.services__index { color: var(--fg-3); }
.services__index span { color: var(--fg); }
.services__panels { position: relative; min-height: 46vh; }
.panel {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 560px;
  opacity: 0; visibility: hidden;
  transform: translateY(28px);
  transition: opacity .5s var(--ease-soft), transform .8s var(--ease-out), visibility 0s .5s;
}
.panel.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s, 0s, 0s; }
.panel__title { font-size: var(--fs-h2); margin-bottom: clamp(18px, 2vw, 28px); }
.panel__text { color: var(--fg-2); font-size: var(--fs-lede); line-height: 1.5; max-width: 30em; margin-bottom: clamp(22px, 2.4vw, 34px); text-wrap: pretty; }
.panel__list { display: flex; flex-direction: column; gap: 10px; color: var(--fg-2); }
.panel__list li { display: flex; align-items: center; gap: 14px; }
.panel__list li::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.services__progress { position: absolute; left: var(--gutter); bottom: 5vh; display: flex; gap: 6px; }
.services__progress i { width: 44px; height: 2px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.services__progress i::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform: scaleX(var(--p, 0)); transform-origin: left; }

/* ---- 04 Network (dark) --------------------------------------------------- */
.network { min-height: 190vh; }
.network__inner {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--nav-h) var(--gutter) 0;
  max-width: min(760px, 62vw);
}
.network .h2 { margin-bottom: clamp(20px, 2.4vw, 32px); max-width: 12ch; }
.network .lede { margin-bottom: clamp(36px, 4vw, 56px); }
.stats {
  display: grid; grid-template-columns: repeat(4, auto); gap: clamp(20px, 3vw, 48px);
  justify-content: start;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(28px, 3vw, 40px);
}
.stat dt { color: var(--fg-3); margin-bottom: 10px; }
.stat dd {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  font-weight: 320;
  letter-spacing: -.03em;
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}
.stat dd small { font-size: .45em; color: var(--fg-3); margin-left: .1em; font-style: italic; }
.hubs { color: var(--fg-3); }

/* ---- 05 Process (dark, sticky route) ------------------------------------- */
.process { height: 360vh; }
.process__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid;
  grid-template-columns: minmax(300px, 440px) 1fr;
  align-items: center;
  padding: var(--nav-h) var(--gutter) 0;
}
.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 40px 1fr; gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  opacity: .32;
  transition: opacity .6s var(--ease-soft);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step.is-active { opacity: 1; }
.step__n { color: var(--fg-3); padding-top: .55em; transition: color .4s; }
.step.is-active .step__n { color: var(--accent); }
.step__title { font-size: var(--fs-h3); margin-bottom: 8px; }
.step__text { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.6; max-width: 32em; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .7s var(--ease-in-out), opacity .5s; }
.step.is-active .step__text { max-height: 8em; opacity: 1; }
.process__hint { position: absolute; left: var(--gutter); bottom: 5vh; display: flex; align-items: center; gap: 12px; color: var(--fg-3); }
.process__hint i { width: 48px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.process__hint i::after { content: ""; position: absolute; inset: 0; background: var(--fg); animation: scrollLine 2.2s var(--ease-in-out) infinite; }

/* ---- 06 Cases ------------------------------------------------------------ */
.cases {
  padding: clamp(120px, 14vw, 200px) var(--gutter) clamp(80px, 10vw, 140px);
  max-width: var(--max);
  margin: 0 auto;
}
.cases .h2 { max-width: 12ch; }
.cases__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}
.case--offset { margin-top: clamp(40px, 6vw, 96px); }

/* ---- 07 Voices ----------------------------------------------------------- */
.voices {
  padding: clamp(80px, 10vw, 140px) var(--gutter) clamp(120px, 14vw, 200px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.voices__stage { position: relative; width: min(980px, 100%); min-height: 12em; margin-bottom: clamp(28px, 3vw, 44px); transition: min-height .5s var(--ease-soft); }
.voice {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: opacity .6s var(--ease-soft), transform .9s var(--ease-out), visibility 0s .6s;
}
.voice.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: .1s, .1s, 0s; }
.voice p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.9vw, 2.9rem);
  font-weight: 320;
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 60, "WONK" 1;
  letter-spacing: -.015em;
  line-height: 1.2;
  text-wrap: balance;
}
.voice footer { color: var(--fg-3); }
.voices__tabs { display: flex; gap: 8px; }
.voices__tabs button { position: relative; padding: 10px 14px; color: var(--fg-3); display: flex; flex-direction: column; gap: 8px; align-items: stretch; transition: color .3s; }
.voices__tabs button[aria-selected="true"] { color: var(--fg); }
.voices__tabs button i { display: block; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.voices__tabs button i::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform: scaleX(0); transform-origin: left; }
.voices__tabs button[aria-selected="true"] i::after { animation: tabFill var(--voice-ms, 6500ms) linear forwards; }
@keyframes tabFill { to { transform: scaleX(1); } }

/* ---- 08 Quote ------------------------------------------------------------ */
.quote {
  padding: clamp(100px, 12vw, 180px) var(--gutter) clamp(120px, 14vw, 200px);
  max-width: var(--max);
  margin: 0 auto;
}
.quote__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 120px);
  align-items: start;
}
.quote__copy { position: sticky; top: calc(var(--nav-h) + 4vh); }
.quote .h2 { margin-bottom: clamp(20px, 2.4vw, 32px); max-width: 10ch; }
.quote .lede { margin-bottom: clamp(32px, 3.6vw, 48px); }
.quote__contacts { display: flex; flex-direction: column; gap: 10px; color: var(--fg-2); }
.quote__contacts a { position: relative; }
.quote__contacts a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out); }
.quote__contacts a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---- Footer -------------------------------------------------------------- */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  padding: clamp(56px, 7vw, 96px) var(--gutter) 0;
  overflow: hidden;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto clamp(48px, 6vw, 96px);
}
.footer .eyebrow { margin-bottom: 18px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; color: var(--fg-2); font-size: var(--fs-small); }
.footer__links a { position: relative; display: inline-block; }
.footer__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out); }
.footer__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.clocks { display: flex; flex-direction: column; gap: 10px; color: var(--fg-2); }
.clocks li { display: flex; justify-content: space-between; max-width: 220px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.clocks b { color: var(--fg); font-weight: 500; }
.footer__word {
  font-family: var(--font-display);
  font-size: clamp(5rem, 19.5vw, 19rem);
  font-weight: 340;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
  letter-spacing: -.045em;
  line-height: .78;
  text-align: center;
  color: var(--fg);
  transform: translateY(.06em);
  user-select: none;
  max-width: var(--max);
  margin: 0 auto;
  white-space: nowrap;
}
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 24px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--fg-3);
  max-width: var(--max);
  margin: 0 auto;
}
.footer__legal { display: flex; gap: 22px; }
.footer__legal a:hover { color: var(--fg); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1200px) {
  .network__inner { max-width: min(760px, 70vw); }
}

@media (max-width: 900px) {
  .hero { padding-top: calc(var(--nav-h) + 4vh); padding-bottom: 44vh; }
  .hero__inner { max-width: none; }
  .hero__title { max-width: none; }
  .hero__meta { grid-template-columns: 1fr; gap: 10px; }
  .hero__handled { display: none; }
  .hero__coords { text-align: left; }
  .hero .seal { display: none; }

  .services { height: 360vh; }
  .services__stage { grid-template-columns: 1fr; align-items: end; padding-bottom: 12vh; }
  .services__panels { min-height: 40vh; }
  .panel { justify-content: flex-end; max-width: none; }

  .network__inner { max-width: none; justify-content: flex-start; padding-top: calc(var(--nav-h) + 6vh); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .process { height: 320vh; }
  .process__stage { grid-template-columns: 1fr; align-items: end; padding-bottom: 12vh; }
  .step { padding: 14px 0; }
  .step__text { font-size: .9rem; }
  .process__hint { display: none; }

  .cases__grid { grid-template-columns: 1fr; gap: 48px; }
  .case--offset { margin-top: 0; }
  .waybill { aspect-ratio: 4 / 3.4; max-width: 520px; }

  .quote__grid { grid-template-columns: 1fr; }
  .quote__copy { position: static; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
