/* ============================================================
   The Amazing Amy Leigh — Magnolia design system
   Single CSS file, custom properties, no framework, no build.
   ============================================================ */

/* ============================================================
   Design tokens — Magnolia (light) and dark Magnolia (candlelit cocoa)

   Pattern: every color exists twice — as a hex token (--ink) for
   opaque use, and as space-separated RGB channels (--ink-channels)
   for transparent use via `rgb(var(--ink-channels) / 0.NN)`.
   Dark theme overrides BOTH variants of each color.

   Contrast (WCAG AA = 4.5:1 normal text, 3:1 large/UI):
     LIGHT  ink/bg = 11.6:1   ink-soft/bg = 7.6:1
            muted/bg = 3.7:1 (large/secondary only — ok)
            accent/bg = 4.7:1   accent-deep/bg = 7.5:1
     DARK   ink/bg = 14.5:1   ink-soft/bg = 11.4:1
            muted/bg = 6.9:1
            accent/bg = 5.9:1   accent-deep/bg = 4.5:1
============================================================ */

:root {
  color-scheme: light;

  /* ----- Color: hex tokens ----- */
  --bg:           #FBF6EE;   /* cream — aged paper */
  --surface:      #FFFFFF;   /* cards */
  --surface-2:    #F4EEE3;   /* muted card / hover */
  --ink:          #3D2C26;   /* warm dark brown body text */
  --ink-soft:     #5D4540;   /* slightly lighter for body copy */
  --muted:        #816756;   /* secondary text, captions — AA on bg/surface */
  --rule:         #E5D9CB;   /* hairline dividers */
  --border-strong:#998778;   /* visible borders (inputs, focused UI) */
  --accent:       #B8554E;   /* dusty terracotta — CTAs */
  --accent-deep:  #8E3F39;   /* darker terracotta — hover */
  --accent-soft:  #F2D9C4;   /* peach wash */
  --accent-cool:  #7E8E70;   /* sage — icons, dividers */

  /* ----- Color: semantic aliases (form & feedback) ----- */
  --link:         #8E3F39;   /* same as accent-deep */
  --link-hover:   #B8554E;   /* same as accent */
  --success:      #4F6347;   /* deeper sage — passes AA on white */
  --error:        #B8423A;   /* warning red — passes AA on white */
  --focus-ring:   #B8554E;   /* accent */
  --on-accent:    #FFFFFF;   /* text on accent / accent-deep button bgs */
  --btn-bg-hover: #8E3F39;   /* darker than --accent for hover (white text passes AA) */

  /* ----- Color: RGB-channel companions for `rgb(var(--x) / α)` ----- */
  --bg-channels:           251 246 238;
  --surface-channels:      255 255 255;
  --surface-2-channels:    244 238 227;
  --ink-channels:           61  44  38;
  --accent-channels:       184  85  78;
  --accent-deep-channels:  142  63  57;
  --accent-soft-channels:  242 217 196;
  --accent-cool-channels:  126 142 112;
  --error-channels:        184  66  58;

  /* ----- Layered shadows (channels-driven, theme-aware) ----- */
  --shadow-1: 0 1px 2px rgb(var(--ink-channels) / 0.05),
              0 2px 6px rgb(var(--ink-channels) / 0.04);
  --shadow-2: 0 4px 8px rgb(var(--ink-channels) / 0.06),
              0 12px 24px rgb(var(--ink-channels) / 0.06);
  --shadow-3: 0 8px 16px rgb(var(--ink-channels) / 0.08),
              0 24px 56px rgb(var(--ink-channels) / 0.10);

  /* ----- Spacing scale (8px base) ----- */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;
  --space-11: 192px;

  /* ----- Type scale ----- */
  --text-xs:   0.8125rem;  /* 13px */
  --text-sm:   0.9375rem;  /* 15px */
  --text-base: 1.0625rem;  /* 17px */
  --text-md:   1.1875rem;  /* 19px */
  --text-lg:   1.375rem;   /* 22px */
  --text-xl:   1.75rem;    /* 28px */
  --text-2xl:  2.25rem;    /* 36px */
  --text-3xl:  3rem;       /* 48px */
  --text-4xl:  4.25rem;    /* 68px */
  --text-5xl:  5.5rem;     /* 88px */

  /* ----- Radii ----- */
  --radius-sm:   4px;
  --radius:     12px;
  --radius-lg:  20px;
  --radius-pill: 999px;

  /* ----- Containers ----- */
  --w-prose:   68ch;
  --w-narrow: 760px;
  --w-wide:  1100px;
  --w-full:  1320px;

  /* ----- Type families ----- */
  --font-serif:  "Cormorant Infant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:   "Nunito", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-script: "Sacramento", "Allura", cursive;

  /* ----- Easing ----- */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ----- Dark Magnolia: candlelit cocoa ------------------------------ */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:           #1F1815;
  --surface:      #2A201B;
  --surface-2:    #34281F;
  --ink:          #F0E3D2;
  --ink-soft:     #D4C0AC;
  --muted:        #A89485;
  --rule:         #3D2E26;
  --border-strong:#8B7261;
  --accent:       #D87870;
  --accent-deep:  #C46159;   /* large-text emphasis (h3 28px+); button hover uses --btn-bg-hover instead */
  --accent-soft:  #4A2F26;
  --accent-cool:  #9DB089;

  --link:         #D87870;
  --link-hover:   #E89890;
  --success:      #9DB089;
  --error:        #E08580;
  --focus-ring:   #D87870;
  --on-accent:    #1F1815;   /* dark text on bright accent — AA on dark theme */
  --btn-bg-hover: #E89890;   /* brighter than --accent for hover (cocoa text still passes AA) */

  --bg-channels:           31  24  21;
  --surface-channels:      42  32  27;
  --surface-2-channels:    52  40  31;
  --ink-channels:         240 227 210;
  --accent-channels:      216 120 112;
  --accent-deep-channels: 196  97  89;
  --accent-soft-channels:  74  47  38;
  --accent-cool-channels: 157 176 137;
  --error-channels:       224 133 128;

  /* Shadows on dark surfaces should be deeper & rely on the bg color
     (not ink) — true black drop shadows feel right against warm cocoa. */
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.30),
              0 2px 6px rgb(0 0 0 / 0.20);
  --shadow-2: 0 4px 8px rgb(0 0 0 / 0.36),
              0 12px 24px rgb(0 0 0 / 0.30);
  --shadow-3: 0 8px 16px rgb(0 0 0 / 0.40),
              0 24px 56px rgb(0 0 0 / 0.45);
}

