/* Rishi Chellani portfolio — shared styles (editorial light) */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

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

:root {
  /* color tokens */
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-alt: #f2f0ea;
  --ink: #14161a;
  --ink-2: #444a55;      /* 8.9:1 on --bg */
  --ink-3: #5b6270;      /* 5.9:1 on --bg */
  --line: #e4e1d8;
  --accent: #1d4ed8;     /* 6.7:1 on white */
  --accent-ink: #163ab0;
  --accent-soft: #e8eefc;
  --ok: #17703a;
  --warn: #9a5200;
  --focus: #1d4ed8;

  /* type */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* spacing scale (8pt) */
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s5: 3rem; --s6: 4rem; --s7: 6rem;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,22,26,.04), 0 8px 24px rgba(20,22,26,.06);
  --max: 1080px;
  --measure: 68ch;
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: var(--s2); top: -4rem; z-index: 200;
  background: var(--ink); color: #fff; padding: .625rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: var(--s1); color: #fff; }

.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }

/* ── type ── */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.05; letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.3125rem; line-height: 1.25; }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s1); }
.lede { font-size: 1.1875rem; color: var(--ink-2); max-width: var(--measure); text-wrap: pretty; }
p { text-wrap: pretty; }

/* ── nav ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,249,246,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.125rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: var(--s3); list-style: none; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: .9375rem; font-weight: 500; padding: .5rem 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links .btn { color: #fff; padding: .5rem 1.125rem; }
.nav-links .btn:hover { color: #fff; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .75rem 1.5rem; border-radius: 999px;
  font: 600 .9375rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn[disabled] { opacity: .5; cursor: progress; }

.icon { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── sections ── */
section { padding-block: var(--s7); }
.section-head { margin-bottom: var(--s5); }
.section-head .lede { margin-top: var(--s2); }
.alt { background: var(--surface-alt); }

/* ── hero ── */
.hero { padding-block: clamp(4rem, 10vw, 7.5rem) var(--s6); }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { margin-top: var(--s3); font-size: 1.3125rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.status {
  display: inline-flex; align-items: center; gap: .625rem; margin-bottom: var(--s3);
  font-size: .875rem; font-weight: 500; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .375rem 1rem;
}
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; }
.proof { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line); color: var(--ink-3); font-size: .9375rem; }
.proof strong { color: var(--ink); font-weight: 600; }

.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s3); margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line); }
.proof-grid dt { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
.proof-grid dd { margin-top: .25rem; font-size: .9375rem; color: var(--ink-3); }

/* ── cards ── */
.grid { display: grid; gap: var(--s3); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s3); display: flex; flex-direction: column; gap: var(--s1);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.card h3 { margin-top: .25rem; }
.card p { color: var(--ink-2); font-size: .9688rem; }
.card-link { color: inherit; text-decoration: none; }
.card-link:hover { color: inherit; border-color: var(--accent); box-shadow: var(--shadow); }
.card-link:hover h3 { color: var(--accent); }
.card .more { margin-top: auto; padding-top: var(--s1); color: var(--accent); font-weight: 600; font-size: .9375rem; display: inline-flex; align-items: center; gap: .375rem; }
.card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: var(--s1); }

.project { padding: var(--s3) var(--s3) var(--s3); }
.project .kicker { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--s1); list-style: none; }
.tags li { font-size: .8125rem; font-weight: 500; color: var(--ink-2); background: var(--surface-alt); border: 1px solid var(--line); border-radius: 999px; padding: .1875rem .75rem; }

/* ── experiments row ── */
.exp { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s2); }
.exp a { display: flex; flex-direction: column; gap: .25rem; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .2s; }
.exp a:hover { border-color: var(--accent); color: var(--ink); }
.exp strong { font-weight: 600; display: flex; justify-content: space-between; gap: var(--s1); }
.exp span { color: var(--ink-3); font-size: .9063rem; }

