/* ArcSmith by McGill & Co.
   Colors and type follow the ArcSmith brand kit (edition one, September 2026):
   ebony, ivory and brushed brass; Bodoni Moda for display, Hanken Grotesk for the quiet work.
   Brass is jewelry: the marks, the drawing, one rule. Dark and cinematic is the primary identity. */

/* tools/fonts.mjs trims these to what the pages set: Bodoni at weight 400 only (its italic just for
   the hero subline), Hanken from 400 to 900. A page asking Bodoni for another weight would get 400,
   or a synthesized bold, so widen the tool's ranges first. */
@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-r1-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-r1-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-r1-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}

:root {
  /* brand kit */
  --ebony: #14110d;
  --surface: #1d1914;
  --line: #2e2820;
  --ivory: #efe7d6;
  --stone: #9c9282;
  --brass: #bf9a5e;
  --brass-light: #e3c891;
  --brass-deep: #8a6a39;
  --paper: #f3ede2;
  --ink: #1a1612;
  --ink-soft: #5e5446;   /* secondary text on paper; stone is too light there */
  --mcgill-sun: #f7b84b; /* the McGill & Co. mark keeps its own sun */

  /* surface roles: paper sections in the light scheme */
  --bg: var(--paper);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --accent: var(--brass-deep);
  --hair: rgba(26, 22, 18, 0.14);
  --field: rgba(26, 22, 18, 0.5);
  --focus: var(--brass-deep);
  --error: #9b2c1f;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --caps: 0.42em;

  --gutter: clamp(1rem, 4.2vw, 3.5rem);
  --measure: 88rem;
  --bar: clamp(5rem, 4.2rem + 2vw, 6.25rem);
  --ease: cubic-bezier(0.22, 0.61, 0.2, 1);
  --ease-light: cubic-bezier(0.45, 0.05, 0.25, 1);
  --fx: 50%;   /* focal point of the hero render */
  --fy: 30%;
  --dawn: 3.2s; /* the hero's daylight starts once the drawing has held for a beat */
  --pen: 1.6s;       /* one stroke of the pen */
  --pace: 1;         /* the spacing between the drawing's batches of strokes */
  --rise-time: 2.8s; /* the sketch rising behind the pen */
  --notes-at: 1.5s;  /* the datums and the sheet title */
  --notes-for: 1.2s;
  --light: 3.2s;     /* daylight crossing the frame */
  --rest: 2.6s;      /* the drawing settling out of the daylight */
}

/* A return visit within 30 days (sun.js sets the class): the same opening at a quicker pace, the pen
   for about a second, then daylight, live after about 3.4 s instead of 6.4 s */
:root.is-return {
  --dawn: 1.2s;
  --pen: 0.7s;
  --pace: 0.3;
  --rise-time: 1s;
  --notes-at: 0.5s;
  --notes-for: 0.6s;
  --light: 2.2s;
  --rest: 1.6s;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ebony);
    --fg: var(--ivory);
    --fg-soft: var(--stone);
    --accent: var(--brass);
    --hair: var(--line);
    --field: rgba(239, 231, 214, 0.42);
    --focus: var(--brass);
    --error: #f0a494;
  }
}

/* Native controls and the page scrollbar take the colour of the surface they sit on: dark for the
   ebony frame of the site, light on the paper sections of the light scheme */
:root { color-scheme: dark; }
.intro, .faq, .waitlist, .doc { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  .intro, .faq, .waitlist, .doc { color-scheme: dark; }
}

/* Links within the page glide there; a move to another page cross-fades (where the browser can) */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.32s; }

/* Dark surfaces look the same in both schemes */
.masthead, .hero, .maker, .colophon, .beta, .lost, .shortcut {
  --bg: var(--ebony);
  --fg: var(--ivory);
  --fg-soft: var(--stone);
  --accent: var(--brass);
  --hair: var(--line);
  --field: rgba(239, 231, 214, 0.42);
  --focus: var(--brass);
  --error: #f0a494;
  color: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ebony); }

