/* The Shropshire Celebrant · foundation stylesheet
   Palette provenance: navy #0c243c (53.7% of her official card),
   gold #c49a44 (sampled from the card's gold flecks, 70th percentile),
   sage #bec9b9 (sampled from the commissioned eucalyptus watercolour),
   cream #faf8f4 (warm white harmonising with the CC logo cream).
   Gold is decorative or large-display only on light grounds (AA rule). */

:root {
  --navy: #0c243c;
  --navy-deep: #091c2f;
  --navy-soft: #14324f;
  --gold: #c49a44;
  --gold-soft: #d8ba7a;
  --gold-focus: #a07a2b; /* focus rings + focused input borders ONLY: 3:1+ on white, cream, navy and navy-soft */
  --sage: #bec9b9;
  --sage-deep: #77856f;   /* decorative/large display only on light (3.9:1) */
  --sage-ink: #5c6a55;    /* AA-checked sage for small text on cream/white (5.4:1) */
  --cream: #faf8f4;
  --white: #ffffff;
  --ink: #0c243c;           /* body text on light */
  --ink-soft: #435568;      /* secondary text on light, AA on cream */
  --cream-ink: #f2efe9;     /* body text on navy */
  --cream-ink-soft: #b9c4cf;/* secondary text on navy, AA on navy */
  --line: #e3ded4;          /* hairline on light */
  --line-navy: #24405c;     /* hairline on navy */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --ease-settle: cubic-bezier(0.22, 0.8, 0.3, 1);
  --reveal-time: 0.9s;
  --reveal-shift: 18px;
  --wrap: 1120px;
  --wrap-narrow: 760px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-wrap: break-word;
}
body.bg-white { background: var(--white); }
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 7.2vw, 4.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
p { margin: 0 0 1em; }
a { color: inherit; }
p a, li a { text-decoration-color: var(--gold); text-underline-offset: 3px; }
p a:hover, li a:hover { color: var(--sage-ink); }
.lede { font-size: clamp(1.125rem, 2.4vw, 1.3rem); color: var(--ink-soft); max-width: 38em; }
.muted { color: var(--ink-soft); }
::selection { background: var(--sage); color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold-focus); outline-offset: 3px; border-radius: 2px; }

/* ---------- layout rhythm ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.wrap-narrow { max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.section { padding-block: clamp(64px, 11vw, 120px); }
.section-tight { padding-block: clamp(40px, 7vw, 72px); }
.flow > * + * { margin-top: 1em; }
.center { text-align: center; }
.divider-sprig { display: flex; justify-content: center; padding-block: clamp(10px, 2vw, 20px); }
.divider-sprig img { width: 54px; opacity: 0.85; }

/* ---------- register modifiers ---------- */
/* Celebration pages: lighter, more air, gentle warmth */
.register-lift { background: var(--white); }
.register-lift .section-alt { background: var(--cream); }
/* Remembrance pages: settled, deeper, slower */
.register-settle { --reveal-time: 1.5s; --reveal-shift: 10px; background: var(--cream); }
.register-settle .section-deep { background: var(--navy); color: var(--cream-ink); }
.register-settle .section-deep .muted, .register-settle .section-deep .lede { color: var(--cream-ink-soft); }
.on-navy { background: var(--navy); color: var(--cream-ink); }
.on-navy .muted, .on-navy .lede { color: var(--cream-ink-soft); }
.on-navy p a, .on-navy li a { text-decoration-color: var(--gold-soft); }
.on-navy p a:hover, .on-navy li a:hover { color: var(--gold-soft); }
.on-navy ::selection { background: var(--gold); color: var(--navy); }