/* ----- Theme transition: fires when [data-theme] flips on <html>.
   Wrapped in @media so it never runs for users who opted out, and never
   on first paint (the inline pre-paint script in layout.html sets the
   theme before paint, so initial render has no value to transition from). */
@media (prefers-reduced-motion: no-preference) {
  *,
  *::before,
  *::after {
    transition: background-color 150ms ease,
                color 150ms ease,
                border-color 150ms ease,
                fill 150ms ease,
                stroke 150ms ease;
  }
}

/* ---------- Reset + base --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "calt", "onum";
  position: relative;
}

/* Aged-paper grain — fixed-position noise overlay, low opacity, never blocks input.
   Light theme uses a warm-brown ink-tinted grain on `multiply`. Dark theme
   uses a warm-cream grain on `screen` so the texture LIGHTENS the dark
   surface (giving the same "tactile paper" feel, just inverted). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.17 0 0 0 0 0.15 0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
:root[data-theme="dark"] body::before {
  opacity: 0.08;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.94 0 0 0 0 0.89 0 0 0 0 0.82 0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img, svg { display: block; max-width: 100%; height: auto; }

/* Honor the HTML `hidden` attribute even when a more specific rule sets
   display (e.g. .field-error { display: flex } would otherwise win). */
[hidden] { display: none !important; }
a { color: var(--link); text-decoration: none; transition: color 180ms var(--ease); }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; text-decoration-color: var(--link-hover); text-underline-offset: 3px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  margin: var(--space-7) 0 var(--space-4);
}
h1 { font-size: var(--text-3xl); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); color: var(--accent-deep); }
h4 { font-size: var(--text-lg); }
h5, h6 { font-size: var(--text-md); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
p { margin: 0 0 var(--space-4); color: var(--ink-soft); }

ul, ol { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
li { margin-bottom: var(--space-2); }

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-7) 0; }
blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-md);
  color: var(--ink);
}

