/* ============================================================================
   Teddy's Sleeping Bears
   Every Bear Hug Leaves Paw Prints That Last a Lifetime

   One stylesheet for the whole site. Sections are labelled so you can find
   things without reading it all. Colours and sizes live in ONE place at the
   top (":root") — change them there and the whole site follows.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Nunito+Sans:wght@300;400;600;700&display=swap');

/* ============================================================================
   1. THE PALETTE  —  sampled from the logo
   ========================================================================= */

:root {
  /* Surfaces */
  --cream:        #FBF5EA;
  --parchment:    #F3E9D6;
  --parchment-2:  #EFE1C9;

  /* Bear fur */
  --tan:          #E4C49E;
  --bear-light:   #C68B54;
  --bear:         #A9683A;
  --bear-deep:    #7C4924;

  /* Text — always one of these two on a cream/parchment surface */
  --ink:          #432917;
  --ink-soft:     #6B4A32;

  /* Sky, moon, sun */
  --moon:         #F0CD82;
  --moon-deep:    #DFB25B;
  --sun:          #F2921E;
  --sun-soft:     #F7B34B;
  --sky:          #BDD9EA;
  --sky-light:    #DCEDF6;
  --sky-deep:     #9BC4DC;

  /* Script / wordmark */
  --script:       #C1682B;

  /* Night */
  --night:        #2E3A52;
  --night-deep:   #1F2740;
  --star:         #FFFDF6;

  /* Type scale — fluid, so it never needs breakpoints */
  --step--1: clamp(0.88rem, 0.85rem + 0.15vw, 0.95rem);
  --step-0:  clamp(1.05rem, 1.00rem + 0.25vw, 1.18rem);
  --step-1:  clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-2:  clamp(1.5rem,  1.32rem + 0.9vw,  2.1rem);
  --step-3:  clamp(1.9rem,  1.6rem  + 1.5vw,  2.9rem);
  --step-4:  clamp(2.6rem,  2.0rem  + 3.0vw,  4.6rem);

  /* Rhythm */
  --gap-xs: 0.5rem;
  --gap-s:  1rem;
  --gap-m:  1.75rem;
  --gap-l:  3rem;
  --gap-xl: 5rem;
  --gap-xxl: 7rem;

  --radius:      18px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 34px -18px rgba(67, 41, 23, 0.34);
  --shadow-lift: 0 18px 46px -20px rgba(67, 41, 23, 0.42);

  /* Motion — nothing here is faster than 400ms, on purpose */
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-calm:    0.5s;
  --t-gentle:  0.8s;
  --t-slow:    1.2s;

  --reading: 62ch;
}

/* ============================================================================
   2. RESET & BASE
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--cream);
  color: var(--ink);
  font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 var(--gap-s);
  text-wrap: balance;
}

h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 var(--gap-s); max-width: var(--reading); }

a { color: var(--script); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bear-deep); }

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.5em; max-width: var(--reading); }

strong { font-weight: 600; }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tan), transparent);
  margin: var(--gap-l) 0;
}

/* The flowing script — headline moments only, never small, never body copy */
.script {
  font-family: 'Alex Brush', 'Snell Roundhand', cursive;
  font-weight: 400;
  color: var(--script);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

/* ============================================================================
   3. ACCESSIBILITY HELPERS
   ========================================================================= */

.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-link {
  position: absolute;
  top: -100px;
  left: var(--gap-s);
  z-index: 200;
  background: var(--cream);
  color: var(--ink);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lift);
  font-weight: 600;
  transition: top var(--t-calm) var(--ease);
}
.skip-link:focus { top: var(--gap-s); }