/* ── video slots ── */
.video { background: #0f1218; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; position: relative; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: .5rem; color: #c9ced8; padding: var(--s3); }
.video-empty svg { width: 40px; height: 40px; margin-inline: auto; opacity: .8; }
.video-empty strong { color: #fff; font-weight: 600; }
.video-empty span { font-size: .875rem; }
.video-card h3 { margin-top: var(--s2); font-size: 1.125rem; }
.video-card p { color: var(--ink-2); font-size: .9375rem; margin-top: .25rem; }

/* ── split blocks ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: start; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.stat { border-top: 2px solid var(--ink); padding-top: var(--s1); }
.stat b { font-family: var(--serif); font-size: 2.5rem; line-height: 1; display: block; font-weight: 600; }
.stat span { font-size: .875rem; color: var(--ink-3); }
.plain-list { list-style: none; display: grid; gap: var(--s2); }
.plain-list li { display: flex; gap: .75rem; color: var(--ink-2); }
.plain-list .icon { color: var(--accent); margin-top: .25rem; }

/* ── contact ── */
.contact { background: var(--ink); color: #e8e9ec; }
.contact h2 { color: #fff; }
.contact .eyebrow { color: #9db8ff; }
.contact .lede { color: #c4c8d1; }
.contact a:not(.btn) { color: #cfdcff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s6); align-items: start; }
.contact-links { list-style: none; display: grid; gap: var(--s2); margin-top: var(--s4); }
.contact-links a { display: inline-flex; align-items: center; gap: .75rem; min-height: 44px; }
.form { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: var(--s4); display: grid; gap: var(--s2); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.field { display: grid; gap: .375rem; }
.field label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1.5px solid #c9c5b8; border-radius: 8px; padding: .75rem .875rem; min-height: 44px; width: 100%;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid rgba(29,78,216,.25); outline-offset: 0; }
.form-msg { font-size: .9375rem; }
.form-msg.error { color: #b42318; }
.form-success { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: var(--s5) var(--s4); text-align: center; }
.form-success[hidden] { display: none; }

footer { padding-block: var(--s4); color: var(--ink-3); font-size: .875rem; border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: space-between; }

/* ── case-study pages ── */
.crumb { padding-top: var(--s4); font-size: .9375rem; }
.crumb a { color: var(--ink-3); text-decoration: none; display: inline-flex; align-items: center; gap: .375rem; min-height: 44px; }
.crumb a:hover { color: var(--accent); }
.case-hero { padding-block: var(--s4) var(--s5); }
.case-hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.case-hero .lede { margin-top: var(--s2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3); margin-block: var(--s4); padding-block: var(--s3); border-block: 1px solid var(--line); }
.facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { font-weight: 500; margin-top: .25rem; }
.case-body { padding-block: var(--s5) var(--s6); }
.case-body section { padding-block: 0; margin-bottom: var(--s6); }
.case-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--s2); }
.case-body p, .case-body ul { max-width: var(--measure); color: var(--ink-2); }
.case-body p + p { margin-top: var(--s2); }
.case-body ul { padding-left: 1.25rem; display: grid; gap: .625rem; margin-top: var(--s1); }
.case-body strong { color: var(--ink); font-weight: 600; }
.callout { max-width: var(--measure); background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: var(--s2) var(--s3); color: var(--ink); margin-top: var(--s3); }
.shots { display: grid; gap: var(--s3); margin-top: var(--s3); }
.shots figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shots figcaption { padding: var(--s1) var(--s2); font-size: .875rem; color: var(--ink-3); border-top: 1px solid var(--line); }
.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s2); }

/* ── motion ── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .35s ease-out, transform .35s ease-out; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ── responsive ── */
@media (max-width: 860px) {
  section { padding-block: var(--s6); }
  .split, .contact-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .menu-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--s1) 1.25rem var(--s2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border: 0; margin-top: var(--s1); justify-content: center; }
}
@media (max-width: 560px) {
  .form { padding: var(--s3); }
  .form .row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}
