/* =========================================================
   Jack Shute — portfolio
   Palette: warm paper, forest ink, one hot orange accent
   ========================================================= */
:root {
  --paper: #F5F4ED;
  --paper-2: #ECEBE2;
  --ink: #172726;
  --ink-2: #243F3D;
  --muted: #5E6B69;
  --line: rgba(23, 39, 38, 0.14);
  --accent: #F95831;
  --on-dark: #F5F4ED;
  --on-dark-muted: rgba(245, 244, 237, 0.62);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --max-wide: 1560px;
  --space: clamp(96px, 14vw, 200px);
}

*, *::before, *::after { 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(--sans);
  font-size: clamp(17px, 1.15vw, 19px);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
em { font-style: italic; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--wide { max-width: var(--max-wide); }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 2px;
}
.eyebrow--light { color: var(--on-dark-muted); }

h2.eyebrow { margin: 0; } /* "Selected work" is a real heading but styled as a small label */
.section-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(48px, 7vw, 96px);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--gutter);
  color: var(--on-dark);
  transition: color .4s ease, background-color .4s ease, backdrop-filter .4s ease;
}
.nav--light {
  color: var(--ink);
  background: rgba(245, 244, 237, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav__mark {
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav__links a {
  font-size: 14px;
  text-decoration: none;
  position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px;
  height: 1px; background: var(--accent);
  transition: right .35s ease;
}
.nav__links a:hover::after { right: 0; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--on-dark);
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.hero__glow, .contact__glow {
  position: absolute; pointer-events: none;
  border-radius: 50%;
  filter: blur(40px);
}
.hero__glow {
  width: min(80vw, 1100px); aspect-ratio: 1;
  right: -18vw; top: -10vw;
  background: radial-gradient(circle at 50% 50%,
    rgba(249, 88, 49, 0.95) 0%,
    rgba(249, 88, 49, 0.55) 28%,
    rgba(160, 60, 40, 0.25) 50%,
    rgba(23, 39, 38, 0) 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6vw, 5vw) scale(1.08); }
}
.hero__inner {
  position: relative;
  padding-top: 140px;
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(88px, 17vw, 260px);
  line-height: 0.86;
  letter-spacing: -0.035em;
  margin: clamp(24px, 4vw, 48px) 0 clamp(48px, 7vw, 96px);
}
.hero__title .line { display: block; }
.hero__title .line--indent { padding-left: 0.9em; }
.hero__title em { color: var(--accent); }

/* Name on the left, portrait card on the right */
.hero__main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: clamp(32px, 5vw, 80px);
}
.hero__main .hero__title { font-size: clamp(88px, 15vw, 230px); }
.portrait {
  position: relative;
  width: clamp(220px, 24vw, 360px);
  margin: 0 0 clamp(48px, 7vw, 96px);
}
/* Soft orange glow spilling out from behind the card */
.portrait::before {
  content: "";
  position: absolute; inset: -35% -40%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(249, 88, 49, 0.75), rgba(249, 88, 49, 0.25) 55%, rgba(23, 39, 38, 0) 100%);
  filter: blur(30px);
  pointer-events: none;
}
.portrait__frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}
/* Multiply turns the studio white into the site's warm paper tone */
.portrait__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.04);
}
.hero__foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(245, 244, 237, 0.18);
}
.hero__lede {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.45;
  font-weight: 300;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 14px; text-decoration: none;
  white-space: nowrap;
}
.hero__cta svg {
  width: 44px; height: 44px; padding: 11px;
  border: 1px solid rgba(245, 244, 237, 0.35);
  border-radius: 50%;
  transition: background .3s, border-color .3s, transform .3s;
}
.hero__cta:hover svg { background: var(--accent); border-color: var(--accent); transform: translateY(3px); }

/* ---------- ABOUT ---------- */
.about { padding: clamp(56px, 7vw, 104px) 0 clamp(64px, 9vw, 136px); }
.about__statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 21ch;
  margin: 0 0 clamp(72px, 10vw, 140px);
}
.about__statement em { color: var(--accent); }
.about__grid {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: clamp(40px, 8vw, 140px);
}
.about__roles dl { margin: 0; }
.about__roles dl > div {
  display: grid; grid-template-columns: 80px 1fr; gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.about__roles dl > div:last-child { border-bottom: 1px solid var(--line); }
.about__roles dt {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); padding-top: 3px;
}
.about__roles dd { margin: 0; font-size: 16px; line-height: 1.5; }
.about__link { text-decoration: none; border-bottom: 1px solid var(--line); transition: color .25s, border-color .25s; }
.about__link:hover { color: var(--accent); border-color: var(--accent); }
.about__body p { margin: 0 0 1.4em; max-width: 60ch; }
.about__aside {
  margin-top: 2.4em !important;
  padding-top: 1.6em;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 1.9vw, 28px);
  line-height: 1.35;
  color: var(--ink-2);
}