body {
  margin: 0;
  color: var(--fg);
  /* the warm glow of the brand guide, over ebony, behind the masthead and hero */
  background:
    radial-gradient(ellipse 60% 55% at 22% 0%, rgba(191, 154, 94, 0.13), transparent 70%) top / 100% 100svh no-repeat,
    var(--ebony);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: hidden;
}
::selection { background: var(--brass); color: var(--ebony); }

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 1px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.6rem 1rem; background: var(--ivory); color: var(--ebony); text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Spaced capitals, the title-block lettering of the brand */
.byline, .jump, .quiet, .credit, .hint, .still figcaption, .sheet-title, .sheet-name, label, legend, button {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: var(--caps);
  text-transform: uppercase;
}

/* Masthead: the top bar of the letterbox */
.masthead {
  min-height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.6rem); }
.wordmark { display: block; line-height: 0; }
.wordmark img { display: block; width: auto; height: clamp(3.25rem, 2.5rem + 1.9vw, 4.25rem); }
.byline {
  margin: 0;
  font-size: 0.7rem;
  color: var(--brass);
}
.jump {
  font-size: 0.7rem;
  text-decoration: none;
  padding: 0.6rem 0 0.4rem;
  background: linear-gradient(var(--brass), var(--brass)) left bottom / calc(100% - var(--caps)) 1px no-repeat;
  transition: background-size 420ms var(--ease), color 200ms var(--ease);
}
.jump:hover { color: var(--brass-light); background-size: 30% 1px; }
.masthead-nav { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 2.75rem); }
.quiet {
  font-size: 0.7rem;
  color: var(--stone);
  text-decoration: none;
  padding: 0.6rem 0 0.4rem;
  transition: color 200ms var(--ease);
}
.quiet:hover { color: var(--ivory); }

/* The shortcut bar (home page): once the hero has scrolled away, the way to apply stays in reach.
   page.js shows it while neither the hero nor the form is on screen; without JavaScript it never shows. */
.shortcut {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
  padding: 0 var(--gutter);
  background: rgba(20, 17, 13, 0.95);
  border-bottom: 1px solid var(--line);
  translate: 0 -100%;
  visibility: hidden;
  transition: translate 420ms var(--ease), visibility 0s linear 420ms;
}
.shortcut.is-shown { translate: 0 0; visibility: visible; transition: translate 420ms var(--ease), visibility 0s; }
.shortcut-top { display: block; line-height: 0; }
.shortcut-top img { display: block; width: auto; height: 2.1rem; }
/* Nor does the bar cover keyboard focus: a browser that scrolls a focused control to the top edge
   stops it a bar's height, and a little air, below */
main :is(a, button, input, select, textarea) { scroll-margin-top: 4.5rem; }

/* Hero: a letterboxed frame; the drawing rises, then daylight develops the render */
.hero {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: calc(100svh - var(--bar));
}
.frame {
  position: relative;
  align-self: center;
  width: 100%;
  height: 100%;
  min-height: max(16rem, calc(100vw / 2.6));
  max-height: calc(100vw / 2.39);
  overflow: hidden;
  container-type: size;
  background: var(--ebony);
  isolation: isolate;
}
/* The plate always covers the frame. It carries the warm vignette itself because its transform
   makes it an isolated group: the sketch's screen blend can only see what the plate paints. */
