/* ==========================================================================
   Baby B is in Bloom — design tokens
   ========================================================================== */

@font-face {
  font-family: 'Halimun';
  src: url('../assets/fonts/Halimun.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette */
  --color-blush: #E6C3BB;
  --color-blush-tint: #F6E7E2;
  --color-dusty-rose: #D7A49E;
  --color-soft-pink: #EBC6C0;
  --color-cream: #EDE1D4;
  --color-sage: #BBBC9D;
  --color-olive-sage: #B4B385;
  --color-eucalyptus-deep: #838B6B;
  --color-eucalyptus: #849176;
  --color-gold: #F2D586;
  --color-bg: #FCF9F8;
  --color-ink: #4A3F3C;
  --color-ink-soft: #6E5F5A;

  /* Type */
  --font-script: 'Halimun', cursive;
  --font-serif: 'Cardo', Georgia, 'Times New Roman', serif;

  /* Rhythm */
  --section-padding-y: clamp(3.5rem, 12vw, 6rem);
  --content-max: 640px;
  --radius: 4px;

  /* Motion */
  --ease-bloom: cubic-bezier(0.22, 0.61, 0.36, 1);
  --reveal-distance: 14px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  width: 100%;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3 { margin: 0; font-weight: 400; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

a { color: var(--color-dusty-rose); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-cream);
  color: var(--color-ink);
  padding: 0.75em 1.25em;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.eyebrow {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-dusty-rose);
  margin: 0 0 0.75em;
}

.section__heading {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  color: var(--color-ink);
  margin-bottom: 1em;
}

.lede {
  color: var(--color-ink-soft);
  font-size: 1.02rem;
}

/* ==========================================================================
   Layout scaffolding
   ========================================================================== */

.section {
  position: relative;
  padding: var(--section-padding-y) 1.5rem;
}

.section__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .section { padding-left: 2rem; padding-right: 2rem; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 5rem;
  background: var(--color-bg);
}

.hero__inner {
  max-width: 520px;
}

.hero__wordmark {
  width: 100%;
  max-width: 460px;
  margin: 0.5rem auto 1.25rem;
}

.hero__date {
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--color-ink-soft);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.scroll-cue__chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--color-dusty-rose);
  border-bottom: 2px solid var(--color-dusty-rose);
  transform: rotate(45deg);
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, 4px); }
}

/* ==========================================================================
   Floral accents
   ========================================================================== */

.floral-corner {
  position: absolute;
  width: 42vw;
  max-width: 260px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}
.floral-corner--left {
  top: -2rem;
  left: -1rem;
  max-width: 200px;
}
.floral-corner--right {
  top: -1rem;
  right: -1rem;
}
.section--grub .floral-corner--right {
  top: -2.5rem;
  max-width: 200px;
}
.section--grub .floral-corner--right img {
  transform: rotate(180deg);
}
.section--closing .floral-corner--right {
  z-index: 2;
}

/* clearance so corners don't sit over heading/eyebrow text */
.section--welcome .section__heading,
.section--registry .eyebrow {
  margin-top: 2.75rem;
}
.section--grub .eyebrow {
  margin-top: 1.5rem;
}
.section--registry .eyebrow {
  color: var(--color-ink-soft);
}

/* ==========================================================================
   Welcome / announcement collage
   ========================================================================== */

.announcement-grid {
  margin: 2rem 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 32px -16px rgba(74, 63, 60, 0.35);
}

/* ==========================================================================
   Event details
   ========================================================================== */

.section--details {
  background: var(--color-cream);
}

.detail-list {
  margin: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-list__row {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  border-bottom: 1px solid rgba(131, 139, 107, 0.25);
  padding-bottom: 1.1rem;
}
.detail-list__row:last-child { border-bottom: none; padding-bottom: 0; }

.detail-list dt {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-eucalyptus-deep);
}

.detail-list dd {
  margin: 0;
  font-size: 1.08rem;
}

.map-link {
  display: block;
  width: fit-content;
  margin-top: 0.6em;
  padding: 0.4em 0.9em;
  background: var(--color-bg);
  border-radius: 999px;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--color-dusty-rose);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9em 2.1em;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease-bloom), background-color 0.25s ease, box-shadow 0.25s ease;
}

.btn--primary {
  background: var(--color-dusty-rose);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(215, 164, 158, 0.8);
}
.btn--primary:hover { background: #c68f89; }
.btn--primary:active { transform: scale(0.97); }

.btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* ==========================================================================
   RSVP form
   ========================================================================== */

.section--rsvp {
  background: var(--color-blush-tint);
  padding-top: 2.5rem;
}

.section--grub {
  padding-bottom: 2.5rem;
}

.section--rsvp .section__heading {
  position: relative;
  padding-bottom: 1rem;
}
.section--rsvp .section__heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: var(--color-gold);
}

.rsvp-deadline {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  color: var(--color-eucalyptus-deep);
}

.rsvp-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field-row { display: flex; flex-direction: column; gap: 0.4em; }
.field-row[hidden] { display: none; }

.field-row--split {
  flex-direction: row;
  gap: 1rem;
}
.field-row--split > div {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-eucalyptus-deep);
}

