/* =========================================================
   FONTS
   Primary: Adobe Fonts kit rhd8gme (linked in index.html)
   - "oskar"             400, 600
   - "new-hero"          400, 400i, 700, 700i
   - "new-hero-hairline" 100, 100i
   Fallback (offline): local files, declared below as
   "OskarLocal" and "HeroLocal" (distinct names so they
   never shadow the Adobe families — CSS family names are
   case-insensitive):
     /fonts/oskar.woff        — "OskarLocal"
     /fonts/hero-light.woff   — "HeroLocal" 300
     /fonts/hero.woff         — "HeroLocal" 400
     /fonts/hero-bold.woff    — "HeroLocal" 700
   ========================================================= */
@font-face {
  font-family: "OskarLocal";
  src: url("../fonts/oskar.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "HeroLocal";
  src: url("../fonts/hero-light.woff") format("woff");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "HeroLocal";
  src: url("../fonts/hero.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "HeroLocal";
  src: url("../fonts/hero-bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* =========================================================
   RESET — equivalent of Tailwind v3 Preflight (formerly
   injected by cdn.tailwindcss.com). Kept minimal + faithful.
   ========================================================= */
*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; }
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: "new-hero", "HeroLocal", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body { margin: 0; line-height: inherit; }
hr { height: 0; color: inherit; border-top-width: 1px; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
small { font-size: 80%; }
button, input, optgroup, select, textarea {
  font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit;
  font-size: 100%; font-weight: inherit; line-height: inherit; letter-spacing: inherit;
  color: inherit; margin: 0; padding: 0;
}
button, select { text-transform: none; }
button, input:where([type="button"]), input:where([type="reset"]), input:where([type="submit"]) {
  -webkit-appearance: button; background-color: transparent; background-image: none;
}
:-moz-focusring { outline: auto; }
summary { display: list-item; }
blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; }
fieldset { margin: 0; padding: 0; }
legend { padding: 0; }
ol, ul, menu { list-style: none; margin: 0; padding: 0; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; }
button, [role="button"] { cursor: pointer; }
:disabled { cursor: default; }
img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
[hidden]:where(:not([hidden="until-found"])) { display: none; }

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  --ink: #294f73;
  --ink-deep: #1f3d5a;
  --paper: #f9f8f4;
  --board: #f4f4ef;
  --rose: #c98289;
  --rose-deep: #a9626b;
  /* [1d] text-safe companions (WCAG AA 4.5:1 on paper, board, card stock) */
  --rose-text: #985660;   /* small rose text: 4.96 on board · 5.15 on paper */
  --soft-text: #76706a;   /* quiet meta text: 4.73 on slips · 4.80 on form card */
  --note-action: #5c5853; /* owner actions on coloured notes: >= 4.61 at the note edge */
  --note-danger: #7d3f48; /* delete on coloured notes: >= 5.13 */
  --muted: #6f6b66;
  --text: #4e4b48;
  --line: #e7e1d8;

  /* [2c] Type scale — every absolute font-size uses one of these.
     (em-relative sizes such as .amp stay relative by design.) */
  --fs-3xs: 0.625rem;   /* 10px  separator dot */
  --fs-2xs: 0.75rem;    /* 12px  eyebrows, labels, status, small caps */
  --fs-xs: 0.8125rem;   /* 13px  nav, buttons, CTAs, signatures, note author */
  --fs-sm: 0.9375rem;   /* 15px  fine print */
  --fs-base: 1rem;      /* 16px  inputs (avoids iOS zoom) */
  --fs-md: 1.0625rem;   /* 17px  slip copy, note messages */
  --fs-body: clamp(1.0625rem, 1.5vw, 1.1875rem);
  --fs-body-lg: clamp(1.125rem, 1.8vw, 1.3125rem);
  --fs-sig: clamp(1.1rem, 2vw, 1.3rem);
  --fs-h4: 1.5rem;      /* monogram, form title */
  --fs-h3: 1.75rem;     /* registry names */
  --fs-lede: clamp(1.35rem, 2.8vw, 1.85rem);
  --fs-h2: clamp(1.9rem, 4.2vw, 2.75rem);
  --fs-h1: clamp(3rem, 8.5vw, 6rem);

  --font-display: "oskar", "OskarLocal", "new-hero", sans-serif;
  --font-sans: "new-hero", "HeroLocal", Arial, sans-serif;

  /* [2a] Italic voice: A = New Hero italic (default), B = true serif italic.
     Used ONLY for the ampersand, hero lede and note messages. */
  --font-italic: var(--font-sans);
  --italic-weight: 400;
  --italic-scale: 1;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Fine paper grain (SVG fractal noise, warm-tinted) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .46 0 0 0 0 .48 0 0 0 0 .45 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* [1b] Warm grain for card stock (slips, form card, notes): sepia-brown
     noise instead of the gray-green --grain, so multiply warms rather than grays. */
  --grain-warm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .56 0 0 0 0 .47 0 0 0 0 .37 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* [1c] Sprig ornament as a mask (for pseudo-elements) */
  --orn-sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 16' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M2 8 H38'/%3E%3Cpath d='M20 8 C16 4 12 3 9 4 C12 7 16 8 20 8Z'/%3E%3Cpath d='M20 8 C24 4 28 3 31 4 C28 7 24 8 20 8Z'/%3E%3Cpath d='M20 8 C17 11 14 12 11 12 C14 9.5 17 8.5 20 8Z'/%3E%3Cpath d='M20 8 C23 11 26 12 29 12 C26 9.5 23 8.5 20 8Z'/%3E%3C/svg%3E");
  /* [1b-ii] same warm grain with alpha pre-scaled (~0.14) for use as a background layer */
  --grain-card: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .56 0 0 0 0 .47 0 0 0 0 .37 0 0 0 .032 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Larger, softer fibres for the board */
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .58 0 0 0 0 .52 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

/* [2a] Variant B — enable with ?italic=serif (see <head> script) */
html[data-italic="serif"] {
  --font-italic: "cormorant-garamond", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --italic-weight: 500;
  --italic-scale: 1.14; /* Cormorant's small x-height needs a lift to match New Hero */
}

/* =========================================================
   BASE
   ========================================================= */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem; /* [3b] anchors land below the sticky bar */
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.01em;
  font-kerning: normal;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}

/* [1f] No orphans: pretty for running text, balance for headings
   and short centred copy (hero body, section intros, registry slips). */
p, li, figcaption { text-wrap: pretty; }
h1, h2, h3, .eyebrow, .lede, .signature, .fine-print,
.text-center p, .registry-link__copy, .note--empty .note__message { text-wrap: balance; }
.story-copy { text-wrap: pretty; }

/* [3d] Visible keyboard focus everywhere (components may refine it) */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

::selection {
  background: rgba(201, 130, 137, 0.22);
  color: var(--ink-deep);
}

/* Tailwind font-class fallbacks */
.font-display {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
}
.font-sans {
  font-family: var(--font-sans);
}

/* =========================================================
   EDITORIAL TYPOGRAPHY
   ========================================================= */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--rose { color: var(--rose-text); } /* [1d] */

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: 1.04;
  letter-spacing: 0.12em;
  margin-right: -0.12em; /* optically recentre tracked caps */
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

/* Italic ampersand — no tracking; family via --font-italic [2a] */
.amp {
  font-family: var(--font-italic); /* [2a] */
  font-style: italic;
  font-weight: var(--italic-weight);
  font-size: 0.55em;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0.12em;
  vertical-align: 0.08em;
}

.lede {
  font-family: var(--font-italic); /* [2a] */
  font-weight: var(--italic-weight);
  font-style: italic;
  font-size: calc(var(--fs-lede) * var(--italic-scale));
  line-height: 1.5;
  letter-spacing: 0.005em;
  color: #6c6863;
  text-wrap: balance;
}

.body-copy {
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
}
.body-copy--lg {
  font-size: var(--fs-body-lg);
  line-height: 1.9;
}

.fine-print {
  font-size: var(--fs-sm);
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.signature {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  line-height: 1.6;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.signature--ink {
  font-size: var(--fs-sig);
  letter-spacing: 0.18em;
  color: var(--ink);
}
.signature--ink .amp { font-size: 0.85em; }

/* Drop cap for "Our Story" — delicate, ink, three-line */
/* [2b] Drop cap — true 3-line initial: cap top on line 1's cap height,
   baseline on line 3's baseline (Chromium 110+, Safari via -webkit-). */
.drop-cap::first-letter {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  -webkit-initial-letter: 3;
          initial-letter: 3;
  margin-right: 0.18em;
}
/* Fallback (Firefox): float sized to span 3 lines at line-height 1.9.
   cap span = 2 x 1.9em + ~0.7em cap-height = 4.5em -> ~6.3em glyph. */
@supports not ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
  .drop-cap::first-letter {
    float: left;
    font-size: 6.3em;
    line-height: 0.74;
    margin: 0.07em 0.12em 0 -0.02em;
  }
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.brand-mark {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  letter-spacing: 0.16em;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark .amp { font-size: 0.7em; }
.brand-mark--lg { font-size: var(--fs-h4); letter-spacing: 0.14em; }

.menu-button {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
  padding: 0.55rem 0.85rem;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color 0.3s, background-color 0.3s;
}
.menu-button:hover { border-color: #d6cdc0; background: #fff; }
.menu-button:active { background: #f1eee8; } /* [3d] */

.nav-link {
  position: relative;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.35s var(--ease-soft);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.2em;
  bottom: -6px;
  height: 1px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.nav-link:hover,
.nav-link:focus-visible { color: var(--ink); }
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }
.nav-link:active { color: var(--ink-deep); } /* [3d] */

/* [3b] Sticky bar after the hero: translucent paper, blur, hairline */
.site-header.is-stuck {
  position: fixed;
  background: rgba(249, 248, 244, 0.84);
  -webkit-backdrop-filter: saturate(1.15) blur(12px);
          backdrop-filter: saturate(1.15) blur(12px);
  border-bottom: 1px solid rgba(41, 79, 115, 0.1);
  animation: nav-drop 0.5s var(--ease-out);
}
.site-header.is-stuck > nav { padding-top: 0.9rem; padding-bottom: 0.9rem; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-stuck { background: rgba(249, 248, 244, 0.97); }
}
@keyframes nav-drop {
  from { transform: translateY(-100%); opacity: 0; }
}
/* active-section indicator reuses the rose underline */
.nav-link[aria-current] { color: var(--ink); }
.nav-link[aria-current]::after { transform: scaleX(1); }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.1rem 2.1rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out),
    background-color 0.35s var(--ease-soft),
    border-color 0.35s var(--ease-soft),
    color 0.35s var(--ease-soft),
    opacity 0.35s;
}
.btn[hidden] { display: none; }
.btn:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
  transition-duration: 0.12s;
}

.btn__arrow {
  display: inline-block;
  font-size: var(--fs-base);
  letter-spacing: 0;
  transition: transform 0.5s var(--ease-out);
}
.group:focus-visible .btn__arrow { transform: translateX(5px); }
@media (hover: hover) { /* [3d] */
  .group:hover .btn__arrow { transform: translateX(5px); }
}

/* Submit: outlined like the hero button; ink fill blooms on hover */
.btn-primary {
  flex: 1;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: none;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 0.6s var(--ease-out);
}
@media (hover: hover) { /* [3d] */
  .btn-primary:hover:not(:disabled) {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -18px rgba(31, 61, 90, 0.6);
  }
}
.btn-primary:focus-visible::before,
.btn-primary[data-state="loading"]::before { transform: scaleX(1); }
@media (hover: hover) { /* [3d] */
  .btn-primary:hover:not(:disabled)::before { transform: scaleX(1); }
}
.btn-primary[data-state="loading"] { cursor: progress; opacity: 0.92; color: #fff; }
/* [3d] keyboard focus fills ink, so the label must turn white (was ink-on-ink) */
.btn-primary:focus-visible { color: #fff; }
.btn-primary[data-state="success"] {
  color: #fff;
  border-color: var(--rose);
  animation: btn-pop 0.5s var(--ease-out);
}
.btn-primary[data-state="success"]::before { transform: scaleX(1); background: var(--rose-deep); } /* [1d] */
.btn-primary:disabled { cursor: progress; }

.btn__spinner {
  display: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.btn-primary[data-state="loading"] .btn__spinner { display: inline-block; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
  padding-inline: 1.25rem;
}
@media (hover: hover) { /* [3d] */
  .btn-ghost:hover:not(:disabled) {
    border-color: #cfc5b8;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
  }
}

/* =========================================================
   DECORATIVE ELEMENTS
   ========================================================= */
.fine-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d9dad3 18%, #d9dad3 82%, transparent);
}

.ornament-rule {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  max-width: 17rem;
  margin: 2.5rem auto;
  color: var(--rose);
}
.ornament-rule--sm { max-width: 9rem; margin: 2rem auto 2.5rem; gap: 0.8rem; }
.ornament-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 130, 137, 0.45));
}
.ornament-rule span:last-child {
  background: linear-gradient(90deg, rgba(201, 130, 137, 0.45), transparent);
}
.ornament-rule--xs { max-width: 6rem; margin: 0.5rem auto 0; gap: 0.6rem; }
.ornament-rule--xs .ornament-sprig { width: 30px; height: 12px; }

/* [4c] Quiet due-date line under the hero ornament */
.due-date {
  margin: -1rem 0 2rem;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.due-date__dot { margin: 0 0.35em; color: var(--rose); }
/* Visibly unfinished until the real month is entered */
.due-date.is-placeholder .due-date__value {
  padding: 0.1em 0.4em;
  outline: 1px dashed var(--rose);
  outline-offset: 2px;
  color: var(--rose-text);
}

/* ---------- Hero atmosphere ---------- */
.hero-wash {
  isolation: isolate;
  background: linear-gradient(to bottom, var(--paper) 0%, var(--paper) 55%, #fff 100%);
}
/* paper grain over the hero, fading out at the bottom */
.hero-wash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  background-size: 220px;
  opacity: 0.18;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* [1a] dissolve the glows before the section edge — no hard seam */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 96%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 96%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.hero-glow--ink  { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; left: -14vw; top: -18vw; background: rgba(41, 79, 115, 0.05); }
.hero-glow--rose { width: 40vw; height: 40vw; max-width: 560px; max-height: 560px; right: -12vw; top: -6vw; background: rgba(201, 130, 137, 0.08); }
.hero-glow--sand { width: 60vw; height: 22vw; left: 20vw; bottom: 6vw; /* [1a] was -8vw: clipped into a hard edge */ background: rgba(214, 226, 212, 0.28); }

.sprig {
  position: absolute;
  color: rgba(41, 79, 115, 0.14);
  width: clamp(70px, 9vw, 120px);
  height: auto;
  animation: sway 9s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}
.sprig--left        { left: 5%;  top: 16%; transform: rotate(-24deg); }
.sprig--left-small  { left: 11%; top: 34%; width: clamp(44px, 5vw, 70px); color: rgba(201, 130, 137, 0.28); transform: rotate(18deg); animation-delay: -3s; }
.sprig--right       { right: 5%; top: 14%; transform: rotate(26deg) scaleX(-1); animation-delay: -5s; }
.sprig--right-small { right: 12%; top: 36%; width: clamp(44px, 5vw, 70px); color: rgba(201, 130, 137, 0.28); transform: rotate(-16deg) scaleX(-1); animation-delay: -1.5s; }

@keyframes sway {
  from { translate: 0 0; rotate: -1.5deg; }
  to   { translate: 0 -4px; rotate: 1.5deg; }
}

.hero-content > * { animation: rise-in 1.1s var(--ease-out) backwards; }
.hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }
.hero-content > *:nth-child(5) { animation-delay: 0.32s; }
.hero-content > *:nth-child(6) { animation-delay: 0.4s; }
.hero-content > *:nth-child(7) { animation-delay: 0.48s; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
}

@media (max-width: 640px) {
  .sprig--left-small,
  .sprig--right-small { display: none; }
  .sprig--left  { left: -4%; top: 10%; }
  .sprig--right { right: -4%; top: 10%; }
}

/* Invitation-style hairline frame */
.hero-frame {
  position: absolute;
  inset: clamp(5.5rem, 9vw, 7rem) clamp(1rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
  border: 1px solid rgba(41, 79, 115, 0.12);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
.hero-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201, 130, 137, 0.14);
}
.ornament-sprig { width: 40px; height: 16px; color: var(--rose); flex: none; }
.ornament-rule--sm .ornament-sprig { width: 34px; height: 14px; } /* [1c] */

/* ---------- Our Story: stationery folio ---------- */
.story-section { background: linear-gradient(to bottom, #fff 0%, #fff 60%, var(--paper) 100%); }

.story-folio {
  position: relative;
  max-width: 38rem;
  padding: clamp(2.75rem, 6vw, 4.5rem) clamp(1.5rem, 6vw, 4.25rem);
  background:
    linear-gradient(#fff, #fff) padding-box;
  border: 1px solid #ebe9e3;
  box-shadow:
    inset 0 0 0 7px #fff,
    inset 0 0 0 8px rgba(201, 130, 137, 0.22);
}
.story-folio__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(41, 79, 115, 0.35);
  border-style: solid;
}
.story-folio__corner--tl { top: 16px; left: 16px; border-width: 1px 0 0 1px; }
.story-folio__corner--br { bottom: 16px; right: 16px; border-width: 0 1px 1px 0; }

.story-copy {
  max-width: 31rem; /* ~60–65 characters per line */
  margin: 0 auto;
  text-align: left;
  hyphens: manual;
}

/* ---------- [4d] Optional arched photo slot (hidden by default) ---------- */
.photo-slot { padding-top: 1rem; padding-bottom: 3rem; background: var(--paper); }
.photo-arch { width: min(320px, 74vw); margin: 0 auto; text-align: center; }
.photo-arch__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 999px 999px 3px 3px;
  border: 1px solid #e6e4dd;
  background: #fdfbf7;
  box-shadow:
    inset 0 0 0 7px #fdfbf7,
    inset 0 0 0 8px rgba(201, 130, 137, 0.22),
    0 18px 40px -26px rgba(52, 60, 66, 0.25);
}
.photo-arch__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  /* keep the keyline visible over the photo */
  clip-path: inset(8px round 999px 999px 0 0);
}
.photo-arch__caption {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Section transitions ---------- */
.registry-section { background: var(--paper); }

/* ---------- Fizzy registry button ---------- */
.btn-fizz {
  isolation: isolate;
  overflow: visible;
  padding: 1.15rem 2.4rem;
  border: 1px solid var(--rose);
  background: rgba(255, 255, 255, 0.55);
  color: var(--rose-text); /* [1d] */
  transition:
    color 0.5s var(--ease-soft),
    border-color 0.5s var(--ease-soft),
    transform 0.6s var(--ease-out),
    box-shadow 0.6s var(--ease-out);
}
/* soft fill that blooms from the centre */
.btn-fizz::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--rose-deep); /* [1d] white on --rose was 2.98:1; on --rose-deep 4.52:1 */
  transform: scaleX(0);
  transition: transform 0.6s var(--ease-out);
}
/* fine inner keyline, like an embossed card */
.btn-fizz::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border: 1px solid rgba(201, 130, 137, 0.25);
  transition: border-color 0.5s var(--ease-soft);
  pointer-events: none;
}
.btn-fizz:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px rgba(169, 98, 107, 0.65);
}
@media (hover: hover) { /* [3d] */
  .btn-fizz:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -18px rgba(169, 98, 107, 0.65);
  }
}
.btn-fizz:focus-visible::before { transform: scaleX(1); }
@media (hover: hover) { /* [3d] */
  .btn-fizz:hover::before { transform: scaleX(1); }
}
.btn-fizz:focus-visible::after { border-color: rgba(255, 255, 255, 0.45); }
@media (hover: hover) { /* [3d] */
  .btn-fizz:hover::after { border-color: rgba(255, 255, 255, 0.45); }
}
.btn-fizz:active { transform: translateY(0) scale(0.985); transition-duration: 0.12s; }

