/* Scribbleborn — shared stylesheet.
   No inline styles anywhere, so the CSP can forbid them outright. */

:root {
  --wall: #F2F0EA;
  --card: #FFFEFA;
  --ink: #1B1D1B;
  --placard: #62665E;
  --hairline: #D6D5CA;
  --violet: #5E3490;
  --tangerine: #B85712;
  --grass: #2F7135;
  --sky: #2E6DB4;
  --cherry: #B32C3E;
  --sun: #E0A50E;
  --on-violet: #FFFFFF;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "Karla", "Helvetica Neue", Arial, sans-serif;

  --measure: 35rem;
  --step: clamp(1rem, 0.55rem + 1.8vw, 1.6rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wall: #171816;
    --card: #201F1D;
    --ink: #EEEDE6;
    --placard: #A2A69B;
    --hairline: #373832;
    --violet: #B892E4;
    --tangerine: #F2913F;
    --grass: #6FB973;
    --sky: #6BA3E0;
    --cherry: #E97182;
    --sun: #E9C04A;
    --on-violet: #17131F;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --wall: #171816;
  --card: #201F1D;
  --ink: #EEEDE6;
  --placard: #A2A69B;
  --hairline: #373832;
  --violet: #B892E4;
  --tangerine: #F2913F;
  --grass: #6FB973;
  --sky: #6BA3E0;
  --cherry: #E97182;
  --sun: #E9C04A;
  --on-violet: #17131F;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--wall);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--violet);
  color: var(--on-violet);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip-link:focus { left: 0; }

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.25rem var(--step) 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.page.doc { gap: 1.6rem; padding-bottom: 3rem; }

/* ---------- type roles ---------- */
.label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--placard);
  margin: 0;
}

.work-title {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 40;
  font-style: italic;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0.3rem 0 0.2rem;
  text-wrap: balance;
}

.medium { font-size: 0.8125rem; color: var(--placard); margin: 0; font-style: italic; }

h1.wordmark {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 120;
  font-weight: 600;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.1rem);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.02em;
}

h1.doc-title {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 90;
  font-weight: 600;
  font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.3rem);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 60;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
}

.doc h2 { font-size: 1.2rem; margin-top: 1.2rem; }

h3 { font-family: var(--f-body); font-size: 1rem; font-weight: 700; margin: 0; }

p { margin: 0; }
.section { display: flex; flex-direction: column; gap: 1rem; }
.section p + p { margin-top: 0.6rem; }
.doc p + p { margin-top: 0.7rem; }

.doc ul { margin: 0.2rem 0 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.4rem; }
.doc li::marker { color: var(--violet); }

a { color: var(--violet); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

/* ---------- crayon divider ---------- */
.crayon { width: 100%; height: 14px; display: block; overflow: visible; }
.crayon path { fill: none; stroke-linecap: round; stroke-width: 6; opacity: 0.85; }
.crayon path.under { stroke-width: 9; opacity: 0.22; }

/* ---------- masthead ---------- */
.masthead { display: flex; flex-direction: column; gap: 0.8rem; align-items: center; text-align: center; }
.masthead a { text-decoration: none; color: inherit; }

.lede { font-size: 1.075rem; color: var(--placard); margin: 0; max-width: 27rem; text-wrap: balance; }

.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.4rem 1.1rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--placard);
}

.trust-strip span { display: inline-flex; align-items: center; gap: 0.35rem; }
.trust-strip span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grass); }

/* ---------- diptych ---------- */
.diptych { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.work { display: flex; flex-direction: column; gap: 0.65rem; margin: 0; }

.frame { background: var(--card); padding: 0.5rem; border: 1px solid var(--hairline); line-height: 0; position: relative; }
.frame img { width: 100%; height: auto; display: block; }

.frame::before {
  content: "";
  position: absolute;
  top: -9px; left: 50%;
  width: 62px; height: 19px;
  transform: translateX(-50%) rotate(-2.2deg);
  background: rgba(224, 165, 14, 0.32);
  border-left: 1px solid rgba(224, 165, 14, 0.45);
  border-right: 1px solid rgba(224, 165, 14, 0.45);
}

.caption-note {
  text-align: center;
  font-family: var(--f-display);
  font-style: italic;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  color: var(--violet);
  font-size: 1.05rem;
  margin: 0;
  text-wrap: balance;
}

/* ---------- steps ---------- */
.steps { display: flex; flex-direction: column; counter-reset: step; }

.step {
  display: grid;
  grid-template-columns: 2.3rem 1fr;
  gap: 0.2rem 0.9rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--hairline);
}

.step:first-child { border-top: 1px solid var(--hairline); }

.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--f-display);
  font-variation-settings: "WONK" 1, "opsz" 40;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--violet);
  grid-row: 1 / 3;
}

.step p { font-size: 0.9375rem; color: var(--placard); }

/* ---------- studio ---------- */
.studio {
  background: var(--card);
  border: 1px solid var(--hairline);
  padding: 1.45rem var(--step);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field > label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.03em; color: var(--placard); }

input[type="text"], input[type="email"] {
  font-family: var(--f-body);
  font-size: 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--hairline);
  background: var(--wall);
  color: var(--ink);
  border-radius: 3px;
  width: 100%;
}

