:root {
  --paper: #f0e8e0;
  --paper-deep: #e4d8cb;
  --sheet: #fbf7f2;
  --ink: #382848;
  --ink-deep: #261b33;
  --mint: #5df9ca;
  --mint-soft: #c6f7e6;
  --wall: 10px;
  --inner-wall: 6px;
  --radius: 18px;
  --gutter: clamp(16px, 5vw, 72px);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--mint); }

h1, h2, h3 { margin: 0; font-stretch: 125%; color: inherit; }
h1 { font-size: clamp(2.5rem, 6.2vw, 5.6rem); font-weight: 780; line-height: 0.98; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 760; line-height: 1.02; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; font-weight: 720; line-height: 1.2; font-stretch: 112%; }
p { margin: 0; max-width: 60ch; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons: a mint door in an ink frame */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border: 3px solid var(--ink); border-radius: 12px;
  background: var(--mint); color: var(--ink);
  font: 680 1rem/1 var(--font); font-stretch: 112%;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.on-dark .btn { border-color: var(--mint); }
.on-dark .btn:hover { box-shadow: 4px 4px 0 var(--mint); }
.link { font-weight: 620; text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter);
  transition: background-color .25s ease, box-shadow .25s ease, padding .25s ease;
}
.site-header.solid { background: rgba(240, 232, 224, .94); box-shadow: 0 3px 0 var(--ink); padding-block: 10px; }
@supports (backdrop-filter: blur(8px)) { .site-header.solid { background: rgba(240, 232, 224, .82); backdrop-filter: blur(10px); } }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 44px; height: auto; }
.wordmark { font-size: .82rem; font-weight: 720; font-stretch: 125%; letter-spacing: .3em; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 600; font-stretch: 108%; }
.site-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.site-nav .btn { padding: 10px 16px; font-size: .92rem; }

