:root {
  color-scheme: light;
  --paper: #f6ede0;
  --light: #fff4df;
  --ink: #302219;
  --body: #534034;
  --line: #cab29d;
  --copper: #934521;
  --burnt: #38231a;
  --amber: #f4b572;
  --masthead-height: 66px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
  --mono: 'Consolas', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid #bb5d2d; outline-offset: 5px; }
.skip { position: absolute; inset: .6rem auto auto .6rem; z-index: 10; padding: .6rem 1rem; transform: translateY(-200%); background: var(--paper); }
.skip:focus { transform: none; }
.masthead, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 clamp(1rem, 4vw, 4rem); }
.masthead { min-height: var(--masthead-height); background: var(--paper); }
.masthead a, .footer a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .63rem; font-weight: 650; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; background: center / contain no-repeat url('assets/mark.svg'); }
.masthead nav { display: flex; align-items: center; gap: clamp(.65rem, 2.5vw, 2rem); font-size: .84rem; font-weight: 600; }
.masthead nav a { white-space: nowrap; }
.masthead nav a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.contact-link span { margin-inline-start: .21rem; color: var(--copper); }

.hero { position: relative; background: #261711; color: var(--light); }
.hero.is-enhanced { height: 165svh; }
.hero-stage {
  isolation: isolate;
  position: relative;
  height: calc(100svh - var(--masthead-height));
  max-height: 1040px;
  overflow: hidden;
  background: #261711;
  text-align: center;
  --frame-width: clamp(320px, 42vw, 530px);
  --frame-height: clamp(285px, 48svh, 470px);
  --frame-radius: 19px;
  --cover-alpha: .58;
  --light-alpha: 1;
  --light-shift: 0px;
  --shade-alpha: .54;
  --shade-shift: 0px;
  --split: 0px;
  --title-alpha: 1;
}
.hero.is-enhanced .hero-stage { position: sticky; top: 0; }
.hero-light, .hero-shade { position: absolute; inset: 0; pointer-events: none; }
.hero-light {
  opacity: var(--light-alpha);
  transform: translateY(var(--light-shift)) scale(1.04);
  background:
    radial-gradient(ellipse at 26% 22%, #805337 0, transparent 60%),
    radial-gradient(ellipse at 88% 94%, #603720 0, transparent 59%),
    linear-gradient(125deg, #42291d, #2c1a12 77%);
}
.hero-shade {
  z-index: 2;
  opacity: var(--shade-alpha);
  transform: translateY(var(--shade-shift));
  background: radial-gradient(ellipse at 53% 49%, #26130900 36%, #2414088f 90%);
}
.hero-frame {
  position: absolute;
  z-index: 1;
  top: 49%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: var(--frame-width);
  height: var(--frame-height);
  overflow: hidden;
  contain: layout;
  border: 1px solid #b68058;
  border-radius: var(--frame-radius);
  background: #3a2218;
  box-shadow: 0 24px 80px #130906a3;
}
.hero-frame img, .hero-frame video, .hero-frame::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-frame img, .hero-frame video { object-fit: cover; }
@media (max-width: 740px) {
  .hero-frame { background: linear-gradient(155deg, #4b2b1c, #291810 72%); }
  .hero-frame img, .hero-frame video { object-fit: contain; transform: scale(var(--media-crop, 1)); }
}
.hero-frame video { opacity: 0; }
.hero-frame video[data-playing] { opacity: 1; }
.hero-frame::after { content: ''; background: #211108; opacity: var(--cover-alpha); }
.hero-label, .hero-foot, .motion-toggle, .hero h1 { position: absolute; z-index: 3; }
.hero-label {
  top: 13%;
  inset-inline: 1rem;
  margin: 0;
  color: #ffd3a2;
  font: 600 .78rem/1.25 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.hero h1 {
  inset-inline: .4rem;
  top: 48%;
  transform: translateY(-50%);
  margin: 0;
  font: 400 clamp(3.05rem, 8.4vw, 8.4rem) / .96 var(--serif);
  letter-spacing: -.085em;
  opacity: var(--title-alpha);
  text-shadow: 0 4px 32px #200f0a;
  pointer-events: none;
}
.hero h1 span { display: block; }
.hero h1 span:first-child { transform: translateX(calc(-1 * var(--split))); }
.hero h1 span + span { transform: translateX(var(--split)); }
.hero h1 i { color: var(--amber); font-weight: 400; }
.hero-foot { bottom: 8%; inset-inline: 1rem; }
.hero-foot p { margin: 0 0 .9rem; color: var(--light); font-size: clamp(.86rem, 2vw, 1.02rem); letter-spacing: .03em; }
.hero-action, .closing-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .9em;
  border-radius: 20rem;
  padding: .6rem 1.04rem;
  font-weight: 650;
  font-size: .9rem;
  text-decoration: none;
}
.hero-action { border: 1px solid #c89369; background: #302019; color: var(--light); }
.hero-action:hover, .motion-toggle:hover { background: #69412a; }
.hero-action:focus-visible, .motion-toggle:focus-visible { outline-color: var(--amber); }
.hero-action span { color: var(--amber); }
.motion-toggle {
  right: 1.2rem;
  bottom: 1.1rem;
  padding: .3rem .7rem;
  border: 1px solid #9c7457;
  border-radius: 14rem;
  background: #302019;
  color: var(--light);
  cursor: pointer;
  font-size: .76rem;
}

.anchor-point { height: 0; }
.chapter {
  position: relative;
  --chapter-paper: #ecd6b9;
  --chapter-ink: #2e1c13;
  --chapter-body: #513628;
  --chapter-accent: #79401f;
  --world-x: 0px;
  --world-y: 0px;
  --film-x: 0px;
  --film-y: 0px;
  --film-scale: .92;
  --depth-x: 0px;
  --depth-y: 0px;
  --copy-y: 0px;
  --case-y: 0px;
  background: var(--chapter-paper);
  color: var(--chapter-ink);
}
.chapter.is-enhanced::after {
  content: '';
  display: block;
  height: clamp(7rem, 25svh, 15rem);
}
.chapter-stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: max(620px, 94svh);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .98fr);
  align-content: center;
  column-gap: clamp(2rem, 8vw, 8rem);
  row-gap: clamp(1.4rem, 3vh, 2.7rem);
  padding: clamp(3rem, 7vh, 5rem) max(6vw, calc((100vw - 1320px) / 2));
}
.chapter.is-enhanced .chapter-stage { position: sticky; top: 0; }
.chapter.is-expanded-content .chapter-stage { position: relative; }
.chapter.is-expanded-content::after { display: none; }
.chapter-world,
.chapter-depth { position: absolute; pointer-events: none; }
.chapter-world { z-index: -1; inset: -38px; transform: translate3d(var(--world-x), var(--world-y), 0); }
.chapter-depth { z-index: 2; transform: translate3d(var(--depth-x), var(--depth-y), 0); }
.chapter-media {
  z-index: 1;
  position: absolute;
  top: 12%;
  right: max(5%, calc((100% - 1380px) / 2));
  bottom: 12%;
  width: min(62%, 860px);
}
.chapter-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 17px;
  border: 1px solid #c18c63;
  transform: translate3d(var(--film-x), var(--film-y), 0) scale(var(--film-scale));
  background: #42281a;
  box-shadow: 0 35px 72px #38201461;
}
.chapter-frame > img, .chapter-frame > video, .chapter-frame::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.chapter-frame > img, .chapter-frame > video { object-fit: cover; }
.chapter-frame > video { opacity: 0; }
.chapter-frame > video[data-playing] { opacity: 1; }
.chapter-frame::after {
  content: '';
  pointer-events: none;
  box-shadow: inset 0 0 75px #21100544;
}
.chapter-media .motion-toggle { z-index: 3; bottom: 1.25rem; right: 1.25rem; }
.chapter-intro, .case { position: relative; z-index: 3; min-width: 0; }
.chapter-intro { grid-column: 1; transform: translate3d(0, var(--copy-y), 0); }
.chapter-intro::before {
  content: '';
  z-index: -1;
  position: absolute;
  pointer-events: none;
}
.chapter .eyebrow {
  color: var(--chapter-accent);
  font: 650 .76rem/1.35 var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.chapter h2 {
  max-width: 13ch;
  margin: 0;
  color: var(--chapter-ink);
  font: 400 clamp(2.7rem, 5.1vw, 5.15rem)/.98 var(--serif);
  letter-spacing: -.075em;
  text-wrap: balance;
}
.intro-text {
  color: var(--chapter-body);
  max-width: 49ch;
  margin: 1.15rem 0 0;
  font-size: clamp(1rem, 1.37vw, 1.14rem);
  line-height: 1.58;
}
.case-caption {
  margin: 0 0 .55rem;
  color: var(--chapter-accent);
  font: 600 .73rem/1.55 var(--mono);
}
.case { transform: translate3d(0, var(--case-y), 0); }

.chapter--marketing .chapter-world {
  background:
    radial-gradient(ellipse at 23% 28%, #fff1d9 0, #f2dfc3 26%, transparent 58%),
    linear-gradient(124deg, #d4a77f 2%, #e8c8a6 49%, #af7853);
}
.chapter--marketing .chapter-intro::before {
  inset: -2.3rem -4.5rem -2.3rem -2.4rem;
  background: radial-gradient(ellipse at 33% 43%, #f6e6cf 39%, #f2dfc3a6 56%, #f2dfc300 74%);
}
.chapter--marketing .chapter-frame { transform-origin: right center; }
.chapter--marketing .chapter-depth {
  left: 42%;
  top: 70%;
  width: 71%;
  height: 118px;
  rotate: -6deg;
  transform-origin: left center;
  background: linear-gradient(110deg, #83503000 3%, #b7865d76 54%, #ecd4aa9e);
  clip-path: polygon(0 41%, 100% 0, 100% 44%, 0 100%);
}
.case--paper {
  justify-self: start;
  grid-column: 1;
  width: min(100%, 31rem);
  padding: 1rem 1.05rem .18rem;
  background: linear-gradient(122deg, #fbefdb, #f3e0c9 96%);
  border-top: 2px solid #b57751;
  box-shadow: 0 16px 36px #492c2129;
}
.case--paper details + details { border-top: 1px solid #cab29d; }
.case--paper summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 54px; font-weight: 650; cursor: pointer; }
.case--paper summary::marker { content: ''; }
.case--paper summary::-webkit-details-marker { display: none; }
.case--paper summary span { flex: 0 0 auto; width: .55rem; height: .55rem; border: 1px solid var(--copper); border-inline-start: 0; border-top: 0; transform: rotate(45deg); margin-inline: .4rem; }
.case--paper details[open] summary span { transform: rotate(225deg); }
.case--paper details p { color: var(--body); margin: 0 1rem 1rem 0; }

.chapter--coding {
  --chapter-paper: #2b1912;
  --chapter-ink: #fff0d8;
  --chapter-body: #f1d7bf;
  --chapter-accent: #ffc094;
}
.chapter--coding .chapter-world {
  background:
    radial-gradient(ellipse at 17% 35%, #785036 0, transparent 62%),
    radial-gradient(ellipse at 85% 90%, #3b291c 0, transparent 58%),
    linear-gradient(111deg, #43291c, #281810 72%);
}
.chapter--coding .chapter-stage { row-gap: clamp(2rem, 7vh, 5rem); }
.chapter--coding .chapter-media { left: max(5%, calc((100% - 1380px) / 2)); right: auto; top: 6%; bottom: 21%; }
.chapter--coding .chapter-frame { transform-origin: left 56%; border-color: #9d6b4a; }
.chapter--coding .chapter-frame::after { background: linear-gradient(to right, transparent 63%, #26160eb0 100%); }
.chapter--coding .motion-toggle { left: 1.25rem; right: auto; }
.chapter--coding .chapter-intro { grid-column: 2; justify-self: end; width: min(100%, 33.5rem); }
.chapter--coding .chapter-intro::before {
  inset: -2rem -2rem -2rem -7rem;
  background: radial-gradient(ellipse at 61% 49%, #2d1c15 26%, #2d1c15ed 48%, #2d1c1500 75%);
}
.chapter--coding .chapter-depth {
  top: 11%;
  left: 11%;
  width: 36%;
  height: 75%;
  border: 1px solid #dea97c4a;
  border-inline-end-color: transparent;
  rotate: -6deg;
}
.case--dark {
  grid-column: 1 / -1;
  align-self: end;
  margin-left: clamp(1rem, 13vw, 13rem);
  padding: .9rem clamp(.9rem, 2.6vw, 2.25rem) 1rem;
  color: var(--chapter-ink);
  background: linear-gradient(100deg, #382218ed, #312017);
  border-top: 1px solid #bc7e53;
  box-shadow: 0 22px 63px #180d08a1;
}
.build-steps { margin: 0; }
.build-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.8rem); }
.build-steps div { padding-top: .65rem; border-top: 1px solid #795942; }
.build-steps dt { color: #f5c08a; font: 600 .77rem/1.6 var(--mono); }
.build-steps dd { margin: .25rem 0 0; font-size: .94rem; line-height: 1.48; }

.chapter--pilot {
  --chapter-paper: #d2a781;
  --chapter-ink: #321b11;
  --chapter-body: #513628;
  --chapter-accent: #783b20;
}
.chapter--pilot.is-enhanced::after { height: clamp(6rem, 21svh, 11rem); }
.chapter--pilot .chapter-stage { align-content: end; }
.chapter--pilot .chapter-world {
  background:
    radial-gradient(ellipse at 62% 24%, #ffe1b8 0%, transparent 54%),
    linear-gradient(155deg, #86543c 7%, #c68f67 52%, #deba93 94%);
}
.chapter--pilot .chapter-media { left: 4%; right: 4%; top: 8%; width: auto; bottom: 11%; }
.chapter--pilot .chapter-frame { transform-origin: 56% top; }
.chapter--pilot .motion-toggle { top: 1.4rem; bottom: auto; }
.chapter--pilot .chapter-depth {
  height: 6rem;
  width: 65%;
  left: -9%;
  bottom: 11%;
  rotate: 7deg;
  background: linear-gradient(104deg, #39231999, #b28052b0 47%, #f0c88c0d);
}
.chapter--pilot .closing {
  grid-column: 2;
  justify-self: end;
  width: min(100%, 32rem);
  margin-right: -.5rem;
  padding: clamp(1.2rem, 3vw, 2.6rem);
  background: linear-gradient(121deg, #fff2db, #e8c29d);
  border-inline-start: 2px solid #a9633d;
  box-shadow: 0 22px 54px #42251766;
}
.closing h2 { max-width: 15ch; font-size: clamp(2.55rem, 4.7vw, 4.8rem); }
.closing-action {
  margin-top: 1.45rem;
  background: #873917;
  color: #fff4e1;
  padding: .72rem 1.15rem;
}
.closing-action:hover { background: #6e2b12; }
.footer { min-height: 85px; font-size: .85rem; }

@media (max-width: 740px) {
  :root { --masthead-height: 59px; }
  .hero.is-enhanced { height: 147svh; }
  .hero-stage { --frame-width: min(61vw, 410px); --frame-height: 47svh; }
  .hero-label { top: 14%; font-size: .68rem; }
  .hero h1 { font-size: clamp(2.4rem, 9.3vw, 4.25rem); letter-spacing: -.075em; }
  .hero-foot { bottom: 10%; }
  .hero-foot p { margin-bottom: .65rem; }
  .motion-toggle { bottom: .45rem; right: .67rem; }
  .chapter.is-enhanced::after { display: none; }
  .chapter.is-enhanced .chapter-stage { position: relative; }
  .chapter-stage,
  .chapter--coding .chapter-stage {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    row-gap: 1.25rem;
    padding: 1.55rem 1.1rem 3rem;
  }
  .chapter .chapter-media {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(15rem, 67vw, 29rem);
  }
  .chapter-frame { border-radius: 7px; }
  .chapter-frame img, .chapter-frame video { object-fit: contain; }
  .chapter--coding .chapter-frame { background: #26251d; }
  .chapter--pilot .chapter-frame { background: #50301d; }
  .chapter .motion-toggle { top: .57rem; right: .52rem; left: auto; bottom: auto; }
  .chapter .chapter-intro { grid-column: 1; max-width: 31rem; width: 100%; }
  .chapter .chapter-intro::before { inset: -1rem; }
  .chapter h2 { max-width: 13ch; font-size: clamp(2.65rem, 10.1vw, 4.35rem); }
  .chapter-intro .intro-text { margin-top: .82rem; }
  .chapter--marketing .chapter-intro { margin-top: -2.7rem; margin-left: -.1rem; padding: .9rem 1rem 0; }
  .chapter--marketing .chapter-intro::before {
    inset: 0 0 -1rem;
    background: linear-gradient(168deg, #f3e0c8 31%, #f3e0c8e2 58%, #f3e0c804 100%);
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
  }
  .chapter--marketing .chapter-depth { left: 38%; top: 28%; height: 73px; }
  .chapter--marketing .case { width: 100%; }
  .chapter--coding .chapter-stage { padding-top: 2rem; }
  .chapter--coding .chapter-intro { padding: 0 .15rem; justify-self: start; }
  .chapter--coding .chapter-depth { left: 8%; top: 10%; width: 84%; height: 24%; }
  .chapter--coding .chapter-frame::after { background: linear-gradient(to top, #2d1c1560 5%, transparent 38%); }
  .case--dark { grid-column: 1; margin: 0; padding: .85rem .9rem 1rem; }
  .build-steps { grid-template-columns: 1fr; gap: .6rem; }
  .build-steps dd { font-size: .95rem; }
  .chapter--pilot .chapter-stage { padding-bottom: 2rem; }
  .chapter--pilot .chapter-media { height: clamp(15rem, 78vw, 29rem); }
  .chapter--pilot .closing { margin: -3.2rem 0 0 max(0px, 7vw); padding: 1.1rem 1.15rem 1.25rem; width: auto; }
  .chapter--pilot .closing::before { display: none; }
  .chapter--pilot .chapter-depth { bottom: 32%; left: -18%; }
}

@media (max-width: 365px) {
  .masthead { gap: .55rem; padding-inline: .7rem; }
  .masthead nav { gap: .5rem; font-size: .75rem; }
  .masthead .brand { font-size: .85rem; gap: .35rem; }
  .masthead .brand-mark { width: 1.05rem; height: 1.05rem; }
  .hero h1 { font-size: 2.2rem; }
  .chapter .chapter-stage { padding-inline: .8rem; }
  .chapter h2 { font-size: 2.55rem; }
  .chapter--pilot .closing { margin-left: 0; }
  .footer { gap: .6rem; padding-inline: .8rem; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero.is-enhanced { height: auto; }
  .hero.is-enhanced .hero-stage { position: relative; }
  .hero-stage { min-height: 520px; }
  .hero-frame { width: min(88vw, 940px); height: min(56vw, 55svh); }
  .chapter { --film-scale: 1; }
  .motion-toggle { display: none; }
}