.btn-fizz__label { position: relative; }

.fizz {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fizz__dot {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%;
  opacity: 0;
  /* [3c] champagne: pale gold bead with a bright rim, no coloured confetti */
  background: radial-gradient(circle at 35% 35%, #fffdf6 0 35%, #ecdcb0 70%, rgba(226, 207, 159, 0.6) 100%);
  box-shadow: 0 0 3px rgba(236, 220, 176, 0.7);
}
/* [3c] fewer, smaller, slower bubbles that only rise; 220ms hover-intent delay */
@media (hover: hover) {
  .btn-fizz:hover .fizz__dot {
    animation: fizz 2.8s calc(220ms + var(--d)) cubic-bezier(0.3, 0.1, 0.4, 1) infinite;
  }
}
.btn-fizz:focus-visible .fizz__dot {
  animation: fizz 2.8s calc(220ms + var(--d)) cubic-bezier(0.3, 0.1, 0.4, 1) infinite;
}
@keyframes fizz {
  0%   { opacity: 0;   transform: translate(0, 0) scale(0.6); }
  20%  { opacity: 0.8; }
  70%  { opacity: 0.5; }
  100% { opacity: 0;   transform: translate(var(--x), var(--y)) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .fizz { display: none; }
}

/* =========================================================
   REGISTRY CARDS — insert slips
   ========================================================= */
.registry-grid { max-width: 920px; margin-inline: auto; }

.registry-link {
  --lift: 0px;
  --rest: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.25rem 2.25rem 2.5rem;
  border: 1px solid #e6e4dd;
  border-radius: 3px;
  /* [1b-ii] the face lives on ::before. `transform` makes this a stacking
     context, so the old z-index:-1 back-slip painted OVER the cream face
     (measured #f4f4f0 instead of #fdfbf7). Face and back-slip are now
     explicit layers: back-slip -2, face -1, content above. */
  background: none;
  text-align: center;
  text-decoration: none;
  transform: translateY(var(--lift)) rotate(var(--rest));
  box-shadow:
    0 1px 1px rgba(52, 60, 66, 0.05),
    0 6px 14px -8px rgba(52, 60, 66, 0.12);
  transition:
    transform 0.7s var(--ease-out),
    box-shadow 0.7s var(--ease-out),
    border-color 0.4s var(--ease-soft);
}
.registry-link--a { --rest: -0.6deg; }
.registry-link--b { --rest: 0.5deg; }

/* slip face: warm-white stock + faint warm grain + double keyline */
.registry-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image:
    var(--grain-card),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 40%);
  background-size: 220px, auto;
  background-color: #fdfbf7;
  background-blend-mode: multiply, normal;
  box-shadow:
    inset 0 0 0 6px #fdfbf7,
    inset 0 0 0 7px rgba(41, 79, 115, 0.12);
  transition: box-shadow 0.7s var(--ease-out);
  pointer-events: none;
}
/* stacked slip behind */
.registry-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border: 1px solid #e8e7e1;
  border-radius: inherit;
  background: #f5f5f1;
  transform: translate(6px, 7px) rotate(1.2deg);
  transition: transform 0.7s var(--ease-out);
}
.registry-link > * { position: relative; }

