/* ==========================================================================
   Simon Knowles Motion - Marketing Site
   ========================================================================== */

/* ---- Fonts --------------------------------------------------------------- */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/CormorantGaramond-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/CormorantGaramond-LightItalic.woff2") format("woff2");
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/CormorantGaramond-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("./fonts/DMMono-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("./fonts/DMMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("./fonts/DMMono-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---- Tokens -------------------------------------------------------------- */

:root {
  --ink:           #1A1814;
  --ink-2:         #221F1A;
  --ink-3:         #2C2823;
  --ink-4:         #3A3530;

  --gold:          #c8a84b;
  --gold-deep:     #a8893a;
  --gold-soft:     #d8bd6a;

  --cream:         #E8DCC2;
  --cream-2:       #F2EADA;
  --cream-3:       #DDD0B5;

  --fg-on-ink:     #E8DCC2;
  --fg-on-ink-2:   #B8AC95;
  --fg-on-ink-3:   #7A7165;

  --fg:            var(--fg-on-ink);
  --fg-muted:      var(--fg-on-ink-2);
  --fg-faint:      var(--fg-on-ink-3);
  --rule:          var(--ink-3);

  --font-serif:    "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --font-mono:     "DM Mono", "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --ease-brand:        cubic-bezier(0.22, 0.61, 0.24, 1.00);
  --ease-brand-in:     cubic-bezier(0.50, 0.00, 0.78, 0.20);
  --dur-micro:  180ms;
  --dur-base:   480ms;
  --dur-grand:  800ms;

  /* ---- Scroll reveal (see assets/reveal.js) --------------------------- */
  --reveal-dur:     850ms;
  --reveal-ease:    cubic-bezier(0.22, 0.9, 0.24, 1); /* fast start, long settle, no overshoot */
  --reveal-stagger: 110ms;
  --reveal-y:       24px;
}

/* ---- Reset & base -------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
}

body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Header -------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px clamp(28px, 5vw, 64px);
  background: linear-gradient(to bottom, var(--ink) 60%, rgba(26, 24, 20, 0));
  border-bottom: 1px solid transparent;
  transition:
    background var(--dur-base) var(--ease-brand),
    border-color var(--dur-base) var(--ease-brand);
}

.site-header.scrolled {
  background: var(--ink);
  border-bottom-color: var(--ink-3);
}

.site-header img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-header .lock {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1.4;
  white-space: nowrap;
}

.site-header .lock .sub {
  color: var(--fg-faint);
  margin-left: 8px;
}

.site-header .grow { flex: 1; }

.site-header .header-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
  transition: color var(--dur-micro) var(--ease-brand);
}

.site-header .header-cta:hover { color: var(--gold-soft); }

.site-header .header-cta .arrow {
  transition: transform var(--dur-base) var(--ease-brand);
}

.site-header .header-cta:hover .arrow { transform: translateX(6px); }

/* ---- Section chrome ------------------------------------------------------ */

.section {
  padding: clamp(80px, 14vh, 160px) clamp(28px, 5vw, 64px);
  max-width: 1280px;
  margin: 0 auto;
}

.section + .section,
.section-outer + .section-outer {
  border-top: 1px solid var(--ink-3);
}

.section-outer { background: var(--ink); }

.section .grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px clamp(40px, 6vw, 80px);
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-id {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.running {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  line-height: 1.6;
}

.section h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 72px);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--fg);
  text-wrap: balance;
}

.section .sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 2vw, 26px);
  color: var(--fg-muted);
  margin: 0 0 36px;
  line-height: 1.25;
}

.section p {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg);
  margin: 0 0 1em;
  max-width: 620px;
  text-wrap: pretty;
}

.section p.muted { color: var(--fg-muted); }

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px clamp(28px, 5vw, 64px) 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px clamp(40px, 6vw, 80px);
  width: 100%;
}

.hero .hero-section-id {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(72px, 9vw, 132px);
  letter-spacing: -0.015em;
  line-height: 0.98;
  margin: 0 0 24px;
  color: var(--fg);
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
}

.hero .lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--fg-muted);
  max-width: 640px;
  line-height: 1.3;
  margin: 0 0 56px;
}

.hero .hero-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  transition: color var(--dur-micro) var(--ease-brand);
}

.hero .hero-cta .arrow {
  transition: transform var(--dur-base) var(--ease-brand);
}

.hero .hero-cta:hover { color: var(--gold-soft); }
.hero .hero-cta:hover .arrow { transform: translateX(8px); }

