:root {
  --ink: #111111;
  --body: #444444;
  --muted: #6b6b6b;
  --faint: #8a8a8a;
  --rule: #d8d8d8;
  --ground: #ffffff;
  --well: #f4f4f4;
  --well-edge: #e2e2e2;
  --gutter: clamp(16px, 6.67vw, 96px);
  --typewriter: "American Typewriter", "AmericanTypewriter-Light", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  position: relative;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.display, .title, .title-sm, .title-lg, .job h3 { font-family: var(--typewriter); font-weight: 300; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 32px; }
.nav-mark { display: block; line-height: 0; }
.nav-links { display: flex; gap: 40px; }
.nav-links a { color: #5c5c5c; font-weight: 500; font-size: 16px; line-height: 20px; text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

/* Hero */
.hero { padding-top: 72px; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(46px, 6.67vw, 96px); line-height: 1.04; letter-spacing: -0.02em; max-width: 1000px; }
.hero-body { display: flex; flex-direction: column; gap: 36px; align-items: flex-start; }
.lede { color: var(--body); font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; max-width: 620px; }
.install-row { max-width: 100%; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.note { color: var(--muted); font-size: 15px; line-height: 18px; }

/* Command */
.cmd {
  display: inline-flex; align-items: center; gap: 20px;
  height: 56px; padding-left: 24px; padding-right: 10px;
  background: var(--ink); color: #fff; border-radius: 14px;
  font-family: var(--mono); font-size: 16px; line-height: 20px;
  max-width: 100%;
}
.cmd-prompt { color: var(--faint); }
.cmd-text { white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.cmd-text::-webkit-scrollbar { display: none; }
.cmd-copy {
  flex-shrink: 0; height: 36px; padding-inline: 16px; border: 0; border-radius: 9px;
  background: #2a2a2a; color: #fff; font-family: var(--sans); font-weight: 600; font-size: 14px;
  transition: background-color .2s;
}
.cmd-copy:hover { background: #3a3a3a; }
.cmd-copy.done { background: #fff; color: var(--ink); }
.cmd-copy:focus-visible, .nav-links a:focus-visible, .undo:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cmd .cmd-copy:focus-visible { outline-color: #fff; }

/* Demo window: one window, five jobs */
.demo-wrap { padding-top: 96px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo { position: relative; overflow: hidden; background: var(--well); border: 1px solid var(--well-edge); border-radius: 20px; }
.demo-bar { display: flex; align-items: center; gap: 8px; height: 48px; padding-inline: 20px; background: #ededed; }
.demo-bar i { width: 12px; height: 12px; border-radius: 6px; background: #d0d0d0; flex-shrink: 0; }
.demo-title { padding-left: 16px; color: var(--muted); font-size: 14px; white-space: nowrap; transition: opacity .2s; }
.demo-stage { position: relative; height: 432px; }
.scene { position: absolute; inset: 0; padding: 52px clamp(20px, 9.6vw, 120px) 32px; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s .4s; }
.scene.on { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.chip {
  position: absolute; top: 48px; right: clamp(20px, 4vw, 56px);
  display: grid; place-items: center; height: 32px; padding-inline: 16px; border-radius: 16px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px;
  opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s;
}
.chip.on { opacity: 1; transform: none; }

.note { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.demo-label { color: var(--faint); font-weight: 500; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.note-text { color: #222; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.55; }

.photo { position: relative; max-width: 760px; height: 300px; border-radius: 12px; overflow: hidden; background: #2b2d2b; }
.sky { position: absolute; inset: 0 0 34% 0; background: linear-gradient(#aeb7bf, #d9dde0); }
.sky-warm { position: absolute; inset: 0; background: linear-gradient(#3e3358 0%, #a2506a 42%, #ee8a4f 78%, #f7c47b 100%); opacity: 0; transition: opacity 1.2s ease; }
.sun { position: absolute; left: 64%; bottom: -22px; width: 54px; height: 54px; border-radius: 50%; background: #ffe2a8; box-shadow: 0 0 40px 12px rgba(255, 196, 120, .55); opacity: 0; transform: translateY(24px); transition: opacity 1s ease .3s, transform 1.4s cubic-bezier(.2,.7,.2,1) .3s; }
.land { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46%; }
.glint { opacity: .5; transition: stroke .9s ease; }
.photo.warm .sky-warm { opacity: 1; }
.photo.warm .sun { opacity: 1; transform: none; }
.photo.warm .glint { stroke: #f2a865; }

.sheet { max-width: 640px; background: #fff; border: 1px solid #dedede; border-radius: 10px; overflow: hidden; font-size: 16px; }
.fx { display: flex; align-items: center; gap: 14px; height: 38px; padding-inline: 14px; border-bottom: 1px solid #e6e6e6; color: var(--muted); }
.fx span { font-style: italic; font-family: Georgia, serif; }
.fx-text { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.sheet-grid { display: grid; grid-template-columns: 1fr 160px; }
.col { display: flex; flex-direction: column; }
.col > span, .vals span { display: flex; align-items: center; height: 36px; padding-inline: 14px; border-bottom: 1px solid #efefef; }
.col-cost { border-left: 1px solid #efefef; }
.col-cost span { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.vals { display: flex; flex-direction: column; }
.head { color: var(--faint); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; background: #fafafa; }
.total { border-bottom: 0 !important; background: #f6f6f6; font-weight: 600; opacity: 0; transition: opacity .4s; }
.sheet.done .total { opacity: 1; }

.site { max-width: 640px; background: #fff; border: 1px solid #dedede; border-radius: 10px; padding: 36px 40px 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.site-kicker { color: var(--faint); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.site-head { font-family: var(--typewriter); font-weight: 300; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; }
.site-sub { color: var(--body); font-size: 16px; line-height: 24px; margin-bottom: 14px; }
.site-cta { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; transition: padding .6s cubic-bezier(.2,.8,.2,1.15), font-size .6s cubic-bezier(.2,.8,.2,1.15); }
.site.big .site-cta { padding: 15px 30px; font-size: 18px; }

.article-head { font-family: var(--typewriter); font-weight: 300; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; margin-bottom: 18px; }
.article { max-width: 720px; color: #222; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.6; }
.term { white-space: nowrap; }
.answer {
  position: absolute; display: flex; flex-direction: column; gap: 6px; width: min(520px, calc(100% - 32px)); padding: 18px 22px;
  background: #fff; border: 1px solid #dadada; border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  font-size: 16px; line-height: 24px; color: var(--body);
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s cubic-bezier(.2,.7,.2,1);
}
.answer b { color: var(--ink); font-weight: 600; }
.answer.on { opacity: 1; transform: none; }

.prompt {
  position: absolute; left: 0; top: 0; z-index: 22;
  display: flex; align-items: center; gap: 16px; width: min(560px, calc(100% - 32px)); min-height: 72px; padding: 12px 22px;
  background: #fff; border: 1px solid #dadada; border-radius: 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .35s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.prompt.on { opacity: 1; transform: none; }
.prompt img { flex-shrink: 0; }
.prompt-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prompt-meta { color: #7a7a7a; font-family: var(--mono); font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt-text { font-size: 19px; line-height: 24px; min-height: 24px; }
.prompt-text.typing::after { content: ""; display: inline-block; width: 1px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--ink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Reduce Motion: job one, settled */
.still .prompt { opacity: 1; transform: none; left: clamp(20px, 20vw, 260px); top: 260px; }
.still .scene-note .chip { opacity: 1; transform: none; }

/* Steps */
.how { padding-top: 160px; display: flex; flex-direction: column; gap: 64px; }
.title { font-size: clamp(38px, 3.9vw, 56px); line-height: 1.14; letter-spacing: -0.01em; max-width: 900px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 64px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.step-num { font-size: 64px; line-height: 64px; }
.rule { display: block; height: 1px; background: var(--rule); transform-origin: left; }
.step h3 { font-weight: 600; font-size: 22px; line-height: 28px; }
.step p, .job p, .open-points p { color: var(--body); font-size: 18px; line-height: 28px; }

/* Jobs */
.what { padding-top: 160px; display: flex; flex-direction: column; gap: 56px; }
.jobs { border-bottom: 1px solid var(--rule); }
.job { display: grid; grid-template-columns: 420px minmax(0, 560px); gap: 64px; align-items: baseline; padding-block: 28px; border-top: 1px solid var(--rule); }
.job h3 { font-size: 32px; line-height: 40px; }

/* Open */
.open { padding-top: 180px; }
.open-grid { display: grid; grid-template-columns: 420px minmax(0, 560px); gap: 64px; padding-bottom: 100px; border-bottom: 1px solid var(--rule); }
.title-sm { font-size: 40px; line-height: 48px; }
.open-points { display: flex; flex-direction: column; gap: 32px; }
.open-points div { display: flex; flex-direction: column; gap: 6px; }
.open-points h3 { font-weight: 600; font-size: 20px; line-height: 28px; }

/* Get */
.get { padding-top: 52px; display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.get-head { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.title-lg { font-size: clamp(42px, 4.45vw, 64px); line-height: 1.12; letter-spacing: -0.01em; }
.get-head p { color: var(--body); font-size: 20px; line-height: 30px; max-width: 520px; }
.get-alt { color: var(--muted); font-size: 15px; line-height: 22px; }

/* Footer */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 120px; padding-bottom: 48px; color: var(--muted); font-size: 14px; line-height: 18px; }
.foot a, .get-alt a, .open-points a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Marquees: dragged out, marching, then frayed to dust */
.mq { position: absolute; z-index: 20; pointer-events: none; overflow: visible; }
.mq rect { fill: none; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.mq .ink { stroke: var(--ink); stroke-dasharray: 5 5; animation: march .5s linear infinite; }
.mq .paper { stroke: #fff; stroke-dasharray: 5 5; stroke-dashoffset: 5; animation: march-b .5s linear infinite; }
.mq circle { fill: var(--ink); }
@keyframes march { to { stroke-dashoffset: -10; } }
@keyframes march-b { to { stroke-dashoffset: -5; } }
.cursor { position: absolute; z-index: 21; width: 14px; height: 20px; pointer-events: none; margin: -2px 0 0 -2px; }

/* Content waiting for its loop */
.motion .pending { opacity: 0; transform: translateY(8px); }
.motion .filling { transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.motion .rule.pending { opacity: 1; transform: scaleX(0); }
.motion .rule.filling { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.motion .ch { opacity: 0; }
.motion .ch.on { opacity: 1; }
.motion .job.waiting { opacity: .28; transform: none; }
.motion .job { transition: opacity .45s ease; }

/* Phone and tablet */
@media (max-width: 1100px) {
  .job, .open-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 40px; }
}
@media (max-width: 800px) {
  .nav { padding-block: 24px; }
  .nav-links { gap: 20px; }
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding-top: 40px; gap: 24px; }
  .hero-body { gap: 28px; }
  .demo-wrap { padding-top: 64px; }
  .demo-stage { height: 440px; }
  .scene { padding-top: 60px; }
  .chip { top: 14px; }
  .photo { height: 220px; }
  .sheet-grid { grid-template-columns: 1fr 112px; }
  .col > span, .vals span { padding-inline: 10px; font-size: 15px; }
  .site { padding: 24px; }
  .prompt { padding: 10px 14px; gap: 12px; min-height: 60px; }
  .still .prompt { left: 16px; top: auto; bottom: 16px; }
  .prompt img { width: 32px; height: auto; }
  .prompt-text { font-size: 16px; line-height: 21px; }
  .how, .what { padding-top: 104px; gap: 44px; }
  .steps { grid-template-columns: 1fr; gap: 44px; }
  .job, .open-grid { grid-template-columns: 1fr; gap: 10px; }
  .job h3 { font-size: 28px; line-height: 34px; }
  .open { padding-top: 120px; }
  .open-grid { gap: 28px; padding-bottom: 72px; }
  .get-head p br { display: none; }
  .foot { padding-top: 88px; flex-direction: column; }
}
@media (max-width: 520px) {
  .cmd { gap: 12px; padding-left: 16px; font-size: 14px; }
  .install-row, .install-row .cmd, .cmd-final { width: 100%; }
  .cmd-text { flex: 1; min-width: 0; }
}
