:root {
  --bg: #F5F1EA;
  --ink: #1c1a17;
  --ink-soft: rgba(28,26,23,0.68);
  --ink-faint: rgba(28,26,23,0.45);
  --hairline: rgba(28,26,23,0.16);
  --accent: oklch(0.47 0.23 265);
  --accent-light: oklch(0.8 0.1 265);
  --accent-soft: oklch(0.94 0.02 265);
  --impact-bg: oklch(0.24 0.005 260);
  --thumb-bg: #1c1a17;
  --error: #b3413a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
}

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

a { color: var(--ink); }
a:hover { color: var(--accent); }

img { display: block; max-width: 100%; }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(20px,5vw,32px) 0;
  font-family: 'Inter', sans-serif;
}
.nav.nav--home { justify-content: flex-end; max-width: 900px; position: sticky; top: 0; z-index: 10; background: var(--bg); padding: 24px 16px 12px; }
.nav-author { font-size: 14px; letter-spacing: 0.02em; color: var(--ink); font-weight: 500; text-decoration: none; }
.nav-links { display: flex; gap: 32px; font-size: 14px; color: var(--ink-soft); }
.nav-links a { color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--ink); font-weight: 500; }

/* Home intro */
.intro { max-width: 900px; margin: 0 auto; padding: 48px 16px 32px; }
.intro h1, .intro h2 {
  font-size: clamp(42px, 12vw, 90px);
  line-height: 1.1;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.intro h1 { color: var(--accent); }
.intro h2 { color: var(--ink); margin-bottom: 40px; }
.intro-line1 {
  font-size: 22px; line-height: 1.6; color: var(--ink);
  margin: clamp(48px, 10vw, 96px) 0 24px; max-width: 660px;
}
.avatar-inline {
  display: inline-block; width: 70px; height: 58px; border-radius: 8px;
  overflow: hidden; vertical-align: text-bottom; margin: 0 2px;
}
.avatar-inline img { width: 100%; height: 100%; object-fit: cover; }
.intro-row2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar-icon { width: 70px; height: 70px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.avatar-icon img { width: 100%; height: 100%; object-fit: cover; }
.intro-line2 { font-size: 22px; line-height: 1.6; color: var(--ink); margin: 0; max-width: 600px; }

/* Selected work */
.selected-work { max-width: 900px; margin: 0 auto; padding: 48px 16px 96px; }
.selected-work h3 { font-size: clamp(30px,7vw,44px); font-weight: 600; margin: 0 0 56px; letter-spacing: -0.01em; }
.projects { display: flex; flex-direction: column; gap: 64px; }
.project-row { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.project-row.reverse { flex-direction: row-reverse; }
.project-thumb {
  width: min(320px,100%); height: 380px; border-radius: 16px; overflow: hidden;
  background: var(--thumb-bg); flex-shrink: 0; position: relative;
}
.project-thumb-inner { position: absolute; top: 24px; bottom: 0; left: 50%; transform: translateX(-50%); width: 95%; }
.project-thumb-inner img { width: 100%; height: 100%; object-fit: contain; }
.project-copy { flex: 1; min-width: 260px; }
.project-copy h4 { font-size: 28px; font-weight: 600; margin: 0 0 16px; letter-spacing: -0.01em; }
.project-copy p { font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 20px; font-family: 'Inter', sans-serif; }
.proj-link { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink); }
.proj-link:hover { color: var(--accent); }

/* Contact */
.contact-wrap { max-width: 700px; margin: 0 auto; padding: clamp(56px,10vw,96px) clamp(20px,5vw,32px) 140px; }
.contact-wrap h1 { font-size: clamp(38px,10vw,64px); line-height: 1.1; font-weight: 600; margin: 0 0 32px; letter-spacing: -0.01em; }
.contact-intro { font-size: 21px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 56px; max-width: 520px; }
.contact-rows { display: flex; flex-direction: column; gap: 28px; }
.contact-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.contact-link {
  font-family: 'Inter', sans-serif; font-size: clamp(18px,5vw,22px); font-weight: 500; text-decoration: none;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; color: var(--ink);
}
.contact-link:hover { color: var(--accent); }
.contact-eyebrow {
  font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; width: 100px; flex-shrink: 0;
}
.copy-btn {
  font-family: 'Inter', sans-serif; font-size: 13px; color: var(--ink-soft); background: none;
  border: 1px solid var(--hairline); border-radius: 100px; padding: 5px 14px; cursor: pointer;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

/* Password gate */
.pw-gate {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 24px; font-family: 'Inter', sans-serif;
}
.pw-gate[hidden] { display: none; }
.pw-box { max-width: 360px; width: 100%; text-align: center; }
.pw-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 30px; font-weight: 600; color: var(--ink); margin-bottom: 12px; letter-spacing: -0.01em; }
.pw-sub { font-size: 15px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 28px; }
.pw-form { display: flex; flex-direction: column; gap: 12px; }
.pw-input {
  font-family: 'Inter', sans-serif; font-size: 16px; padding: 13px 16px; border-radius: 8px;
  border: 1px solid var(--hairline); background: transparent; color: var(--ink); outline: none;
}
.pw-error { font-size: 13px; color: var(--error); text-align: left; padding: 0 2px; display: none; }
.pw-error.show { display: block; }
.pw-submit {
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; padding: 13px 16px;
  border-radius: 8px; border: none; background: var(--accent); color: #fff; cursor: pointer;
}

/* Case study header */
.cs-header { max-width: 1120px; margin: 0 auto; padding: clamp(36px,7vw,56px) clamp(20px,5vw,32px) 40px; }
.eyebrow { font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 20px; }
.cs-header h1 { font-size: clamp(40px,9vw,76px); line-height: 1.03; font-weight: 600; margin: 0 0 28px; letter-spacing: -0.01em; max-width: 820px; }
.cs-header h1.tight { font-size: clamp(38px,8vw,64px); line-height: 1.08; }
.cs-dek { font-size: 22px; line-height: 1.5; color: var(--ink-soft); max-width: 640px; margin: 0 0 28px; font-weight: 400; }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; font-family: 'Inter', sans-serif; }
.tag-pill { border: 1px solid var(--hairline); border-radius: 100px; padding: 7px 16px; font-size: 13px; color: var(--ink-soft); }

/* Hero */
.hero-phone-wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px,5vw,40px) 88px; display: flex; justify-content: center; }
.hero-phone {
  width: 280px; aspect-ratio: 9/19.5; border-radius: 22px; overflow: hidden;
  background: var(--accent-soft); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.25);
}
.hero-phone img { width: 100%; height: 100%; object-fit: cover; }
.hero-wide-wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px,5vw,40px) 88px; }
.hero-wide { width: 100%; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.25); }
.hero-wide img { width: 100%; height: auto; }