/* ---- Principles ---------------------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 36px 0 0;
  border-top: 1px solid var(--ink-3);
}

.principles .item {
  padding: 26px 28px 24px 0;
  border-right: 1px solid var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.principles .item:last-child {
  border-right: 0;
  padding-right: 0;
}

.principles .num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.principles .name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 30px;
  color: var(--gold);
  line-height: 1.1;
  margin: 0;
}

.principles .desc {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.45;
  margin: 0;
}

/* ---- Tier cards ---------------------------------------------------------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
}

.tier {
  padding: 32px 28px 28px;
  border-right: 1px solid var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 320ms var(--ease-brand);
}

.tier:last-child { border-right: 0; }
.tier:hover { background: var(--ink-2); }

.tier .tier-id {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.tier .tier-name {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
}

.tier .tier-fee {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 24px;
  color: var(--gold-soft);
  letter-spacing: -0.01em;
  line-height: 1;
}

.tier .tier-blurb {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0;
}

.tier .fields {
  border-top: 1px solid var(--ink-3);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 0 0 2px;
}

.field-value {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--fg);
  line-height: 1.4;
  margin: 0;
}

.tier .cta-row {
  margin-top: auto;
  padding-top: 18px;
}

/* ---- CTA link (shared) --------------------------------------------------- */

.cta-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  transition: color var(--dur-micro) var(--ease-brand);
}

.cta-link .arrow {
  transition: transform var(--dur-base) var(--ease-brand);
}

.cta-link:hover { color: var(--gold-soft); }
.cta-link:hover .arrow { transform: translateX(6px); }

/* ---- Work index ---------------------------------------------------------- */

.work {
  border-top: 1px solid var(--ink-3);
}

.work-item {
  padding: 28px 0;
  display: grid;
  grid-template-columns: 90px 1fr 360px 28px;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--ink-3);
  text-decoration: none;
  color: var(--fg);
  transition: background 320ms var(--ease-brand);
}

.work-item:hover { background: var(--ink-2); }

.work-item .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
  text-transform: uppercase;
}

.work-item .work-name {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 38px;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--fg);
}

.work-item .work-name em {
  font-style: italic;
  color: var(--gold);
}

.work-item .frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 55% 45%, rgba(208, 176, 80, 0.18), rgba(26, 24, 20, 0.95) 65%),
    var(--ink-2);
  border: 1px solid var(--ink-3);
  position: relative;
  overflow: hidden;
}

.work-item .frame::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 56%; aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(232, 220, 194, 0.55);
  box-shadow: 0 0 32px 4px rgba(208, 176, 80, 0.22);
}

.work-item .arrow {
  font-size: 22px;
  color: var(--gold);
  text-align: right;
  transition: transform var(--dur-base) var(--ease-brand);
}

.work-item:hover .arrow { transform: translateX(8px); }

/* ---- Contact ------------------------------------------------------------- */

.contact {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}

.contact .biggie {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(36px, 4.5vw, 56px);
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--fg);
  margin: 0;
  text-wrap: balance;
}

.contact .biggie em {
  font-style: italic;
  color: var(--gold);
}

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

.channels .channel-row {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-3);
}

.channels .channel-row:first-child { border-top: 1px solid var(--ink-3); }

.channels .ch-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
  width: 80px;
  flex-shrink: 0;
}

.channels .ch-val {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--fg);
}

.channels .ch-val a {
  color: var(--fg);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-brand);
}

.channels .ch-val a:hover { color: var(--gold); }

.contact-cta {
  margin-top: 48px;
}

.contact-cta .cta-link {
  font-size: 13px;
}

/* ---- Footer -------------------------------------------------------------- */

.site-footer {
  padding: 48px clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--ink-3);
  background: var(--ink);
}

.site-footer .inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: baseline;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.site-footer .inner .grow { flex: 1; }

.site-footer .inner .footer-link {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-brand);
}

.site-footer .inner .footer-link:hover { color: var(--gold); }

.site-footer .inner .sep { color: var(--ink-4); }

/* ---- Scroll stagger reveal ----------------------------------------------- */

/* Hidden state is gated on .js so content stays visible if the script fails. */
.js [data-stagger-child] {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition:
    opacity var(--reveal-dur) var(--reveal-ease),
    transform var(--reveal-dur) var(--reveal-ease);
}

.js [data-stagger-container].is-visible [data-stagger-child] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--i, 0) * var(--reveal-stagger));
}