/* ---------- header ---------- */
.site-head {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px clamp(20px, 5vw, 48px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand-mark { width: 46px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.on-navy .brand-name { color: var(--cream-ink); }

/* burger */
.burger {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.burger span:not(.burger-label) {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.2s;
}
.burger span:not(.burger-label)::before, .burger span:not(.burger-label)::after {
  content: "";
  position: absolute;
  left: 0;
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-settle);
}
.burger span::before { top: -8px; }
.burger span::after { top: 8px; }
.burger[aria-expanded="true"] span:not(.burger-label) { background: transparent; }
.burger[aria-expanded="true"] span:not(.burger-label)::before { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:not(.burger-label)::after { transform: translateY(-8px) rotate(-45deg); }
.burger-label { position: absolute; width: 1px; height: 1px; background: transparent; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- drawer ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--navy);
  color: var(--cream-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 6vw, 72px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.45s var(--ease-settle), visibility 0s linear 0.45s;
  overflow-y: auto;
}
.drawer.open { visibility: visible; opacity: 1; transition: opacity 0.45s var(--ease-settle); }
.drawer-close {
  position: absolute;
  top: 18px;
  right: max(clamp(20px, 5vw, 48px), calc((100vw - var(--wrap)) / 2 + clamp(20px, 5vw, 48px)));
  color: var(--cream-ink);
}
.drawer nav ul { list-style: none; margin: 0; padding: 0; }
.drawer nav li + li { margin-top: clamp(4px, 1.2vh, 14px); }
.drawer nav a {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.6vh, 2.6rem);
  color: var(--cream-ink);
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
  min-height: 44px;
  background: linear-gradient(currentColor, currentColor) no-repeat left calc(100% - 4px) / 0% 2px;
  transition: color 0.25s, background-size 0.35s var(--ease-settle);
}
.drawer nav a:hover, .drawer nav a:focus-visible { color: var(--gold-soft); background-size: 100% 2px; }
.drawer nav a.is-active { background: linear-gradient(var(--gold), var(--gold)) no-repeat left calc(100% - 4px) / 100% 2px; }
.drawer-foot a { transition: color 0.25s; }
.drawer-foot a:hover { color: var(--gold-soft); }
.drawer-foot { margin-top: clamp(20px, 5vh, 44px); color: var(--cream-ink-soft); font-size: 0.95rem; }
.drawer-foot a { color: var(--cream-ink); }
/* staggered entrance, JS-gated so no-JS users always see links */
html.js .drawer nav li { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease-settle), transform 0.5s var(--ease-settle); }
html.js .drawer.open nav li { opacity: 1; transform: none; }
html.js .drawer.open nav li:nth-child(1) { transition-delay: 0.08s; }
html.js .drawer.open nav li:nth-child(2) { transition-delay: 0.13s; }
html.js .drawer.open nav li:nth-child(3) { transition-delay: 0.18s; }
html.js .drawer.open nav li:nth-child(4) { transition-delay: 0.23s; }
html.js .drawer.open nav li:nth-child(5) { transition-delay: 0.28s; }
html.js .drawer.open nav li:nth-child(6) { transition-delay: 0.33s; }
html.js .drawer.open nav li:nth-child(7) { transition-delay: 0.38s; }
html.js .drawer.open nav li:nth-child(8) { transition-delay: 0.43s; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--cream);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease-settle);
}
.btn:hover { background: var(--navy-soft); border-color: var(--navy-soft); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }
.on-navy .btn { background: var(--cream); border-color: var(--cream); color: var(--navy); }
.on-navy .btn:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.on-navy .btn-ghost { background: transparent; border-color: var(--cream-ink-soft); color: var(--cream-ink); }
.on-navy .btn-ghost:hover { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 20px; }
.field-label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.field-hint { display: block; color: var(--ink-soft); font-size: 0.875rem; margin-top: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-focus);
  box-shadow: 0 0 0 3px rgba(196, 154, 68, 0.22);
}

/* ---------- quote / testimonial ---------- */
.quote { margin: 0; position: relative; padding-top: 1.6em; }
.quote::before {
  content: "\201C";
  position: absolute;
  top: 0;
  left: -0.05em;
  font-family: var(--font-display);
  font-size: 3.2em;
  line-height: 1;
  color: var(--gold);
}
.quote.center::before { left: 50%; transform: translateX(-50%); }
.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 0.5em;
}
.quote cite { font-style: normal; color: var(--ink-soft); font-size: 0.95rem; }
.on-navy .quote cite { color: var(--cream-ink-soft); }