/* ---------- WORK INDEX ---------- */
.work { padding-bottom: var(--space); background: var(--paper); }
.index { list-style: none; margin: 0 0 var(--space); padding: 0; }
.index li { border-bottom: 1px solid var(--line); }
.index a {
  display: grid;
  grid-template-columns: 70px 1fr auto 40px;
  align-items: baseline;
  gap: 20px;
  padding: clamp(18px, 2.4vw, 30px) 0;
  text-decoration: none;
  transition: padding .35s ease, color .35s ease;
}
.index__num { font-size: 14px; color: var(--accent); font-variant-numeric: tabular-nums; }
.index__client {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 68px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.index__tag { font-size: 14px; color: var(--muted); text-align: right; }
.index__arrow { text-align: right; transition: transform .35s ease, color .35s ease; }
.index a:hover { padding-left: 16px; }
.index a:hover .index__client { color: var(--accent); }
.index a:hover .index__arrow { transform: translateY(4px); color: var(--accent); }

/* ---------- CASE STUDY ---------- */
.case { padding-top: var(--space); }
.case:first-child { padding-top: 0; }

/* Dark band with orange glow behind each client name (matches the hero) */
.case__band {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
  padding: clamp(56px, 7vw, 104px) 0;
  margin-bottom: clamp(56px, 7vw, 104px);
}
.case__band .wrap { position: relative; }
.case__glow {
  position: absolute; pointer-events: none;
  --size: clamp(480px, 70vw, 1000px);
  width: var(--size); aspect-ratio: 1;
  margin-top: calc(var(--size) / -2); /* centre the glow on its `top` point */
  border-radius: 50%;
  filter: blur(40px);
  background: radial-gradient(circle at 50% 50%,
    rgba(249, 88, 49, 0.9) 0%,
    rgba(249, 88, 49, 0.5) 28%,
    rgba(160, 60, 40, 0.22) 50%,
    rgba(23, 39, 38, 0) 70%);
  animation: drift 20s ease-in-out infinite alternate;
}
/* Glow position varies so the bands don't feel identical */
.case__band--1 .case__glow { right: -18%; top: 25%; }
.case__band--2 .case__glow { left: -22%;  top: 85%; animation-direction: alternate-reverse; }
.case__band--3 .case__glow { right: -5%;  top: 95%; }
.case__band--4 .case__glow { left: 30%;   top: 10%; animation-direction: alternate-reverse; }
.case__band .case__title { margin-bottom: 0; }
.case__band .case__title em { color: var(--on-dark-muted); }

.case__head {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.case__num {
  font-family: var(--serif);
  font-size: clamp(56px, 6vw, 96px);
  line-height: 1;
  color: var(--accent);
}
.case__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 150px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(40px, 5vw, 72px);
}
.case__title em {
  display: block;
  color: var(--muted);
  font-size: 0.42em;
  letter-spacing: -0.01em;
  margin-top: 0.35em;
}
.case__intro {
  max-width: 62ch;
  margin-left: auto;
  margin-bottom: clamp(56px, 7vw, 104px);
}
.case__intro p { margin: 0 0 1.2em; }
.case__intro p:first-child { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.45; }
.case__image { width: 100%; margin-bottom: clamp(40px, 5vw, 72px); }

/* ---------- FILMS ---------- */
.films { display: grid; gap: clamp(40px, 4vw, 64px) clamp(20px, 2.4vw, 36px); }
.films--2, .films--4 { grid-template-columns: repeat(2, 1fr); }
.films--3 { grid-template-columns: repeat(3, 1fr); }
.film { margin: 0; }
.film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  overflow: hidden;
}
.film__frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.film figcaption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 20px;
  padding-top: 16px;
}
.film__title { font-size: 16px; font-weight: 500; }
.film__link {
  font-size: 13px; color: var(--muted); text-decoration: none;
  transition: color .25s;
}
.film__link:hover { color: var(--accent); }
.film__desc { grid-column: 1 / -1; font-size: 15px; color: var(--muted); max-width: 46ch; }