/* honeypot — must never be visible or focusable to a human */
.gotcha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.dropzone {
  border: 1.5px dashed var(--hairline);
  background: var(--wall);
  color: var(--placard);
  padding: 1.4rem 1rem;
  text-align: center;
  cursor: pointer;
  font-family: var(--f-body);
  font-size: 0.9375rem;
  border-radius: 3px;
  width: 100%;
  transition: border-color 120ms ease, color 120ms ease;
}

.dropzone:hover { border-color: var(--violet); color: var(--violet); }
.dropzone[data-has-file="true"] { border-style: solid; border-color: var(--violet); color: var(--violet); }

.preview { display: none; }
.preview[data-shown="true"] { display: block; }
.preview img { width: 100%; height: auto; display: block; }

button.primary {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--on-violet);
  background: var(--violet);
  border: none;
  border-radius: 3px;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  width: 100%;
}

button.primary:disabled { opacity: 0.45; cursor: not-allowed; }

.fineprint { font-size: 0.8125rem; color: var(--placard); }

.result { border-left: 3px solid var(--violet); padding-left: 1rem; display: flex; flex-direction: column; gap: 0.45rem; }

.result .story {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 30, "opsz" 20;
  font-size: 1.05rem;
  line-height: 1.62;
}

.noticed { font-size: 0.875rem; color: var(--placard); font-style: italic; }

.example-tag {
  display: inline-block;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tangerine); border: 1px solid var(--tangerine);
  padding: 0.15rem 0.4rem; border-radius: 2px; align-self: flex-start;
}

.status { font-size: 0.9375rem; color: var(--placard); min-height: 1.4em; }
.status[data-tone="error"] { color: var(--cherry); }
.status[data-tone="good"] { color: var(--grass); }

/* ---------- ladder ---------- */
.ladder { display: flex; flex-direction: column; }

.rung {
  display: grid; grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem; align-items: baseline;
  padding: 0.9rem 0; border-bottom: 1px solid var(--hairline);
}

.rung:first-child { border-top: 1px solid var(--hairline); }
.rung .what { font-weight: 700; }
.rung .detail { grid-column: 1 / -1; font-size: 0.875rem; color: var(--placard); }

.rung .price {
  font-family: var(--f-display);
  font-variation-settings: "opsz" 40;
  font-weight: 600; font-size: 1.1rem;
  font-variant-numeric: tabular-nums; color: var(--violet);
}

.rung[data-lead="true"] .price { font-size: 1.55rem; }

/* ---------- promises ---------- */
.promises { display: flex; flex-direction: column; gap: 1.1rem; }
.promise { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem; }
.promise .mark { grid-row: 1 / 3; font-weight: 800; font-size: 0.95rem; line-height: 1.5; }
.promise[data-kind="do"] .mark { color: var(--grass); }
.promise[data-kind="dont"] .mark { color: var(--cherry); }
.promise p { font-size: 0.9375rem; color: var(--placard); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; }
details { border-bottom: 1px solid var(--hairline); padding: 0.15rem 0; }
details:first-of-type { border-top: 1px solid var(--hairline); }

summary {
  cursor: pointer; list-style: none;
  padding: 0.9rem 1.7rem 0.9rem 0;
  font-weight: 700; font-size: 0.9375rem; position: relative;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  position: absolute; right: 0.15rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-display); font-size: 1.3rem; line-height: 1; color: var(--violet);
}

details[open] summary::after { content: "\2212"; }
details > p, details > ul { padding: 0 0 1rem; font-size: 0.9375rem; color: var(--placard); }

/* ---------- founding note ---------- */
.founding {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--sun);
  padding: 1.2rem var(--step);
  display: flex; flex-direction: column; gap: 0.55rem;
}

/* ---------- footer ---------- */
footer { margin-top: 1rem; background: var(--card); border-top: 1px solid var(--hairline); }

.footer-inner {
  max-width: var(--measure); margin: 0 auto;
  padding: 2.25rem var(--step) 2.5rem;
  display: flex; flex-direction: column; gap: 1.6rem;
}

.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 1.5rem; }
.foot-col { display: flex; flex-direction: column; gap: 0.5rem; }

.foot-col a {
  color: var(--ink); text-decoration: none; font-size: 0.875rem;
  border-bottom: 1px solid transparent; width: fit-content;
}

.foot-col a:hover { border-bottom-color: var(--violet); color: var(--violet); }

.foot-brand {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 60;
  font-weight: 600; font-size: 1.3rem; margin: 0;
}

.foot-legal {
  border-top: 1px solid var(--hairline);
  padding-top: 1.2rem; font-size: 0.8125rem; color: var(--placard);
  display: flex; flex-direction: column; gap: 0.45rem;
}

.updated { font-size: 0.8125rem; color: var(--placard); }

.backlink { font-size: 0.875rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 27rem) { .diptych { grid-template-columns: 1fr; gap: 1.6rem; } }

/* The tagline is the positioning, so it sits with the wordmark and never
   gets cut for space. It also carries the AI disclosure in five words. */
.tagline {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 50, "WONK" 1, "opsz" 30;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--violet);
  margin: -0.35rem 0 0;
  letter-spacing: 0.01em;
}