/* Impact */
.impact-section { background: var(--impact-bg); padding: clamp(48px,8vw,80px) clamp(20px,5vw,40px); }
.impact-inner { max-width: 1120px; margin: 0 auto; }
.impact-label { font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-light); font-weight: 600; margin-bottom: 36px; }
.impact-statement { font-size: clamp(20px,5vw,26px); line-height: 1.5; color: #fff; max-width: 760px; margin: 0; font-family: 'Source Serif 4', Georgia, serif; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 56px; }
.metric-value { font-size: 64px; line-height: 1; font-weight: 600; color: #fff; letter-spacing: -0.02em; }
.metric-label { font-family: 'Inter', sans-serif; font-size: 15px; color: var(--bg); opacity: 0.7; margin-top: 14px; line-height: 1.5; max-width: 280px; }
.press-line { margin-top: 52px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.15); font-family: 'Inter', sans-serif; font-size: 14px; color: var(--bg); opacity: 0.65; }

/* Body */
.cs-body { max-width: 800px; margin: 0 auto; padding: clamp(56px,9vw,96px) clamp(20px,5vw,40px) 0; }
.cs-section { margin-bottom: 64px; }
.section-label { font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 20px; }
.section-label.mb24 { margin-bottom: 24px; }
.section-label.mb28 { margin-bottom: 28px; }
.section-label.mb32 { margin-bottom: 32px; }
.body-prose { font-size: 21px; line-height: 1.65; color: var(--ink); margin: 0; }
.body-prose.mb20 { margin-bottom: 20px; }
.body-prose.mb24 { margin-bottom: 24px; }
.body-prose.mb32 { margin-bottom: 32px; }
.body-sub { font-size: 19px; line-height: 1.65; color: var(--ink); margin: 0 0 12px; }
.inter-note { font-family: 'Inter', sans-serif; font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 24px; }

.bullet-list { display: flex; flex-direction: column; gap: 22px; }
.bullet-list.tight { gap: 10px; }
.bullet-list.mid { gap: 14px; }
.bullet-item { display: flex; gap: 18px; }
.bullet-item.tight { gap: 12px; }
.bullet-dash { color: var(--accent); font-family: 'Inter', sans-serif; padding-top: 2px; }
.bullet-item p { font-size: 19px; line-height: 1.6; color: var(--ink); margin: 0; }
.bullet-item p.inter { font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin: 0; font-family: 'Inter', sans-serif; }

.image-frame { width: 100%; border-radius: 4px; overflow: hidden; border: 1px solid var(--hairline); }
.image-frame img { width: 100%; height: auto; display: block; }
.image-caption { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--ink-faint); margin: 10px 0 0; }
.image-caption.center { text-align: center; }

