/* Draftsmith site. One stylesheet, no framework. Tokens first, light then dark. */

@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --ground: #FFF8E7;
  --ground-2: #FFEFC7;
  --surface: #FFFFFF;
  --ink: #2A1E17;
  --ink-2: #5B4A3E;
  --ink-3: #7A6858;
  --line: #2A1E17;
  --hard: #2A1E17;
  --soft: 0 18px 40px -18px rgba(42, 30, 23, .35);
  --link: #B3195F;
  --accent: #0A6A8C;
  --focus: #0A6A8C;
  --dots: rgba(42, 30, 23, .09);
  --code-bg: #FFF1CC;
  --n-yellow: #FFE36E;
  --n-blue: #A9E4FA;
  --n-pink: #FFC2DC;
  --n-green: #BDEBC6;
  --n-orange: #FFD1A1;
  --n-purple: #DCCFFF;
  --note-ink: #2A1E17;
  --note-ink-2: #5B4A3E;
  --yellow: #FFD83D;
  --cyan: #34C3F0;
  --pink: #FF5FA2;
  --header: rgba(255, 248, 231, .86);
  --radius: 16px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #1C1511;
  --ground-2: #261C16;
  --surface: #30251E;
  --ink: #FFF3DC;
  --ink-2: #E6D5BD;
  --ink-3: #C2AE96;
  --line: #0E0A08;
  --hard: #0A0706;
  --soft: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --link: #FF8CC0;
  --accent: #7FD8F7;
  --focus: #7FD8F7;
  --dots: rgba(255, 243, 220, .06);
  --code-bg: #3A2D24;
  --header: rgba(28, 21, 17, .86);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #1C1511;
    --ground-2: #261C16;
    --surface: #30251E;
    --ink: #FFF3DC;
    --ink-2: #E6D5BD;
    --ink-3: #C2AE96;
    --line: #0E0A08;
    --hard: #0A0706;
    --soft: 0 18px 40px -18px rgba(0, 0, 0, .7);
    --link: #FF8CC0;
    --accent: #7FD8F7;
    --focus: #7FD8F7;
    --dots: rgba(255, 243, 220, .06);
    --code-bg: #3A2D24;
    --header: rgba(28, 21, 17, .86);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 4.2vw + 1.2rem, 4.4rem); }