::selection { background: var(--accent-soft); color: var(--ink); }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Layout: container ---------------------------------------- */
.container {
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* ---------- Site header --------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(var(--bg-channels) / 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header-inner {
  max-width: var(--w-full);
  margin-inline: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
/* Push the theme toggle (and everything after it) to the right edge.
   The wordmark sits flush left; theme-toggle, nav-toggle, and nav cluster right. */
.theme-toggle { margin-left: auto; }
.wordmark {
  font-family: var(--font-script);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.6rem);
  color: var(--accent-deep);
  line-height: 1;
  white-space: nowrap;
}
.wordmark:hover { color: var(--accent); text-decoration: none; }

.site-nav {
  display: flex; gap: var(--space-5);
  font-size: var(--text-sm);
}
.site-nav a {
  color: var(--ink);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  padding: var(--space-2) 0;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}
.site-nav a:hover, .site-nav a:focus {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.nav-cta {
  padding: var(--space-2) var(--space-4) !important;
  border: 1px solid var(--accent) !important;
  border-radius: var(--radius-pill);
  color: var(--link) !important;   /* link uses AA-passing accent-deep / dark accent */
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--on-accent) !important;
  border-bottom-color: var(--accent) !important;
}

/* Theme toggle: same dimensions as the menu pill so they align in the header */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}
.theme-toggle svg { display: block; }
.theme-toggle .theme-toggle-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-toggle-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-toggle-moon { display: block; }

/* Mobile nav toggle: ellipsis dots + 'menu' label, hidden on desktop */
.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--ink);
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.nav-toggle:hover, .nav-toggle:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.nav-toggle-icon {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.nav-toggle-icon span {
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 280ms var(--ease), background 280ms var(--ease);
}
.nav-toggle[aria-expanded="true"] {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span {
  background: var(--surface);
}
/* When open, animate the dots into a tight row → close affordance */
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) { transform: translateX(2px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) { transform: translateX(-2px); }

@media (max-width: 880px) {
  .site-header-inner { padding-block: var(--space-3); }
  .site-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    padding: var(--space-7) var(--space-5) var(--space-7);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-2);
    transform: translateY(-110%);
    transition: transform 320ms var(--ease);
    gap: var(--space-3);
    font-family: var(--font-serif);
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-lg);
    font-weight: 500;
  }
  .nav-toggle { display: inline-flex; }
  .nav-cta { margin-top: var(--space-3); }
}

/* ---------- Site main ----------------------------------------------- */
.site-main { min-height: 60vh; padding-bottom: var(--space-9); }

/* ---------- Hero (home) --------------------------------------------- */
.hero-home {
  position: relative;
  padding: var(--space-9) var(--space-5) var(--space-8);
  overflow: hidden;
  background:
    /* Layered gradient mesh — terracotta wash top-right, peach center-right,
       sage breath bottom-left. All channels-driven so the dark theme
       inherits proportionally darker washes automatically. */
    radial-gradient(ellipse 70% 50% at 80% 0%,  rgb(var(--accent-channels)      / 0.10), transparent 70%),
    radial-gradient(ellipse 50% 50% at 100% 50%, rgb(var(--accent-soft-channels) / 0.45), transparent 65%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgb(var(--accent-cool-channels) / 0.10), transparent 65%),
    linear-gradient(180deg, rgb(var(--bg-channels) / 0), rgb(var(--surface-2-channels) / 0.4));
}

/* Decorative botanical SVG flourish behind the wordmark */
.hero-flourish {
  position: absolute;
  width: clamp(160px, 22vw, 320px);
  height: auto;
  color: var(--accent-cool);
  opacity: 0.45;
  top: 18%;
  right: 36%;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-6deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--w-full);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  gap: var(--space-9);
  align-items: center;
}

.hero-portrait {
  position: relative;
  /* Slight rotation pulls the peach wash off-axis for a tactile, asymmetric feel */
}
.hero-portrait::before {
  content: "";
  position: absolute;
  inset: var(--space-6) calc(var(--space-5) * -1) calc(var(--space-5) * -1.5) var(--space-5);
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, rgb(var(--accent-soft-channels) / 0.6) 100%);
  border-radius: var(--radius-lg);
  z-index: 0;
  transform: rotate(-2deg);
  transition: transform 600ms var(--ease);
}
.hero-portrait::after {
  /* Tiny botanical mark — a sage sprig in the corner */
  content: "✺";
  position: absolute;
  bottom: calc(var(--space-5) * -1);
  right: var(--space-3);
  z-index: 2;
  color: var(--accent-cool);
  font-size: var(--text-2xl);
  opacity: 0.7;
  transform: rotate(15deg);
}
.hero-portrait:hover::before {
  transform: rotate(-3deg) translate(-4px, -4px);
}
.hero-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  transition: transform 800ms var(--ease);
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--accent-cool);
  margin: 0 0 var(--space-4);
}

