/* ============================================================
   Hughson & Merton Int. — editorial rebuild
   Type:  Space Grotesk (display/body) + Space Mono (labels)
   Palette: warm paper / ink / vermillion
   ============================================================ */

:root {
  --paper:   #e9e3d6;
  --paper-2: #f3eee4;
  --ink:     #14130f;
  --ink-2:   #1b1a15;
  --accent:  #e0361d;
  --accent-ink: #ff5638;
  --line: rgba(20,19,15,.18);
  --line-on-ink: rgba(239,233,223,.16);

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: clamp(20px, 4.5vw, 72px);
  --maxw: 1600px;
  --ease: cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

/* ---------------- Theming ---------------- */
[data-theme="ink"]   { background: var(--ink);   color: var(--paper-2); }
[data-theme="paper"] { background: var(--paper); color: var(--ink); }
[data-theme="ink"] .rule,   [data-theme="ink"] hr { border-color: var(--line-on-ink); }
[data-theme="paper"] .rule, [data-theme="paper"] hr { border-color: var(--line); }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px,2.4vw,26px) var(--pad);
  color: var(--ink);
  pointer-events: none;
  transition: color .45s var(--ease);
}
.nav.light { color: var(--paper-2); }
.nav a, .nav button { pointer-events: auto; }
.nav .wordmark { color: currentColor; line-height: .95; display: block; }
.nav .wordmark b {
  font-weight: 700; font-size: clamp(15px, 1.5vw, 20px);
  letter-spacing: .01em; display: block; white-space: nowrap;
}
.nav .wordmark span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .34em;
  display: block; margin-top: 3px; opacity: .75;
}
.nav-links { display: flex; align-items: center; gap: clamp(16px,2.4vw,40px); }
.nav-links a {
  color: currentColor; font-family: var(--mono); font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: currentColor; transition: width .4s var(--ease);
}
.nav-links a:hover { color: var(--accent); }
.nav.light .nav-links a:hover { color: var(--accent-ink); }
.nav-links a:hover::after { width: 100%; background: currentColor; }
.nav-links .vm svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.nav-links .vm:hover svg { fill: var(--accent); }
.nav.light .nav-links .vm:hover svg { fill: var(--accent-ink); }

/* ---------------- Layout helpers ---------------- */
.section { position: relative; padding: clamp(72px,11vh,150px) var(--pad); }
.section.full { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.inner { width: 100%; max-width: var(--maxw); margin: 0 auto; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .28em;
  text-transform: uppercase; display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 clamp(20px,3vw,40px);
}
.eyebrow::before {
  content: ""; width: 34px; height: 1px; background: currentColor; opacity: .5;
}
.accent { color: var(--accent); }
[data-theme="ink"] .accent { color: var(--accent-ink); }

/* Display type */
.display {
  font-family: var(--display); font-weight: 500;
  line-height: .96; letter-spacing: -.025em; margin: 0;
  font-size: clamp(2.6rem, 7.2vw, 8rem);
}
.display.tight { letter-spacing: -.04em; }
.mega {
  font-family: var(--display); font-weight: 700;
  line-height: .82; letter-spacing: -.045em; margin: 0;
  font-size: clamp(4rem, 17vw, 17rem); text-transform: uppercase;
}
.serifless-note, .body {
  font-size: clamp(1rem, 1.15vw, 1.22rem); font-weight: 400; line-height: 1.72;
}
.body.dim { opacity: .62; }
.mono-note { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; opacity: .7; line-height: 1.7; }

/* ---------------- HERO ---------------- */
.hero { min-height: 100vh; display: grid; align-items: center;
  grid-template-columns: 1.05fr .95fr; gap: clamp(24px,4vw,60px);
  padding-top: clamp(120px,16vh,180px); padding-bottom: clamp(60px,8vh,90px); }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(3rem, 8vw, 9rem); }