:focus-visible {
  outline: 3px solid var(--bear-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================================
   4. LAYOUT
   ========================================================================= */

.wrap {
  width: min(100% - 2.5rem, 1120px);
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2.5rem, 760px); }

.section { padding-block: var(--gap-xl); position: relative; }
.section--tight { padding-block: var(--gap-l); }
.section--parchment { background: var(--parchment); }

/* Soft torn-paper edge between bands, instead of a hard line */
.section--parchment::before,
.section--parchment::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 26px;
  background: inherit;
  -webkit-mask: radial-gradient(20px at 50% 0, transparent 98%, #000) 0 0/44px 26px repeat-x;
          mask: radial-gradient(20px at 50% 0, transparent 98%, #000) 0 0/44px 26px repeat-x;
}
.section--parchment::before { top: -25px; transform: scaleY(-1); }
.section--parchment::after  { bottom: -25px; }

.stack > * + * { margin-top: var(--gap-s); }
.center { text-align: center; }
.center p, .center li { margin-inline: auto; }

.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.6;
  font-weight: 300;
}

.eyebrow {
  font-family: 'Fraunces', serif;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bear);
  margin-bottom: var(--gap-xs);
}

/* ============================================================================
   5. THE SKY  —  clouds, stars, sun and moon
   Shared by the hero and any other section that wants weather.
   ========================================================================= */

.sky {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-light) 0%, var(--sky) 46%, var(--cream) 100%);
  transition: background var(--t-slow) var(--ease);
}

/* Night mode — set by the sun/moon toggle, remembered between visits */
[data-sky='night'] .sky {
  background: linear-gradient(180deg, var(--night-deep) 0%, var(--night) 52%, #4A4A63 100%);
}

.sky__layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* — Clouds ————————————————————————————————— */
.cloud {
  position: absolute;
  border-radius: var(--radius-pill);
  background: radial-gradient(ellipse at 50% 60%, rgba(255,255,255,0.95), rgba(255,255,255,0.55) 62%, rgba(255,255,255,0) 78%);
  filter: blur(11px);
  opacity: 0.85;
  will-change: transform;
  transition: opacity var(--t-slow) var(--ease);
}
.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: inherit;
}
.cloud::before { width: 62%; height: 150%; top: -42%; left: 8%; }
.cloud::after  { width: 46%; height: 124%; top: -26%; right: 10%; }

.cloud--1 { width: 320px; height: 74px; top: 12%;  left: -18%; animation: drift 78s linear infinite; }
.cloud--2 { width: 210px; height: 54px; top: 34%;  left: -14%; animation: drift 96s linear infinite; animation-delay: -22s; opacity: 0.6; }
.cloud--3 { width: 400px; height: 88px; top: 58%;  left: -24%; animation: drift 112s linear infinite; animation-delay: -48s; opacity: 0.5; }
.cloud--4 { width: 170px; height: 44px; top: 22%;  left: -10%; animation: drift 88s linear infinite; animation-delay: -60s; opacity: 0.45; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(145vw); }
}

[data-sky='night'] .cloud { opacity: 0.16; }

/* — Stars ————————————————————————————————— */
.star {
  position: absolute;
  fill: var(--star);
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
}
[data-sky='night'] .star {
  opacity: 0.9;
  animation: twinkle 6s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.28; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.06); }
}