.plate {
  position: absolute;
  left: var(--fx);
  top: var(--fy);
  width: max(100cqw, 150cqh);
  aspect-ratio: 3 / 2;
  translate: calc(var(--fx) * -1) calc(var(--fy) * -1);
  transform-origin: var(--fx) var(--fy);
  background: radial-gradient(ellipse 70% 54% at 50% 39%, #231d16 0%, var(--ebony) 75%);
  animation: push-in 26s var(--ease) var(--dawn) both;
}
.plate picture, .plate .render, .plate .sketch, .plate .lines {
  position: absolute; inset: 0;
  display: block;
  width: 100%; height: 100%;
}
/* Hidden until daylight reaches it (the daylight keyframes show it): until then the drawing is the
   only picture, and the browser should measure it, not a render the mask keeps out of sight. */
.plate .render {
  visibility: hidden;
  -webkit-mask-image: linear-gradient(100deg, #000 40%, transparent 60%);
  mask-image: linear-gradient(100deg, #000 40%, transparent 60%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  animation: daylight var(--light) var(--ease-light) var(--dawn) forwards;
}

/* The owner's sketch, brass on black. Screen leaves the plate untouched where the sketch is black,
   so only the ink shows. Its soft top edge (--rise, measured up from the plate's foot) climbs at
   an even pace behind the pen, from the foot, where nothing shows yet, to above the ridge. */
@property --rise { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.plate .sketch {
  --rise: 0%;
  mix-blend-mode: screen;
  opacity: 0.72;
  -webkit-mask-image: linear-gradient(to top, #000 calc(var(--rise) - 12%), transparent calc(var(--rise) + 12%));
  mask-image: linear-gradient(to top, #000 calc(var(--rise) - 12%), transparent calc(var(--rise) + 12%));
  animation: sketch-rise var(--rise-time) linear 0.1s forwards, lines-rest var(--rest) var(--ease) calc(var(--dawn) + 0.8s) forwards;
}

/* The drawing: fine brass line at the brand's 50 to 75 percent, notes in stone */
.lines {
  overflow: visible;
  animation: lines-rest var(--rest) var(--ease) calc(var(--dawn) + 0.8s) forwards;
}
.lines path {
  fill: none;
  stroke: var(--brass);
  stroke-opacity: 0.74;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw var(--pen) var(--ease) var(--d, 0s) forwards;
}
.lines .gl { stroke-opacity: 0.75; stroke-width: 1.35; } /* the heaviest line by width, inside the brand's 50 to 75% */
.lines .b1 { --d: calc(0.3s * var(--pace)); }
.lines .b2 { --d: calc(0.55s * var(--pace)); }
.lines .b3 { --d: calc(0.8s * var(--pace)); }
.lines .b4 { --d: calc(1.05s * var(--pace)); }
.lines .b5 { --d: calc(1.3s * var(--pace)); }
.lines .b6 { --d: calc(1.55s * var(--pace)); }
.lines .notes { opacity: 0; animation: fade-in var(--notes-for) var(--ease) var(--notes-at) forwards; }
.lines .notes path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
.lines .hatch { stroke-opacity: 0.5; stroke-width: 0.9; }
.lines .notes .leader { stroke: var(--stone); stroke-opacity: 0.8; stroke-width: 0.8; stroke-dasharray: 3 5; }
.lines .datum { fill: none; stroke: var(--stone); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lines .notes .quarter { fill: var(--stone); stroke: none; }
.lines text {
  fill: var(--stone);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* A warm band of low sun that crosses the frame once, just ahead of the daylight */
.daylight {
  position: absolute; inset: -10% 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(227, 200, 145, 0.32) 47%, rgba(235, 211, 160, 0.5) 50%, rgba(227, 200, 145, 0.28) 53%, transparent 70%);
  mix-blend-mode: soft-light;
  opacity: 0;
  translate: -85% 0;
  animation: sun-pass var(--light) var(--ease-light) var(--dawn) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes daylight {
  from { visibility: visible; }
  to { visibility: visible; -webkit-mask-position: 0 0; mask-position: 0 0; }
}
@keyframes sketch-rise { to { --rise: 112%; } }
@keyframes lines-rest { to { opacity: 0; } }
@keyframes sun-pass {
  0% { opacity: 0; translate: -85% 0; }
  18% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; translate: 85% 0; }
}
@keyframes push-in { from { scale: 1; } to { scale: 1.045; } }

/* Move the sun (sun.js). After the opening the frame becomes a slider: the render on the lit side
   of a soft line of light, the drawing on the other, and the band of low sun riding the line.
   The masks repaint while the line moves; that runs only while someone is steering it. */
@property --sun { syntax: "<percentage>"; inherits: true; initial-value: 150%; }
@property --glow { syntax: "<number>"; inherits: true; initial-value: 1.5; }

.frame.is-live {
  touch-action: pan-y;
  transition: --sun 1.4s var(--ease), --glow 1.4s var(--ease);
}
.frame.is-live.is-moving { transition-duration: 0.14s; }
@media (hover: hover) { .frame.is-live { cursor: ew-resize; } } /* the picture answers a sideways move */
.frame.is-live:focus-visible { outline-offset: -6px; }
.frame.is-live .plate .render,
.frame.is-live .plate .sketch,
.frame.is-live .lines {
  animation: none;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.frame.is-live .plate .render {
  visibility: visible;
  -webkit-mask-image: linear-gradient(100deg, #000 calc(var(--sun) - var(--soft, 5%)), transparent calc(var(--sun) + var(--soft, 5%)));
  mask-image: linear-gradient(100deg, #000 calc(var(--sun) - var(--soft, 5%)), transparent calc(var(--sun) + var(--soft, 5%)));
}
.frame.is-live .lines { opacity: 1; }
.frame.is-live .plate .sketch,
.frame.is-live .lines {
  display: block;
  -webkit-mask-image: linear-gradient(100deg, transparent calc(var(--sun) - var(--soft, 5%)), #000 calc(var(--sun) + var(--soft, 5%)));
  mask-image: linear-gradient(100deg, transparent calc(var(--sun) - var(--soft, 5%)), #000 calc(var(--sun) + var(--soft, 5%)));
}
.frame.is-live .lines path { animation: none; stroke-dashoffset: 0; }
.frame.is-live .lines .notes { animation: none; opacity: 1; }
.frame.is-live .daylight {
  animation: none;
  opacity: 0;
  translate: calc((var(--glow) - 0.5) * 100%) 0;
  transition: opacity 0.6s var(--ease);
}
.frame.is-live.is-moving .daylight { opacity: 1; }

.titles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.6rem 2rem;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.4rem, 3.2vw, 2.6rem) var(--gutter) clamp(1.6rem, 3.4vw, 2.75rem);
}
h1 {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.9rem, 0.9rem + 4.9vw, 7rem);
  line-height: 1;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.subline {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.5rem, 1.3rem + 0.7vw, 2.1rem);
  line-height: 1.2;
  color: var(--ivory);
  text-wrap: balance;
}
.credit {
  margin: 0;
  font-size: 0.68rem;
  color: var(--stone);
  text-align: right;
  text-wrap: balance; /* a phone wraps the caption: no single word left alone on its last line */
}
.hint {
  grid-column: 2;
  margin: 0;
  font-size: 0.68rem;
  color: var(--ivory);
  text-align: right;
  text-wrap: balance;
  opacity: 0;
  transition: opacity 0.9s var(--ease) 0.4s;
}
.hint::before {
  content: "";
  display: inline-block;
  width: 0.45rem; height: 0.45rem;
  margin-right: 0.9em;
  border-radius: 50%;
  background: var(--brass);
}
.hero.is-live .hint { opacity: 1; }
@media (hover: hover) { .hint .by-touch { display: none; } }
@media not (hover: hover) { .hint .by-pointer { display: none; } }

/* Intro: the promise, then the three things it does */
.intro {
  background: var(--bg);
}
.intro-inner, .waitlist-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 clamp(1rem, 2.5vw, 2.5rem);
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) var(--gutter) clamp(4.5rem, 9vw, 8rem);
}

/* Sheet strips: the drawing set carries on down the page. Each section opens on a strip in title-block
   lettering (the hero's drawing is Sheet 01): a drawn line at the brand's opacity, the sheet's name
   under it. page.js draws each line once as its section arrives (.is-drawn). A line waits undrawn
   only where scripts run and motion is welcome, a test the stylesheet makes before the first paint,
   so no line is ever seen drawn and then taken back; everywhere else the lines stand drawn. */
.sheet { grid-column: 1 / -1; display: grid; gap: 0.85rem; margin: 0 0 clamp(2.5rem, 5vw, 4.5rem); }
.sheet-rule { display: block; height: 1px; background: var(--accent); opacity: 0.6; transform-origin: left; }
.sheet-name { font-size: 0.68rem; color: var(--fg-soft); }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .sheet:not(.is-drawn) .sheet-rule { transform: scaleX(0); }
  .sheet.is-drawn .sheet-rule { transition: transform 1.4s var(--ease); }
}

.lede {
  grid-column: 1 / span 7;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  line-height: 1.38;
  text-wrap: pretty;
}
.features {
  grid-column: 9 / -1;
  align-self: end;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hair);
}
.features li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--hair);
  font-size: 1.05rem;
  line-height: 1.4;
}
/* Each feature is marked by a detail from a working drawing: a dimension string, a section tag,
   a revision cloud */
.features svg {
  width: 1.75rem; height: 1.75rem;
  fill: none; stroke: var(--accent); stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.features svg .solid { fill: var(--accent); stroke: none; }

/* The studio behind it: a raised panel, the copy on the left and a McGill & Co. render filling the
   right side from the panel's top edge to its foot */
.maker {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 clamp(1rem, 2.5vw, 2.5rem);
  background: var(--surface);
  padding: 0 0 0 max(var(--gutter), calc((100vw - var(--measure)) / 2 + var(--gutter)));
}
.maker-copy { grid-column: 1 / span 5; align-self: center; padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(4.5rem, 9vw, 8rem); }
.maker-copy .sheet { margin-bottom: clamp(2rem, 4vw, 3rem); }
.mcd { display: block; width: clamp(5.5rem, 4.5rem + 3vw, 7.5rem); height: auto; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.mcd .sun { fill: var(--mcgill-sun); }
.mcd .ink { fill: none; stroke: var(--ivory); stroke-width: 15; stroke-linecap: butt; stroke-linejoin: miter; }
.mcd .ink g { stroke-width: 14; }
.maker h2, .faq h2, .waitlist h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.5rem + 2.6vw, 4.1rem);
  line-height: 1.05;
  text-wrap: balance;
}
.maker-copy p {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--stone);
}
.maker-copy .visit { margin-top: 1.75rem; color: var(--ivory); font-weight: 500; }
.still {
  grid-column: 7 / -1;
  position: relative;
  min-height: clamp(26rem, 42vw, 44rem);
  margin: 0;
  overflow: hidden;
  background: var(--ebony);
}
/* 78% across keeps the whole house in the crop at every width, and the low sun too once the window is
   wide enough to hold both (about 1100 px and up; a tablet's taller, narrower window loses the sun) */
.still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 55%; }
.still::after { /* a little dusk at the foot, so the caption reads over any render */
  content: "";
  position: absolute; inset: auto 0 0;
  height: 32%;
  background: linear-gradient(to top, rgba(20, 17, 13, 0.6), transparent);
  pointer-events: none;
}
.still figcaption {
  position: absolute; right: var(--gutter); bottom: 1.1rem; z-index: 1;
  font-size: 0.68rem;
  color: var(--ivory);
  text-align: right;
}

/* Before you apply: the answers set as a schedule, question on the left, answer on the right */
.faq { background: var(--bg); }
.faq-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 clamp(1rem, 2.5vw, 2.5rem);
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) var(--gutter) 0;
}
.faq h2 { grid-column: 1 / span 6; margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); }
.answers {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  margin: 0;
  border-bottom: 1px solid var(--hair);
}
.answers > div {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: baseline;
  padding: clamp(1.4rem, 2.6vw, 2rem) 0;
  border-top: 1px solid var(--hair);
}
.answers dt {
  grid-column: 1 / span 5;
  font-family: var(--display);
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem);
  line-height: 1.25;
}
.answers dd { grid-column: 7 / -1; max-width: 36rem; margin: 0; font-size: 1.05rem; line-height: 1.65; color: var(--fg-soft); }