.hero-title {
  font-family: var(--font-script);
  font-size: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  font-weight: 400;
  color: var(--accent-deep);
  line-height: 0.92;
  margin: 0 0 var(--space-4);
  /* Subtle text shadow gives depth against the gradient mesh */
  text-shadow: 0 1px 0 rgb(var(--surface-channels) / 0.4);
}

.hero-tag {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-style: italic;
  color: var(--accent-deep);   /* AA-passing accent for body-size text */
  margin: 0 0 var(--space-6);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hero-tag span { color: var(--accent-cool); opacity: 0.6; }

.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-rule {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-top: var(--space-9);
  color: var(--accent-cool);
  opacity: 0.7;
}
.hero-rule svg { display: block; }

@media (max-width: 880px) {
  .hero-home { padding-block: var(--space-7); }
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-7); }
  .hero-portrait { max-width: 360px; margin-inline: auto; }
  .hero-flourish { display: none; }
}

/* ---------- Page-load reveal animations ----------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 900ms var(--ease) forwards;
  animation-delay: var(--reveal-delay, 0s);
}
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ---------- Buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 200ms var(--ease);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
  color: var(--on-accent);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover, .btn-ghost:focus {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent-deep);
  text-decoration: none;
}

/* ---------- Page header (non-home pages) ---------------------------- */
.page-header {
  padding-top: var(--space-9);
  padding-bottom: var(--space-6);
  text-align: center;
  position: relative;
}
/* Decorative botanical mark above the title */
.page-header::before {
  content: "✺";
  display: block;
  font-family: var(--font-serif);
  font-size: var(--text-md);
  color: var(--accent-cool);
  opacity: 0.6;
  margin-bottom: var(--space-3);
  letter-spacing: 0.6em;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 1.5rem + 3vw, var(--text-4xl));
  font-weight: 500;
  margin: 0 0 var(--space-4);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.page-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-4) auto 0;
}
.page-featured {
  margin-top: var(--space-7);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  max-width: 800px;
  margin-inline: auto;
  position: relative;
}
.page-featured::before {
  /* Soft peach wash backing, like the hero portrait */
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  z-index: -1;
  transform: rotate(-1deg);
}
.page-featured img { width: 100%; display: block; }

/* ---------- Page body / typography ---------------------------------- */
.page-body {
  max-width: var(--w-prose);
  font-size: var(--text-md);
}
.page-body img {
  border-radius: var(--radius);
  margin: var(--space-5) auto;
  box-shadow: var(--shadow-1);
}
.page-body a { color: var(--link); border-bottom: 1px solid var(--accent-soft); }
.page-body a:hover { background: var(--accent-soft); text-decoration: none; }

/* Drop cap: only when the page starts with a paragraph (i.e. About-style prose
   pages — not pages that lead with cols/galleries/headings). */
.page-body > p:first-child::first-letter {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 4.2em;
  float: left;
  line-height: 0.85;
  margin: 0.05em var(--space-3) 0 0;
  color: var(--accent-deep);
  font-style: normal;
}

/* ---------- Cols (from extracted [one_half], [one_third] shortcodes) - */
.cols {
  display: grid;
  gap: var(--space-7);
  margin: var(--space-7) 0;
}
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-2-1 { grid-template-columns: 2fr 1fr; }
.cols > div > h2,
.cols > div > h3 {
  margin-top: 0;
}
@media (max-width: 720px) {
  .cols-2, .cols-3, .cols-4, .cols-2-1 { grid-template-columns: 1fr; gap: var(--space-5); }
}
/* Cols inside .page-body break out of the prose-width clamp so they can
   actually fill the wide container (otherwise two-up layouts feel cramped). */
.page-body .cols {
  position: relative;
  width: var(--w-wide);
  max-width: calc(100vw - (var(--space-7) * 2));
  left: 50%;
  transform: translateX(-50%);
}

/* ---------- Price list (from extracted [price] shortcodes) ---------- */
.price-list {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0;
  border-top: 1px solid var(--rule);
}
.price-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-serif);
  font-size: var(--text-md);
}
.price-list li::before { content: ""; }
.price-amount {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--accent-deep);
  letter-spacing: 0.01em;
}