/* Used by reveal.js to re-arm a section off-screen without a visible rewind. */
[data-stagger-container].no-transition [data-stagger-child] {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-stagger-child],
  .js [data-stagger-container].is-visible [data-stagger-child] {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0s;
  }
}

/* ---- No-op reveal (deliberate) ------------------------------------------- */

.reveal { /* intentional no-op - kept for semantic readability */ }

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 800px) {
  /* 14vh of vertical padding reads as dead space once the content column is
     narrow — tighten the rhythm on small screens. */
  .section {
    padding-top: clamp(56px, 8vh, 88px);
    padding-bottom: clamp(56px, 8vh, 88px);
  }

  .hero-grid,
  .section .grid {
    grid-template-columns: 1fr;
  }

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

  .principles .item {
    border-right: 0;
    border-bottom: 1px solid var(--ink-3);
    padding-right: 0;
  }

  .principles .item:last-child { border-bottom: 0; }

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

  .tier {
    border-right: 0;
    border-bottom: 1px solid var(--ink-3);
  }

  .tier:last-child { border-bottom: 0; }

  .work-item {
    grid-template-columns: 60px 1fr 16px;
  }

  .work-item .frame { display: none; }

  .contact {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ---- Selected work: index treatment ("An index, not a showreel.") -------- */

.work-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  margin: 8px 0 48px;
}

.feature { display: block; text-decoration: none; color: var(--fg); }

.feature .frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 55% 45%, rgba(208, 176, 80, 0.18), rgba(26, 24, 20, 0.95) 65%),
    var(--ink-2);
  border: 1px solid var(--ink-3);
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-brand);
}

.feature .frame::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 46%; aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(232, 220, 194, 0.55);
  box-shadow: 0 0 32px 4px rgba(208, 176, 80, 0.22);
}

.feature:hover .frame { border-color: var(--gold-deep); }

.feature-cap {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-top: 12px;
  line-height: 1.5;
}

.work-index { border-top: 1px solid var(--ink-3); }

.work-index-head,
.work-row {
  display: grid;
  grid-template-columns: 48px 140px 1fr 72px 24px;
  align-items: baseline;
  gap: 24px;
}

.work-index-head {
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.work-row {
  padding: 22px 0;
  border-bottom: 1px solid var(--ink-3);
  text-decoration: none;
  color: var(--fg);
  transition: background 320ms var(--ease-brand);
}

.work-row:hover { background: var(--ink-2); }

.work-row .wr-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.work-row .wr-client {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  align-self: center;
}

.work-row .wr-project {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 28px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--fg);
}

.work-row .wr-project em { font-style: italic; color: var(--gold); }

.work-row .wr-project .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  padding: 3px 7px;
  margin-left: 12px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.work-row .wr-year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  align-self: center;
}

.work-row .arrow {
  font-size: 18px;
  color: var(--gold);
  text-align: right;
  align-self: center;
  transition: transform var(--dur-base) var(--ease-brand);
}

.work-row:hover .arrow { transform: translateX(8px); }

@media (max-width: 800px) {
  .work-features { grid-template-columns: 1fr; gap: 28px; }
  .work-index-head { display: none; }
  .work-row {
    grid-template-columns: 36px 1fr 20px;
    gap: 6px 16px;
  }
  .work-row .wr-num { grid-row: 1; grid-column: 1; }
  .work-row .wr-project { grid-row: 1; grid-column: 2; font-size: 24px; }
  .work-row .arrow { grid-row: 1; grid-column: 3; align-self: baseline; }
  .work-row .wr-client { grid-row: 2; grid-column: 2; align-self: start; }
  .work-row .wr-year { grid-row: 2; grid-column: 2; align-self: start; text-align: right; }
  .work-row .wr-project .tag { margin-left: 8px; }
}

/* ==========================================================================
   Project detail page (e.g. work/plenish.html)
   Reuses tokens, rail/section, .sub, .field-label/.field-value, stagger.
   ========================================================================== */

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-brand);
}

.project-back .arrow {
  transition: transform var(--dur-base) var(--ease-brand);
}

.project-back:hover { color: var(--gold-soft); }
.project-back:hover .arrow { transform: translateX(-6px); }

.project-masthead {
  margin: 36px 0 40px;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.project-masthead h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(56px, 8vw, 110px);
  letter-spacing: -0.015em;
  line-height: 0.98;
  margin: 0 0 14px;
  color: var(--fg);
  text-wrap: balance;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}

.project-video {
  margin-bottom: 48px;
}

.project-body {
  margin-bottom: 56px;
}

@media (max-width: 800px) {
  .project-meta { gap: 20px 32px; }
}