.registry-link:focus-visible {
  --lift: -6px;
  --rest: 0deg;
  border-color: #dbd9d0;
  box-shadow:
    0 2px 3px rgba(52, 60, 66, 0.05),
    0 30px 50px -26px rgba(52, 60, 66, 0.32),
    0 50px 90px -50px rgba(41, 79, 115, 0.25);
}
@media (hover: hover) { /* [3d] */
  .registry-link:hover {
    --lift: -6px;
    --rest: 0deg;
    border-color: #dbd9d0;
    box-shadow:
      0 2px 3px rgba(52, 60, 66, 0.05),
      0 30px 50px -26px rgba(52, 60, 66, 0.32),
      0 50px 90px -50px rgba(41, 79, 115, 0.25);
  }
}
.registry-link:focus-visible::after { transform: translate(9px, 11px) rotate(2deg); }
@media (hover: hover) { /* [3d] */
  .registry-link:hover::after { transform: translate(9px, 11px) rotate(2deg); }
}
.registry-link:focus-visible::before {
  box-shadow:
    inset 0 0 0 6px #fdfbf7,
    inset 0 0 0 7px rgba(201, 130, 137, 0.35);
}
@media (hover: hover) { /* [3d] */
  .registry-link:hover::before {
    box-shadow:
      inset 0 0 0 6px #fdfbf7,
      inset 0 0 0 7px rgba(201, 130, 137, 0.35);
  }
}
.registry-link:active { --lift: -2px; transition-duration: 0.15s; }
.registry-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