/* The scroll story */
.story { position: relative; height: 640vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-copy {
  position: absolute; z-index: 2;
  left: var(--gutter); top: clamp(96px, 17vh, 180px);
  max-width: 36rem;
  will-change: opacity, transform;
}
.hero-copy p { margin-top: 22px; font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.hero-copy::before {
  content: ""; position: absolute; inset: -60px -80px -60px -120px; z-index: -1;
  background: radial-gradient(closest-side, rgba(240, 232, 224, .92), rgba(240, 232, 224, 0));
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2;
  font-size: .9rem; font-weight: 600; font-stretch: 108%;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue i { width: 3px; height: 34px; background: var(--ink); border-radius: 3px; position: relative; overflow: hidden; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; right: 0; top: -40%; height: 40%; background: var(--mint);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { to { top: 100%; } }

/* Title block: the caption for each step, drawn like a sheet's title block */
.titleblock {
  position: absolute; z-index: 3; left: var(--gutter); bottom: clamp(20px, 6vh, 56px);
  width: min(31rem, calc(100vw - 2 * var(--gutter) - 48px));
  list-style: none; margin: 0; padding: 0;
}
.titleblock li {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 4.6rem 1fr;
  border: 4px solid var(--ink); border-radius: 16px; overflow: hidden;
  background: var(--sheet);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.titleblock li.active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.titleblock .num {
  display: grid; place-items: center; align-content: center; gap: 2px;
  background: var(--mint); border-right: 4px solid var(--ink);
  font-size: 2.4rem; font-weight: 800; font-stretch: 125%; line-height: 1;
}
.titleblock .num small { font-size: .72rem; font-weight: 600; font-stretch: 100%; }
.titleblock .body { padding: 14px 18px 16px; }
.titleblock p { margin-top: 6px; font-size: .98rem; line-height: 1.5; }

.rail {
  position: absolute; z-index: 3; right: var(--gutter); top: 50%; transform: translateY(-50%);
  height: min(46vh, 380px); width: 24px; list-style: none; margin: 0; padding: 0;
}
.rail::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 6px; border-radius: 6px; background: var(--ink); }
.rail li {
  position: absolute; left: 0; width: 24px; height: 16px; transform: translateY(-50%);
  border-radius: 3px; background: var(--paper);
  border: 3px solid var(--ink);
  transition: background-color .3s ease;
}
.rail li::after {
  content: ""; position: absolute; inset: 2px 3px;
  background: linear-gradient(var(--ink) 0 2px, transparent 2px) 0 50% / 100% 4px repeat-y;
  opacity: .35;
}
.rail li.done { background: var(--mint); }
.rail li.done::after { opacity: .9; }
.rail li:nth-child(1) { top: 0%; } .rail li:nth-child(2) { top: 25%; } .rail li:nth-child(3) { top: 50%; }
.rail li:nth-child(4) { top: 75%; } .rail li:nth-child(5) { top: 100%; }

.wipe-tags {
  position: absolute; z-index: 2; top: clamp(86px, 13vh, 130px); left: 0; right: 0;
  pointer-events: none; opacity: 0; transition: opacity .3s ease;
}
.wipe-tags.on { opacity: 1; }
.wipe-tags span {
  position: absolute; padding: 6px 12px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  font-size: .85rem; font-weight: 650; font-stretch: 110%; white-space: nowrap;
}
.wipe-tags .left { right: calc(100% - var(--wx, 50%) + 14px); }
.wipe-tags .right { left: calc(var(--wx, 50%) + 14px); background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); }

/* Sections */
.section { padding: clamp(80px, 14vh, 160px) var(--gutter); }
.section-head { display: grid; gap: 18px; max-width: 46rem; margin-bottom: clamp(40px, 7vh, 72px); }
.section-head p { font-size: 1.15rem; }

/* Features as rooms in a floor plan */
.plan {
  position: relative;
  display: grid; gap: var(--inner-wall);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "a a a b b b"
    "a a a c c c"
    "d d e e f f";
  background: var(--ink);
  border: var(--wall) solid var(--ink); border-radius: calc(var(--radius) + 10px);
}
.room { position: relative; background: var(--paper); padding: clamp(22px, 3vw, 40px); display: grid; align-content: start; gap: 12px; }
.room:nth-child(1) { grid-area: a; border-radius: var(--radius) 0 0 0; }
.room:nth-child(2) { grid-area: b; border-radius: 0 var(--radius) 0 0; }
.room:nth-child(3) { grid-area: c; }
.room:nth-child(4) { grid-area: d; border-radius: 0 0 0 var(--radius); }
.room:nth-child(5) { grid-area: e; }
.room:nth-child(6) { grid-area: f; border-radius: 0 0 var(--radius) 0; }
.room img { border-radius: 10px; border: 3px solid var(--ink); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; margin-bottom: 8px; }
.room h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); }
.room-tag { font-size: .85rem; font-weight: 600; font-stretch: 108%; opacity: .7; }
/* Openings in the inner walls, like the doorways in the logo */
.room.gap-r::after, .room.gap-b::after { content: ""; position: absolute; background: var(--paper); }
.room.gap-r::after { right: calc(-1 * var(--inner-wall)); top: 38%; width: var(--inner-wall); height: 64px; }
.room.gap-b::after { bottom: calc(-1 * var(--inner-wall)); left: 30%; height: var(--inner-wall); width: 64px; }
/* Windows on the outer wall: three mint lines */
.win { position: absolute; background: linear-gradient(var(--mint) 0 0) center / 100% 2px no-repeat, linear-gradient(var(--mint) 0 0) top / 100% 2px no-repeat, linear-gradient(var(--mint) 0 0) bottom / 100% 2px no-repeat; }
.win.h { height: var(--wall); width: 84px; top: calc(-1 * var(--wall)); }
.win.h.bottom { top: auto; bottom: calc(-1 * var(--wall)); }
.win.v { width: var(--wall); height: 84px; right: calc(-1 * var(--wall)); background: linear-gradient(90deg, var(--mint) 0 2px, transparent 2px calc(50% - 1px), var(--mint) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px) calc(100% - 2px), var(--mint) calc(100% - 2px)); }
.door {
  position: absolute; bottom: calc(-1 * var(--wall)); width: 64px; height: 64px;
  background: var(--mint); border-radius: 0 100% 0 0; border-left: 4px solid var(--ink);
  box-shadow: inset 0 calc(-1 * var(--wall)) 0 var(--mint);
}
.note { margin-top: 28px; font-size: .95rem; }