/* ---------- ceremony tiles ---------- */
.tile-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(24px, 4vw, 34px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.35s var(--ease-settle), box-shadow 0.35s, border-color 0.35s;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(12, 36, 60, 0.1); border-color: var(--sage); }
.tile h3 { margin: 0; }
.tile p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.tile .tile-go { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: 0.95rem; color: var(--sage-ink); }
.tile-settle { background: var(--navy); border-color: var(--navy); }
.tile-settle h3 { color: var(--cream-ink); }
.tile-settle p { color: var(--cream-ink-soft); }
.tile-settle .tile-go { color: var(--gold-soft); }
.tile-settle:hover { border-color: var(--gold); box-shadow: 0 14px 34px rgba(9, 28, 47, 0.28); }

/* ---------- audio player pill ---------- */
.audio-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
}
.audio-pill button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--navy);
  color: var(--cream);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: background 0.2s;
}
.audio-pill button:hover { background: var(--navy-soft); }
.audio-pill button:disabled { cursor: default; }
.audio-pill[data-audio-future] { opacity: 0.55; }
.on-navy .audio-pill { background: var(--navy-soft); border-color: var(--line-navy); color: var(--cream-ink); }
.on-navy .audio-pill button { background: var(--gold); color: var(--navy); }

/* ---------- footer ---------- */
.site-foot { background: var(--navy-deep); color: var(--cream-ink); }
.site-foot .foot-grid {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-block: clamp(48px, 8vw, 72px);
}
.site-foot h4 { color: var(--cream-ink); font-size: 1.15rem; margin-bottom: 0.7em; }
.site-foot p { color: var(--cream-ink-soft); font-size: 0.97rem; margin-bottom: 0.4em; }
.site-foot a { color: var(--cream-ink); text-decoration-color: var(--gold-soft); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--gold-soft); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot li a { text-decoration: none; display: inline-block; padding: 2px 0; }
.site-foot li a:hover { text-decoration: underline; }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.foot-brand img { width: 44px; }
.foot-brand span { font-family: var(--font-display); font-size: 1.2rem; }
.foot-legal {
  border-top: 1px solid var(--line-navy);
  padding-block: 22px;
  font-size: 0.9rem;
  color: var(--cream-ink-soft);
  text-align: center;
}
.foot-legal a { color: var(--cream-ink); }

/* ---------- reveals (fail visible: hidden only under html.js) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity var(--reveal-time) var(--ease-settle), transform var(--reveal-time) var(--ease-settle);
}
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal-d1.in { transition-delay: 0.12s; }
html.js .reveal-d2.in { transition-delay: 0.24s; }
html.js .reveal-d3.in { transition-delay: 0.36s; }

/* ---------- leaf drift canvas ---------- */
.leaf-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.has-leaves { position: relative; }
.has-leaves > .wrap, .has-leaves > .wrap-narrow { position: relative; z-index: 1; }

/* ---------- dove draw-on + flourish ---------- */
/* stroke dash values are applied by shared.js only, so no-JS shows the art complete */
[data-dove-draw] .dove-stroke, [data-flourish] .flourish-stroke { transition: none; }

/* ---------- reduced motion: kill everything ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .drawer nav li { opacity: 1; transform: none; }
  .leaf-canvas { display: none; }
}

.skip-link{position:absolute;left:-999px;top:0;background:var(--navy);color:#fff;padding:12px 18px;z-index:200;border-radius:0 0 6px 0}
.skip-link:focus{left:0}

/* heading underline flourish: the line that becomes the dove */
.h-flourish{display:block;width:min(340px,72%);color:var(--gold);margin:14px 0 22px}
h1:has(+ .h-flourish){margin-bottom:0}
.h-flourish svg{width:100%;height:auto;display:block;overflow:visible}
.on-navy .h-flourish{color:var(--gold-soft)}