/* ==========================================================================
   Copy-to-clipboard control — email channel (mailto fallback)
   Subtle text-style button matching DM Mono utility scale + gold accent.
   ========================================================================== */

.channels .ch-val:has(.copy-email) {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
}

.copy-email {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule-strong, var(--ink-4));
  padding: 0 0 1px;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  line-height: 1.4;
  transition:
    color var(--dur-micro) var(--ease-brand),
    border-color var(--dur-micro) var(--ease-brand);
}

.copy-email:hover,
.copy-email:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--gold);
  outline: none;
}

.copy-email.is-copied {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ==========================================================================
   Video embed wrapper + placeholder (project detail pages)
   Replace .video-placeholder with a Vimeo iframe div when ready;
   the .video-embed wrapper and its padding-top stay in place.
   ========================================================================== */

.video-embed {
  padding-top: 56.25%;
  position: relative;
  margin-bottom: 48px;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(200, 168, 75, 0.35); /* --gold at ~35% opacity */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.video-placeholder .vp-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.video-placeholder .vp-ratio {
  position: absolute;
  bottom: 14px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  opacity: 0.6;
}

/* ==========================================================================
   Media carousel (shared component — see assets/carousel.js)
   Tokens only; DM Mono counter, gold accent on controls, video-caption style.
   ========================================================================== */

.media-carousel {
  margin-bottom: 48px;
}

.carousel-viewport {
  position: relative;
}

.carousel-slide .video-embed {
  position: relative;
  width: 100%;
  /* padding-top is authored inline per slide, so mixed aspect ratios work */
}

.carousel-slide .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 18px;
}

.carousel-controls[hidden] { display: none; }

.carousel-prev,
.carousel-next {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 8px;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  color: var(--fg);
  transition: color var(--dur-micro) var(--ease-brand);
}

.carousel-prev:hover,
.carousel-next:hover,
.carousel-prev:focus-visible,
.carousel-next:focus-visible {
  color: var(--gold);
}

.carousel-prev:focus-visible,
.carousel-next:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.carousel-counter {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  min-width: 64px;
  text-align: center;
}

.media-carousel .carousel-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 12px 0 0;
  max-width: none;
  line-height: 1.5;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-prev,
  .carousel-next {
    transition: none;
  }
}

/* ==========================================================================
   Idents grid (work/idents.html)
   Responsive 2-up grid of ident tiles; 1 column below ~640px.
   Lazy-load iframes via data-src (see the page's inline script).
   ========================================================================== */

.idents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 32px;
  margin: 8px 0 48px;
}

.ident-tile .video-embed {
  position: relative;
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
}

.ident-tile .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ident-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 12px 0 0;
  line-height: 1.5;
}

.ident-caption .ident-link {
  color: var(--gold);
  text-decoration: none;
  margin-left: 12px;
  transition: color var(--dur-micro) var(--ease-brand);
}

.ident-caption .ident-link:hover { color: var(--gold-soft); }

@media (max-width: 640px) {
  .idents-grid {
    grid-template-columns: 1fr;
  }
}

/* A lone feature tile spans the full width rather than leaving a half-width gap.
   Self-correcting: reverts to the 2-up grid automatically when a second tile returns. */
.work-features .feature:only-child { grid-column: 1 / -1; }

/* "Start a conversation" CTA confirms the address was copied (mailto fallback). */
.cta-link.mail-cta.is-copied { color: var(--gold-soft); }

/* ==========================================================================
   Header CTA: degrade to arrow-only rather than clipping the phrase.
   The link keeps aria-label="Start a conversation" for screen readers.
   ========================================================================== */

@media (max-width: 640px) {
  .site-header .header-cta-label { display: none; }
  .site-header .header-cta { gap: 0; }
}

/* Drop the descriptor below 809px. With it shown, the wordmark and the full
   CTA need 809px, so any narrower pushes the CTA past the right edge. */
@media (max-width: 808px) {
  .site-header .lock .sub { display: none; }
}

/* Landscape phones: the label costs more than it earns at this height. */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header .header-cta-label { display: none; }
  .site-header .header-cta { gap: 0; }
}