input[type="text"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1px solid rgba(131, 139, 107, 0.4);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--color-dusty-rose);
  box-shadow: 0 0 0 3px rgba(215, 164, 158, 0.22);
}

.field-row--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.6em;
}
.field-row--checkbox input[type="checkbox"] {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  accent-color: var(--color-dusty-rose);
}
.field-row--checkbox label {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.98rem;
  color: var(--color-ink);
}

.rsvp-conditional {
  padding-left: 0.2rem;
  border-left: 2px solid var(--color-soft-pink);
  margin-left: 0.35rem;
}

.rsvp-form__submit {
  margin-top: 0.5rem;
  align-self: center;
}

.rsvp-form__status {
  text-align: center;
  min-height: 1.4em;
  font-size: 0.92rem;
  margin: 0;
}
.rsvp-form__status[data-state="success"] { color: var(--color-eucalyptus-deep); }
.rsvp-form__status[data-state="error"] { color: #a24444; }

.rsvp-closed {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-cream);
  border-radius: var(--radius);
}

/* ==========================================================================
   Registry
   ========================================================================== */

.section--registry { background: var(--color-cream); }

.nappy-callout {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--color-blush-tint);
  border-radius: var(--radius);
}

.nappy-callout__heading {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--color-dusty-rose);
  margin: 0 0 0.4rem;
}

.nappy-callout__text {
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  margin: 0;
}

.sizing-intro { margin-top: 2.5rem; }

.sizing-table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sizing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}

.sizing-table th,
.sizing-table td {
  padding: 0.7em 0.9em;
  text-align: left;
  border-bottom: 1px solid rgba(131, 139, 107, 0.2);
}

.sizing-table th {
  background: var(--color-sage);
  color: #fff;
  font-weight: 400;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.sizing-table tr:last-child td { border-bottom: none; }
.sizing-table tr:nth-child(even) td { background: rgba(187, 188, 157, 0.1); }

.brand-guide-intro { margin-top: 2rem; }

.brand-guide {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}

.brand-guide li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em 0.6em;
  padding: 0.7em 0.9em;
  font-size: 0.92rem;
  color: var(--color-ink);
  border-bottom: 1px solid rgba(131, 139, 107, 0.2);
}
.brand-guide li:last-child { border-bottom: none; }
.brand-guide li:nth-child(even) { background: rgba(187, 188, 157, 0.1); }

.brand-guide__item {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-eucalyptus-deep);
  flex-basis: 100%;
}

/* ==========================================================================
   Pets section
   ========================================================================== */

.pets-photo {
  margin: 0 0 2rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 32px -16px rgba(74, 63, 60, 0.35);
}

/* ==========================================================================
   Closing
   ========================================================================== */

.section--closing { background: var(--color-cream); }

.closing-photo {
  margin: 0 0 2rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 32px -16px rgba(74, 63, 60, 0.35);
}

/* ==========================================================================
   Closing quote from the parents
   ========================================================================== */

.section--parent-quote {
  background: var(--color-bg);
  padding-bottom: 2rem;
}

.quote-mark {
  display: block;
  font-family: var(--font-script);
  font-size: 4rem;
  line-height: 1;
  color: var(--color-gold);
  margin-bottom: 0.25rem;
}

.parent-quote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-ink);
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.parent-quote__sign {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--color-dusty-rose);
  margin: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  position: relative;
  text-align: center;
  padding: 0 0 2rem;
  background: var(--color-bg);
  overflow: hidden;
}

.footer__garland {
  display: block;
  width: 100%;
  opacity: 0.95;
}

.footer__signoff,
.footer__contact {
  padding: 0 1.5rem;
}

.footer__signoff {
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  margin: 0 0 0.5rem;
}

.footer__contact {
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  margin: 1rem 0 0;
}
.footer__contact a {
  color: var(--color-dusty-rose);
  text-decoration: underline;
}

/* ==========================================================================
   Scroll reveal + parallax
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity 0.7s var(--ease-bloom), transform 0.7s var(--ease-bloom);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section__inner.reveal > * {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity 0.6s var(--ease-bloom), transform 0.6s var(--ease-bloom);
}
.section__inner.reveal.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.section__inner.reveal > *:nth-child(1) { transition-delay: 0.02s; }
.section__inner.reveal > *:nth-child(2) { transition-delay: 0.1s; }
.section__inner.reveal > *:nth-child(3) { transition-delay: 0.18s; }
.section__inner.reveal > *:nth-child(4) { transition-delay: 0.26s; }
.section__inner.reveal > *:nth-child(5) { transition-delay: 0.34s; }
.section__inner.reveal > *:nth-child(6) { transition-delay: 0.42s; }

.floral-corner.reveal {
  transition-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .section__inner.reveal > *,
  .scroll-cue__chevron {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Tablet / desktop scale-up
   ========================================================================== */

@media (min-width: 768px) {
  body { font-size: 18px; }
  .section { padding-top: 6rem; padding-bottom: 6rem; }
  .content-max { max-width: 720px; }
  .field-row--split { max-width: 460px; margin: 0 auto; }
}