/* Waitlist */
.waitlist { background: var(--bg); }
.waitlist-inner { gap: 2.5rem clamp(1rem, 2.5vw, 2.5rem); padding-bottom: clamp(4.5rem, 10vw, 9rem); }
.waitlist-inner > .sheet { margin-bottom: clamp(0rem, 5vw - 2.5rem, 2rem); } /* the row gap gives the rest */
.waitlist-head { grid-column: 1 / span 5; }
.waitlist-lede { max-width: 30rem; margin: 1.5rem 0 0; font-size: 1.05rem; line-height: 1.65; color: var(--fg-soft); }
.beta-note { margin: 1.25rem 0 0; color: var(--fg-soft); }
.beta-note a { color: var(--fg); }

/* Apply for the beta: a square that fills when ticked */
.check { display: inline-flex; align-items: center; gap: 0.9rem; color: var(--fg); cursor: pointer; }
.check input {
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 1.15rem; height: 1.15rem; min-height: 0;
  margin: 0; padding: 0;
  border: 1px solid var(--field);
  border-radius: 0;
  cursor: pointer;
}
.check input::before {
  content: "";
  width: 0.55rem; height: 0.55rem;
  background: var(--fg);
  scale: 0;
  transition: scale 180ms var(--ease);
}
.check input:checked { border-color: var(--fg); }
.check input:checked::before { scale: 1; }
.check input:hover, .check:hover input { border-color: var(--accent); }
.check-note { margin: 0.45rem 0 0 2.05rem; font-size: 0.92rem; line-height: 1.5; color: var(--fg-soft); }
.waitlist .signup, .waitlist .success-card { grid-column: 7 / -1; }
.signup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.75rem;
  position: relative;
}
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
label { font-size: 0.7rem; color: var(--fg-soft); }
.optional { text-transform: none; letter-spacing: 0.02em; font-weight: 400; }
input, select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.5rem 0;
  font: inherit;
  font-size: 1.15rem;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--field);
  border-radius: 0;
  transition: border-color 200ms var(--ease);
}
input:hover, select:hover, input:focus-visible, select:focus-visible { border-bottom-color: var(--accent); }
/* Focus in a field draws a line along its foot, left to right like the pen, and its label takes the
   line's colour. (Forced colours drop background images, so the outline comes back there.) */