/* — Sun and moon discs ———————————————————— */
.disc {
  position: absolute;
  border-radius: 50%;
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.disc--sun {
  width: clamp(70px, 9vw, 120px);
  aspect-ratio: 1;
  top: 13%; left: 9%;
  background: radial-gradient(circle at 38% 34%, var(--sun-soft), var(--sun) 58%, #E07C15 100%);
  box-shadow: 0 0 60px 18px rgba(242, 146, 30, 0.28);
  animation: breathe 9s ease-in-out infinite;
}

.disc--moon {
  width: clamp(64px, 8vw, 108px);
  aspect-ratio: 1;
  top: 15%; left: 10%;
  background: radial-gradient(circle at 36% 32%, #FFF3D4, var(--moon) 58%, var(--moon-deep) 100%);
  box-shadow: 0 0 66px 20px rgba(240, 205, 130, 0.26);
  opacity: 0;
  transform: scale(0.82);
  animation: breathe 11s ease-in-out infinite;
}

[data-sky='night'] .disc--sun  { opacity: 0; transform: scale(0.82) translateY(18px); }
[data-sky='night'] .disc--moon { opacity: 1; transform: scale(1); }

@keyframes breathe {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.07); }
}

/* Text sitting on the sky needs to survive both day and night */
[data-sky='night'] .sky h1,
[data-sky='night'] .sky h2 { color: var(--cream); }
[data-sky='night'] .sky .lede,
[data-sky='night'] .sky p  { color: #E8E2D6; }
[data-sky='night'] .sky .script { color: var(--moon); }

/* ============================================================================
   6. DAY / NIGHT TOGGLE
   ========================================================================= */

.sky-toggle {
  position: absolute;
  top: var(--gap-m);
  right: var(--gap-m);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem 0.5rem 0.6rem;
  border: 1px solid rgba(67, 41, 23, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 246, 0.72);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--t-calm) var(--ease),
              box-shadow var(--t-calm) var(--ease),
              background var(--t-slow) var(--ease),
              color var(--t-slow) var(--ease);
}
.sky-toggle:hover {
  transform: scale(1.03);
  box-shadow: 0 0 24px rgba(242, 146, 30, 0.3);
}
.sky-toggle__icon {
  width: 22px; height: 22px;
  transition: transform var(--t-slow) var(--ease);
}
[data-sky='night'] .sky-toggle {
  background: rgba(46, 58, 82, 0.62);
  color: var(--cream);
  border-color: rgba(255, 253, 246, 0.22);
}
[data-sky='night'] .sky-toggle__icon { transform: rotate(-140deg); }

/* ============================================================================
   7. HEADER & NAVIGATION
   ========================================================================= */

/* backdrop-filter lives on ::before, not the header itself — an element
   with backdrop-filter becomes a containing block for position:fixed
   descendants, which would trap the mobile nav overlay inside the header's
   own (small) box instead of letting it cover the viewport. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid rgba(67, 41, 23, 0.08);
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(251, 245, 234, 0.9);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-s);
  padding-block: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { width: 52px; height: 52px; flex: none; }
.brand__name {
  font-family: 'Fraunces', serif;
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.15;
  max-width: 8.5em;
}

/* — Desktop nav ———————————————————————————— */
.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a,
.site-nav .nav-parent {
  display: inline-block;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t-calm) var(--ease), color var(--t-calm) var(--ease);
}
.site-nav a:hover,
.site-nav .nav-parent:hover { background: var(--parchment); color: var(--bear-deep); }

.site-nav a[aria-current='page'] {
  background: var(--parchment-2);
  color: var(--bear-deep);
}

/* The Support link stays visually distinct — nobody should hunt for it */
.site-nav .nav-support > a,
.site-nav .nav-support > .nav-parent { color: var(--bear-deep); }

.has-sub { position: relative; }
.nav-parent::after {
  content: '';
  display: inline-block;
  width: 0.42em; height: 0.42em;
  margin-left: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--t-calm) var(--ease);
}
.has-sub[data-open='true'] .nav-parent::after { transform: translateY(1px) rotate(-135deg); }

.sub-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 250px;
  padding: 0.5rem;
  background: var(--cream);
  border: 1px solid rgba(67, 41, 23, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-calm) var(--ease),
              transform var(--t-calm) var(--ease),
              visibility var(--t-calm);
}
.has-sub[data-open='true'] .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.sub-menu a {
  display: block;
  text-align: left;
  padding: 0.6rem 0.9rem;
  font-weight: 400;
}

/* — Mobile toggle ————————————————————————— */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(67, 41, 23, 0.18);
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle__bars span {
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t-calm) var(--ease), opacity var(--t-calm) var(--ease);
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-group-label {
  font-family: 'Fraunces', serif;
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bear);
  padding: 0.9rem 0.8rem 0.2rem;
  display: none;
}

/* ============================================================================
   8. BUTTONS
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 2rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: 'Fraunces', serif;
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-calm) var(--ease),
              box-shadow var(--t-calm) var(--ease),
              background var(--t-calm) var(--ease),
              color var(--t-calm) var(--ease);
}
.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(242, 146, 30, 0.32);
}

.btn--primary   { background: var(--bear-deep); color: var(--cream); }
.btn--primary:hover { background: var(--bear); color: var(--cream); }

.btn--donate    { background: var(--sun); color: var(--ink); }
.btn--donate:hover { background: var(--sun-soft); color: var(--ink); }

.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--bear-light);
}
.btn--quiet:hover { background: var(--parchment); color: var(--bear-deep); }

.btn--full { width: 100%; }

/* Donate sits in the nav, but reads as a button */
.site-nav .nav-donate a {
  background: var(--sun);
  color: var(--ink);
  font-family: 'Fraunces', serif;
  margin-left: 0.4rem;
  padding-inline: 1.35rem;
}
.site-nav .nav-donate a:hover { background: var(--sun-soft); color: var(--ink); }

