/* =========================================================
   Laura Maron — Portfolio
   Design system + layout. Plain CSS, no build step.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg:        #FAF8F4;
  --surface:   #FFFFFF;
  --surface-2: #F1ECE3;
  --ink:       #1C1B18;
  --ink-soft:  #5B574E;
  --ink-faint: #8A8479;
  --line:      rgba(28, 27, 24, 0.12);
  --line-soft: rgba(28, 27, 24, 0.07);
  --accent:    #B5522F;
  --accent-ink:#8F3F22;
  --accent-soft: rgba(181, 82, 47, 0.10);

  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --radius-lg: 22px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4:  clamp(2.7rem, 1.9rem + 4vw, 5.2rem);
  --step-5:  clamp(3.4rem, 2.2rem + 6vw, 7rem);
}

:root[data-theme="dark"] {
  --bg:        #14130F;
  --surface:   #1D1B16;
  --surface-2: #24211A;
  --ink:       #F3EFE8;
  --ink-soft:  #B4AEA2;
  --ink-faint: #837D71;
  --line:      rgba(243, 239, 232, 0.14);
  --line-soft: rgba(243, 239, 232, 0.08);
  --accent:    #E68B5F;
  --accent-ink:#F0A57F;
  --accent-soft: rgba(230, 139, 95, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #14130F;
    --surface:   #1D1B16;
    --surface-2: #24211A;
    --ink:       #F3EFE8;
    --ink-soft:  #B4AEA2;
    --ink-faint: #837D71;
    --line:      rgba(243, 239, 232, 0.14);
    --line-soft: rgba(243, 239, 232, 0.08);
    --accent:    #E68B5F;
    --accent-ink:#F0A57F;
    --accent-soft: rgba(230, 139, 95, 0.12);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "cv11";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 130px); }
.section--tight { padding-block: clamp(48px, 6vw, 84px); }

.eyebrow {
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-ink);
}
.section-head { max-width: 46ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-top: 12px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__brand { font-family: var(--font-display); font-size: var(--step-1); letter-spacing: -0.01em; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 34px); }
.nav__links a { font-size: var(--step--1); font-weight: 500; letter-spacing: 0.02em; color: var(--ink-soft); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--ink-faint); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
@media (max-width: 620px) { .nav__links a:not(.btn-nav) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px;
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.02em;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
:root[data-theme="dark"] .btn--primary { color: #1A140F; }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface-2); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 110px); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.hero__eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--step-5); line-height: 0.98; letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--accent-ink); }
.hero__lede {
  margin-top: clamp(26px, 3vw, 38px); max-width: 54ch;
  font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft);
}
.hero__cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__meta { margin-top: clamp(48px, 6vw, 76px); display: flex; flex-wrap: wrap; gap: 14px 40px; border-top: 1px solid var(--line); padding-top: 28px; }
.hero__meta div { min-width: 130px; }
.hero__meta dt { font-size: var(--step--1); color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.hero__meta dd { font-size: var(--step-0); font-weight: 500; margin-top: 4px; }

/* ---------- Work list ---------- */
.work-list { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.case {
  position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px);
  align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 44px);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
  overflow: hidden;
}
.case:hover { transform: translateY(-4px); border-color: var(--ink-faint); box-shadow: 0 24px 50px -30px rgba(0,0,0,.4); }
.case:nth-child(even) { grid-template-columns: 1fr 1.05fr; }
.case:nth-child(even) .case__media { order: -1; }
.case__index { font-size: var(--step--1); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.case__client { font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--accent-ink); margin-top: 14px; }
.case__title { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); line-height: 1.04; letter-spacing: -0.01em; margin-top: 8px; }
.case__desc { color: var(--ink-soft); margin-top: 14px; max-width: 42ch; }
.case__metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { font-size: var(--step--1); font-weight: 600; padding: 7px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.chip--plain { background: var(--surface-2); color: var(--ink-soft); font-weight: 500; }
.case__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-weight: 600; font-size: var(--step--1); color: var(--ink); }
.case__link .arrow { transition: transform .2s; }
.case:hover .case__link .arrow { transform: translateX(4px); }
.case__stretch { position: absolute; inset: 0; z-index: 1; }
.case__media { position: relative; z-index: 2; pointer-events: none; }

@media (max-width: 800px) {
  .case, .case:nth-child(even) { grid-template-columns: 1fr; }
  .case:nth-child(even) .case__media { order: 0; }
}

/* ---------- Media placeholder ---------- */
.media {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 20% 10%, var(--accent-soft), transparent 55%),
    var(--surface-2);
  border: 1px solid var(--line-soft);
  overflow: hidden; display: grid; place-items: center;
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media__note {
  font-size: var(--step--1); color: var(--ink-faint); text-align: center; padding: 20px;
  letter-spacing: 0.03em;
}
.media__note b { display: block; color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }

