/* NAP — Collins-grammar rebuild. Tokens flip via html[data-theme]. */

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Junicode";
  src: url("assets/fonts/junicode-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8f8f7;
  --fg: #140700;
  --mid: #5e5855;
  --hairline: rgba(20, 7, 0, 0.14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --theme-fade: 0.7s ease;
  --pad: clamp(20px, 5vw, 96px);
}
html[data-theme="dark"] {
  --bg: #000000;
  --fg: #f8f8f7;
  --mid: #d0d0c8;
  --hairline: rgba(248, 248, 247, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
  transition: background-color var(--theme-fade), color var(--theme-fade);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--fg); color: var(--bg); }

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 400;
  font-variant-numeric: oldstyle-nums;
}

/* ---- type scale ---- */
.display-1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.0; letter-spacing: -0.02em; }
.display-2 { font-size: clamp(26px, 2.9vw, 40px); line-height: 1.18; letter-spacing: -0.015em; }
.display-detail { font-size: clamp(40px, 4.5vw, 64px); line-height: 1.05; letter-spacing: -0.02em; }

/* ---- load reveal (hero) ---- */
.load-reveal { opacity: 0; transform: translateY(40px); }
body.loaded .load-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 1s 0.1s, transform 2s var(--ease) 0.1s;
}
@media (prefers-reduced-motion: reduce) {
  .load-reveal { opacity: 1; transform: none; transition: none; }
}
.eyebrow {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--mid);
  letter-spacing: -0.01em;
  transition: color var(--theme-fade);
}
.dim { color: var(--mid); transition: color var(--theme-fade); }

/* ---- buttons ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.8s var(--ease), background-color var(--theme-fade), color var(--theme-fade), border-color var(--theme-fade);
}
.pill:hover { transform: scale(1.045); }
.pill--solid { background: var(--fg); color: var(--bg); }
.pill--outline { background: transparent; color: var(--fg); border-color: currentColor; }

.linkBtn {
  font-family: var(--sans);
  font-size: 14px;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--theme-fade), opacity 0.3s;
}
.linkBtn:hover { opacity: 0.6; }

/* ---- header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  /* marks sit snug in the corners: top gap = side gap */
  padding: 22px;
  z-index: 60;
  transition: transform 0.6s var(--ease);
}
.site-header.header--hidden { transform: translateY(-100%); }

.wordmark {
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.38em;
  text-decoration: none;
  color: var(--fg);
  transition: color var(--theme-fade);
  display: flex;
  align-items: center;
}
.wordmark img {
  height: 63px;
  width: auto;
  display: block;
  transition: filter var(--theme-fade);
}
/* Dark chrome flips to light chrome on the dark theme */
html[data-theme="dark"] .wordmark img { filter: invert(1); }
body.menu-open .wordmark img { filter: invert(1); }

/* inline chrome wordmark wherever copy says NAP */
.nap-inline {
  height: 0.74em;
  width: auto;
  display: inline-block;
  vertical-align: baseline;
  transform: translateY(0.04em);
  transition: filter var(--theme-fade);
}
html[data-theme="dark"] .nap-inline { filter: invert(1); }
.site-footer .nap-inline { filter: invert(1); height: 1em; vertical-align: -0.14em; transform: none; }

.burger {
  width: 45px; height: 30px;
  padding: 0;
  background: none; border: none; cursor: pointer;
  display: grid; place-items: center;
  position: relative;
}
.burger span {
  display: block;
  width: 45px; height: 10px;
  background: url("assets/pill-chrome.png") center / 100% 100% no-repeat;
  position: absolute;
  transition: transform 0.5s var(--ease), filter var(--theme-fade);
}
.burger span:nth-child(1) { transform: translateY(-9px); }
.burger span:nth-child(2) { transform: translateY(9px); }
html[data-theme="dark"] .burger span { filter: invert(1); }
body.menu-open .burger span { filter: invert(1); }
body.menu-open .burger span:nth-child(1) { transform: rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: rotate(-45deg); }

