/* ───────── HOME-SPECIFIC STYLES ───────── */

/* HERO — giant wordmark only.
   Hero is exactly one viewport tall. The wordmark is fixed, anchored to the
   bottom of the viewport, and scales/translates into the nav brand slot on scroll. */
/* HERO — giant wordmark only.
   Hero is exactly one viewport tall. The wordmark is fixed, anchored to the
   bottom of the viewport, and scales/translates into the nav brand slot on scroll. */
.hero {
  position: relative;
  height: 100vh;
  padding: 0 var(--pad-page);
  overflow: hidden;
  background: var(--mash-dusk-blue);
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}
.hero__sweep {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--mash-orange) 14%, transparent), transparent 45%),
    radial-gradient(circle at 10% 80%, color-mix(in srgb, var(--mash-teal) 18%, transparent), transparent 55%);
  pointer-events: none;
}

.hero__top {
  position: absolute;
  top: 100px; left: 0; right: 0;
  z-index: 3;
  padding: 0 var(--pad-page);
  display: flex; justify-content: space-between; align-items: center;
}
.hero__clock {
  font-family: var(--font-body);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  background: color-mix(in srgb, var(--paper-plain) 60%, transparent);
}

/* Giant wordmark — FIXED, anchored to the BOTTOM of the viewport.
   Clipped to only render while the hero section is in view (JS toggles opacity). */
.hero__mark {
  position: fixed;
  left: var(--pad-page); right: var(--pad-page);
  bottom: 0;
  width: calc(100vw - 2 * var(--pad-page));
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: bottom left;
  will-change: transform, opacity;
  pointer-events: none;
  padding: 0 0 2vh;
  transition: opacity .2s linear;
}
.hero__mark-img {
  width: 100%;
  max-width: 1700px;
  height: auto;
  display: block;
}

/* Hide the nav brand only while the giant mark is still covering that spot */
body.hero-active .nav__brand { opacity: 0; pointer-events: none; }

.hero__marker {
  position: fixed;
  bottom: 30px; right: var(--pad-page);
  z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-soft);
  transition: opacity .3s;
  pointer-events: none;
}
body.hero-docked .hero__marker { opacity: 0; }
.hero__marker svg { width: 32px; height: 32px; animation: pulse 3s var(--ease-in-out) infinite; }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:.6} 50%{transform:scale(1.08);opacity:1} }

/* Hero shapes */
.shape--hero-sparkle { top: 12%; right: 4%; width: 120px; transform: rotate(18deg); opacity: .9; }
.shape--hero-quat { bottom: 22%; left: -40px; width: 180px; opacity: .85; }
.shape--hero-blob { top: 35%; right: -80px; width: 260px; opacity: .4; }

[data-density="minimal"] .shape--hero-sparkle,
[data-density="minimal"] .shape--hero-quat,
[data-density="minimal"] .shape--hero-blob { opacity: 0; }

[data-density="busy"] .shape--hero-sparkle { opacity: 1; }
[data-density="busy"] .shape--hero-quat { opacity: 1; }
[data-density="busy"] .shape--hero-blob { opacity: .55; }

/* ───────── STRIP ───────── */
.strip {
  background: var(--mash-cosmo-black);
  color: var(--mash-anti-flash);
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
  padding: 26px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.strip__item {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 24px;
  padding-right: 60px;
}
.strip__icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
  filter: brightness(0) invert(1) opacity(.7);
}

/* ───────── MANIFESTO ───────── */
.manifesto { padding-top: 140px; padding-bottom: 120px; }
.manifesto__grid {
  display: grid;
  grid-template-columns: 1fr 5fr 2fr;
  gap: 40px;
  align-items: start;
}
.manifesto__eyebrow { padding-top: 14px; }
.manifesto__copy {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  text-wrap: pretty;
}
.manifesto__copy em { font-style: italic; color: var(--mash-orange); }
.manifesto__copy .hl--orange {
  background: var(--mash-orange);
  color: white;
  padding: 0 0.15em;
  border-radius: 4px;
}
.manifesto__aside {
  padding-top: 14px;
  display: flex; flex-direction: column; gap: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.manifesto__glyph {
  width: 60px;
  opacity: .9;
}
@media (max-width: 900px) {
  .manifesto__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ───────── METRICS ───────── */
.metrics { padding-top: 80px; padding-bottom: 140px; }
.metrics__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 60px 0;
}
.metric {
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
}
.metric + .metric::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 10%; bottom: 10%;
  width: 1px;
  background: var(--rule);
}
.metric__n {
  font-family: var(--font-display);
  font-size: clamp(56px, 6vw, 100px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.metric__l { font-size: 15px; color: var(--ink-soft); max-width: 180px; }
@media (max-width: 820px) {
  .metrics__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .metric + .metric::before { display: none; }
}

/* ───────── WORK ───────── */
.work { padding-top: 40px; padding-bottom: 140px; }
.work__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: end;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--rule);
}
.work__head h2 {
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  font-weight: 500;
  grid-column: 2;
}
.work__all {
  font-size: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid currentColor;
  transition: color .25s;
}
.work__all:hover { color: var(--mash-orange); }

.work__list { display: flex; flex-direction: column; }

.project {
  display: grid;
  grid-template-columns: 140px 1fr 240px;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  position: relative;
  transition: padding .4s var(--ease-out);
}
.project:hover { padding: 36px 24px; }
.project::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s var(--ease-out);
  z-index: 0;
}
.project:hover::before { transform: scaleY(1); transform-origin: top; }
.project > * { position: relative; z-index: 1; }
.project:hover { color: var(--paper); }