.category-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.category-pill { font-family: 'Inter', sans-serif; font-size: 14px; padding: 7px 14px; border-radius: 100px; border: 1px solid var(--hairline); color: var(--ink-soft); }
.category-pill.is-new { border-color: var(--accent); color: var(--accent); font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2.gap24 { gap: 24px; }

.compare-box { border: 1px solid var(--hairline); border-radius: 4px; padding: 28px 32px; }
.compare-label { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; margin: 0 0 10px; }
.compare-label.old { color: var(--ink-faint); }
.compare-label.new { color: var(--accent); }
.compare-quote { font-size: 18px; line-height: 1.4; margin: 0 0 8px; font-weight: 500; }
.compare-quote.old { color: var(--ink-faint); }
.compare-quote.new { color: var(--ink); }
.compare-note { font-size: 14px; line-height: 1.5; margin: 0; font-family: 'Inter', sans-serif; }
.compare-note.old { color: var(--ink-faint); }
.compare-note.new { color: var(--ink-soft); }

.props-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 32px 40px; }
.props-grid.two-col { grid-template-columns: 1fr 1fr; gap: 32px 40px; }
.prop-title { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.prop-text { font-size: 17px; line-height: 1.55; color: var(--ink-soft); margin: 0; }

.screen-group { margin-bottom: 56px; }
.screen-group-title { font-size: 19px; color: var(--ink); margin: 0 0 8px; font-weight: 600; }
.screen-group-caption { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 24px; font-family: 'Inter', sans-serif; }
.screen-row { display: flex; gap: 20px; flex-wrap: wrap; }
.screen-tile { width: 220px; }
.screen-phone { width: 100%; aspect-ratio: 9/19.5; border-radius: 18px; overflow: hidden; background: var(--accent-soft); }
.screen-phone img { width: 100%; height: 100%; object-fit: cover; }
.screen-label { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--ink-faint); text-align: center; margin: 10px 0 0; }

.value-props-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; }
.value-prop-frame { border-radius: 4px; overflow: hidden; border: 1px solid var(--hairline); }

.rollout-section {
  margin-bottom: 64px; width: 100vw; position: relative; left: 50%; transform: translateX(-50%);
  max-width: 1600px; padding: 0 40px; box-sizing: border-box;
}
.rollout-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px; align-items: start; }
.rollout-n { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--ink-faint); font-weight: 600; margin: 0 0 10px; }
.rollout-text { font-size: 15px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 16px; font-family: 'Inter', sans-serif; min-height: 90px; }
.rollout-img { width: 100%; min-width: 0; aspect-ratio: 204/423; border-radius: 4px; overflow: hidden; }
.rollout-img img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .grid-2, .props-grid, .rollout-grid { grid-template-columns: 1fr; }
}

/* Footer nav */
.cs-footer { border-top: 1px solid var(--hairline); padding: 40px clamp(20px,5vw,40px); }
.cs-footer-inner {
  max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-family: 'Inter', sans-serif; font-size: 14px; color: var(--ink-faint);
}
.cs-footer-inner a { color: var(--accent); text-decoration: none; font-weight: 500; }