.registry-link__index {
  font-family: var(--font-display);
  font-size: var(--fs-2xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--soft-text); /* [1d] was #a39d95, 2.6:1 */
}

.registry-link__title {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.registry-link__copy {
  max-width: 22rem;
  margin: 1rem auto 0;
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--muted);
}

/* perforation line */
.registry-link__perf {
  align-self: stretch;
  margin: 2rem -0.5rem 1.6rem;
  border-top: 1.5px dashed rgba(120, 130, 120, 0.22);
}

.registry-link__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rose);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.35s var(--ease-soft);
}
@media (hover: hover) { /* [3d] */
  .registry-link:hover .registry-link__cta { color: var(--rose-deep); }
}

@media (min-width: 640px) {
  .registry-link { padding: 3.75rem 3rem 2.75rem; }
}

/* =========================================================
   BULLETIN BOARD BACKDROP
   Warm linen base + dotted grid + paper grain + fibres,
   faded in/out so the section blends with its neighbours.
   ========================================================= */
.bulletin-board-bg {
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(
      to bottom,
      var(--paper) 0,
      var(--board) 220px,
      var(--board) calc(100% - 200px),
      var(--paper) 100%
    );
}

.bulletin-board-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 50% 40%, transparent 50%, rgba(150, 165, 150, 0.05) 100%),
    radial-gradient(circle, rgba(122, 140, 120, 0.2) 1px, transparent 1.7px),
    var(--grain),
    var(--fibre),
    repeating-linear-gradient(0deg, rgba(140, 150, 140, 0.015) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(140, 150, 140, 0.012) 0 1px, transparent 1px 5px);
  background-size: 100% 100%, 24px 24px, 220px 220px, 420px 420px, auto, auto;
  background-position: center, 12px 12px, 0 0, 0 0, 0 0, 0 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 200px, #000 calc(100% - 180px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 200px, #000 calc(100% - 180px), transparent 100%);
}