/* ==========================================================================
   Short viewports (landscape phones): tighten vertical rhythm so the header,
   project title and start of the meta strip fit without scrolling.
   Heights only — no layout structure or desktop font sizes change.
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
  /* ~half the usual section padding */
  .section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  /* Hero becomes content-height rather than viewport-height */
  .hero {
    min-height: 0;
    padding-top: 84px;
    padding-bottom: 40px;
  }

  /* Slimmer header bar */
  .site-header { padding-top: 12px; padding-bottom: 12px; }

  /* Tighten the run-in to the meta strip on project pages */
  .project-back { margin-bottom: 0; }
  .project-masthead { margin: 20px 0 20px; }
  .project-meta { padding: 14px 0; margin-bottom: 28px; }
  .project-video, .media-carousel, .idents-grid { margin-bottom: 28px; }
  .project-body { margin-bottom: 28px; }
}

/* ==========================================================================
   Brand lockup links home. The <a> reproduces the header's own 24px gap so
   wrapping the logo + wordmark doesn't change the layout.
   ========================================================================== */

.site-header .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--dur-micro) var(--ease-brand);
}

.site-header .brand-link:hover { opacity: 0.72; }

.site-header .brand-link:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 6px;
}

/* ==========================================================================
   Layer strip: a row of render passes shown as square frames.
   Five up on desktop, two up below 800px (last item spans), one below 520px.
   ========================================================================== */

.layer-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(8px, 1.2vw, 16px);
  margin: 8px 0 48px;
}

.layer-frame {
  display: block;
  width: 100%;
  /* height:auto lets aspect-ratio drive the box; without it the height
     attribute on the img would hold the frame at its intrinsic size. */
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--ink-3);
  background: var(--ink-2);
}

.layer-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 8px 0 0;
  line-height: 1.5;
}

.layer-strip-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 12px 0 0;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .layer-strip { grid-template-columns: repeat(2, 1fr); }
  .layer-strip .layer-item:last-child { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .layer-strip { grid-template-columns: 1fr; }
  .layer-strip .layer-item:last-child { grid-column: auto; }
}

/* ==========================================================================
   Feature tile carrying a looping video rather than the glow-ring placeholder.
   The iframe ignores pointer events so the whole tile stays a link.
   ========================================================================== */

.feature .frame.has-video {
  background: var(--ink-2);
}

.feature .frame.has-video::after { content: none; }

.feature .frame.has-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* ==========================================================================
   Format matrix figure (work/campaign-toolkits.html).
   Inline SVG so it stays sharp and inherits the theme. Label font-size is in
   viewBox units: 10 x 1200 / 880 (the desktop content column) = 13.64.
   ========================================================================== */

.matrix {
  margin: 8px 0 0;
}

.matrix svg {
  display: block;
  width: 100%;
  height: auto;
}

.matrix-cell {
  fill: none;
  stroke: var(--ink-4);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.matrix-master {
  fill: var(--gold);
}

.matrix-link {
  stroke: var(--ink-4);
  stroke-width: 1;
  opacity: 0.45;
  vector-effect: non-scaling-stroke;
}

.matrix-label {
  font-family: var(--font-mono);
  font-size: 13.64px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  fill: var(--fg-faint);
}

.matrix-label-master {
  fill: var(--ink);
}

.matrix-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 12px 0 0;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .matrix-label { display: none; }
}

/* ==========================================================================
   Meta labels inside a section.
   `.section p` (0-1-1) outranks a bare label class (0-1-0), so any label that
   is a <p> was being rendered as 19px serif body copy. Scoping under .section
   (0-2-0) restores each label's own type. text-wrap: balance keeps short
   labels from dropping one or two words onto a line of their own.
   ========================================================================== */

.section .field-label,
.section .field-value,
.section .ident-caption,
.section .layer-label,
.section .layer-strip-caption,
.section .matrix-caption {
  max-width: none;
  text-wrap: balance;
}

.section .field-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-faint);
  margin: 0 0 2px;
}

.section .field-value {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg);
  margin: 0;
}

.section .ident-caption,
.section .layer-strip-caption,
.section .matrix-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--fg-faint);
  margin: 12px 0 0;
}

.section .layer-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--fg-faint);
  margin: 8px 0 0;
}

/* ==========================================================================
   Project prev / next navigation (see assets/project-nav.js)
   Built at runtime from the PROJECTS manifest, so there is no markup for
   these rules in the project pages beyond the empty [data-project-nav] mount.
   ========================================================================== */

.project-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
  margin: 72px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--rule);
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  text-decoration: none;
  color: var(--fg-muted);
  transition: color var(--dur-micro) var(--ease-brand);
}

.project-nav-link.is-next {
  text-align: right;
  align-items: flex-end;
}

.project-nav-link .pn-dir {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.project-nav-link .arrow {
  transition: transform var(--dur-base) var(--ease-brand);
}

.project-nav-link .pn-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  text-wrap: balance;
}

