/* ── Tokens ─────────────────────────────────────────── */
:root {
  --bg: #f5f2ec;
  --surface: #fffdf9;
  --ink: #1b1719;
  --muted: #6b6266;
  --line: #e2dcd3;
  --accent: #714b67;        /* Odoo plum */
  --accent-ink: #ffffff;
  --accent-soft: #efe5ec;
  --spark: #c9930f;
  --sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141113;
    --surface: #1d191c;
    --ink: #efe9e6;
    --muted: #a59a9f;
    --line: #332c30;
    --accent: #c99bbd;
    --accent-ink: #1b1218;
    --accent-soft: #2b2129;
    --spark: #e6b93a;
    color-scheme: dark;
  }
}

/* ── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(1120px, 100% - 80px); } }

.skip { position: absolute; left: 16px; top: -60px; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

.eyebrow, .kicker, .when, .case-meta, .stats dt, .path h3, .toolkit dt {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ── Header ─────────────────────────────────────────── */
.top { display: flex; justify-content: space-between; align-items: center; padding-block: 22px; }
.mark { font-weight: 700; font-size: 20px; letter-spacing: -0.03em; text-decoration: none; }
.mark span { color: var(--spark); }
.top nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding-block: clamp(48px, 10vw, 120px) 0; }
.hero h1 {
  margin-top: 22px;
  max-width: 16ch;
  font-size: clamp(42px, 7.4vw, 96px);
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 28px; max-width: 48ch; font-size: clamp(18px, 2vw, 21px); color: var(--muted); text-wrap: pretty; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 550; font-size: 16px; text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.btn:hover { color: var(--ink); border-color: var(--ink); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: clamp(56px, 9vw, 96px) 0 0;
  border-block: 1px solid var(--line);
}
.stats div { padding: 22px 20px 24px 0; }
.stats div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.stats dd { margin: 8px 0 0; font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.stats .stat-now dd { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.15; color: var(--accent); padding-top: 4px; }

/* ── Sections ───────────────────────────────────────── */
.section { padding-block: clamp(72px, 11vw, 130px) 0; }
.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end;
  margin-bottom: 36px;
}
.section-head h2, .about h2 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.03em; }
.section-head p { color: var(--muted); max-width: 46ch; justify-self: end; font-size: 16px; }

/* ── Work cases ─────────────────────────────────────── */
.case {
  display: flex; flex-direction: column;
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.case-meta .when { margin-left: auto; }
.tag {
  padding: 3px 9px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent); font-weight: 500;
}
.client { margin-top: 26px; font-size: 14.5px; color: var(--muted); }
.case h3 { margin-top: 6px; font-size: clamp(21px, 2.2vw, 26px); text-wrap: balance; }
.case ul { margin: 18px 0 0; padding: 0; list-style: none; }
.case li {
  position: relative; padding-left: 18px; margin-top: 10px;
  font-size: 15.5px; line-height: 1.55; color: var(--muted); text-wrap: pretty;
}
.case li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent); opacity: .7;
}

.featured { margin-bottom: 12px; padding: clamp(26px, 3.6vw, 48px); }
.featured .case-body { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 64px); }
.featured h3 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.03em; }
.featured .summary { margin-top: 16px; color: var(--muted); font-size: 17px; text-wrap: pretty; }
.featured ul { margin-top: 26px; }
.featured li { font-size: 16px; color: var(--ink); }

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ── Side project ───────────────────────────────────── */
.projects { display: grid; gap: 12px; }
.project {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px clamp(24px, 5vw, 64px); align-items: start;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.project h4 { font-size: clamp(26px, 3vw, 34px); margin-top: 12px; }
.project > p, .project-body > p { color: var(--muted); font-size: 17px; text-wrap: pretty; }
.project-body > .project-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-family: var(--mono); font-size: 13.5px; }
.project-links a { color: var(--accent); }

/* ── About ──────────────────────────────────────────── */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.about-text p { margin-top: 20px; font-size: clamp(18px, 1.8vw, 20px); text-wrap: pretty; }
.about-text h2 + p { margin-top: 28px; }
.path h3 { font-weight: 400; margin-bottom: 12px; }
.path ol { list-style: none; margin: 0 0 48px; padding: 0; }
.path li {
  display: grid; grid-template-columns: 110px 1fr; column-gap: 16px;
  padding-block: 14px; border-top: 1px solid var(--line);
}
.path li .when { grid-row: span 2; padding-top: 3px; }
.path li b { font-weight: 600; }
.path li span:last-child { color: var(--muted); font-size: 15px; }
.toolkit { display: grid; grid-template-columns: 110px 1fr; margin: 0; }
.toolkit dt, .toolkit dd { padding-block: 12px; border-top: 1px solid var(--line); margin: 0; }
.toolkit dt { padding-top: 15px; }
.toolkit dd { padding-left: 16px; font-size: 16px; }

/* ── Contact ────────────────────────────────────────── */
.contact {
  margin-top: clamp(80px, 12vw, 150px);
  padding-block: clamp(64px, 10vw, 120px);
  background: var(--ink); color: var(--bg);
}
.contact .eyebrow { color: color-mix(in srgb, var(--bg) 60%, var(--ink)); }
.contact h2 { margin-top: 18px; max-width: 18ch; font-size: clamp(34px, 5.4vw, 64px); letter-spacing: -0.03em; text-wrap: balance; }
.email {
  display: inline-block; margin-top: 36px;
  font-size: clamp(20px, 3.6vw, 40px); font-weight: 500; letter-spacing: -0.02em;
  text-decoration-color: var(--spark); text-decoration-thickness: 2px; text-underline-offset: 8px;
  overflow-wrap: anywhere;
}
.email:hover { color: var(--spark); }
.links { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); text-decoration: none; font-size: 15px;
}
.links a:hover { color: var(--ink); background: var(--bg); }

.foot {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 28px; font-family: var(--mono); font-size: 12.5px; color: var(--muted);
}
.foot a { text-decoration: none; }

/* ── Tablet ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .cases { grid-template-columns: repeat(2, 1fr); }
  .featured .case-body, .about { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .featured .case-body { gap: 0; }
}

/* ── Phone ──────────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top nav a:nth-child(2) { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div, .stats div + div { padding: 18px 0; border-left: 0; }
  .stats div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cases, .project { grid-template-columns: 1fr; }
  .path li, .toolkit { grid-template-columns: 92px 1fr; }
}

/* ── Print ──────────────────────────────────────────── */
@media print {
  .top nav, .actions, .skip, .foot a { display: none; }
  .contact { background: none; color: inherit; }
  body { background: #fff; }
}