/* ---------- Gallery (from extracted [gallery]) ---------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin: var(--space-7) 0;
  max-width: none;
}
/* Break out of the prose-width clamp so galleries fill the wide container */
.page-body .gallery {
  position: relative;
  width: var(--w-wide);
  max-width: calc(100vw - var(--space-7));
  left: 50%;
  transform: translateX(-50%);
}
.gallery a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease);
  border-bottom: 0;
  background: var(--surface-2);
}
.gallery a::after {
  /* Warm overlay that washes in on hover — matches accent-soft */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgb(var(--accent-channels) / 0) 40%,
    rgb(var(--accent-deep-channels) / 0.35) 100%);
  opacity: 0;
  transition: opacity 320ms var(--ease);
  pointer-events: none;
}
.gallery a:hover {
  transform: translateY(-4px) rotate(-0.6deg);
  box-shadow: var(--shadow-3);
  background: transparent;
}
.gallery a:hover::after { opacity: 1; }
.gallery a:nth-child(even):hover { transform: translateY(-4px) rotate(0.6deg); }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 700ms var(--ease), filter 320ms var(--ease);
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  filter: saturate(0.95);
}
.gallery a:hover img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

/* ---------- Site footer ---------------------------------------------
   Footer is an inverse panel — dark on a light page, even-darker on a
   dark page (always visually distinct from the body). Uses dedicated
   --footer-* tokens so the wash colors don't get inverted in dark mode. */
:root {
  --footer-bg:      #3D2C26;   /* same as light --ink */
  --footer-fg:      #F2D9C4;   /* same as light --accent-soft — 9.5:1 on footer-bg */
  --footer-fg-mute: #C2AD9E;   /* AA on footer-bg (6.45:1) */
  --footer-accent:  #B8554E;   /* same as light --accent */
  --footer-fg-channels: 242 217 196;
}
:root[data-theme="dark"] {
  --footer-bg:      #15100D;   /* deeper than --bg, gives a clear stage */
  --footer-fg:      #ECDFCD;   /* warm cream — 14:1 on footer-bg */
  --footer-fg-mute: #B89E89;   /* AA on footer-bg (6.87:1) */
  --footer-accent:  #D87870;
  --footer-fg-channels: 236 223 205;
}
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: var(--space-8) var(--space-5) var(--space-6);
  margin-top: var(--space-10);
}
.site-footer-inner {
  max-width: var(--w-full);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-7);
  align-items: start;
}
.footer-script {
  font-family: var(--font-script);
  font-size: var(--text-3xl);
  color: var(--footer-fg);
  line-height: 1;
}
.footer-tag {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--footer-fg-mute);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}
.footer-nav { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.footer-nav a {
  color: var(--footer-fg);
  text-transform: lowercase;
  font-size: var(--text-sm);
  border-bottom: 1px solid transparent;
}
.footer-nav a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--footer-accent);
  text-decoration: none;
}
.footer-meta {
  grid-column: 1 / -1;
  border-top: 1px solid rgb(var(--footer-fg-channels) / 0.15);
  padding-top: var(--space-4);
  color: var(--footer-fg-mute);
  font-size: var(--text-xs);
}

@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Profile grid (portfolio page) --------------------------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
  margin: var(--space-7) 0;
}
.page-body .profile-grid {
  position: relative;
  width: var(--w-wide);
  max-width: calc(100vw - (var(--space-7) * 2));
  left: 50%;
  transform: translateX(-50%);
}
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  text-decoration: none;
  text-align: center;
  transition: transform 240ms var(--ease),
              box-shadow 240ms var(--ease),
              border-color 240ms var(--ease),
              background 180ms var(--ease);
  color: var(--ink);
}
.page-body .profile-card { border-bottom: 1px solid var(--rule); background: var(--surface); }
.profile-card:hover,
.profile-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-2);
  background: var(--surface);
  text-decoration: none;
}
.profile-card img {
  width: 100%;
  max-width: 140px;
  height: 80px;
  object-fit: contain;
  margin-bottom: var(--space-3);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: var(--space-2);
}
.profile-card-name {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  color: var(--accent-deep);
  font-weight: 500;
}
.profile-card-host {
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* ---------- Contact form -------------------------------------------- */
.contact-body { max-width: 720px; }
.contact-intro {
  margin-bottom: var(--space-7);
  color: var(--ink-soft);
  font-size: var(--text-md);
}
.contact-intro p:last-child { margin-bottom: 0; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  box-shadow: var(--shadow-1);
}

/* Two-column row that collapses on narrow viewports */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

.field {
  margin-bottom: var(--space-5);
  display: flex;
  flex-direction: column;
}
.field-row .field { margin-bottom: 0; }
@media (max-width: 600px) {
  .field-row .field:not(:last-child) { margin-bottom: var(--space-5); }
}

.field-label {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-2);
  letter-spacing: 0.005em;
}

