/* ============================================================
   Srishti — Editorial Portfolio
   Shared design system
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=Hanken+Grotesk:ital,wght@0,300..700;1,400..500&family=Newsreader:ital,opsz,wght@0,6..72,320..560;1,6..72,320..440&family=Space+Grotesk:wght@400;500;600&display=swap');

/* ---- Tokens ---- */
:root {
  --paper:    #fcfcfb;
  --paper-2:  #f3f4f3;
  --paper-3:  #eaebea;
  --ink:      #17181a;
  --ink-2:    #54565a;
  --ink-3:    #8a8d92;
  --line:     rgba(23, 24, 26, 0.13);
  --line-2:   rgba(23, 24, 26, 0.07);
  --accent:   #c5482a;
  --accent-2: #a13a20;

  /* filled (inverted) surfaces — footer, active chips */
  --fill:      #17181a;
  --fill-text: #fcfcfb;

  /* var names kept for compatibility; values are now an open grotesk pairing */
  --serif-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --serif-body:    'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --grotesk:       'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;

  --maxw: 1500px;
  --pad: clamp(20px, 5vw, 96px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Tweak: heading font ---- */
html[data-font="serif"]   { --serif-display: 'Newsreader', Georgia, 'Times New Roman', serif; }
html[data-font="serif"] .hero__statement,
html[data-font="serif"] .cs-title,
html[data-font="serif"] .foot__big { letter-spacing: -0.01em; }
html[data-font="grotesk2"] { --serif-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif; }

/* ---- Tweak: background ---- */
html[data-bg="pure"] { --paper: #ffffff; --paper-2: #f5f6f6; --paper-3: #ececec; }
html[data-bg="cool"] { --paper: #f3f5f6; --paper-2: #e9edee; --paper-3: #dfe4e5; --line: rgba(20,28,32,0.12); }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

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

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

/* ---- Type helpers ---- */
.eyebrow {
  font-family: var(--grotesk);
  font-size: clamp(11px, 0.78vw, 13px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow--ink { color: var(--ink-2); }

.serif { font-family: var(--serif-display); font-weight: 400; }
.ital  { font-style: italic; }
.accent { color: var(--accent); }

.lead {
  font-family: var(--serif-body);
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.42;
  font-weight: 360;
  letter-spacing: -0.005em;
  color: var(--ink);
}

/* numbers / indices */
.index {
  font-family: var(--grotesk);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(80px, 11vw, 180px); }

/* ---- Top nav ---- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(18px, 2vw, 30px) var(--pad);
  mix-blend-mode: normal;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(252,252,251,0.82);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom-color: var(--line-2);
}
.nav__brand {
  font-family: var(--serif-display);
  font-size: clamp(20px, 1.6vw, 26px);
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 0.55em;
}
.nav__brand .mark { color: var(--accent); font-size: 0.8em; }
.nav__brand .role {
  font-family: var(--grotesk);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 40px); align-items: baseline; }
.nav__links a {
  font-family: var(--grotesk);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  padding-bottom: 2px;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__links a.cta { color: var(--accent); }
@media (max-width: 720px) {
  .nav__brand .role { display: none; }
  .nav__links { gap: 16px; }
  .nav__links a.hide-sm { display: none; }
}

/* ---- Buttons / links ---- */
.link-arrow {
  font-family: var(--grotesk);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--ink);
}
.link-arrow .arr { transition: transform 0.45s var(--ease); }
.link-arrow:hover .arr { transform: translateX(6px); }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
/* safety net: force-visible (instant, no transition) so content never stays hidden
   in engines that pause animations, in print, or under reduced-motion */
html.reveal-all .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* image-slot defaults */
image-slot {
  --slot-bg: var(--paper-3);
  background: var(--paper-3);
  display: block;
  width: 100%;
  color: var(--ink-3);
  font-family: var(--grotesk);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* footer */
.foot {
  background: var(--fill);
  color: var(--fill-text);
  padding-block: clamp(70px, 9vw, 140px) 40px;
}
.foot ::selection { background: var(--fill-text); color: var(--fill); }
.foot__big {
  font-family: var(--serif-display);
  font-size: clamp(52px, 12vw, 200px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.foot__big a:hover { color: var(--accent); }
.foot a.u { border-bottom: 1px solid rgba(244,241,234,0.3); transition: border-color 0.3s, color 0.3s; }
.foot a.u:hover { color: var(--accent); border-color: var(--accent); }
.foot .eyebrow { color: rgba(244,241,234,0.5); }
.foot__row {
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between;
  align-items: flex-end; margin-top: clamp(50px, 7vw, 96px);
}
.foot__links { display: flex; gap: 28px; flex-wrap: wrap; }
.foot__links a {
  font-family: var(--grotesk); font-size: 14px; letter-spacing: 0.06em;
  color: rgba(244,241,234,0.78);
}
.foot__links a:hover { color: var(--accent); }
.foot__base {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  margin-top: clamp(50px, 8vw, 110px);
  padding-top: 26px;
  border-top: 1px solid rgba(244,241,234,0.16);
  font-family: var(--grotesk);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.5);
}

/* rule */
.rule { height: 1px; background: var(--line); border: 0; }

/* tweaks root must never block the page */
#tweaks-root:empty { display: none; }

/* ============================================================
   CASE STUDY pages
   ============================================================ */
.cs-back {
  font-family: var(--grotesk); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 0.6em;
}
.cs-back .arr { transition: transform 0.4s var(--ease); }
.cs-back:hover { color: var(--ink); }
.cs-back:hover .arr { transform: translateX(-5px); }

.cs-hero { padding-top: clamp(48px, 8vh, 96px); }
.cs-hero__eyebrow { display: flex; gap: 14px 26px; flex-wrap: wrap; align-items: baseline; }
.cs-hero__eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
.cs-title {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(52px, 11vw, 168px); line-height: 0.94; letter-spacing: -0.022em;
  margin-top: clamp(20px, 3vw, 40px);
}
.cs-summary {
  font-family: var(--serif-body); font-weight: 360;
  font-size: clamp(22px, 2.6vw, 40px); line-height: 1.28; letter-spacing: -0.01em;
  max-width: 22ch; margin-top: clamp(14px, 1.8vw, 26px); text-wrap: balance;
}
.cs-summary em { font-style: italic; }

.cs-cover { margin-top: clamp(44px, 6vw, 96px); }
.cs-cover image-slot { aspect-ratio: 16 / 8.4; height: auto; border-radius: 2px; }

/* meta strip */
.cs-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-block: 1px solid var(--line);
  margin-top: clamp(34px, 4.5vw, 64px);
}
.cs-meta__cell { background: var(--paper); padding: clamp(22px, 2.4vw, 34px) clamp(4px,1vw,14px); }
.cs-meta__k { font-family: var(--grotesk); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.cs-meta__v { font-family: var(--serif-body); font-size: clamp(17px, 1.4vw, 22px); margin-top: 10px; line-height: 1.35; }
@media (max-width: 720px){ .cs-meta { grid-template-columns: 1fr 1fr; } }

/* content blocks */
.cs-block { display: grid; grid-template-columns: 0.34fr 0.66fr; gap: clamp(28px, 5vw, 90px); align-items: start; }
.cs-block + .cs-block { margin-top: clamp(70px, 9vw, 150px); }
.cs-block__label {
  font-family: var(--grotesk); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 500; position: sticky; top: 120px;
  display: flex; gap: 12px; align-items: baseline;
}
.cs-block__label .n { color: var(--accent); }
.cs-block__body h3 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(30px, 4vw, 60px); line-height: 1.04; letter-spacing: -0.018em;
  margin-bottom: clamp(20px, 2vw, 32px); text-wrap: balance;
}
.cs-block__body p { font-size: clamp(18px, 1.45vw, 23px); line-height: 1.5; color: var(--ink); margin-bottom: 1em; max-width: 60ch; }
.cs-block__body p:last-child { margin-bottom: 0; }
.cs-block__body p .accent { color: var(--accent); }
.cs-block__body strong { font-weight: 500; }
@media (max-width: 820px){
  .cs-block { grid-template-columns: 1fr; gap: 18px; }
  .cs-block__label { position: static; }
}

/* full-bleed-ish figure */
.cs-figure { margin-top: clamp(60px, 8vw, 120px); }
.cs-figure image-slot { aspect-ratio: 16 / 9; height: auto; border-radius: 2px; }
.cs-figure__cap { font-family: var(--grotesk); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 14px; }
.cs-figure--pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); }
.cs-figure--pair image-slot { aspect-ratio: 4 / 5; }
@media (max-width: 720px){ .cs-figure--pair { grid-template-columns: 1fr; } }

/* outcome stats */
.cs-outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 60px); margin-top: clamp(44px, 5vw, 80px); }
.cs-outcome { border-top: 2px solid var(--ink); padding-top: 22px; }
.cs-outcome__n { font-family: var(--serif-display); font-size: clamp(46px, 6vw, 92px); line-height: 1; letter-spacing: -0.02em; }
.cs-outcome__l { font-family: var(--grotesk); font-size: 13px; letter-spacing: 0.04em; color: var(--ink-2); margin-top: 14px; line-height: 1.5; max-width: 26ch; }
@media (max-width: 720px){ .cs-outcomes { grid-template-columns: 1fr; } }

/* pull quote inside case study */
.cs-pull {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(30px, 4.6vw, 72px); line-height: 1.08; letter-spacing: -0.018em;
  text-wrap: balance; max-width: 20ch; margin-inline: auto; text-align: center;
}
.cs-pull em { font-style: italic; color: var(--accent); }
.cs-pull__by { font-family: var(--grotesk); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 28px; text-align: center; }

/* next project */
.cs-next { border-top: 1px solid var(--line); margin-top: clamp(80px,10vw,160px); }
.cs-next a { display: block; padding-block: clamp(50px, 7vw, 110px); }
.cs-next__k { font-family: var(--grotesk); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.cs-next__t {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(44px, 8vw, 130px); line-height: 0.96; letter-spacing: -0.02em;
  margin-top: 16px; display: inline-flex; align-items: center; gap: 0.3em;
  transition: color 0.4s var(--ease);
}
.cs-next__t .arr { font-size: 0.5em; transition: transform 0.5s var(--ease); }
.cs-next a:hover .cs-next__t { color: var(--accent); }
.cs-next a:hover .cs-next__t .arr { transform: translateX(14px); }
