/* ============================================================
   Silly Goose Baby Shower — design system
   Premium storybook + soft coquette + modern editorial.
   Signature palette: warm ivory, powder blue, dusty blue, butter.
   ============================================================ */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #fff9f2;
  --powder: #e8f0f8;
  --gingham: #c8d9eb;
  --blue: #496c91;
  --blue-deep: #38536f;
  --butter: #f4d77e;
  --butter-soft: #fbe9a8;
  --sage: #a8b99c;
  --navy: #263b53;
  --white: #ffffff;
  --ink-soft: #4c6076;
  --line: #dce7f1;
  --danger: #b3402e;
  --success: #3e6b34;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(38, 59, 83, 0.08);
  --shadow-lg: 0 24px 60px rgba(38, 59, 83, 0.14);
  --maxw: 1060px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--navy);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 18px; z-index: 200; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; color: #fff; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--navy); }
h2 { font-size: clamp(28px, 5.4vw, 38px); }
h3 { font-size: clamp(20px, 3.6vw, 24px); }
p { margin: 0 0 1em; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 12px; font-weight: 700;
  color: var(--blue); margin-bottom: 10px;
}
.lede { font-size: clamp(16px, 2.6vw, 18px); color: var(--ink-soft); }

/* ---------- gingham + scallops ---------- */
.gingham {
  background-color: var(--powder);
  background-image:
    linear-gradient(rgba(255,255,255,0.55) 50%, transparent 50%),
    linear-gradient(90deg, rgba(255,255,255,0.55) 50%, transparent 50%),
    linear-gradient(rgba(200,217,235,0.5) 50%, transparent 50%),
    linear-gradient(90deg, rgba(200,217,235,0.5) 50%, transparent 50%);
  background-size: 56px 56px;
}
.scallop-top, .scallop-bottom { position: relative; }
.scallop-top::before, .scallop-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18px; pointer-events: none;
  background-image: radial-gradient(circle at 12px 9px, var(--ivory) 9px, transparent 10px);
  background-size: 24px 18px; background-repeat: repeat-x;
}
.scallop-top::before { top: -1px; transform: rotate(180deg); }
.scallop-bottom::after { bottom: -1px; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(56px, 10vw, 96px) 0; }
.section--powder { background: var(--powder); }
.section--white { background: var(--white); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(28px, 6vw, 48px); }
.section-head img { margin: 0 auto 10px; }
.divider-bow { display: flex; justify-content: center; padding: 6px 0 0; }
.divider-bow img { width: 74px; opacity: 0.95; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 1.2;
  padding: 15px 30px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-height: 52px;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--blue-deep); }
.btn--butter { background: var(--butter); color: var(--navy); box-shadow: var(--shadow); }
.btn--butter:hover { background: var(--butter-soft); }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--gingham); }
.btn--ghost:hover { border-color: var(--blue); }
.btn--small { padding: 10px 20px; min-height: 44px; font-size: 15px; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 60; background: rgba(255, 249, 242, 0.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--navy); text-decoration: none; margin-right: auto; }
.brand img { width: 38px; height: 38px; }
.nav-links { display: none; gap: 4px; }
.nav-links a { color: var(--navy); text-decoration: none; font-weight: 500; padding: 10px 12px; border-radius: 999px; font-size: 15px; }
.nav-links a:hover { background: var(--powder); }
.nav-toggle { background: none; border: 1px solid var(--line); border-radius: 12px; width: 46px; height: 46px; font-size: 20px; cursor: pointer; color: var(--navy); }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}
.nav-links.open {
  display: flex; position: absolute; top: 62px; left: 12px; right: 12px; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px; box-shadow: var(--shadow-lg);
}
.nav { position: sticky; }
.nav .wrap { position: relative; }

/* ---------- envelope / welcome ---------- */
.envelope-screen {
  min-height: 100svh; display: grid; place-items: center; padding: 32px 20px;
  text-align: center; position: relative; overflow: hidden;
}
.envelope-card { max-width: 560px; width: 100%; position: relative; z-index: 2; }
.envelope-card h1 { font-size: clamp(30px, 7vw, 44px); }
.envelope-art { width: min(430px, 88vw); margin: 8px auto 4px; }
.envelope-wrap { perspective: 1200px; margin: 10px auto 18px; width: min(430px, 88vw); }
.envelope-svg { width: 100%; }
.envelope-opening .flap { animation: flapOpen 0.9s ease forwards; transform-origin: 280px 112px; }
@keyframes flapOpen { to { transform: rotateX(168deg) translateY(-6px); opacity: 0.92; } }
.envelope-opening .seal { animation: sealPop 0.5s ease forwards; }
@keyframes sealPop { to { transform: scale(0); opacity: 0; } }
.skip-link-inline { display: inline-block; margin-top: 14px; font-size: 15px; }
.hidden { display: none !important; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(40px, 8vw, 72px) 0 clamp(50px, 9vw, 84px); position: relative; }
.hero h1 { font-size: clamp(38px, 9.4vw, 62px); max-width: 760px; margin-inline: auto; }
.hero .parents { font-family: var(--font-display); font-size: clamp(22px, 5.4vw, 30px); color: var(--blue); margin: 6px 0 10px; }
.hero-art { width: min(360px, 74vw); margin: 0 auto 6px; }
.hero-photo {
  width: min(440px, 88vw); aspect-ratio: 4 / 3; object-fit: cover; margin: 22px auto 6px;
  border-radius: 140px 140px var(--radius) var(--radius); border: 6px solid #fff;
  box-shadow: var(--shadow-lg); background: var(--powder);
}
.hero-date { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 22px; font-weight: 700; color: var(--blue); margin: 12px 0 22px; box-shadow: var(--shadow); }
.hero-decor { position: absolute; pointer-events: none; opacity: 0.9; }
.hero-decor--daisy { width: 64px; left: max(10px, 4vw); top: 84px; }
.hero-decor--bow { width: 76px; right: max(10px, 4vw); top: 130px; }
@media (max-width: 640px) { .hero-decor { display: none; } }