/* ---------- Value strip ---------- */
.value { background: var(--surface); border-block: 1px solid var(--line); }
.value__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.value__grid > div h3 { font-size: var(--step-1); font-weight: 600; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.value__grid > div h3 span { font-family: var(--font-display); color: var(--accent-ink); font-size: var(--step-1); }
.value__grid > div p { color: var(--ink-soft); font-size: var(--step-0); }
@media (max-width: 760px) { .value__grid { grid-template-columns: 1fr; gap: 28px; } }

.pullquote {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--step-2); line-height: 1.28; letter-spacing: -0.005em;
  max-width: 30ch; color: var(--ink);
}

/* ---------- Other work grid ---------- */
.grid-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: clamp(14px, 2vw, 22px); }
.mini {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transition: transform .3s, border-color .3s;
}
.mini:hover { transform: translateY(-3px); border-color: var(--ink-faint); }
.mini .media { aspect-ratio: 1 / 1; border: none; border-radius: 0; }
.mini__label { padding: 14px 16px; }
.mini__label b { display: block; font-weight: 600; font-size: var(--step-0); }
.mini__label span { font-size: var(--step--1); color: var(--ink-faint); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.about__body p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }
.about__body p + p { margin-top: 18px; }
.about__body strong { color: var(--ink); font-weight: 600; }
.about__side { position: sticky; top: 100px; }
.about__side .media { aspect-ratio: 3 / 4; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } .about__side { position: static; } }

/* ---------- Contact / footer ---------- */
.contact { text-align: center; }
.contact h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-4); line-height: 1; letter-spacing: -0.02em; }
.contact p { color: var(--ink-soft); max-width: 46ch; margin: 20px auto 34px; font-size: var(--step-1); }
.contact__mail { font-family: var(--font-display); font-size: var(--step-2); color: var(--accent-ink); border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color .2s; }
.contact__mail:hover { border-color: var(--accent); }

.footer { border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-block: 34px; font-size: var(--step--1); color: var(--ink-faint); }
.footer__links { display: flex; gap: 22px; }
.footer__links a { color: var(--ink-soft); transition: color .2s; }
.footer__links a:hover { color: var(--ink); }

/* ---------- Case study page ---------- */
.cs-hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(30px, 4vw, 52px); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: var(--step--1); font-weight: 500; color: var(--ink-soft); margin-bottom: 34px; }
.back-link:hover { color: var(--ink); }
.back-link .arrow { transition: transform .2s; }
.back-link:hover .arrow { transform: translateX(-3px); }
.cs-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-4); line-height: 1.02; letter-spacing: -0.02em; max-width: 20ch; margin-top: 8px; }
.cs-hero__lede { margin-top: 22px; max-width: 60ch; font-size: var(--step-1); color: var(--ink-soft); }

.cs-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-block: 1px solid var(--line); padding-block: 28px; margin-top: clamp(36px, 5vw, 56px); }
.cs-meta dt { font-size: var(--step--1); color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.cs-meta dd { font-size: var(--step-0); font-weight: 500; margin-top: 6px; }
@media (max-width: 680px) { .cs-meta { grid-template-columns: 1fr 1fr; gap: 20px; } }

.cs-body { max-width: 68ch; margin-inline: auto; }
.cs-section { margin-top: clamp(48px, 7vw, 88px); }
.cs-section__tag { font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--accent-ink); }
.cs-section h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.01em; margin-top: 10px; margin-bottom: 18px; }
.cs-section p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.6; }
.cs-section p + p { margin-top: 16px; }
.cs-section ul { margin-top: 16px; padding-left: 0; list-style: none; display: grid; gap: 12px; }
.cs-section li { position: relative; padding-left: 26px; color: var(--ink-soft); font-size: var(--step-0); }
.cs-section li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.metric__num { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; color: var(--accent-ink); }
.metric__label { font-size: var(--step--1); color: var(--ink-soft); margin-top: 10px; }
@media (max-width: 620px) { .metrics { grid-template-columns: 1fr; } }

.cs-figure { margin-top: 28px; }
.cs-figure .media { aspect-ratio: 16 / 9; }
.cs-figure figcaption { font-size: var(--step--1); color: var(--ink-faint); margin-top: 10px; text-align: center; }

.next-case { border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 96px); }
.next-case a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: clamp(36px, 5vw, 60px); }
.next-case span { font-size: var(--step--1); color: var(--ink-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.next-case b { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); }
.next-case a:hover b { color: var(--accent-ink); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Note banner (editor hint) ---------- */
.edit-note {
  font-size: var(--step--1); color: var(--ink-faint);
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 14px;
  background: var(--surface-2);
}
