/* =========================================================
   Mary's Portfolio — base stylesheet
   Plain CSS, no build step. Edit tokens below to reskin.
   ========================================================= */

:root {
  /* Palette (light) */
  --bg:            #fbfaf8;
  --bg-elevated:   #ffffff;
  --text:          #1b1a17;
  --text-muted:    #6b6862;
  --border:        #e6e2db;
  --accent:        #b8422a;
  --accent-text:   #ffffff;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  /* Rhythm */
  --measure: 68ch;
  --page-max: 1120px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #16150f;
    --bg-elevated:  #1e1d16;
    --text:        #ece9e1;
    --text-muted:  #a4a094;
    --border:      #322f26;
    --accent:      #e0714f;
    --accent-text: #16150f;
  }
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
.muted { color: var(--text-muted); }
.small { font-size: 0.9rem; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}
section { padding-block: clamp(3rem, 8vw, 6rem); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-block: 1rem;
}
.brand { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; gap: 1.4rem; font-size: 0.95rem; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(4rem, 12vw, 8rem) clamp(3rem, 8vw, 5rem); }
.hero p.lede {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  color: var(--text-muted);
  max-width: 46ch;
}

/* ---------- Stat row ---------- */
.stat-row {
  display: flex; flex-wrap: wrap; gap: clamp(1.75rem, 6vw, 3.5rem);
  margin: 2.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.stat-row .stat { margin: 0; }
.stat-row dd {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--accent);
  margin: 0;
}
.stat-row dt { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ---------- Eyebrow label (reusable kicker) ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--accent); margin-bottom: 0.6rem; }

/* ---------- Fact groups (impact / scale) ---------- */
.fact-groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem; margin-top: 2.5rem;
  border-top: 1px solid var(--border); padding-top: 1.75rem;
}
.fact-list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.fact-list li { margin-bottom: 0.4rem; }
.fact-list li:last-child { margin-bottom: 0; }

/* ---------- Work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gap);
  margin-top: 2.5rem;
}
.work-card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.work-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.25);
}
.work-card .thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--border), var(--bg));
  display: grid; place-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.work-card .body { padding: 1.1rem 1.25rem 1.4rem; }
.work-card .body h3 { margin-bottom: 0.15em; }
.work-card .meta { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.work-card .status { font-size: 0.82rem; margin-top: 0.9rem; color: var(--accent); }
.work-card.is-soon { cursor: default; }
.work-card.is-soon:hover { transform: none; border-color: var(--border); box-shadow: none; }
.work-card.is-soon .status { color: var(--text-muted); }

/* ---------- Case study ---------- */
.case-header { padding-block: clamp(3rem, 9vw, 6rem) 2rem; }
.case-header .kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--accent); margin-bottom: 1rem; }
.case-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
  border-top: 1px solid var(--border); padding-top: 1.75rem;
}
.case-facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.3rem; }
.case-facts dd { margin: 0; font-size: 0.98rem; }

.case-body { max-width: 760px; }
.case-body h2 { margin-top: 2.5em; }
.case-body figure { margin: 2.5rem 0; }
.case-body figure img { border: 1px solid var(--border); border-radius: var(--radius); }
.case-body figcaption { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.6rem; }
.case-body blockquote {
  margin: 2rem 0; padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-serif); font-size: 1.2rem; font-style: italic;
}
.placeholder-media {
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(45deg, var(--bg-elevated), var(--bg-elevated) 12px, var(--border) 12px, var(--border) 24px);
  border: 1px dashed var(--border); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--text-muted); font-size: 0.85rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--text);
  text-decoration: none; font-size: 0.95rem;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); color: var(--accent-text); }

/* ---------- Prev/next ---------- */
.case-nav { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 3rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-footer a { text-decoration: none; }

/* ---------- Utilities ---------- */
.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
