/* ============================================================
   1. RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }

body {
  min-height: 100svh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }

img, picture, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
ul[role="list"] { list-style: none; padding: 0; }
:target { scroll-margin-block-start: 4rem; }

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

/* ============================================================
   2. TOKENS — sampled from Luci's artwork
   ============================================================ */
:root {
  /* ---- Light theme. Every value color-picked from Luci's artwork. ---- */
  --bg:         #FFF7D6;   /* the cream box behind "Character Illustration" */
  --surface:    #FCEBCD;
  --ink:        #5A1818;   /* the hand-lettering maroon */
  --ink-soft:   #8A4438;
  --sage:       #9DC7A4;   /* price chips */
  --peach:      #EEA261;   /* CTA gradient, top */
  --gold:       #F7D887;   /* CTA gradient, bottom */
  --rust:       #AC573A;   /* links */
  --rule:       rgba(90, 24, 24, .18);

  /* Text that sits ON sage or ON the warm gradient. Dark in BOTH themes,
     because those two surfaces stay light in both. Using --ink here would
     go cream-on-sage at 1.5:1 the moment dark mode turned on. */
  --on-accent:  #5A1818;

  --font-body: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
               "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Fluid type, 320 -> 1440. No media queries anywhere in this file. */
  --step--1: clamp(0.88rem, 0.85rem + 0.14vw, 0.97rem);
  --step-0:  clamp(1.05rem, 1.00rem + 0.25vw, 1.22rem);
  --step-1:  clamp(1.26rem, 1.17rem + 0.45vw, 1.56rem);
  --step-2:  clamp(1.51rem, 1.36rem + 0.76vw, 2.02rem);
  --step-3:  clamp(1.81rem, 1.57rem + 1.20vw, 2.62rem);
  --step-4:  clamp(2.18rem, 1.80rem + 1.88vw, 3.40rem);

  --space-2xs: clamp(0.50rem, 0.48rem + 0.13vw, 0.63rem);
  --space-xs:  clamp(0.75rem, 0.71rem + 0.19vw, 0.94rem);
  --space-s:   clamp(1.00rem, 0.95rem + 0.25vw, 1.19rem);
  --space-m:   clamp(1.50rem, 1.43rem + 0.38vw, 1.78rem);
  --space-l:   clamp(2.00rem, 1.90rem + 0.50vw, 2.38rem);
  --space-xl:  clamp(3.00rem, 2.85rem + 0.76vw, 3.56rem);
  --space-2xl: clamp(4.00rem, 3.80rem + 1.01vw, 4.75rem);

  --wrap: 56rem;
  --gutter: var(--space-m);
  --radius: 14px;

  color-scheme: light dark;
}



/* ============================================================
   2b. DARK THEME
   Ground colour is Luci's own deep red-brown #5D2D28 — sampled from the
   Examples panel — held at hue 6 degrees and taken down to 10% lightness,
   with chroma eased back so it reads as warm shadow rather than mud.

   The rules this follows:
   - Nothing is inverted. Hue stays put; only lightness and chroma move.
   - Body text is a dimmed cream, not white. The brand cream #FFF7D6 on this
     ground is 17:1, which haloes; #EDE4C0 lands at 14:1 and reads calm.
   - Saturated brand colours get LIGHTER on a dark ground, never darker.
     Rust #AC573A as a link would be 2.4:1, so it lifts to #E0957B (7.5:1).
   - Sage and the CTA gradient remain light surfaces, so their text stays dark
     via --on-accent, and the gradient deepens just enough to hold the same
     contrast it has in light mode (6.7:1 vs 6.3:1).
   - Elevation swaps from cast shadow to a warm ring. A dark shadow on a dark
     ground does nothing, so the art gets framed instead of floated.
   - The artwork itself is NOT filtered. Lit panels on a dark wall is the
     point — it's a gallery at night, which is what the hero already shows.
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #211312;   /* #5D2D28, hue held, darkened to L=10%  */
    --surface:    #301C1A;
    --ink:        #EDE4C0;   /* 14.1:1 on --bg   AAA */
    --ink-soft:   #C2A48E;   /*  7.7:1 on --bg   AAA */
    --sage:       #9DC7A4;   /*  unchanged; 9.5:1 against --on-accent */
    --peach:      #DD8E4B;   /*  6.7:1 against --on-accent */
    --gold:       #DEC073;   /* 10.0:1 against --on-accent */
    --rust:       #E0957B;   /*  7.5:1 on --bg   AAA */
    --rule:       rgba(237, 228, 192, .16);
    --on-accent:  #2A1210;
  }

  /* Art is framed, not shadowed — see note above. */
  .banner img,
  .portrait,
  .panel {
    box-shadow: 0 0 0 1px #6F4B3E, 0 16px 40px -18px rgba(0, 0, 0, .85);
  }
  .chip { box-shadow: 0 3px 0 rgba(20, 8, 8, .45); }
  .chip:hover,
  .chip:focus-visible { box-shadow: 0 5px 0 rgba(20, 8, 8, .45); }
}