.hero .kicker {
  font-family: var(--mono); font-size: 13px; letter-spacing: .22em;
  text-transform: uppercase; margin: 0 0 clamp(22px,3vw,38px); display: flex; gap: 14px; align-items:center;
}
.hero .kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display:inline-block; }
.hero .sub {
  margin: clamp(24px,3vw,40px) 0 0; max-width: 30ch;
  font-size: clamp(1.05rem,1.4vw,1.35rem); line-height: 1.55;
}
.hero .sub .accent { font-weight: 500; }
.hero-figure { position: relative; align-self: center; }
/* Transparent cutout sits straight on the paper, grounded with a soft shadow */
.hero-figure img {
  width: 100%;
  height: clamp(400px, 78vh, 860px);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 26px 34px rgba(20,19,15,.22));
}
.hero-figure figcaption {
  margin-top: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  opacity: .55; text-align: right; line-height: 1.5;
}
.scrollcue {
  position: absolute; left: var(--pad); bottom: clamp(20px,4vh,40px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px; opacity: .6;
}
.scrollcue .bar { width: 46px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
.scrollcue .bar::after { content:""; position:absolute; inset:0; background: var(--accent); transform: translateX(-100%); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0%{transform:translateX(-100%)} 60%,100%{transform:translateX(100%)} }

/* ---------------- Marquee ---------------- */
.marquee {
  background: var(--ink); color: var(--paper-2);
  padding: clamp(14px,1.8vw,22px) 0; overflow: hidden;
  border-top: 1px solid var(--line-on-ink); border-bottom: 1px solid var(--line-on-ink);
  white-space: nowrap;
}
.marquee .track { display: inline-flex; align-items: center; gap: 0; will-change: transform; animation: marq 34s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .item {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.4rem,3.4vw,3rem); letter-spacing: -.01em; padding: 0 clamp(20px,3vw,46px);
  display: inline-flex; align-items: center;
}
.marquee .item .star { color: var(--accent-ink); margin-left: clamp(20px,3vw,46px); font-size: .8em; }
.marquee .item.ghost { -webkit-text-stroke: 1.4px var(--paper-2); color: transparent; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------------- Editorial spread ---------------- */
.spread { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,90px); align-items: center; }
.spread.reverse { direction: rtl; }
.spread.reverse > * { direction: ltr; }
.spread .media { position: relative; }
.spread .media img { width: 100%; height: auto; }
.spread .media .idx {
  position: absolute; top: -14px; left: -6px; font-family: var(--mono);
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
}
.spread .txt .display { font-size: clamp(1.9rem,3.4vw,3.4rem); font-weight: 500; line-height: 1.05; }
.spread .txt .body { margin-top: clamp(20px,2.4vw,30px); max-width: 40ch; }
.spread .txt .foot { margin-top: 22px; }
.framed { border: 1px solid var(--line); padding: clamp(14px,2vw,28px); background: var(--paper-2); }
[data-theme="ink"] .framed { border-color: var(--line-on-ink); background: var(--ink-2); }

/* ---------------- Full-bleed statement (1906) ---------------- */
.bleed { position: relative; min-height: 100vh; display: flex; align-items: flex-end;
  padding: clamp(72px,11vh,140px) var(--pad); overflow: hidden; }
.bleed .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.bleed::after { content:""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10,9,7,.15) 0%, rgba(10,9,7,.2) 45%, rgba(10,9,7,.78) 100%); }
.bleed .inner { position: relative; z-index: 2; color: #fff; }
.bleed .display { font-size: clamp(2.6rem,7.5vw,7.5rem); font-weight: 600; }
.bleed .body { margin-top: 22px; max-width: 40ch; color: rgba(255,255,255,.82); }

/* ---------------- Manifesto (we're small) ---------------- */
.manifesto { text-align: center; }
.manifesto .stack { display: flex; flex-direction: column; align-items: center; gap: 0; }
.manifesto .mega .out { -webkit-text-stroke: clamp(1px,.22vw,3px) var(--paper-2); color: transparent; }
.manifesto .by { font-family: var(--display); font-weight: 400; letter-spacing: -.02em;
  font-size: clamp(1.6rem,4.6vw,3.4rem); margin: clamp(4px,1vw,10px) 0 clamp(40px,6vw,72px); }
.manifesto .by em { font-style: normal; color: var(--accent-ink); }
.credo { max-width: 760px; margin: 0 auto; }
.credo p { font-size: clamp(1.1rem,1.7vw,1.5rem); line-height: 1.65; margin: clamp(18px,2.4vw,30px) 0; font-weight: 400; }
.credo b { font-weight: 500; color: var(--accent-ink); }
.credo .line-list { display: block; }

/* ---------------- Process list ---------------- */
.process .head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 20px; margin-bottom: clamp(30px,4vw,56px); }
.steps { border-top: 1px solid var(--line); }
[data-theme="ink"] .steps { border-color: var(--line-on-ink); }
.step {
  display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: clamp(16px,3vw,40px);
  padding: clamp(20px,3vw,38px) 0; border-bottom: 1px solid var(--line);
  transition: padding-left .45s var(--ease), color .3s var(--ease);
}
[data-theme="ink"] .step { border-color: var(--line-on-ink); }
.step .num { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; opacity: .6; }
.step .label { font-family: var(--display); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(1.5rem,3.6vw,3rem); line-height: 1.05; }
.step .tick { font-family: var(--mono); font-size: 12px; opacity: 0; transform: translateX(-8px); transition: .4s var(--ease); white-space: nowrap; }
.step:hover { padding-left: clamp(8px,1.4vw,24px); }
.step:hover .num { color: var(--accent); opacity: 1; }
.step:hover .tick { opacity: .7; transform: translateX(0); }
.step:hover .label .accent, .step:hover .label { color: inherit; }