/* ---------- countdown ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 560px; margin: 0 auto; }
.count-cell {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 6px 14px; text-align: center; box-shadow: var(--shadow);
}
.count-cell b { display: block; font-family: var(--font-display); font-size: clamp(26px, 7vw, 40px); color: var(--blue); line-height: 1; }
.count-cell span { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.countdown-done { text-align: center; font-family: var(--font-display); font-size: 24px; color: var(--blue); }

/* ---------- cards & details ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(22px, 5vw, 36px);
}
.details-grid { display: grid; gap: 14px; grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
@media (min-width: 720px) { .details-grid { grid-template-columns: 1fr 1fr; } }
.detail { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.detail .icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--powder); display: grid; place-items: center; font-size: 20px; }
.detail h3 { font-size: 17px; margin-bottom: 2px; font-family: var(--font-body); font-weight: 700; }
.detail p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--powder); }
.map-frame iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ---------- forms ---------- */
.form-card { max-width: 620px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 7px; font-size: 15.5px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 13.5px; display: block; margin-top: 2px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--navy);
  background: #fff; border: 1.5px solid var(--gingham); border-radius: var(--radius-sm);
  padding: 13px 15px; min-height: 52px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(244, 215, 126, 0.55); outline-offset: 0; }
.field .error { color: var(--danger); font-size: 14px; margin-top: 6px; font-weight: 500; }
.radio-row { display: grid; gap: 10px; }
@media (min-width: 560px) { .radio-row { grid-template-columns: 1fr 1fr; } }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-card span {
  display: block; text-align: center; padding: 16px 12px; border: 1.5px solid var(--gingham);
  border-radius: var(--radius-sm); font-weight: 700; background: #fff; transition: all 0.15s ease;
}
.radio-card input:checked + span { background: var(--powder); border-color: var(--blue); color: var(--blue-deep); box-shadow: var(--shadow); }
.radio-card input:focus-visible + span { outline: 3px solid var(--butter); }
.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 18px; font-weight: 500; }
.alert--success { background: #eef4e8; border: 1px solid var(--sage); color: var(--success); }
.alert--error { background: #fbeeea; border: 1px solid #e5b3a7; color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.turnstile-box { margin: 6px 0 16px; display: flex; justify-content: center; }

/* ---------- registry ---------- */
.registry-grid { display: grid; gap: 14px; grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }
@media (min-width: 620px) { .registry-grid { grid-template-columns: 1fr 1fr; } }
.registry-card {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; text-decoration: none; color: var(--navy);
  box-shadow: var(--shadow); font-weight: 700; font-size: 17px; transition: transform 0.15s ease;
}
.registry-card:hover { transform: translateY(-2px); }
.registry-card .gift { width: 46px; height: auto; }
.registry-card small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 13.5px; }
.registry-card .arrow { margin-left: auto; color: var(--blue); font-size: 20px; }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.gallery-item { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--powder); transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.lightbox {
  position: fixed; inset: 0; z-index: 120; background: rgba(28, 42, 60, 0.92);
  display: grid; place-items: center; padding: 20px;
}
.lightbox img { max-width: min(92vw, 900px); max-height: 78vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox-bar { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }
.lightbox-nav { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.lightbox button {
  background: #fff; color: var(--navy); border: 0; border-radius: 999px; min-width: 48px; height: 48px;
  font-size: 19px; cursor: pointer; padding: 0 18px; font-family: var(--font-body); font-weight: 700;
}
.lightbox figcaption { color: #fff; text-align: center; margin-top: 12px; font-size: 15px; }

/* ---------- extras ---------- */
.extras-grid { display: grid; gap: 14px; grid-template-columns: 1fr; max-width: 860px; margin: 0 auto; }
@media (min-width: 720px) { .extras-grid { grid-template-columns: 1fr 1fr; } }
.extra-card { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--butter); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.extra-card h3 { display: flex; align-items: center; gap: 10px; }
.extra-card p { color: var(--ink-soft); margin: 0; white-space: pre-line; }

/* ---------- music ---------- */
.music-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 999px; padding: 8px 16px 8px 8px;
}
.music-bar button {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--blue); color: #fff;
  font-size: 17px; cursor: pointer; display: grid; place-items: center;
}
.music-bar span { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 56px 20px 44px; }
.site-footer img { width: min(420px, 84vw); margin: 0 auto 8px; }
.site-footer .thanks { font-family: var(--font-display); font-size: clamp(24px, 5vw, 32px); }
.site-footer p { color: var(--ink-soft); }

/* ---------- status / states ---------- */
.state-box { max-width: 560px; margin: 12vh auto; text-align: center; padding: 0 20px; }
.spinner {
  width: 42px; height: 42px; margin: 0 auto 16px; border-radius: 50%;
  border: 4px solid var(--powder); border-top-color: var(--blue); animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.demo-badge {
  display: inline-block; background: var(--butter); color: var(--navy); font-weight: 700; font-size: 12px;
  letter-spacing: 0.14em; padding: 5px 12px; border-radius: 999px; text-transform: uppercase;
}

/* landing page */
.landing-hero { text-align: center; padding: 72px 0 30px; }
.landing-hero h1 { font-size: clamp(38px, 8vw, 58px); }
.landing-grid { display: grid; gap: 16px; grid-template-columns: 1fr; padding: 26px 0 70px; }
@media (min-width: 760px) { .landing-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) {
  .brand { font-size: 16.5px; line-height: 1.2; }
  .brand img { width: 34px; height: 34px; }
}