/* Models schedule */
.models { background: var(--mint); }
.schedule { width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.schedule th, .schedule td { text-align: left; vertical-align: top; padding: 18px 16px 18px 0; border-bottom: 3px solid var(--ink); }
.schedule thead th { font-size: .9rem; font-weight: 650; font-stretch: 108%; border-bottom-width: 6px; padding-top: 0; }
.schedule td:first-child { font-weight: 760; font-stretch: 120%; font-size: 1.2rem; white-space: nowrap; width: 22%; }
.schedule td:nth-child(2) { width: 22%; }
.schedule tbody tr:last-child td { border-bottom: 0; }

/* Inside Claude */
.claude { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 22px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 52px; height: 52px;
  border: 3px solid var(--ink); border-radius: 12px; background: var(--mint);
  font-weight: 800; font-stretch: 125%; font-size: 1.3rem;
}
.steps h3 { margin-top: 4px; }
.steps p { margin-top: 4px; }

.chat { border: 4px solid var(--ink); border-radius: 22px; background: var(--sheet); padding: clamp(18px, 2.6vw, 30px); display: grid; gap: 18px; }
.bubble { border-radius: 16px; padding: 14px 18px; max-width: 90%; }
.bubble.user { justify-self: end; background: var(--paper-deep); }
.bubble.reply { justify-self: start; border: 2px solid var(--ink); background: #fff; }
.bubble .who { font-size: .8rem; font-weight: 700; font-stretch: 110%; margin-bottom: 4px; display: block; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.thumbs figure { margin: 0; }
.thumbs img { border-radius: 8px; border: 2px solid var(--ink); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.thumbs figcaption { font-size: .78rem; font-weight: 600; margin-top: 4px; }
.fake-btn { display: inline-block; margin-top: 4px; padding: 8px 14px; border-radius: 9px; border: 2px solid var(--ink); background: var(--mint); font-weight: 680; font-size: .9rem; }

/* Closing */
.closing { background: var(--ink-deep); color: var(--paper); text-align: left; }
.closing h2 { color: var(--mint); max-width: 14ch; font-size: clamp(2.4rem, 6vw, 5.2rem); }
.closing p { margin: 24px 0 36px; font-size: 1.2rem; }
.site-footer { background: var(--ink-deep); color: var(--paper); padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; border-top: 2px solid rgba(240, 232, 224, .15); font-size: .92rem; }
.site-footer .brand { color: var(--paper); }
.site-footer a { color: var(--mint); }

/* Phones and small tablets */
@media (max-width: 860px) {
  .site-nav a:not(.btn) { display: none; }
  .brand .mark { width: 38px; }
  .wordmark { display: none; }
  .hero-copy { top: 92px; right: var(--gutter); }
  .hero-copy p { margin-top: 14px; }
  .hero-actions { margin-top: 20px; }
  .rail { display: none; }
  .titleblock { width: auto; right: var(--gutter); }
  .titleblock li { grid-template-columns: 3.6rem 1fr; }
  .titleblock .num { font-size: 1.9rem; }
  .scroll-cue { display: none; }
  .plan { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d" "e" "f"; }
  .room:nth-child(n) { border-radius: 0; }
  .room:nth-child(1) { border-radius: var(--radius) var(--radius) 0 0; }
  .room:nth-child(6) { border-radius: 0 0 var(--radius) var(--radius); }
  .room.gap-r::after { right: auto; left: 30%; top: auto; bottom: calc(-1 * var(--inner-wall)); width: 64px; height: var(--inner-wall); }
  .win.v { display: none; }
  .claude { grid-template-columns: 1fr; }
  .schedule thead { display: none; }
  .schedule tr { display: grid; gap: 4px; padding: 16px 0; border-bottom: 3px solid var(--ink); }
  .schedule tbody tr:last-child { border-bottom: 0; }
  .schedule td, .schedule td:first-child, .schedule td:nth-child(2) { width: auto; border: 0; padding: 0; white-space: normal; }
  .schedule td:nth-child(2) { font-size: .9rem; font-weight: 600; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .titleblock li, .rail li { transition: none; }
  .scroll-cue i::after { animation: none; top: 30%; }
}