.field > input, .select > select {
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 2px no-repeat;
  transition: border-color 200ms var(--ease), background-size 420ms var(--ease);
}
.field > input:focus-visible, .select > select:focus-visible { outline: none; background-size: 100% 2px; }
.field:has(> input:focus-visible) > label, .field:has(> .select > select:focus-visible) > label { color: var(--accent); }
@media (forced-colors: active) {
  .field > input:focus-visible, .select > select:focus-visible { outline: 2px solid CanvasText; outline-offset: 2px; }
}
input[aria-invalid="true"] { border-bottom-color: var(--error); }
.select { position: relative; }
.select select { appearance: none; padding-right: 1.75rem; cursor: pointer; }
.select select option { color: var(--ink); background: var(--paper); }
.select::after {
  content: "";
  position: absolute; right: 0.3rem; top: 50%;
  width: 0.45rem; height: 0.45rem;
  border-right: 1.5px solid var(--fg-soft); border-bottom: 1.5px solid var(--fg-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

button {
  grid-column: 1 / -1;
  justify-self: start;
  position: relative;
  margin-top: 0.25rem;
  min-height: 3.4rem;
  padding: 0.9rem 2.4rem 0.9rem calc(2.4rem + var(--caps));
  font-size: 0.72rem;
  color: var(--ivory);
  background: var(--ebony);
  border: 1px solid var(--ebony);
  border-radius: 0;
  cursor: pointer;
  transition: background-color 220ms var(--ease), transform 180ms var(--ease);
}
button::after {
  content: "";
  position: absolute; left: 2.4rem; right: 2.4rem; bottom: 0.75rem;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}
button:hover { background: var(--surface); }
button:hover::after, button:focus-visible::after { transform: scaleX(1); }
button:active { transform: translateY(1px); }
button[disabled] { opacity: 0.6; cursor: progress; }

.status { grid-column: 1 / -1; margin: 0; font-size: 0.95rem; }
.status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.status.error { color: var(--error); }
.success {
  margin: 0;
  align-self: center;
  font-family: var(--display);
  font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.3rem);
  line-height: 1.25;
}
.success:focus, .thanks:focus { outline: none; }

/* You're in: the monogram draws itself once over the confirmation (main.js clones it from the
   #done-mark template): the sill, the arch in one stroke, then the F. The kit's ink cut on paper,
   its brass cut on ebony; the geometry is the kit's small monogram. The sill is uncovered from its
   centre (a clip), never scaled, so no part of the mark or its brass is ever stretched. */
.done { display: grid; justify-items: start; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.done-mark { display: block; width: auto; height: clamp(4rem, 3.2rem + 2.4vw, 5.25rem); overflow: visible; }
.done-mark .arch { stroke: var(--ink); stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s var(--ease) 0.15s forwards; }
.done-mark .sill { fill: var(--ink); clip-path: inset(0 50%); animation: sill-in 0.8s var(--ease) 0.05s forwards; }
.done-mark .letter { fill: var(--ink); opacity: 0; animation: fade-in 0.7s var(--ease) 1.25s forwards; }
@keyframes sill-in { to { clip-path: inset(0); } }
@media (prefers-color-scheme: dark) {
  .done-mark .arch { stroke: url(#done-brass); }
  .done-mark .sill, .done-mark .letter { fill: url(#done-brass); }
}
@media (prefers-reduced-motion: reduce) {
  .done-mark .arch, .done-mark .sill, .done-mark .letter { animation: none; stroke-dashoffset: 0; clip-path: none; opacity: 1; }
}

/* After joining: the confirmation, then two optional questions (followup.js) */
.success-card { display: grid; align-content: start; gap: clamp(2rem, 4vw, 2.75rem); }
.followup, .thanks {
  padding-top: clamp(1.75rem, 3vw, 2.25rem);
  border-top: 1px solid var(--hair);
}
.followup { display: grid; gap: 1.75rem; position: relative; }
.followup-intro { margin: 0; color: var(--fg-soft); }
.sizes { min-width: 0; margin: 0; padding: 0; border: 0; }
.sizes legend { margin-bottom: 0.9rem; padding: 0; font-size: 0.7rem; color: var(--fg-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { position: relative; display: inline-flex; font-size: 0.7rem; color: var(--fg); cursor: pointer; }
.chip input {
  position: absolute; inset: 0;
  width: 100%; height: 100%; min-height: 0;
  margin: 0; padding: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  padding: 0.75rem 1rem 0.75rem calc(1rem + var(--caps));
  border: 1px solid var(--field);
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease), color 200ms var(--ease);
}
.chip:hover span { border-color: var(--accent); }
.chip input:checked + span { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.thanks {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.35;
}

/* Footer: the end card */
.colophon {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter) 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--stone);
  background:
    radial-gradient(ellipse 50% 70% at 50% 0%, rgba(191, 154, 94, 0.1), transparent 70%),
    var(--ebony);
}
.colophon .lockup { width: clamp(11rem, 8rem + 12vw, 17rem); height: auto; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.colophon p { margin: 0; }
/* A link never breaks inside its own name ("Beta / agreement" on a phone); the lines break at the dots. */
.colophon a { white-space: nowrap; }
.colophon a { color: var(--ivory); }
.colophon .privacy { font-size: 0.8rem; }
.colophon.slim { gap: 0.25rem; padding: 1.75rem var(--gutter) 2.25rem; background: none; }

/* Privacy: a plain reading page on the paper ground */
.doc { background: var(--bg); }
.doc-inner { max-width: 44rem; margin: 0 auto; padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter) clamp(4rem, 9vw, 7rem); }
.doc h1 { font-size: clamp(2.8rem, 1.8rem + 3.6vw, 4.6rem); }
.doc h2 {
  margin: 2.75rem 0 0.75rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.45rem, 1.25rem + 0.8vw, 1.95rem);
  line-height: 1.2;
}
.doc p, .doc li { margin: 0; font-size: 1.05rem; line-height: 1.7; color: var(--fg-soft); }
.doc p + p { margin-top: 1rem; }
.doc ul { margin: 0; padding-left: 1.2rem; }
.doc li + li { margin-top: 0.7rem; }
.doc p + ul, .doc ul + p { margin-top: 1rem; }
.doc a { color: var(--fg); }
.doc .doc-lede {
  margin-top: 1.5rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  line-height: 1.45;
  color: var(--fg);
}
.doc .doc-updated { margin-top: 3rem; font-size: 0.9rem; }
/* A legal page the owner has not approved yet carries this one line */
.doc .doc-draft {
  margin-top: 1.25rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--fg);
  border-radius: 0.25rem;
  font-size: 1rem;
  color: var(--fg);
}

/* Not found: an empty lot. The hero's ground line and hatch are drawn, and nothing stands on them. */
.lost-page { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.lost { display: grid; align-items: center; }
.lost-inner { width: 100%; max-width: var(--measure); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--gutter); }
.lost h1 {
  max-width: 13ch;
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 1.2rem + 4.6vw, 6rem);
  line-height: 1;
  text-wrap: balance;
}
.grade { display: block; overflow: visible; }
.grade line { stroke: var(--brass); stroke-opacity: 0.75; stroke-width: 1.35; }
.grade path { fill: none; stroke: var(--brass); stroke-opacity: 0.5; stroke-width: 0.9; }
.sheet-title { margin: 1.1rem 0 0; font-size: 0.68rem; color: var(--stone); }
.lost-lede { max-width: 30rem; margin: clamp(3rem, 6vw, 4.5rem) 0 0; font-size: 1.05rem; line-height: 1.65; color: var(--stone); }
.lost-go { margin: 1.5rem 0 0; }
.lost-help { max-width: 30rem; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; font-size: 0.9rem; line-height: 1.6; color: var(--stone); }
.lost-help a { color: var(--ivory); }

@media (prefers-color-scheme: dark) {
  .colophon:not(.slim) { border-top: 1px solid var(--line); }
  button { background: var(--ivory); color: var(--ebony); border-color: var(--ivory); }
  button:hover { background: var(--brass-light); border-color: var(--brass-light); }
  button::after { background: var(--brass-deep); }
}

@media (max-width: 1100px) {
  .lede { grid-column: 1 / -1; }
  .features { grid-column: 1 / -1; margin-top: clamp(2.5rem, 6vw, 3.5rem); }
  .maker-copy { grid-column: 1 / span 6; }
  .faq h2, .waitlist-head { grid-column: 1 / -1; }
  .waitlist .signup, .waitlist .success-card { grid-column: 1 / span 9; }
  .titles { grid-template-columns: 1fr; }
  .credit, .hint { grid-column: 1; text-align: left; }
  .frame { min-height: max(16rem, calc(100vw / 2.2)); max-height: calc(100vw / 1.6); }
}

/* The masthead stacks before its spaced capitals would wrap mid-label (they do below about 1020px) */
@media (max-width: 1060px) {
  .brand { flex-direction: column; align-items: flex-start; gap: 0.2rem; padding: 0.8rem 0; }
  .masthead-nav { flex-direction: column; align-items: flex-end; gap: 0; }
}

@media (max-width: 720px) {
  :root { --fy: 36%; }
  .wordmark img { height: 3.5rem; }
  .jump, .quiet { font-size: 0.62rem; letter-spacing: 0.3em; }
  /* One way in on a phone: the wordmark and "Apply for the beta". Sign in lives in every page's footer
     (and by the form on the home page), and the form itself offers the waitlist. */
  .masthead-nav .quiet:not(.apply), .masthead-nav .jump { display: none; }
  .masthead-nav .apply { color: var(--ivory); background: linear-gradient(var(--brass), var(--brass)) left bottom / calc(100% - var(--caps)) 1px no-repeat; }
  .hero { min-height: 0; grid-template-rows: auto auto; }
  /* The whole house: the frame takes the plate's own proportions at 108% of its width, so only the
     empty margins beside the house fall outside (the plate rule above gives 150cqh = 108cqw). The
     datums and the sheet title would be a few pixels tall at this scale, so they stay off. */
  .frame { height: auto; min-height: 0; aspect-ratio: 150 / 108; max-height: 70svh; }
  .lines .notes > :not(.hatch) { display: none; }
  .titles { grid-template-columns: 1fr; gap: 0.75rem; }
  .credit, .hint { text-align: left; }
  .maker { grid-template-columns: 1fr; padding: 0; }
  .maker-copy { grid-column: 1; padding: clamp(2.5rem, 9vw, 3.5rem) var(--gutter) clamp(3.5rem, 12vw, 5rem); }
  .still { grid-column: 1; order: -1; min-height: 0; aspect-ratio: 4 / 3; }
  .still figcaption { left: var(--gutter); right: auto; text-align: left; }
  .answers dt, .answers dd { grid-column: 1 / -1; }
  .answers dd { margin-top: 0.6rem; }
  .waitlist .signup, .waitlist .success-card { grid-column: 1 / -1; }
  /* Closer fields, so the button shares the screen with the email field */
  .waitlist-inner { row-gap: 1.75rem; }
  .signup { grid-template-columns: 1fr; gap: 1.35rem; }
  button { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  /* as specific as the rule that places them; the slider (.frame.is-live) brings them back */
  .plate .sketch, .plate .lines, .daylight { display: none; }
  .plate { animation: none; }
  .plate .render { visibility: visible; animation: none; -webkit-mask-image: none; mask-image: none; }
  *, *::before, *::after { transition: none !important; }
}