/* The three big homepage choices — generously spaced, never cramped */
.cta-row {
  display: grid;
  gap: var(--gap-m);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  max-width: 880px;
  margin-inline: auto;
}
.cta-row .btn { padding-block: 1.35rem; }

/* ============================================================================
   9. HERO
   ========================================================================= */

.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem);
  text-align: center;
}

/* Shorter sky band for inner pages — same weather, less real estate */
.page-hero {
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
  text-align: center;
}
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { margin-bottom: 0.5rem; }
.page-hero .lede { max-width: 52ch; margin-inline: auto; }

/* A quiet logo watermark for transactional pages (Donate, Contact) —
   keeps brand presence without competing with the form/content. */
.watermark {
  position: absolute;
  top: 50%;
  right: -6%;
  width: clamp(220px, 28vw, 420px);
  transform: translateY(-50%);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
[data-sky='night'] .watermark { opacity: 0.1; }

.hero__logo {
  width: clamp(190px, 30vw, 300px);
  margin-inline: auto;
  margin-bottom: var(--gap-m);
  filter: drop-shadow(0 14px 30px rgba(67, 41, 23, 0.18));
}

.hero__tagline {
  font-size: var(--step-4);
  max-width: 16ch;
  margin: 0 auto var(--gap-s);
}

.hero__sub {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-inline: auto;
  font-weight: 300;
}

/* ============================================================================
   10. THE WELCOME LETTER
   Reads like a letter, not a landing page. Lines arrive one at a time.
   ========================================================================= */

.welcome {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--cream);
  border-radius: 32px;
  box-shadow: var(--shadow-soft);
}

.welcome__name {
  font-family: 'Alex Brush', cursive;
  font-size: var(--step-3);
  color: var(--script);
  text-align: center;
  margin-bottom: var(--gap-m);
}

.welcome p {
  max-width: none;
  margin-bottom: var(--gap-s);
}
.welcome p:last-child { margin-bottom: 0; }

.welcome__sign {
  font-family: 'Alex Brush', cursive;
  font-size: var(--step-2);
  color: var(--script);
  margin-top: var(--gap-m);
}

/* ============================================================================
   11. CARDS  —  "what we do", team, events, memory bears
   ========================================================================= */

.grid {
  display: grid;
  gap: var(--gap-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}
.grid--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--cream);
  border: 1px solid rgba(67, 41, 23, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-gentle) var(--ease), box-shadow var(--t-gentle) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card p:last-child { margin-bottom: 0; }

.card__icon {
  width: 54px; height: 54px;
  margin-bottom: var(--gap-s);
}

.card--parchment { background: var(--parchment); }

/* Person cards */
.person__photo {
  width: 116px; height: 116px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--parchment-2);
  margin-bottom: var(--gap-s);
}
.person__role {
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bear);
  margin-bottom: var(--gap-xs);
}

/* Event entries */
.event {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--gap-m);
  align-items: start;
  padding: var(--gap-m) 0;
  border-bottom: 1px solid rgba(67, 41, 23, 0.1);
}
.event:last-child { border-bottom: 0; }
.event__date {
  text-align: center;
  padding: 0.8rem 1.1rem;
  background: var(--parchment);
  border-radius: var(--radius);
  min-width: 92px;
}
.event__day   { display: block; font-family: 'Fraunces', serif; font-size: var(--step-2); line-height: 1; }
.event__month { display: block; font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bear); }

/* Impact figures on the donate page */
.impact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--gap-s) var(--gap-m);
  align-items: baseline;
  padding: var(--gap-s) 0;
  border-bottom: 1px dashed rgba(67, 41, 23, 0.18);
}
.impact:last-of-type { border-bottom: 0; }
.impact__amount {
  font-family: 'Fraunces', serif;
  font-size: var(--step-2);
  color: var(--bear-deep);
  line-height: 1;
}