/* ---- menu overlay = the footer teleported ---- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000000;
  color: #f8f8f7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 140px var(--pad) 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }
.menu-overlay .mega a { color: #f8f8f7; }
.menu-overlay .mega a:hover { color: #d0d0c8; }
.menu-overlay .pill--solid { background: #f8f8f7; color: #140700; }
.menu-overlay .linkBtn { color: #f8f8f7; }
.menu-overlay .eyebrow { color: #d0d0c8; }

.mega { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mega a {
  font-family: var(--serif);
  font-size: clamp(44px, 6.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
  transition: color 0.3s;
}
.mega a:hover { color: var(--mid); }

.menu-pills { display: flex; align-items: center; gap: 22px; margin-top: 36px; flex-wrap: wrap; }

.menu-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ---- reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.5s cubic-bezier(0.445, 0.05, 0.55, 0.95), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- hero: one line, reel peeks above the fold ---- */
.head {
  height: calc(100svh - 210px);
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 74px var(--pad) 0;
}
.head .display-1 {
  font-family: "Junicode", var(--serif);
  font-weight: 460;
  font-size: clamp(38px, 4.9vw, 72px);
  white-space: nowrap;
  /* centered in the space above the strip */
  margin: auto 0;
}

/* credibility strip — pinned just above the peeking reel, laurel position */
.cred-strip { text-align: center; padding-bottom: 10px; }
.cred-lede {
  font-family: "Junicode", var(--serif);
  font-weight: 330;
  font-size: clamp(20px, 1.9vw, 27px);
  line-height: 1.3;
  color: var(--fg);
  transition: color var(--theme-fade);
}
.cred-tags {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color var(--theme-fade);
}
/* strip follows the headline in, a beat behind */
body.loaded .cred-strip.load-reveal {
  transition: opacity 1s 0.4s, transform 2s var(--ease) 0.4s;
}
@media (max-width: 700px) {
  .cred-tags { letter-spacing: 0.16em; }
}

@media (max-width: 700px) {
  .head .display-1 { white-space: normal; }
  .head { height: calc(100svh - 150px); }
}

/* ---- reel ---- */
.reel { padding: 0 var(--pad) clamp(60px, 8vw, 120px); }
.reel-frame {
  width: min(720px, 100%);
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #000000;
  transform-origin: 50% 0;
  will-change: transform, opacity;
}
.reel-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

.reel-mute {
  position: absolute;
  right: 20px; bottom: 20px;
  width: 52px; height: 48px;
  padding: 0;
  border: none;
  background: none;
  display: grid;
  place-items: center end;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.5s var(--ease);
}
.reel-mute:hover { transform: scale(1.12); }
.reel-mute img {
  height: 44px;
  width: auto;
  display: block;
  /* keep the dark chrome as rendered; a faint halo separates it from dark footage */
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 10px rgba(248, 248, 247, 0.4));
}
.reel-mute .ico-off { display: none; }
.reel-mute.is-muted .ico-on { display: none; }
.reel-mute.is-muted .ico-off { display: block; }
.reel-note {
  position: absolute;
  left: 50%; bottom: 24px;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  color: #f8f8f7;
  border-color: rgba(248, 248, 247, 0.7);
  transition: opacity 0.4s ease, transform 0.8s var(--ease);
}
.reel-frame.noted .reel-note { opacity: 1; transform: translate(-50%, 0); }