/* ============================================================
   3. BASE
   ============================================================ */
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--rust); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--bg);
  padding: var(--space-2xs) var(--space-s); border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; top: 0; z-index: 100; }

/* ============================================================
   4. LAYOUT PRIMITIVES
   ============================================================ */
.wrap {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--gutter);
}
.stack > * + * { margin-block-start: var(--flow, var(--space-s)); }
.stack--xl { --flow: var(--space-xl); }

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }

/* Visually hidden, still announced by screen readers and indexed by search
   engines. Every price on this page lives inside a picture, so the written
   content of each panel is repeated here as real markup, in the same reading
   order as the artwork. Do not swap this for display:none — that would drop it
   out of the accessibility tree, which is the whole point.
   No white-space:nowrap: this carries block content, not one-liners. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
}

/* ============================================================
   5. COMPONENTS
   ============================================================ */

/* --- Banner --- */
.banner { padding-block-start: var(--space-s); }
.banner img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px -12px rgba(90, 24, 24, .35);
}

/* --- Intro: copy left, portrait right --- */
.intro {
  display: grid;
  gap: var(--space-l);
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
}
.intro h1 {
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -.015em;
}
.intro p { font-size: var(--step-1); color: var(--ink-soft); max-width: 30ch; }

.portrait {
  justify-self: center;
  width: min(15rem, 70vw);
  border-radius: 50%;
  border: 6px solid var(--surface);
  box-shadow: 0 8px 24px -10px rgba(90, 24, 24, .4);
}

/* --- Section headings, styled after the art's chip labels --- */
.heading {
  text-align: center;
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -.02em;
}
.heading::after {
  content: "";
  display: block;
  width: 4.5rem; height: 5px;
  margin: var(--space-xs) auto 0;
  border-radius: 99px;
  background: var(--sage);
}

/* --- Commission / example panels --- */
/* The commission panels. Plain images — pinch-zoom on mobile and the panel's
   own size on desktop are enough, so they are not links and carry no hover. */
.panel {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px -14px rgba(90, 24, 24, .45);
}

/* --- Contact --- */
.contact {
  background: linear-gradient(160deg, var(--peach), var(--gold));
  border-radius: var(--radius);
  padding: var(--space-xl) var(--space-m);
  text-align: center;
  color: var(--on-accent);   /* not --ink: this surface stays light in dark mode */
}
.contact h2 { font-size: var(--step-3); font-weight: 800; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  justify-content: center;
  margin-block-start: var(--space-m);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: var(--sage);
  color: var(--on-accent);   /* not --ink: sage stays light in dark mode */
  text-decoration: none;
  font-weight: 700;
  padding: var(--space-2xs) var(--space-m);
  border-radius: 99px;
  box-shadow: 0 3px 0 rgba(90, 24, 24, .18);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chip:hover, .chip:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 rgba(90, 24, 24, .18);
}
.chip svg { width: 1.1em; height: 1.1em; flex: none; }

/* --- Footer --- */
.footer {
  text-align: center;
  font-size: var(--step--1);
  color: var(--ink-soft);
  padding-block: var(--space-xl);
}
.footer hr { border: 0; border-top: 1px solid var(--rule); margin-block-end: var(--space-m); }

/* ============================================================
   6. LEGAL PAGES  (privacy.html, terms.html)
   Long-form text. Narrow measure, clear hierarchy, nothing else.
   ============================================================ */
.prose { max-width: 38rem; }
.prose h1 {
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -.015em;
  margin-block-end: var(--space-l);
}
.prose h2 {
  font-size: var(--step-1);
  font-weight: 800;
  margin-block-start: var(--space-l);
}
.prose p, .prose li { margin-block-start: var(--space-xs); }
.prose ul { padding-inline-start: 1.2em; }
.prose li { margin-block-start: var(--space-2xs); }
.prose strong { font-weight: 700; }

.updated {
  margin-block-start: var(--space-l);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Back link at the top of a legal page. */
.back {
  display: inline-block;
  margin-block-end: var(--space-m);
  font-size: var(--step--1);
  text-decoration: none;
}
.back:hover { text-decoration: underline; }

/* ---- Site footer, shared by every page ---- */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  justify-content: center;
  margin-block-end: var(--space-xs);
}
.footer-nav a { color: var(--ink-soft); }