/* ============================================================================
   12. PAW PRINT TRAIL
   ========================================================================= */

.paw-trail {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.8rem);
  padding-block: var(--gap-m);
  flex-wrap: wrap;
}
.paw-trail svg {
  width: clamp(20px, 2.6vw, 30px);
  fill: var(--bear-light);
  opacity: 0;
  transform: translateY(8px) rotate(var(--tilt, 0deg));
  transition: opacity var(--t-gentle) var(--ease), transform var(--t-gentle) var(--ease);
}
.paw-trail.is-visible svg { opacity: 0.55; transform: translateY(0) rotate(var(--tilt, 0deg)); }
.paw-trail svg:nth-child(1) { transition-delay: 0ms;   --tilt: -12deg; }
.paw-trail svg:nth-child(2) { transition-delay: 150ms; --tilt: 8deg; }
.paw-trail svg:nth-child(3) { transition-delay: 300ms; --tilt: -6deg; }
.paw-trail svg:nth-child(4) { transition-delay: 450ms; --tilt: 10deg; }
.paw-trail svg:nth-child(5) { transition-delay: 600ms; --tilt: -9deg; }
.paw-trail svg:nth-child(6) { transition-delay: 750ms; --tilt: 5deg; }

/* ============================================================================
   13. FORMS
   ========================================================================= */

.field { margin-bottom: var(--gap-m); max-width: var(--reading); }

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.field__hint {
  display: block;
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.9rem 1.1rem;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid rgba(67, 41, 23, 0.2);
  border-radius: 14px;
  transition: border-color var(--t-calm) var(--ease), box-shadow var(--t-calm) var(--ease);
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--bear);
  box-shadow: 0 0 0 4px rgba(169, 104, 58, 0.14);
  outline: none;
}

/* A quiet, reassuring note above forms */
.note {
  padding: var(--gap-s) var(--gap-m);
  background: var(--parchment);
  border-left: 4px solid var(--moon-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.note p:last-child { margin-bottom: 0; }

/* ============================================================================
   14. FOOTER
   ========================================================================= */

.site-footer {
  background: var(--parchment);
  padding-block: var(--gap-xl) var(--gap-m);
  margin-top: var(--gap-xl);
  position: relative;
}

.site-footer__grid {
  display: grid;
  gap: var(--gap-l);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  margin-bottom: var(--gap-l);
}

.site-footer h2 {
  font-size: var(--step-0);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bear);
  margin-bottom: var(--gap-s);
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--script); text-decoration: underline; }

.site-footer__logo { width: 120px; margin-bottom: var(--gap-s); }

.site-footer__bottom {
  padding-top: var(--gap-m);
  border-top: 1px solid rgba(67, 41, 23, 0.12);
  font-size: var(--step--1);
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-s) var(--gap-m);
  justify-content: space-between;
}
.site-footer__bottom p { margin: 0; max-width: none; }

.socials { display: flex; gap: 0.7rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--cream);
  transition: transform var(--t-calm) var(--ease), background var(--t-calm) var(--ease);
}
.socials a:hover { transform: scale(1.06); background: var(--parchment-2); }
.socials svg { width: 20px; height: 20px; fill: var(--ink); }

/* An urgent-help line should never be hard to find */
.helpline {
  background: var(--parchment-2);
  border-radius: var(--radius);
  padding: var(--gap-m);
  margin-bottom: var(--gap-l);
}
.helpline p { max-width: none; }
.helpline p:last-child { margin-bottom: 0; }

/* ============================================================================
   15. SCROLL REVEALS
   Sections fade in and drift up. Children stagger.
   ========================================================================= */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-gentle) var(--ease), transform var(--t-gentle) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-group > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-group > .reveal:nth-child(2) { transition-delay: 130ms; }
.reveal-group > .reveal:nth-child(3) { transition-delay: 260ms; }
.reveal-group > .reveal:nth-child(4) { transition-delay: 390ms; }
.reveal-group > .reveal:nth-child(5) { transition-delay: 520ms; }
.reveal-group > .reveal:nth-child(6) { transition-delay: 650ms; }