h2 { font-size: clamp(2rem, 2.6vw + 1.1rem, 3.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--code-bg); padding: .1em .35em; border-radius: 6px; }
kbd {
  display: inline-block; padding: .05em .45em; border: 2px solid var(--line); border-bottom-width: 3px;
  border-radius: 7px; background: var(--surface); color: var(--ink); font-weight: 600; line-height: 1.35; white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
/* Paper notes and the pink band stay bright in dark mode, so focus there is drawn in the notes' own ink. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: var(--note-ink); padding: .6em 1em; border: 2.5px solid var(--line); border-radius: 12px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.lede { font-size: clamp(1.1rem, .6vw + 1rem, 1.3rem); color: var(--ink-2); max-width: 40em; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 62rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }
.eyebrow { display: inline-block; color: var(--link); margin-bottom: .2em; transform: rotate(-2deg); }
.band { background: var(--ground-2); }
.dotted { background-image: radial-gradient(var(--dots) 1.4px, transparent 1.6px); background-size: 18px 18px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.25em; min-height: 48px;
  font: 700 1.02rem/1.1 var(--font-body); color: var(--btn-ink); text-decoration: none;
  background: var(--btn-bg); border: 2.5px solid var(--line); border-radius: 14px;
  box-shadow: 0 4px 0 var(--hard); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--hard); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--hard); }
.btn-primary { --btn-bg: var(--yellow); --btn-ink: var(--note-ink); }
.btn-pink { --btn-bg: var(--pink); --btn-ink: var(--note-ink); }
.btn-small { min-height: 40px; padding: .5em .95em; font-size: .95rem; border-radius: 12px; }
.btn-big { font-size: 1.12rem; padding: .85em 1.2em; min-height: 56px; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn .btn-sub { display: block; font-weight: 600; font-size: .78em; opacity: .85; margin-top: .2em; }
.btn-stack { flex-direction: column; align-items: flex-start; gap: 0; text-align: left; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.45rem/1 var(--font-display); }
.brand img { width: 44px; height: 44px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: .5em .7em; border-radius: 10px; }
.nav a:hover { background: color-mix(in srgb, var(--yellow) 45%, transparent); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.mode-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: var(--surface); color: var(--ink); border: 2.5px solid var(--line); border-radius: 12px; cursor: pointer;
  box-shadow: 0 3px 0 var(--hard);
}
.mode-toggle .icon { width: 22px; height: 22px; }
.mode-toggle .i-sun { display: none; }
:root[data-theme="dark"] .mode-toggle .i-sun { display: block; }
:root[data-theme="dark"] .mode-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mode-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .mode-toggle .i-moon { display: none; }
}
@media (max-width: 860px) { .nav { display: none; } .header-actions { margin-left: auto; } }
@media (max-width: 420px) { .brand span { display: none; } }

/* ---------- Sticky note ---------- */
.note {
  --tilt: 0deg; --paper: var(--n-yellow);
  position: relative; background: var(--paper); color: var(--note-ink);
  border: 2.5px solid var(--line); border-radius: var(--radius);
  box-shadow: 6px 7px 0 var(--hard);
  padding: 20px 22px; transform: rotate(var(--tilt));
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.note a { color: #8E1049; }
.note code { background: rgba(255, 255, 255, .55); color: var(--note-ink); }
.note h3 { color: var(--note-ink); }
.note p { color: var(--note-ink-2); }
.note:hover { transform: rotate(0deg) scale(1.02); }
.paper-yellow { --paper: var(--n-yellow); } .paper-blue { --paper: var(--n-blue); } .paper-pink { --paper: var(--n-pink); }
.paper-green { --paper: var(--n-green); } .paper-orange { --paper: var(--n-orange); } .paper-purple { --paper: var(--n-purple); }
.tilt-l { --tilt: -1.6deg; } .tilt-r { --tilt: 1.4deg; } .tilt-ll { --tilt: -2.6deg; } .tilt-rr { --tilt: 2.4deg; }

.kind {
  display: inline-flex; align-items: center; gap: .35em;
  font: 800 .72rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--note-ink); background: rgba(255, 255, 255, .6); border: 2px solid var(--note-ink);
  padding: .32em .6em .3em; border-radius: 999px;
}
.kind .icon { width: 1.1em; height: 1.1em; stroke-width: 2.4; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.feature {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px;
  box-shadow: 4px 5px 0 var(--hard);
}
.feature h3 { font-size: 1.2rem; margin: 12px 0 .35em; }
.feature p { color: var(--ink-2); margin: 0; font-size: 1rem; }
.feature-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; border: 2.5px solid var(--line);
  background: var(--paper, var(--n-yellow)); color: var(--note-ink);
}
.feature-icon .icon { width: 24px; height: 24px; }

/* ---------- FAQ ---------- */
.faq { max-width: 52em; margin-inline: auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 2.5px solid var(--line); border-radius: 14px; box-shadow: 3px 4px 0 var(--hard); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; position: relative;
  font: 600 1.15rem/1.3 var(--font-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font: 700 1.6rem/1 var(--font-display); color: var(--link);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 20px 18px; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 44px 56px; border-top: 2px solid color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink-2); font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink); font-weight: 700; }
.fineprint-tm { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-3); margin: 0; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Prose pages (privacy, 404) ---------- */
.prose { max-width: 46em; margin-inline: auto; padding-block: clamp(40px, 6vw, 72px) 80px; }
.prose h1 { font-size: clamp(2.2rem, 3vw + 1rem, 3.2rem); }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose .summary { --paper: var(--n-yellow); margin: 28px 0 8px; }
.prose .summary ul { margin: 0; color: var(--note-ink); }
.prose .updated { color: var(--ink-3); }
.lost { text-align: center; }
.lost .note { max-width: 30em; margin: 28px auto; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .note, .note:hover { transform: none; }
}

/* ---------- Draftsmith additions ---------- */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 4.5vw, 56px); align-items: center; padding-block: clamp(40px, 7vw, 88px); }
.hero h1 { margin-bottom: .35em; }
.hero .lede { margin-bottom: 1.4em; }
.hero-icon { justify-self: center; width: min(280px, 60vw); transform: rotate(3deg); filter: drop-shadow(8px 10px 0 var(--hard)); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fineprint { margin-top: 1.1em; color: var(--ink-3); font-size: .95rem; }
.eyebrow { color: var(--link); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; margin: 0 0 .6em; }
.section { padding-block: clamp(48px, 7vw, 88px); }
.section h2 { text-align: center; margin-bottom: 1.2em; }
.promise { display: grid; gap: 8px; max-width: 46em; margin-inline: auto; }
.promise p { margin: 0; }
.site-footer .brand { margin-bottom: 8px; }
.lost { text-align: center; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-icon { order: -1; width: 140px; }
}
