:root {
  --paper: #f4f2ec;
  --sheet: #fbfaf7;
  --ink: #1b1a17;
  --muted: #55514a;
  --faint: #6f6a61;
  --rule: #e2ded5;
  --accent: #9a6a18;
  --serif: Newsreader, Georgia, "Times New Roman", serif;
  --sans: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 5.5vw, 80px);
  --shadow: 0 0 0 1px rgba(27, 26, 23, 0.08), 0 40px 90px rgba(60, 48, 24, 0.16);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0; }

.skip {
  position: absolute; left: 12px; top: -48px; padding: 10px 16px;
  background: var(--ink); color: var(--paper); border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: 1440px; margin: 0 auto; padding: 28px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -0.3px; }
.nav nav { display: flex; align-items: center; gap: 36px; }
.nav ul { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.nav ul a { text-decoration: none; color: var(--muted); }
.nav ul a:hover { color: var(--ink); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0 30px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 17px; font-weight: 500; text-decoration: none; transition: background 0.2s;
}
.button:hover { background: #3a3730; }
.button--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px #cfcac0; }
.button--ghost:hover { background: rgba(27, 26, 23, 0.05); }
.button--small { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* Hero */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px;
  max-width: 1440px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gutter) 0;
}
.eyebrow, .kicker { font-size: 13px; letter-spacing: 2.4px; text-transform: uppercase; }
.eyebrow { color: var(--faint); }
.kicker { color: var(--accent); }
.hero h1 {
  max-width: 1040px; font-size: clamp(48px, 7.2vw, 96px); line-height: 1.02; letter-spacing: -0.026em;
  text-wrap: balance;
}
.lede { max-width: 640px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 12px; }
.fine { font-size: 14px; color: var(--faint); }

/* Screenshots */
.shot { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--sheet); }
.shot--hero {
  max-width: 1200px; margin: clamp(56px, 7vw, 88px) auto 0; border-radius: 16px;
  width: calc(100% - 2 * var(--gutter));
  box-shadow: 0 0 0 1px rgba(27, 26, 23, 0.08), 0 60px 120px rgba(60, 48, 24, 0.18), 0 16px 36px rgba(60, 48, 24, 0.1);
}

/* Three features */
.trio {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 72px;
  max-width: 1440px; margin: 0 auto; padding: clamp(88px, 10vw, 140px) calc(var(--gutter) * 2) 0;
}
.trio > div { display: flex; flex-direction: column; gap: 14px; }
.numeral { font-family: var(--serif); font-size: 44px; line-height: 1; color: #b07a1c; }
.trio h3 { font-size: 28px; font-weight: 500; }
.trio p { color: var(--muted); }

/* Levels */
.levels {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px;
  max-width: 1440px; margin: 0 auto; padding: clamp(110px, 12vw, 170px) var(--gutter) 0;
}
.levels h2 { font-size: clamp(44px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.022em; }
.level-list {
  display: flex; align-items: flex-start; justify-content: center; gap: 28px;
  list-style: none; margin: 50px 0 0; padding: 0; text-align: left; width: 100%;
}
.level { display: flex; flex-direction: column; gap: 6px; flex: 0 1 340px; min-width: 0; }
.level__shot {
  aspect-ratio: 340 / 203; border-radius: 12px; overflow: hidden; background: var(--sheet); margin-bottom: 12px;
  box-shadow: 0 0 0 1px rgba(27, 26, 23, 0.08), 0 24px 50px rgba(60, 48, 24, 0.14);
}
.level__shot img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); transform-origin: var(--origin, 50% 50%); }
.level h3 { font-size: 28px; font-weight: 500; }
.level p:last-child { font-size: 16px; line-height: 1.55; color: var(--muted); }
.level__arrow {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 88px; flex: none;
  color: #8f897f; font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase;
}

/* Split sections */
.split {
  display: grid; grid-template-columns: minmax(0, 780fr) minmax(0, 480fr); align-items: center; gap: 72px;
  max-width: 1440px; margin: 0 auto; padding: clamp(110px, 11vw, 160px) var(--gutter) 0;
}
.split--flip { grid-template-columns: minmax(0, 480fr) minmax(0, 780fr); }
.split__text { display: flex; flex-direction: column; gap: 20px; }
.split h2 { font-size: clamp(38px, 3.9vw, 56px); line-height: 1.05; letter-spacing: -0.021em; text-wrap: balance; }
.split__text > p:last-child { font-size: 18px; color: var(--muted); }

.tree {
  margin: 0; padding: 40px 48px; overflow-x: auto; border-radius: 16px; background: var(--sheet);
  box-shadow: 0 0 0 1px rgba(27, 26, 23, 0.07), 0 30px 70px rgba(60, 48, 24, 0.1);
  font-family: var(--mono); font-size: 16px; line-height: 1.9; color: #3b3830;
}
.tree .dim { color: #857f75; }
.tree mark { background: #efe3c9; color: inherit; border-radius: 4px; padding: 2px 6px; margin-left: -6px; }

/* Closing */
.closing {
  display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center;
  max-width: 1440px; margin: 0 auto; padding: clamp(120px, 12vw, 160px) var(--gutter) clamp(100px, 10vw, 140px);
}
.closing img { width: 120px; height: 120px; }
.closing h2 { font-size: clamp(40px, 4.6vw, 64px); font-style: italic; letter-spacing: -0.02em; text-wrap: balance; }
.closing code { font-family: var(--mono); font-size: 15px; color: var(--muted); }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  max-width: 1440px; margin: 0 auto; padding: 40px var(--gutter);
  border-top: 1px solid var(--rule); font-size: 14px; color: var(--faint);
}

/* Tablet */
@media (max-width: 1080px) {
  .nav ul { display: none; }
  .trio { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-left: var(--gutter); padding-right: var(--gutter); max-width: 640px; }
  .level-list { flex-direction: column; align-items: center; gap: 12px; }
  .level { flex-basis: auto; width: 100%; max-width: 440px; }
  .level__arrow { padding-top: 0; flex-direction: row; }
  .level__arrow svg { transform: rotate(90deg); width: 32px; }
  .split, .split--flip { grid-template-columns: minmax(0, 1fr); gap: 36px; max-width: 760px; }
  .split--flip .split__text { order: 2; }
  #files .split__text { order: -1; }
}

/* Phone */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { padding-top: 20px; padding-bottom: 20px; }
  .actions { flex-direction: column; align-self: stretch; }
  .tree { padding: 24px; font-size: 13px; }
  .tree .dim { display: none; }
  .shot--hero { border-radius: 10px; }
}