/* The welcome letter unfolds line by line, like being read aloud */
.welcome .reveal { transition-duration: 1s; }
.welcome .reveal:nth-child(1) { transition-delay: 200ms; }
.welcome .reveal:nth-child(2) { transition-delay: 550ms; }
.welcome .reveal:nth-child(3) { transition-delay: 900ms; }
.welcome .reveal:nth-child(4) { transition-delay: 1250ms; }
.welcome .reveal:nth-child(5) { transition-delay: 1600ms; }
.welcome .reveal:nth-child(6) { transition-delay: 1950ms; }

/* ============================================================================
   16. RESPONSIVE
   Mobile-first everywhere else; this is where the desktop nav collapses.
   ========================================================================= */

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 80;
    background: var(--cream);
    padding: 6rem var(--gap-m) var(--gap-l);
    overflow-y: auto;
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-calm) var(--ease),
                transform var(--t-calm) var(--ease),
                visibility var(--t-calm);
  }
  .site-nav[data-open='true'] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }
  .site-nav a,
  .site-nav .nav-parent {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.95rem 1rem;
    font-size: var(--step-0);
  }

  /* No dropdowns on a phone — everything is simply listed */
  .nav-parent { display: none !important; }
  .nav-group-label { display: block; }
  .sub-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .sub-menu a { padding-left: 1rem; }

  .site-header .btn { display: none; }
  .site-nav .nav-donate a {
    background: var(--sun);
    color: var(--ink);
    text-align: center;
    margin-top: var(--gap-s);
    font-family: 'Fraunces', serif;
  }

  body.nav-open { overflow: hidden; }
}

@media (max-width: 560px) {
  .sky-toggle { top: var(--gap-s); right: var(--gap-s); }
  .event { grid-template-columns: 1fr; gap: var(--gap-s); }
  .event__date { justify-self: start; }
  .brand__name { font-size: var(--step--1); }
  .brand__mark { width: 44px; height: 44px; }
}

/* ============================================================================
   17. REDUCED MOTION
   Mandatory, not optional. Someone overwhelmed by movement gets the same
   warmth with none of the motion — everything visible, nothing drifting.
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  /* Nothing hides waiting for a scroll it will never see */
  .reveal { opacity: 1 !important; transform: none !important; }
  .paw-trail svg { opacity: 0.55 !important; transform: none !important; }
  .cloud, .star, .disc { animation: none !important; }
  .btn:hover, .card:hover, .socials a:hover, .sky-toggle:hover { transform: none !important; }
}

/* ============================================================================
   18. PRINT
   Some families will want to keep a page. Let them.
   ========================================================================= */