/* =========================================================
   BOARD STAGE — form in the centre, notes flow around it
   ========================================================= */
.board-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px) minmax(0, 1fr);
  grid-auto-flow: row dense;
  align-items: start;
  gap: 3.5rem 2.75rem;
  max-width: 1180px;
  margin: 0 auto;
}

/* Notes join the stage grid directly (keeps JS re-rendering safe) */
.sticky-board { display: contents; }

/* Organic scatter: side notes lean toward the form, notes below drift */
@media (min-width: 1025px) {
  .board-stage > .board-form-slot ~ .sticky-board > .note:nth-child(1) { justify-self: end;   align-self: start; }
  .board-stage > .board-form-slot ~ .sticky-board > .note:nth-child(2) { justify-self: start; align-self: center; margin-top: 2.5rem; }
  .board-stage > .board-form-slot ~ .sticky-board > .note:nth-child(3) { justify-self: start; align-self: end; }
  .board-stage > .board-form-slot ~ .sticky-board > .note:nth-child(4) { justify-self: end;   align-self: end; }
  .board-stage > .board-form-slot ~ .sticky-board > .note:nth-child(n+5):nth-child(3n+2) { justify-self: start; }
  .board-stage > .board-form-slot ~ .sticky-board > .note:nth-child(n+5):nth-child(3n)   { justify-self: center; margin-top: 1.75rem; }
  .board-stage > .board-form-slot ~ .sticky-board > .note:nth-child(n+5):nth-child(3n+1) { justify-self: end; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .sticky-board > .note:nth-child(odd)  { justify-self: end; }
  .sticky-board > .note:nth-child(even) { justify-self: start; margin-top: 1.5rem; }
}

.board-form-slot {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  position: relative;
  z-index: 8;
  scroll-margin: 6rem;
}

.board-loading {
  grid-column: 1;
  justify-self: center;
  align-self: center;
  margin: 2rem 0;
  font-size: var(--fs-base);
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--muted);
  animation: breathe 1.8s ease-in-out infinite;
}

@media (max-width: 1024px) {
  .board-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.25rem 2.25rem;
    max-width: 720px;
  }
  /* One row of notes above the form, the rest below */
  .board-form-slot {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    width: 100%;
    max-width: 480px;
  }
}

@media (max-width: 640px) {
  .board-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.75rem;
  }
  .board-form-slot { grid-row: 1; }
  .board-loading { grid-column: 1; }
}

/* =========================================================
   SUBMISSION CARD (stationery — matches folio + slips)
   ========================================================= */
.wish-card {
  position: relative;
  display: grid;
  gap: 1.6rem;
  padding: 3rem 2.25rem 2rem;
  border: 1px solid #e6e4dd;
  border-radius: 2px;
  background: #fdfdfb;
  box-shadow:
    inset 0 0 0 7px #fdfdfb,
    inset 0 0 0 8px rgba(201, 130, 137, 0.2),
    0 1px 2px rgba(52, 60, 66, 0.04),
    0 18px 40px -24px rgba(52, 60, 66, 0.22);
  text-align: left;
  transition: box-shadow 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.wish-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--grain-warm);
  background-size: 220px;
  opacity: 0.12; /* [1b] was 0.2 gray-green */
  mix-blend-mode: multiply;
  pointer-events: none;
}
.wish-card > * { position: relative; }
.wish-card:focus-within {
  box-shadow:
    inset 0 0 0 7px #fdfdfb,
    inset 0 0 0 8px rgba(201, 130, 137, 0.35),
    0 1px 2px rgba(52, 60, 66, 0.04),
    0 24px 48px -26px rgba(52, 60, 66, 0.28);
}
.wish-card.is-editing { border-color: rgba(201, 130, 137, 0.5); }
.wish-card.is-shaking { animation: card-nudge 0.45s var(--ease-soft); }

.wish-card .story-folio__corner { width: 18px; height: 18px; }
.wish-card .story-folio__corner--tl { top: 14px; left: 14px; }
.wish-card .story-folio__corner--br { bottom: 14px; right: 14px; }

/* single strip of washi tape, same as the notes */
.wish-card__tape {
  position: absolute;
  top: -13px;
  left: 50%;
  z-index: 2;
  width: 104px;
  height: 26px;
  transform: translateX(-50%) rotate(-1.5deg);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.24) 0 4px, transparent 4px 9px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 65%),
    rgba(214, 222, 206, 0.75);
  clip-path: polygon(2% 0, 98% 0, 100% 20%, 97% 40%, 100% 60%, 97% 80%, 100% 100%, 2% 100%, 0 80%, 3% 60%, 0 40%, 3% 20%);
  mix-blend-mode: multiply;
}
.wish-card__header { display: grid; gap: 0.6rem; text-align: center; }
.wish-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.wish-card__actions { display: flex; gap: 0.6rem; margin-top: 0.25rem; }