.field-input {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  transition: border-color 180ms var(--ease),
              box-shadow 180ms var(--ease),
              background 180ms var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field-input::placeholder { color: var(--muted); opacity: 1; }

.field-input:hover { border-color: var(--ink-soft); }

.field-input:focus,
.field-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--accent-channels) / 0.18);
  background: var(--surface);
}

.field-textarea {
  resize: vertical;
  min-height: 7em;
  font-family: var(--font-sans);
}

/* Hint text below an input */
.field-hint {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--muted);
  font-style: italic;
}

/* Error state */
.field-invalid .field-input {
  border-color: var(--error);
  background: rgb(var(--accent-channels) / 0.04);
}
.field-invalid .field-input:focus {
  box-shadow: 0 0 0 3px rgb(var(--error-channels) / 0.22);
}
.field-error {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--error);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.field-error::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  flex-shrink: 0;
  margin-top: 3px;
  background-color: var(--error);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='13'/><line x1='12' y1='16.5' x2='12' y2='17'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='13'/><line x1='12' y1='16.5' x2='12' y2='17'/></svg>") center/contain no-repeat;
}

/* Honeypot — visually hidden but in the DOM (display:none would be skipped by bots) */
.field-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Captcha wrapper */
.field-captcha {
  margin-bottom: var(--space-5);
}
.field-captcha .cf-turnstile {
  /* Turnstile mounts an iframe; its own colors come from data-theme="auto" */
  min-height: 65px;
}

/* Submit area + button states */
.contact-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-6);
}
.contact-submit {
  min-width: 180px;
  position: relative;
}
.contact-submit-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgb(var(--surface-channels) / 0.4);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  margin-left: var(--space-2);
  animation: contact-spin 700ms linear infinite;
}
.contact-submit.is-submitting .contact-submit-spinner { display: inline-block; }
.contact-submit:disabled {
  opacity: 0.85;
  cursor: progress;
  transform: none;
}
@keyframes contact-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .contact-submit-spinner { animation: none; }
}

/* Form-level status (error banner) */
.form-status {
  margin: var(--space-5) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  border: 1px solid var(--rule);
}
.form-status-error {
  color: var(--error);
  border-color: var(--error);
  background: rgb(var(--accent-channels) / 0.06);
}

/* Success state — replaces the form */
.contact-success {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-9) var(--space-6);
  box-shadow: var(--shadow-1);
  position: relative;
}
.contact-success::before {
  /* Same peach wash backing as the about page featured image */
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  z-index: -1;
  transform: rotate(-1deg);
}
.contact-success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  margin-bottom: var(--space-4);
}
.contact-success h2 {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 500;
  margin: 0 0 var(--space-3);
  color: var(--ink);
}
.contact-success p {
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 32em;
}

/* Dark theme tweaks for fields (textarea + input look slightly different on cocoa) */
:root[data-theme="dark"] .field-input {
  background: rgb(var(--surface-channels) / 0.5);
}
:root[data-theme="dark"] .field-input:focus {
  background: var(--surface);
}
:root[data-theme="dark"] .field-invalid .field-input {
  background: rgb(var(--accent-channels) / 0.10);
}
:root[data-theme="dark"] .form-status-error {
  background: rgb(var(--accent-channels) / 0.10);
}
:root[data-theme="dark"] .contact-success::before {
  background: var(--accent-soft);   /* deep-peach in dark — gives subtle warm depth */
}

/* ---------- Error page ---------------------------------------------- */
.error-page {
  padding-block: var(--space-10);
  display: grid;
  place-items: center;
  text-align: center;
}
.error-card { max-width: 420px; }
.error-status {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  color: var(--accent);
  font-weight: 500;
  line-height: 1;
}
.error-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--text-2xl);
  margin: var(--space-3) 0 var(--space-5);
}
.error-message { color: var(--muted); margin-bottom: var(--space-6); }

/* ---------- Reduced motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