/* ---------------- Featured work ---------------- */
.work { position: relative; }
.work .cardlink { display: block; position: relative; overflow: hidden; border-radius: 2px; }
.work .cardlink video, .work .cardlink img { width: 100%; height: clamp(420px,78vh,860px); object-fit: cover; transition: transform 1.1s var(--ease); }
.work .cardlink:hover video { transform: scale(1.04); }
.work .cardlink::after { content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(8,7,5,.35), rgba(8,7,5,.15) 40%, rgba(8,7,5,.72)); }
.work .overlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  justify-content: space-between; padding: clamp(24px,4vw,60px); color: #fff; pointer-events: none; }
.work .overlay .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.work .overlay .btm { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.work .overlay .btm h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.03em; margin: 0;
  font-size: clamp(2.4rem,6vw,5.5rem); line-height: .95; }
.work .overlay .play { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; border: 1px solid rgba(255,255,255,.5);
  padding: 12px 20px; border-radius: 40px; transition: background .3s, color .3s; }
.work .cardlink:hover .play { background: #fff; color: var(--ink); }

/* ---------------- Footer ---------------- */
.footer { background: var(--ink); color: var(--paper-2); padding: clamp(70px,10vw,130px) var(--pad) clamp(30px,4vw,50px); }
.footer .big { font-family: var(--display); font-weight: 500; letter-spacing: -.03em;
  font-size: clamp(2.6rem,8vw,7.5rem); line-height: .95; margin: 0 0 clamp(28px,4vw,48px); }
.footer .big a { border-bottom: 2px solid transparent; transition: border-color .3s; }
.footer .big a:hover { border-color: var(--accent-ink); }
.footer .cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px;
  border-top: 1px solid var(--line-on-ink); padding-top: clamp(26px,3vw,40px); }
.footer .col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  opacity: .55; margin: 0 0 14px; font-weight: 400; }
.footer .col a, .footer .col p { font-family: var(--display); font-size: 1rem; margin: 6px 0; opacity: .92; }
.footer .col a { position: relative; }
.footer .col a:hover { color: var(--accent-ink); }
.footer .base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: clamp(40px,6vw,80px); font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; opacity: .5; }

/* ---------------- Case study ---------------- */
.case-hero { min-height: 84vh; display: flex; flex-direction: column; justify-content: center; padding-top: clamp(130px,18vh,200px); }
.case-hero .display { font-size: clamp(3.4rem,12vw,12rem); }
.case-hero .lede { max-width: 52ch; margin-top: clamp(26px,3vw,40px); font-size: clamp(1.05rem,1.5vw,1.4rem); line-height: 1.65; }
.case-meta { display: flex; flex-wrap: wrap; gap: clamp(28px,5vw,80px); margin-top: clamp(30px,4vw,52px);
  border-top: 1px solid var(--line-on-ink); padding-top: 26px; }
.case-meta .m { display: flex; flex-direction: column; gap: 6px; }
.case-meta .m span { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .5; }
.case-meta .m b { font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.case-banner img, .case-banner video { width: 100%; height: clamp(300px,70vh,780px); object-fit: cover; display: block; }
.films { padding: clamp(60px,9vw,120px) var(--pad); }
.film { max-width: var(--maxw); margin: 0 auto clamp(60px,8vw,110px); }
.film:last-of-type { margin-bottom: 0; }
.film .cap { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.film .cap .n { font-family: var(--mono); font-size: 13px; letter-spacing: .2em; opacity: .5; }
.film .cap h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.02em; margin: 0;
  font-size: clamp(1.6rem,3.6vw,2.8rem); }
.frame { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; background: #0b0b0b; border: 1px solid var(--line-on-ink); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.case-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
  padding: clamp(40px,6vw,80px) var(--pad); border-top: 1px solid var(--line-on-ink); }
.case-nav a { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.case-nav a:hover { color: var(--accent-ink); }

/* ---------------- Reveal animation ---------------- */
/* Only hide when JS is active, so content never disappears if JS fails to load */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .marquee .track, .scrollcue .bar::after { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; min-height: auto; padding-top: 130px; }
  .hero-figure { order: -1; }
  .hero-figure img { height: 46vh; }
  .hero-figure figcaption { text-align: left; margin-top: 12px; }
  .scrollcue { display: none; }
  .spread, .spread.reverse { grid-template-columns: 1fr; direction: ltr; gap: 26px; }
  .spread .media .idx { position: static; display: block; margin-bottom: 10px; }
  .step { grid-template-columns: 54px 1fr; }
  .step .tick { display: none; }
  .case-meta { gap: 22px 34px; }
}

@media (max-width: 600px) {
  /* On small screens keep only the wordmark + Vimeo; links live in the footer */
  .nav-links a:not(.vm) { display: none; }
}