/* =========================================================
   FORM FIELDS — hairline underline, like writing on a card
   ========================================================= */
.field { display: grid; gap: 0.55rem; }
.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.45s var(--ease-soft);
}
.field:focus-within .field__label { color: var(--rose-text); } /* [1d] */
.field__count {
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--soft-text); /* [1d] was #a39d95, 2.6:1 */
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.field__count.is-near { color: var(--rose-text); }

.input-editorial {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0.6rem 0.1rem 0.7rem;
  border: 0;
  border-bottom: 1px solid #dcdad2;
  border-radius: 0;
  background: transparent;
  background-image: linear-gradient(var(--rose), var(--rose));
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: 0% 1px;
  font-family: var(--font-sans);
  font-size: var(--fs-base); /* 16px avoids iOS zoom */
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink-deep);
  box-shadow: none;
  transition:
    background-size 0.6s var(--ease-out),
    border-color 0.4s var(--ease-soft),
    background-color 0.4s var(--ease-soft);
}
.input-editorial::placeholder {
  color: var(--soft-text); /* [1d] was #aaa39a, 2.5:1; italic keeps it distinct from typed text */
  font-style: italic;
  opacity: 1;
  transition: opacity 0.4s var(--ease-soft), transform 0.4s var(--ease-soft);
}
.input-editorial:hover:not(:focus) { border-bottom-color: #c9c6bc; }
.input-editorial:focus {
  outline: none;
  background-size: 100% 2px; /* [3d] 2px rose rule = clearer focus indicator */
  border-bottom-color: transparent;
}
.input-editorial:focus::placeholder { opacity: 0.4; }
textarea.input-editorial {
  min-height: 6.5rem;
  resize: none;
  padding-top: 0.5rem;
  line-height: 2rem;
  /* faint ruled lines */
  background-image:
    linear-gradient(var(--rose), var(--rose)),
    repeating-linear-gradient(to bottom, transparent 0 calc(2rem - 1px), rgba(41, 79, 115, 0.07) calc(2rem - 1px) 2rem);
  background-size: 0% 1px, 100% 100%;
  background-position: 50% 100%, 0 0.5rem;
  background-attachment: scroll, local;
}
textarea.input-editorial:focus { background-size: 100% 2px, 100% 100%; } /* [3d] */
.input-editorial.is-invalid { border-bottom-color: #c56f74; }

/* Status line (success / error) */
.form-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 1.2rem;
  margin: 0;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--rose-text); /* [1d] */
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.form-status.is-visible { opacity: 1; transform: none; }
/* [1c] sprig ornament instead of the "✳" glyph (inherits the status colour) */
.form-status[data-tone="success"]::before {
  content: "";
  width: 22px;
  height: 9px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--orn-sprig) center / contain no-repeat;
          mask: var(--orn-sprig) center / contain no-repeat;
}
.form-status[data-tone="error"] { color: #a9474f; }

/* =========================================================
   STICKY NOTES
   ========================================================= */
.note {
  --dx: 0px;
  --dy: 0px;
  --tilt: 0deg;
  --drop: 0px;
  --scatter: 1;

  position: relative;
  z-index: 1;
  justify-self: center;
  width: 100%;
  max-width: var(--w, 310px);
  margin-top: calc(var(--drop) * var(--scatter));
  transform:
    translate(calc(var(--dx) * var(--scatter)), var(--dy))
    rotate(calc(var(--tilt) * var(--scatter)));
  transform-origin: 50% 6%;
  transition: transform 0.6s var(--ease-out);
}

/* Lifted-corner contact shadows (sit behind the paper) */
.note::before,
.note::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: 12px;
  width: 46%;
  height: 24%;
  box-shadow: 0 15px 13px rgba(52, 60, 66, 0.24);
  transition: box-shadow 0.6s var(--ease-out), bottom 0.6s var(--ease-out);
}
.note::before { left: 9px;  transform: skewY(-3deg) rotate(-3deg); }
.note::after  { right: 9px; transform: skewY(3deg) rotate(3deg); }

.note:focus-within {
  z-index: 7;
  transform:
    translate(calc(var(--dx) * var(--scatter)), calc(var(--dy) - 7px))
    rotate(calc(var(--tilt) * var(--scatter) * 0.3))
    scale(1.025);
}
@media (hover: hover) { /* [3d] */
  .note:hover {
    z-index: 7;
    transform:
      translate(calc(var(--dx) * var(--scatter)), calc(var(--dy) - 7px))
      rotate(calc(var(--tilt) * var(--scatter) * 0.3))
      scale(1.025);
  }
}
.note:focus-within::before,
.note:focus-within::after {
  bottom: 16px;
  box-shadow: 0 24px 20px rgba(52, 60, 66, 0.2);
}
@media (hover: hover) { /* [3d] */
  .note:hover::before,
  .note:hover::after {
    bottom: 16px;
    box-shadow: 0 24px 20px rgba(52, 60, 66, 0.2);
  }
}

.note__paper {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 186px;
  padding: 2.15rem 1.5rem 1.1rem;
  border-radius: 2px 2px 3px 16px / 2px 2px 3px 5px;
  background:
    linear-gradient(176deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 24%),
    linear-gradient(to bottom, var(--note) 0%, var(--note) 74%, var(--note-edge) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -10px 18px -14px rgba(52, 60, 66, 0.18),
    0 1px 1px rgba(52, 60, 66, 0.08),
    0 3px 6px rgba(52, 60, 66, 0.07),
    0 14px 26px -14px rgba(52, 60, 66, 0.28);
  transition: box-shadow 0.6s var(--ease-out);
}
.note__paper::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--grain-warm);
  background-size: 220px;
  opacity: 0.16; /* [1b] was 0.4 gray-green */
  mix-blend-mode: multiply;
  pointer-events: none;
}
.note__paper > * { position: relative; z-index: 1; }