/* ---- reel lightbox (full mode only) ---- */
.reel-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh;
}
.reel-dialog::backdrop { background: rgba(0, 0, 0, 0.92); }
.reel-dialog video {
  width: min(90vw, calc(85vh * 4 / 3));
  aspect-ratio: 4 / 3;
  display: block;
  margin: auto;
  position: absolute;
  inset: 0;
}
.reel-dialog .closebtn {
  position: absolute;
  top: 28px; right: 36px;
  background: none; border: none;
  color: #f8f8f7;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* ---- generic band layout ---- */
.band { padding: clamp(70px, 9vw, 130px) var(--pad); }
.band-head { max-width: 900px; margin-bottom: clamp(36px, 5vw, 64px); }
.band-head .display-2 { margin-top: 14px; max-width: 22ch; }

/* ---- interactive rows: ONE floating bar slides between rows (per reference recording) ---- */
.rows { list-style: none; position: relative; }
.rows li {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hairline);
  transition: border-color 0.25s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.25s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.rows li:last-child { border-bottom: 1px solid var(--hairline); }
.rows.bar-on li:not(.active) { opacity: 0.35; }
.rows li.active { border-top-color: transparent; }
.rows li.active + li { border-top-color: transparent; }
.rows li.active:last-child { border-bottom-color: transparent; }

.row-bar {
  position: absolute;
  left: -14px;
  right: -14px;
  top: 0;
  height: 0;
  border-radius: 12px;
  background: var(--fg);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: top 0.45s var(--ease), height 0.45s var(--ease), opacity 0.35s ease, background-color var(--theme-fade);
}
.row-bar.no-slide { transition: opacity 0.35s ease, background-color var(--theme-fade); }

/* chrome spotlight (GlowCard grammar): outer bloom behind the card edge,
   a bright chrome border segment hugging the radius, and a surface sheen —
   all tracking the cursor. Silver, like the wordmark. */
.row-bar::before,
.row-bar::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
/* surface sheen */
.row-bar::before {
  inset: 0;
  background: radial-gradient(
    320px 190px at calc(var(--spot-x, -999) * 1px) 50%,
    rgba(255, 255, 255, 0.16),
    rgba(212, 212, 210, 0.06) 45%,
    transparent 72%
  );
}
/* chrome border segment: crisp lit edge nearest the cursor, on the bar's rim */
.row-bar::after {
  inset: 0;
  padding: 2px;
  background: radial-gradient(
    400px 280px at calc(var(--spot-x, -999) * 1px) 50%,
    rgba(255, 255, 255, 1) 30%,
    rgba(224, 224, 222, 0.65) 52%,
    rgba(170, 170, 168, 0.2) 68%,
    transparent 84%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
/* outer bloom that spills past the card, like the reference —
   a chrome reflection: dark halo on the light theme, light on dark */
.row-bar .bar-glow {
  position: absolute;
  inset: -56px;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  background: radial-gradient(
    360px 240px at calc((var(--spot-x, -999) + 56) * 1px) 50%,
    rgba(62, 50, 44, 0.35),
    rgba(62, 50, 44, 0.14) 45%,
    transparent 70%
  );
  filter: blur(20px);
}
.rows.bar-on .row-bar::before,
.rows.bar-on .row-bar::after,
.rows.bar-on .row-bar .bar-glow { opacity: 1; }

/* dark theme: the bar is light, so the chrome reflection reads dark */
html[data-theme="dark"] .row-bar::before {
  background: radial-gradient(
    320px 190px at calc(var(--spot-x, -999) * 1px) 50%,
    rgba(20, 7, 0, 0.15),
    rgba(20, 7, 0, 0.05) 45%,
    transparent 72%
  );
}
html[data-theme="dark"] .row-bar::after {
  background: radial-gradient(
    400px 280px at calc(var(--spot-x, -999) * 1px) 50%,
    rgba(20, 7, 0, 0.9) 30%,
    rgba(20, 7, 0, 0.45) 52%,
    rgba(20, 7, 0, 0.14) 68%,
    transparent 84%
  );
}
html[data-theme="dark"] .row-bar .bar-glow {
  background: radial-gradient(
    360px 240px at calc((var(--spot-x, -999) + 56) * 1px) 50%,
    rgba(248, 248, 247, 0.26),
    rgba(248, 248, 247, 0.10) 45%,
    transparent 70%
  );
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 40px;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
  text-decoration: none;
  color: inherit;
}
.row h3 {
  font-family: var(--sans);
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.01em;
  transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.5s var(--ease);
}
.row p { color: var(--mid); transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1); }
.row-arrow {
  justify-self: end;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  display: inline-flex;
}
.rows li.active .row h3 { color: var(--bg); transform: translateX(22px); }
.rows li.active .row p { color: var(--bg); opacity: 0.72; }
.rows li.active .row-arrow { opacity: 1; transform: none; color: var(--bg); }
@media (max-width: 700px) {
  .row { grid-template-columns: 1fr 24px; }
  .row p { grid-column: 1 / -1; margin-top: -18px; padding-bottom: 4px; }
  .row-bar { left: -8px; right: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .rows.bar-on li:not(.active) { opacity: 1; }
  .rows li.active .row h3 { transform: none; }
}

/* ---- dark feature panel (service detail pages) ---- */
.feature-panel {
  background: #000000;
  color: #f8f8f7;
  border: 1px solid rgba(248, 248, 247, 0.12);
  border-radius: 24px;
  padding: clamp(40px, 6vw, 90px) clamp(24px, 5vw, 90px);
}
.feature-panel .eyebrow { color: #d0d0c8; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px clamp(24px, 3vw, 56px);
  margin-top: clamp(36px, 5vw, 64px);
}
.feature-grid h4 { font-family: var(--sans); font-weight: 400; font-size: 16px; margin-bottom: 8px; }
.feature-grid p { color: #d0d0c8; font-size: 15px; }
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---- meta split (service detail: outcomes left, pitch right) ---- */
.meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 80px);
}
.meta-grid .outcomes { list-style: none; color: var(--mid); display: flex; flex-direction: column; gap: 8px; transition: color var(--theme-fade); }
.meta-grid .outcomes-label { margin-bottom: 12px; color: var(--fg); transition: color var(--theme-fade); }
@media (max-width: 860px) {
  .meta-grid { grid-template-columns: 1fr; }
}

.note-pending { font-size: 14px; color: var(--mid); transition: color var(--theme-fade); }

/* ---- logo loop: the wordmark marquee, straight across, edge to edge ---- */
.logo-loop {
  overflow: hidden;
  /* rides inside the padded band but bleeds to the screen edges */
  margin: 0 calc(-1 * var(--pad));
  padding: 0 0 clamp(30px, 5vh, 56px);
  cursor: grab;
  touch-action: pan-y;
}
.logo-loop.dragging { cursor: grabbing; }
.logo-loop-track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
}
.logo-loop-track img {
  height: clamp(28px, 3.6vw, 46px);
  width: auto;
  display: block;
  margin: 0 clamp(16px, 2.2vw, 32px);
  transition: filter var(--theme-fade);
  pointer-events: none;
}
html[data-theme="dark"] .logo-loop-track img { filter: invert(1); }
.logo-loop-track .loop-sep {
  color: var(--mid);
  transition: color var(--theme-fade);
  flex: none;
}
.logo-loop-track .loop-sep svg { display: block; width: clamp(10px, 1.1vw, 14px); height: auto; }

/* ---- about (Led by Neera, dark) ---- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 80px);
}
.about-copy p + p { margin-top: 18px; }
.about-copy .display-2 { margin-bottom: 26px; }
.about-lead .eyebrow { margin-bottom: 18px; }
/* the wordmark owns its column — one big chrome line */
.neera-big {
  width: 100%;
  height: auto;
  display: block;
  transition: filter var(--theme-fade);
}
html[data-theme="dark"] .neera-big { filter: invert(1); }
@media (max-width: 860px) {
  .neera-big { max-width: 420px; }
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---- closing ---- */
.closing {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding-top: clamp(90px, 12vw, 170px);
  padding-bottom: clamp(40px, 5vw, 70px);
}
.closing .display-2 { max-width: 24ch; }
.closing-pills {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- footer: one compact block, links spread across the screen ---- */
.site-footer {
  padding: clamp(30px, 4vw, 56px) var(--pad) 44px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.site-footer .mega {
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  width: 100%;
  gap: clamp(48px, 9vw, 140px);
}
.site-footer .mega a { font-size: clamp(30px, 4.4vw, 56px); }
@media (max-width: 700px) {
  .site-footer .mega { flex-direction: column; align-items: center; gap: 10px; }
}
.footer-pills { display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--mid);
  font-size: 13px;
  transition: color var(--theme-fade);
}
.footer-bottom a { color: inherit; }

/* ---- toast ---- */
.toast {
  position: fixed;
  left: 50%; bottom: 34px;
  transform: translate(-50%, 12px);
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.35s ease, transform 0.8s var(--ease), background-color var(--theme-fade), color var(--theme-fade);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- team page ---- */
.team-list { max-width: 900px; }
.person { padding: 34px 0; border-top: 1px solid var(--hairline); transition: border-color var(--theme-fade); }
.team-list .person:last-child { border-bottom: 1px solid var(--hairline); }
.person h3 { font-family: var(--serif); font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.015em; }
.person .role { color: var(--mid); margin: 6px 0 14px; transition: color var(--theme-fade); }
.person p { max-width: 62ch; }
.person .pill { margin-top: 18px; }

/* ---- 404 ---- */
.notfound {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding: 0 var(--pad);
}