.project__meta {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font-body);
}
.project__year { font-size: 13px; color: var(--ink-soft); }
.project__client { font-size: 15px; font-weight: 500; }
.project:hover .project__year,
.project:hover .project__client { color: var(--paper); }

.project__title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.project__title h3 {
  font-size: clamp(34px, 4vw, 68px);
  letter-spacing: -0.03em;
  font-weight: 500;
  line-height: 0.95;
}
.project__title h3 em {
  font-style: italic;
  color: var(--mash-orange);
}

.project__thumb {
  width: 180px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transform: scale(0.85);
  opacity: 0;
  transition: transform .5s var(--ease-out), opacity .4s;
}
.project:hover .project__thumb { transform: scale(1); opacity: 1; }
.project__frame {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.project__accent {
  width: 55%;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.15));
}
.project__tag {
  position: absolute;
  bottom: 8px; left: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: white;
  background: rgba(0,0,0,.35);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.project__kpi {
  display: flex; gap: 10px; align-items: center;
  font-size: 14px;
  color: var(--ink-soft);
  justify-self: end;
  font-variant-numeric: tabular-nums;
}
.project:hover .project__kpi { color: var(--paper); }

@media (max-width: 900px) {
  .work__head { grid-template-columns: 1fr; gap: 16px; }
  .project { grid-template-columns: 1fr; gap: 16px; }
  .project__title { grid-template-columns: 1fr; }
  .project__thumb { display: none; }
}

/* ───────── SERVICES ───────── */
.services {
  position: relative;
  padding: 120px 0 140px;
  background: var(--mash-cosmo-black);
  color: var(--mash-anti-flash);
  overflow: hidden;
}
.services__bg { position: absolute; inset: 0; pointer-events: none; }
.services__head {
  margin-bottom: 80px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: end;
}
.services__head .eyebrow { color: rgba(244,244,241,.6); }
.services__head h2 {
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  font-weight: 500;
}

.svc-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(244,244,241,.18);
}
.svc {
  display: grid;
  grid-template-columns: 80px 1fr 100px;
  gap: 40px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(244,244,241,.18);
  align-items: center;
  transition: padding .4s var(--ease-out), background .4s;
  position: relative;
}
.svc:hover {
  padding-left: 20px;
  padding-right: 20px;
}
.svc__n {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--mash-grey-blue);
  letter-spacing: 0.1em;
}
.svc__body { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: baseline; }
.svc__body h3 {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.02em;
  font-weight: 500;
}
.svc__body p { font-size: 16px; color: rgba(244,244,241,.75); max-width: 500px; }
.svc__icon {
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .5s var(--ease-out);
}
.svc:hover .svc__icon { transform: rotate(22deg) scale(1.15); }
.svc__icon img { width: 100%; height: 100%; object-fit: contain; }

.services__foot { margin-top: 60px; }

@media (max-width: 900px) {
  .services__head { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 48px 1fr 50px; gap: 16px; }
  .svc__body { grid-template-columns: 1fr; gap: 8px; }
}

/* ───────── CLIENTS ───────── */
.clients { padding-top: 140px; padding-bottom: 140px; }
.clients__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.clients__l h2 {
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  font-weight: 500;
  margin-top: 16px;
}
.clients__sub { margin-top: 20px; font-size: 17px; color: var(--ink-soft); max-width: 360px; }
.clients__list {
  list-style: none;
  margin: 0; padding: 0;
  columns: 2;
  column-gap: 40px;
}
.clients__list li {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.01em;
  transition: color .3s, padding .3s;
}
.clients__list li:hover {
  color: var(--mash-orange);
  padding-left: 10px;
}
@media (max-width: 820px) {
  .clients__grid { grid-template-columns: 1fr; gap: 40px; }
  .clients__list { columns: 1; }
}

/* ───────── CTA BANNER ───────── */
.cta-banner {
  background: var(--mash-orange);
  color: white;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.cta-banner__inner {
  position: relative;
  z-index: 2;
}
.cta-banner h2 {
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 20px 0;
}
.cta-banner p {
  font-size: 18px;
  max-width: 400px;
  margin-bottom: 32px;
  opacity: .9;
}
.cta-banner .btn--primary {
  background: var(--mash-cosmo-black);
  color: white;
}
.cta-banner .btn--primary:hover { background: var(--mash-dusk-blue); }
.cta-banner__oval {
  top: -10%;
  right: -5%;
  width: 520px;
  opacity: .28;
  transform: rotate(22deg);
}

/* ───── Scroll typewriter ─────
   Add a blinking caret after the last visible character while typing. */
.typewriter {
  position: relative;
  /* Reserve vertical space so the layout doesn't jump as chars reveal.
     We use min-height based on line-height; manifesto__copy already has clamp font,
     so set a sensible min-height via ch approximation. */
  min-height: 1.2em;
}
.typewriter::after {
  content: '';
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  background: var(--mash-orange);
  margin-left: 0.08em;
  vertical-align: -0.08em;
  animation: typewriter-blink 0.9s steps(1) infinite;
}
.typewriter.typewriter--done::after {
  animation: none;
  opacity: 0;
  transition: opacity .4s .2s;
}
@keyframes typewriter-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