.note:focus-within .note__paper {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -10px 18px -14px rgba(52, 60, 66, 0.18),
    0 2px 3px rgba(52, 60, 66, 0.08),
    0 8px 14px rgba(52, 60, 66, 0.07),
    0 28px 40px -20px rgba(52, 60, 66, 0.34);
}
@media (hover: hover) { /* [3d] */
  .note:hover .note__paper {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.65),
      inset 0 -10px 18px -14px rgba(52, 60, 66, 0.18),
      0 2px 3px rgba(52, 60, 66, 0.08),
      0 8px 14px rgba(52, 60, 66, 0.07),
      0 28px 40px -20px rgba(52, 60, 66, 0.34);
  }
}

/* Paper tones */
.note--butter { --note: #faf3da; --note-edge: #f0e6c4; }
.note--blush  { --note: #f7e2df; --note-edge: #ebcbc6; }
.note--mist   { --note: #e2ecf2; --note-edge: #cadbe6; }
.note--sage   { --note: #e5ecda; --note-edge: #cfdbbf; }
.note--lilac  { --note: #ece4f1; --note-edge: #d9cce5; }
.note--linen  { --note: #fbfaf6; --note-edge: #ecebe4; }

.note__message {
  margin: 0;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: var(--fs-md);
  line-height: 1.7;
  letter-spacing: 0.005em;
  color: #3e3a36;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.note__message::before { content: "\201C"; }
.note__message::after  { content: "\201D"; }

.note__meta {
  display: flex;
  flex-wrap: wrap; /* [1e] let owner actions take their own row */
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(52, 60, 66, 0.16);
}
/* [1e] with actions present the author keeps the full line (no 3-line wrap) */
.note__meta:has(.note__actions) .note__author { flex: 1 0 100%; }

.note__author {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.note__author::before { content: "— "; letter-spacing: 0; }

.note__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto; /* [1e] tuck into the quiet bottom-right corner */
  margin-right: -0.35rem;
}
/* [1e] quiet until the note is hovered or focused; always shown on touch */
@media (hover: hover) {
  .note__actions { opacity: 0; transition: opacity 0.35s var(--ease-soft); }
  .note:hover .note__actions,
  .note:focus-within .note__actions,
  .note.is-editing .note__actions,
  .note__actions:has([data-armed="true"]) { opacity: 1; }
}
.note__action-sep { color: rgba(52, 60, 66, 0.3); font-size: var(--fs-3xs); }

.note__action {
  position: relative;
  padding: 0.3rem 0.35rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--note-action); /* [1d] muted fell to ~3.5:1 at note edges */
  cursor: pointer;
  transition: color 0.3s, background-color 0.35s var(--ease-soft), transform 0.35s var(--ease-out);
}
.note__action:hover { color: var(--ink); background: rgba(255, 255, 255, 0.55); }
.note__action:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; } /* [3d-ii] 1.5px rendered as 1px */
.note__action--danger { color: var(--note-danger); } /* [1d] */
.note__action--danger:hover { color: #6a3039; }
.note__action:active { transform: scale(0.94); } /* [3d] */
.note__action[data-armed="true"] {
  background: var(--rose-deep); /* [1d] */
  color: #fff;
  animation: btn-pop 0.35s var(--ease-out);
}

/* --- Washi tape --------------------------------------------------- */
.note__tape {
  position: absolute;
  top: -13px;
  left: calc(50% + var(--accent-x, 0px));
  z-index: 3;
  width: 94px;
  height: 27px;
  transform: translateX(-50%) rotate(var(--tape-tilt, -2deg));
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.24) 0 4px, transparent 4px 9px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 65%),
    var(--tape);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  clip-path: polygon(2% 0, 98% 0, 100% 20%, 97% 40%, 100% 60%, 97% 80%, 100% 100%, 2% 100%, 0 80%, 3% 60%, 0 40%, 3% 20%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.note__tape--rose { --tape: rgba(222, 180, 184, 0.66); }
.note__tape--ink  { --tape: rgba(168, 192, 214, 0.64); }
.note__tape--sand { --tape: rgba(214, 222, 206, 0.7); }
.note__tape--sage { --tape: rgba(184, 204, 172, 0.66); }

/* dashed print + torn-edge sheen on the tape */
.note__tape::after,
.wish-card__tape::after {
  content: "";
  position: absolute;
  inset: 4px 7px;
  border-top: 1px dashed rgba(255, 255, 255, 0.7);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.7);
}
.note__tape { opacity: 0.92; }

/* --- Push pin ----------------------------------------------------- */
.note__pin {
  position: absolute;
  top: -6px;
  left: calc(50% + var(--accent-x, 0px));
  z-index: 3;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95) 0 1.6px, rgba(255, 255, 255, 0) 3.2px),
    radial-gradient(circle at 42% 38%, var(--pin-light) 0%, var(--pin) 55%, var(--pin-dark) 100%);
  box-shadow:
    0 1px 1px rgba(52, 60, 66, 0.3),
    2px 5px 6px -1px rgba(52, 60, 66, 0.28);
  pointer-events: none;
}
/* needle shadow on the paper */
.note__pin::after {
  content: "";
  position: absolute;
  left: 62%;
  top: 72%;
  width: 2px;
  height: 11px;
  border-radius: 2px;
  background: linear-gradient(to bottom, rgba(52, 60, 66, 0.4), rgba(52, 60, 66, 0));
  transform: rotate(-32deg);
  transform-origin: top center;
  filter: blur(0.5px);
}
.note__pin--rose  { --pin-light: #e9b4b9; --pin: #c98289; --pin-dark: #9c5660; }
.note__pin--ink   { --pin-light: #7e9fbf; --pin: #3c6489; --pin-dark: #1f3d5a; }
.note__pin--brass { --pin-light: #f1dca6; --pin: #c9a65a; --pin-dark: #8d6f2c; }

/* --- Empty state -------------------------------------------------- */
.note--empty .note__paper {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed rgba(52, 60, 66, 0.22);
  box-shadow: none;
}
.note--empty::before,
.note--empty::after { display: none; }
.note--empty .note__message { color: var(--muted); }
.note--empty .note__message::before,
.note--empty .note__message::after { content: none; }

/* =========================================================
   NOTE STATES & MOTION
   ========================================================= */
.note.is-entering {
  animation: note-settle 0.8s var(--ease-out) backwards;
  animation-delay: var(--motion-delay, 0ms);
}
.note.is-fresh {
  z-index: 6;
  animation: note-pin 0.95s var(--ease-out) backwards;
  animation-delay: var(--motion-delay, 0ms);
}
.note.is-updated .note__paper {
  animation: paper-glow 1.5s var(--ease-out);
  animation-delay: var(--motion-delay, 0ms);
}
.note.is-editing { z-index: 6; }
.note.is-editing .note__paper {
  outline: 1.5px dashed rgba(201, 130, 137, 0.75);
  outline-offset: 6px;
}
.note.is-removing {
  pointer-events: none;
  animation: note-remove 0.4s var(--ease-soft) forwards;
}

@keyframes note-settle {
  from {
    opacity: 0;
    transform:
      translate(calc(var(--dx) * var(--scatter)), calc(var(--dy) + 16px))
      rotate(calc(var(--tilt) * var(--scatter) * 1.8))
      scale(0.97);
  }
}

@keyframes note-pin {
  0% {
    opacity: 0;
    transform:
      translate(calc(var(--dx) * var(--scatter)), calc(var(--dy) - 38px))
      rotate(calc(var(--tilt) * var(--scatter) - 7deg))
      scale(1.08);
  }
  55% {
    opacity: 1;
    transform:
      translate(calc(var(--dx) * var(--scatter)), calc(var(--dy) + 3px))
      rotate(calc(var(--tilt) * var(--scatter) + 1deg))
      scale(0.995);
  }
  100% {
    transform:
      translate(calc(var(--dx) * var(--scatter)), var(--dy))
      rotate(calc(var(--tilt) * var(--scatter)))
      scale(1);
  }
}

@keyframes note-remove {
  to {
    opacity: 0;
    transform:
      translate(calc(var(--dx) * var(--scatter)), calc(var(--dy) - 20px))
      rotate(calc(var(--tilt) * var(--scatter) + 6deg))
      scale(0.94);
  }
}

@keyframes paper-glow {
  0%   { filter: brightness(1); }
  25%  { filter: brightness(1.05) drop-shadow(0 0 10px rgba(201, 130, 137, 0.45)); }
  100% { filter: brightness(1) drop-shadow(0 0 0 rgba(201, 130, 137, 0)); }
}

@keyframes card-nudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

@keyframes btn-pop {
  0%   { transform: scale(0.97); }
  60%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* Tablet / mobile: calmer scatter */
@media (max-width: 1024px) {
  .note { --scatter: 0.75; }
}
@media (max-width: 640px) {
  .note { --scatter: 0.4; max-width: 360px; justify-self: center !important; margin-top: 0 !important; }
  .wish-card { padding: 2.75rem 1.5rem 1.75rem; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--paper); }

.back-to-top {
  display: inline-flex;
  gap: 0.4rem;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.35s, transform 0.5s var(--ease-out);
}
.back-to-top:active { color: var(--ink-deep); transform: none; } /* [3d] */
@media (hover: hover) { /* [3d] */
  .back-to-top:hover { color: var(--ink); transform: translateY(-2px); }
}

/* =========================================================
   [3a] SCROLL REVEAL — fade + 12px rise, ~700ms, staggered.
   Uses the individual `translate` property via an animation so
   it composes with slip tilt/hover transforms and never
   overrides component transitions.
   ========================================================= */
.js-reveal [data-reveal]:not(.is-revealed) { opacity: 0; }
.js-reveal [data-reveal].is-revealed {
  animation: reveal-rise 0.7s var(--ease-out) backwards;
  animation-delay: calc(var(--reveal-i, 0) * 90ms);
}
@keyframes reveal-rise {
  from { opacity: 0; translate: 0 12px; }
  to   { opacity: 1; translate: 0 0; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .note:hover,
  .note:focus-within {
    transform:
      translate(calc(var(--dx) * var(--scatter)), var(--dy))
      rotate(calc(var(--tilt) * var(--scatter)));
  }
}


/* =========================================================
   LAYOUT UTILITIES — hand-written replacements for the 73
   Tailwind classes used in index.html (was cdn.tailwindcss.com).
   Kept LAST in this file so they win ties, exactly as the
   CDN's injected <style> did. Values = Tailwind v3 defaults.
   ========================================================= */
.static   { position: static; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-x-0 { left: 0; right: 0; }
.left-0  { left: 0; }
.right-0 { right: 0; }
.top-0   { top: 0; }
.top-full { top: 100%; }
.z-40 { z-index: 40; }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-9  { margin-top: 2.25rem; margin-bottom: 2.25rem; }
.mb-5  { margin-bottom: 1.25rem; }
.mb-8  { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.flex   { display: flex; }
.grid   { display: grid; }
.hidden { display: none; }

.min-h-\[720px\] { min-height: 720px; }
.w-full { width: 100%; }
.max-w-24  { max-width: 6rem; }
.max-w-xs  { max-width: 20rem; }
.max-w-md  { max-width: 28rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }

.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.overflow-hidden { overflow: hidden; }

.border-y { border-top-width: 1px; border-bottom-width: 1px; }
.border-line { border-color: #e7e1d8; }
.bg-paper { background-color: #f8f6f1; }

.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-7 { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-24 { padding-bottom: 6rem; }
.pb-32 { padding-bottom: 8rem; }
.pb-36 { padding-bottom: 9rem; }
.pt-4  { padding-top: 1rem; }
.pt-10 { padding-top: 2.5rem; }
.pt-16 { padding-top: 4rem; }
.pt-24 { padding-top: 6rem; }
.pt-40 { padding-top: 10rem; }

.text-center { text-align: center; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

@media (min-width: 640px) {
  .sm\:mb-20 { margin-bottom: 5rem; }
  .sm\:min-h-\[820px\] { min-height: 820px; }
  .sm\:px-6  { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:pb-28 { padding-bottom: 7rem; }
  .sm\:pb-36 { padding-bottom: 9rem; }
  .sm\:pt-28 { padding-top: 7rem; }
}
@media (min-width: 768px) {
  .md\:static { position: static; }
  .md\:flex   { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:gap-10 { gap: 2.5rem; }
  .md\:border-0 { border-width: 0; }
  .md\:bg-transparent { background-color: transparent; }
  .md\:p-0 { padding: 0; }
}
@media (min-width: 1024px) {
  .lg\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
}