.project-nav-link .pn-num {
  color: var(--fg-faint);
  margin-right: 10px;
}

.project-nav-link .pn-project {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.35;
  color: var(--fg-muted);
  text-wrap: balance;
}

.project-nav-link:hover { color: var(--fg); }
.project-nav-link:hover .pn-project { color: var(--fg); }
.project-nav-link.is-prev:hover .arrow { transform: translateX(-6px); }
.project-nav-link.is-next:hover .arrow { transform: translateX(6px); }

.project-nav-all {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-decoration: none;
  white-space: nowrap;
  padding: 0 4px;
  transition: color var(--dur-micro) var(--ease-brand);
}

.project-nav-all:hover { color: var(--gold); }

/* Scoped under .section so it outranks `.section p` (0-2-0 beats 0-1-1) —
   without this it renders as 19px body serif like any other paragraph. */
.section .project-nav-hint {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-align: center;
  margin: 22px 0 0;
  max-width: none;
  text-wrap: balance;
}

/* Focus ring for keyboard users, since these are the keyboard targets. */
.project-nav-link:focus-visible,
.project-nav-all:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 6px;
  color: var(--fg);
}

@media (max-width: 700px) {
  .project-nav {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
    margin-top: 56px;
  }
  .project-nav-all {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    align-self: auto;
    padding-top: 4px;
  }
  .project-nav-link .pn-project { font-size: 15px; }
}

/* ---- Leaving transition -------------------------------------------------
   A short slide-and-fade in the direction of travel so a swipe reads as a
   swipe rather than a hard cut. Cleared on pageshow in project-nav.js.
   -------------------------------------------------------------------------- */

html.is-leaving .section-outer {
  transition:
    transform 200ms var(--ease-brand-in),
    opacity 200ms var(--ease-brand-in);
  opacity: 0;
}

html.is-leaving-next .section-outer { transform: translateX(-28px); }
html.is-leaving-prev .section-outer { transform: translateX(28px); }

@media (prefers-reduced-motion: reduce) {
  html.is-leaving .section-outer {
    transition: none;
    transform: none;
    opacity: 1;
  }
  .project-nav-link .arrow { transition: none; }
}

/* ==========================================================================
   Captioned media (figure / figcaption)
   Project-body media that carries a caption. The figure owns the trailing
   space so the caption sits tight under its own media rather than adrift
   from it; the media element's own bottom margin is neutralised inside.
   Not used by the idents grid or the carousel — those keep .ident-caption
   and .carousel-caption as they are.
   ========================================================================== */

.media-figure { margin: 0 0 48px; }

.media-figure .video-embed { margin-bottom: 0; }

/* Same neutralising as .video-embed above: .layer-strip also carries a 48px
   bottom margin, which would otherwise leave its caption detached while every
   other caption hugs its media. */
.media-figure .layer-strip { margin-bottom: 0; }

.media-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 10px 0 0;
  line-height: 1.5;
}

/* ==========================================================================
   Anchor landings clear the fixed header.
   In-page links (#approach, #services, #work, #contact) land with the section
   top at the header's bottom edge rather than underneath it. 86px is the
   header's height: 45px logo + 20px top and bottom padding + 1px border.
   ========================================================================== */

.section[id] { scroll-margin-top: 86px; }

/* ==========================================================================
   Tier fees: smaller between 801px and 980px.
   Above 800px the rail sits beside the three cards and leaves each fee too
   narrow at 24px. 20px keeps them three across; below ~860px the tier 03 fee
   can still wrap. Scoped as .tier .tier-fee to match the base rule.
   ========================================================================== */

@media (min-width: 801px) and (max-width: 980px) {
  .tier .tier-fee { font-size: 20px; }
}

/* ==========================================================================
   Project detail pages on small screens.
   Scoped to #project, the section id only the work/ pages use, so the rails
   on index.html and privacy.html are unaffected.
   ========================================================================== */

@media (max-width: 800px) and (min-height: 501px),
       (max-width: 800px) and (orientation: portrait) {
  /* The small-screen section padding (clamp 56px to 88px) is shorter than the
     fixed header, so the first block sat beneath it. 86px header + 32px.
     Not on short landscape screens, which keep the tighter treatment in the
     max-height: 500px landscape block. */
  #project { padding-top: calc(86px + 32px); }
}

@media (max-width: 640px) {
  /* The rail repeats the masthead and date directly below it. */
  #project .rail { display: none; }
}
