/* Saw & Sage placeholder. Tokens mirror the design system (brand/brand-brief.md): Shell in light mode, Workshop in dark. */
@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces-latin-full-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces-latin-full-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(/fonts/archivo-latin-standard-normal.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --surface: #F3EDE2; --raised: #FBF8F2; --line: #D9CFBE; --ink: #1F1E1B; --muted: #5E5A52;
  --sage: #52683F; --sage-text: #3F5236; --action: #A9471F; --on-action: #F3EDE2; --measure: #2D5876;
  --timber: #B07A4A;
  /* the realm windows keep their own worlds in both modes */
  --ws-bg: #1F1E1B; --ws-ink: #ECE8DF; --ws-muted: #B3AEA3; --ws-measure: #CFDDE6; --ws-edge: #1F1E1B;
  --ch-bg: #F7F3EC; --ch-ink: #1F1E1B; --ch-muted: #5E5A52; --ch-measure: #3F5236; --ch-edge: #E2DBCF;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --text: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --tape: cubic-bezier(.2, .9, .1, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1F1E1B; --raised: #2A2925; --line: #45423B; --ink: #ECE8DF; --muted: #B3AEA3;
    --sage: #8DA27A; --sage-text: #A9BC97; --action: #E0703C; --on-action: #1F1E1B; --measure: #CFDDE6;
    --ws-bg: #2A2925; --ws-edge: #45423B;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 18px/1.55 var(--text); }
img { max-width: 100%; display: block; }
a { color: var(--sage-text); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto;
        padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--action); color: var(--on-action); padding: 8px 14px; border-radius: 4px; }
.skip:focus { left: 12px; }
.m { font-family: var(--mono); font-weight: 500; font-variant-numeric: diagonal-fractions; letter-spacing: 0; }
.label, .eyebrow { margin: 0; font: 600 13px/1.3 var(--text); font-stretch: 118%; letter-spacing: .22em; text-transform: uppercase; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.wordmark { font: 560 26px/1 var(--display); font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0; letter-spacing: -.01em; white-space: nowrap; }
.wordmark i, h1 i { font-style: italic; font-weight: 400; color: var(--sage); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.mail { font-size: 15px; color: var(--muted); }

/* hero */
.hero { position: relative; padding-block: clamp(40px, 7vw, 96px) clamp(40px, 6vw, 72px); display: grid; gap: 22px; }
.hero-mark { display: none; }
@media (min-width: 1180px) {
  .hero-mark { display: block; position: absolute; top: 72px; right: max(20px, env(safe-area-inset-right, 0px)); width: 380px; pointer-events: none; }
  .hero-mark img { width: 380px; height: 380px; }
}
@media (max-width: 560px) { .mail { display: none; } }
.hero .label { color: var(--sage-text); }
h1 { margin: 0; max-width: 11ch; font: 560 clamp(44px, 1.6rem + 8vw, 128px)/.94 var(--display);
     font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0; letter-spacing: -.02em; text-wrap: balance; }
.dim { display: flex; align-items: center; gap: 10px; max-width: 640px; color: var(--measure); font-size: 14px; }
.dim .tick { width: 1px; height: 16px; background: currentColor; flex: none; }
.dim .rule { flex: 1; height: 1px; background: currentColor; transform-origin: center; animation: draw 1.2s var(--tape) .25s both; }
@keyframes draw { from { transform: scaleX(0); } }
.lede { margin: 0; max-width: 34em; color: var(--muted); font-size: clamp(18px, 1rem + .4vw, 21px); text-wrap: pretty; }

/* sign-up */
.join { display: grid; gap: 10px; max-width: 560px; margin-top: 8px; }
.join label { font-weight: 600; font-size: 15px; }
.join .row { display: flex; flex-wrap: wrap; gap: 10px; }
.join input[type="email"] { flex: 1 1 260px; min-width: 0; font: 400 17px/1.2 var(--text); color: var(--ink); background: var(--raised);
  border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.join input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.join button { flex: 0 0 auto; font: 600 17px/1 var(--text); color: var(--on-action); background: var(--action); border: 0;
  border-radius: 4px; padding: 14px 22px; cursor: pointer; }
.join button[disabled] { opacity: .75; cursor: progress; }
.join .fine { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.join.done .fine { color: var(--sage-text); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* realms */
.realms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; padding-bottom: clamp(48px, 7vw, 96px); }
.realm { display: grid; align-content: start; gap: 14px; padding: clamp(24px, 3vw, 40px); min-width: 0; border: 1px solid; }
.realm h2 { margin: 0; font: 650 clamp(30px, 1.4rem + 1.6vw, 44px)/1.05 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.realm p { margin: 0; }
.workshop { background: var(--ws-bg); color: var(--ws-ink); border-color: var(--ws-edge); border-radius: 0; }
.workshop .eyebrow { color: var(--ws-muted); font-stretch: 80%; letter-spacing: .14em; }
.workshop h2 { font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; }
.workshop p { color: var(--ws-muted); }
.cleanhome { background: var(--ch-bg); color: var(--ch-ink); border-color: var(--ch-edge); border-radius: 10px; }
.cleanhome .eyebrow { color: var(--ch-muted); }
.cleanhome h2 { font-weight: 360; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0; }
.cleanhome h2 i { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.cleanhome p { color: var(--ch-muted); }
.callout { margin: 10px 0 0; color: var(--ws-measure); font-size: 15px; }
.callout .dim { color: inherit; max-width: none; }
.callout .board { height: 26px; background: var(--timber); margin-top: 6px; }
.callout figcaption { margin-top: 8px; font: 600 12px/1.3 var(--text); font-stretch: 80%; letter-spacing: .14em; text-transform: uppercase; color: var(--ws-muted); }
.note { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; color: var(--ch-measure); }
.note .hand { font: italic 400 26px/1.1 var(--display); font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; }
.note .m { font-size: 16px; }

/* footer */
.foot { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-block: 28px 40px;
        border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot a { color: var(--muted); }
.foot nav { display: flex; gap: 20px; }

/* small pages */
.page { padding-block: clamp(40px, 8vw, 110px); display: grid; gap: 18px; max-width: 760px; }
.page h1 { font-size: clamp(42px, 2rem + 3vw, 72px); max-width: 14ch; }
.page h2 { margin: 18px 0 0; font: 600 24px/1.2 var(--display); font-variation-settings: "opsz" 48, "SOFT" 30; }
.page p, .page li { color: var(--muted); max-width: 38em; }
.page ul { margin: 0; padding-left: 1.2em; }

@media (prefers-reduced-motion: reduce) { .dim .rule { animation: none; } }