.films__label {
  font-family: var(--sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 clamp(32px, 4vw, 56px);
}

/* ---------- FEATURE (e.g. Hoverboard) ---------- */
.feature { margin-bottom: clamp(88px, 11vw, 160px); }
.feature__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 clamp(24px, 3vw, 40px);
}
.feature__grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(40px, 7vw, 120px);
  margin-top: clamp(64px, 8vw, 120px);
  align-items: start;
}
.feature__body p { margin: 0 0 1.2em; }
.feature__body p:last-child, .quote cite { margin-bottom: 0; }
.quote { margin: 0; }
.quote p {
  font-family: var(--serif);
  font-size: clamp(34px, 3.8vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
}
.quote cite {
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats {
  list-style: none; padding: 0;
  margin: clamp(32px, 4vw, 56px) 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stats--1 { grid-template-columns: 1fr; }
.stats--2 { grid-template-columns: repeat(2, 1fr); }
.stats--3 { grid-template-columns: repeat(3, 1fr); }
/* Each stat spans 2 shared rows (figure / label+note), so labels line up
   across a row even when one figure wraps onto two lines */
.stats li {
  padding: 28px 20px 0 0;
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  row-gap: 6px;
  align-content: start;
}
.stat__num { align-self: end; }
.stat__text { display: flex; flex-direction: column; gap: 6px; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stat__num {
  font-family: var(--serif);
  font-size: clamp(56px, 7vw, 112px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.stat__label { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
/* Words instead of a number: set smaller */
.stat__num--text {
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.02;
  text-wrap: balance;
  letter-spacing: -0.02em;
}
/* Screen-size-specific line breaks in stat figures ( | and ^ in case-studies.js ) */
.br-phone { display: none; }
.br-wide { display: block; }
@media (max-width: 640px) {
  .br-phone { display: block; }
  .br-wide { display: none; }
}
/* Marker shown only when previewing archived stats (?drafts) */
.stats__draft {
  display: inline-block;
  margin: clamp(32px, 4vw, 56px) 0 -16px;
  padding: 4px 10px;
  border: 1px dashed var(--muted);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.gold { color: #8C6A1C; } /* dark gold for "Cannes Lion(s)" */
.stat__note { font-size: 13px; letter-spacing: 0.12em; color: var(--muted); opacity: 0.75; }

/* ---------- CONTACT ---------- */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
  padding: var(--space) 0 32px;
}
.contact__glow {
  width: min(70vw, 900px); aspect-ratio: 1;
  left: -20vw; bottom: -40vw;
  background: radial-gradient(circle, rgba(249, 88, 49, 0.7) 0%, rgba(249, 88, 49, 0.25) 35%, rgba(23, 39, 38, 0) 68%);
}
.contact .wrap { position: relative; }
.contact__lede {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 76px);
  line-height: 1;
  margin: clamp(40px, 6vw, 80px) 0 12px;
  color: var(--on-dark-muted);
}
.contact__email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 76px); /* same as "Let's talk" */
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .5s ease, color .3s;
  padding-bottom: 8px;
  overflow-wrap: anywhere;
}
.contact__email:hover { background-size: 100% 2px; }
.contact__foot {
  display: flex; justify-content: space-between;
  margin-top: clamp(96px, 14vw, 200px);
  padding-top: 24px;
  border-top: 1px solid rgba(245, 244, 237, 0.18);
  font-size: 13px;
  color: var(--on-dark-muted);
}
.contact__foot a { text-decoration: none; }
.contact__foot a:hover { color: var(--accent); }

/* ---------- REVEAL ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__glow { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .about__grid, .feature__grid { grid-template-columns: 1fr; }
  .about__roles { order: 2; }
  .films--3 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats li:nth-child(n+3) { padding-top: 32px; }
  .case__intro { margin-left: 0; }
}
@media (max-width: 640px) {
  .hero__sep { display: none; }
  .hero__co { display: block; padding-left: 18px; margin-top: 6px; } /* aligns under the text, past the orange dot */
  .hero__main { grid-template-columns: 1fr; gap: 0; }
  .portrait { order: -1; width: min(46vw, 200px); margin: 0 0 32px; }
  .nav { padding: 16px var(--gutter); }
  .nav__mark { font-size: 20px; }
  .nav__links { gap: 16px; }
  .nav__links a { font-size: 13px; }
  .hero__glow { width: 130vw; right: -60vw; top: -20vw; }
  .hero__title .line--indent { padding-left: 0.5em; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 28px; }
  .films--2, .films--3, .films--4 { grid-template-columns: 1fr; }
  .index a { grid-template-columns: 40px 1fr 24px; }
  .index__tag { display: none; }
  .case__head { gap: 16px; }
  .contact__foot { flex-direction: column; gap: 10px; }
}