@media print {
  .site-header, .site-footer__grid, .sky-toggle, .nav-toggle, .paw-trail { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .sky { background: none; }
  .card, .welcome { box-shadow: none; border: 1px solid #ccc; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 9pt; }
}

/* ============================================================================
   20. ENVELOPE ANIMATION (Letters of Support)
   A closed envelope opens gently to reveal how the letter process works.
   ========================================================================= */

.envelope-scene {
  display: flex;
  justify-content: center;
  padding-block: var(--gap-m) var(--gap-l);
}

.envelope {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 3 / 2;
}

.envelope__body {
  position: absolute;
  inset: 0;
  background: var(--parchment);
  border: 1.5px solid var(--tan);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.envelope__letter {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  height: 78%;
  background: var(--cream);
  border: 1px solid rgba(67, 41, 23, 0.12);
  border-radius: 6px;
  transform: translateY(14%);
  transition: transform var(--t-slow) var(--ease);
  display: grid;
  place-items: center;
  padding: var(--gap-s);
}
.envelope__letter svg { width: 34px; height: 34px; }

.envelope__flap {
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 58%;
  background: var(--bear-light);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 10px 10px 0 0;
  transform-origin: top center;
  transition: transform var(--t-slow) var(--ease);
  z-index: 2;
}

.envelope.is-open .envelope__flap { transform: rotateX(180deg); }
.envelope.is-open .envelope__letter { transform: translateY(-18%); }

@media (prefers-reduced-motion: reduce) {
  .envelope__flap, .envelope__letter { transition: none; }
}

.envelope-steps {
  display: grid;
  gap: var(--gap-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  margin-top: var(--gap-l);
}
.envelope-step {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-gentle) var(--ease), transform var(--t-gentle) var(--ease);
  text-align: center;
}
.envelope-step.is-visible { opacity: 1; transform: none; }
.envelope-step:nth-child(1) { transition-delay: 0ms; }
.envelope-step:nth-child(2) { transition-delay: 150ms; }
.envelope-step:nth-child(3) { transition-delay: 300ms; }
.envelope-step:nth-child(4) { transition-delay: 450ms; }
@media (prefers-reduced-motion: reduce) {
  .envelope-step { opacity: 1 !important; transform: none !important; }
}

.envelope-step__num {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: var(--gap-xs);
  border-radius: 50%;
  background: var(--parchment-2);
  color: var(--bear-deep);
  font-family: 'Fraunces', serif;
  font-weight: 600;
}

/* ============================================================================
   21. CHECKBOX FIELDS (GDPR consent, parent self-declaration)
   ========================================================================= */

.field--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.field--checkbox input[type='checkbox'] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  flex: none;
  accent-color: var(--bear-deep);
}
.field--checkbox label {
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ============================================================================
   22. PRICING CARD (Sponsor a Memory Box)
   ========================================================================= */

.pricing-card {
  max-width: 420px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
  background: var(--cream);
  border: 2px solid var(--moon-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}
.pricing-card__amount {
  font-family: 'Fraunces', serif;
  font-size: var(--step-4);
  color: var(--bear-deep);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.pricing-card__unit { font-size: var(--step--1); color: var(--ink-soft); }

/* ============================================================================
   23. A SKY FULL OF STARS  —  the remembrance page
   A night sky with Teddy on his moon and a bear on a cloud for every child.
   Always night on this page, whatever the day/night toggle says elsewhere.
   ========================================================================= */

.night-sky {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2rem, 5vw, 4rem) calc(var(--gap-xl) + 26px);
  color: #F4EEE2;
  background: linear-gradient(180deg, #131A30 0%, var(--night-deep) 30%, var(--night) 75%, #3B4560 100%);
}

/* Cloud-shaped edge where the sky meets the cream page below */
.night-sky::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 26px;
  background: var(--cream);
  -webkit-mask: radial-gradient(circle at 50% 100%, #000 19px, transparent 20px) 0 0/44px 26px repeat-x;
          mask: radial-gradient(circle at 50% 100%, #000 19px, transparent 20px) 0 0/44px 26px repeat-x;
}

/* Two star fields on different tile sizes, so the pattern never repeats visibly */
.night-sky__stars {
  --peak: 0.95;
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 22px 34px,   #fff, transparent),
    radial-gradient(1px   1px   at 96px 128px,  #fff, transparent),
    radial-gradient(1.6px 1.6px at 168px 62px,  #F5DFA8, transparent),
    radial-gradient(1px   1px   at 236px 196px, #fff, transparent),
    radial-gradient(1.3px 1.3px at 304px 96px,  #fff, transparent),
    radial-gradient(1px   1px   at 58px 210px,  #F5DFA8, transparent);
  background-size: 340px 240px;
  animation: star-field 8s ease-in-out infinite;
}
.night-sky__stars--far {
  --peak: 0.6;
  background-size: 211px 173px;
  animation-duration: 11s;
  animation-delay: -4s;
}
@keyframes star-field {
  0%, 100% { opacity: calc(var(--peak) * 0.4); }
  50%      { opacity: var(--peak); }
}

.night-sky__layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.night-sky .cloud { opacity: 0.12; }
.spark {
  position: absolute;
  fill: var(--star);
  opacity: 0.5;
  animation: twinkle 6s ease-in-out infinite;
}

/* Text colours for the dark ground */
.night-sky h1,
.night-sky h2          { color: var(--cream); }
.night-sky .eyebrow    { color: var(--moon); }
.night-sky__intro p    { color: #E8E2D6; }
.night-sky__intro .lede { color: #DCD6CA; }
.night-sky a           { color: var(--moon); }
.night-sky .btn--primary { background: var(--moon); color: var(--ink); }
.night-sky .btn--primary:hover { background: #F7DFA4; color: var(--ink); box-shadow: 0 0 30px rgba(240, 205, 130, 0.4); }
.night-sky :focus-visible { outline-color: var(--moon); }

/* — Teddy on his moon ———————————————————————— */
.night-sky__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-m) var(--gap-l);
  margin-bottom: var(--gap-l);
}
.night-sky__intro { flex: 1 1 320px; max-width: 560px; }

.moon-bear { margin: 0; width: min(100%, 360px); flex: 0 1 360px; }
.moon-bear__art {
  position: relative;
  container-type: inline-size;
  /* Where the words sit on the bear's belly. Change these three if the
     real artwork has its belly somewhere else. */
  --belly-x: 50%;
  --belly-y: 55.6%;
  --belly-w: 31%;
}
.moon-bear__art img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 42px rgba(240, 205, 130, 0.32));
}
.moon-bear__text {
  position: absolute;
  left: var(--belly-x);
  top: var(--belly-y);
  width: var(--belly-w);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.05;
}
.moon-bear__name    { font-size: 22px; font-size: 6.6cqw; color: var(--bear-deep); }
.moon-bear__forever {
  margin-top: 0.25em;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px; font-size: 4.2cqw;
  color: var(--ink-soft);
}

/* — Bears on clouds ————————————————————————— */
.star-grid {
  display: grid;
  gap: var(--gap-l) var(--gap-m);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  justify-items: center;
}
.star-grid__note { grid-column: 1 / -1; text-align: center; color: #DCD6CA; }
.star-grid__hint {
  margin: var(--gap-l) auto 0;
  text-align: center;
  color: #C9C2B4;
  font-size: var(--step--1);
}

.star-bear { position: relative; width: min(100%, 280px); perspective: 1100px; }
.star-bear__inner {
  position: relative;
  aspect-ratio: 3 / 4;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease);
}
.star-bear[data-flipped='true'] .star-bear__inner { transform: rotateY(180deg); }

.star-bear__face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}

.star-bear__front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
}
.star-bear__art,
.star-bear__img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.28));
  animation: bob 7s ease-in-out infinite;
  animation-delay: var(--bob-delay, 0s);
  transition: filter var(--t-calm) var(--ease);
}
.star-bear__img { flex: 0 1 auto; min-height: 0; max-height: 80%; object-fit: contain; }
.star-bear__front:hover .star-bear__art,
.star-bear__front:hover .star-bear__img,
.star-bear__front:focus-visible .star-bear__art,
.star-bear__front:focus-visible .star-bear__img { filter: drop-shadow(0 0 22px rgba(240, 205, 130, 0.5)); }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.star-bear__name {
  padding-inline: 0.5rem;
  font-family: 'Alex Brush', cursive;
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--cream);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* The back of the bear: the child's words sit inside its belly */
.star-bear__back { transform: rotateY(180deg); }
.star-bear__back-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.star-bear__panel {
  position: absolute;
  left: 13%; right: 13%;
  top: 38%; bottom: 4%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 0.8rem 0.6rem;
  border-radius: 32px;
  text-align: center;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 30%, #F0DAB8, #E2BF95);
  box-shadow: inset 0 2px 10px rgba(124, 73, 36, 0.18);
}
.star-bear__title {
  margin: 0 0 0.1rem;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  color: var(--bear-deep);
}
.star-bear__dates { margin: 0 0 0.45rem; font-size: 0.78rem; line-height: 1.35; color: var(--ink-soft); }
.star-bear__dates span { display: block; }
.star-bear__message {
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
  margin: 0;
  overflow-y: auto;
  font-size: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
  line-height: 1.45;
  scrollbar-width: thin;
}
/* Sits under the bear (not on its back), so it never appears mirrored */
.star-bear__turn {
  position: absolute;
  left: 50%;
  bottom: -2.6rem;
  transform: translateX(-50%);
  padding: 0.35rem 1rem;
  border: 1.5px solid var(--moon);
  border-radius: var(--radius-pill);
  background: rgba(19, 26, 48, 0.5);
  color: var(--moon);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t-calm) var(--ease), background var(--t-calm) var(--ease), visibility var(--t-calm);
}
.star-bear[data-flipped='true'] .star-bear__turn { visibility: visible; opacity: 1; }
.star-bear__turn:hover { background: rgba(240, 205, 130, 0.18); }
