:root {
  --sun: #ffc93c;
  --coral: #ff8a65;
  --pink: #ff6f91;
  --sky: #4fc3f7;
  --mint: #6fcf97;
  --ink: #3a2e39;
  --cream: #fffaf0;
  --white: #ffffff;
  --copper: #7b3d0c;
  --shadow: rgba(58, 46, 57, 0.12);
  --radius: 24px;
  --max-width: 880px;
  --max-width-wide: 1080px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: "Quicksand", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2 {
  font-family: "Baloo 2", cursive;
  margin: 0;
}

.confetti-bar {
  height: 10px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--sun) 0 40px,
    var(--coral) 40px 80px,
    var(--pink) 80px 120px,
    var(--sky) 120px 160px,
    var(--mint) 160px 200px
  );
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #fff6e0 0%, #ffe4d6 50%, #ffe0ea 100%);
  padding: 44px 20px 72px;
  text-align: center;
}

.hero-blob {
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  background: var(--sun);
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(2px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  gap: 36px;
  justify-items: center;
  align-items: center;
}

.hero-photo {
  position: relative;
  width: min(300px, 76vw);
}

.hero-photo-frame {
  aspect-ratio: 4 / 5;
  border: 8px solid var(--white);
  border-radius: 999px 999px 28px 28px;
  overflow: hidden;
  background: #f3e6dc;
  box-shadow: 0 18px 40px rgba(58, 46, 57, 0.2);
}

.hero-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  right: -14px;
  bottom: 22px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  border: 4px solid var(--white);
  box-shadow: 0 10px 24px rgba(255, 201, 60, 0.5);
  transform: rotate(8deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  line-height: 1;
}

.hero-badge-number { font-size: 2.4rem; }

.hero-badge-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text { width: 100%; max-width: 480px; }

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-end;   /* "Turns one" tucks under the right end of the name */
  width: fit-content;
  margin: 0 auto;
  color: var(--copper);
  line-height: 1;
}

.hero-script {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(4.8rem, 16vw, 7.4rem);
  line-height: 1.05;
}

.hero-caps {
  margin-top: 0.15rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 4.2vw, 1.95rem);
  letter-spacing: 0.17em;
  margin-right: -0.17em;   /* cancels the trailing letter-space so the last letter lines up */
  text-transform: uppercase;
}

@media (min-width: 860px) {
  .hero { padding: 72px 20px 88px; }
  .hero-inner {
    grid-template-columns: 1fr auto;
    gap: 72px;
    justify-items: stretch;
  }
  .hero-text { order: 1; max-width: none; text-align: left; }
  .hero-photo { order: 2; width: 340px; }
  .hero-text .hero-title { margin-left: 0; margin-right: 0; }
  .hero-text .party-card,
  .hero-text .party-note { margin-left: 0; margin-right: 0; }
}

.party-card {
  margin: 32px auto 0;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: 0 12px 30px var(--shadow);
  text-align: left;
}

.party-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  padding: 6px 0;
}

.party-icon { font-size: 1.2rem; }

.party-note {
  max-width: 480px;
  margin: 20px auto 0;
  font-weight: 500;
  color: #6b5c66;
}

.cta-button {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 32px;
  background: var(--coral);
  color: var(--white);
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(255, 138, 101, 0.4);
  transition: transform 0.15s ease;
}

.cta-button:hover { transform: translateY(-2px); }

.cta-button-secondary {
  background: var(--sky);
  box-shadow: 0 10px 24px rgba(79, 195, 247, 0.35);
}

/* ---------- Sections ---------- */

.section { padding: 64px 20px; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--ink);
}

.section-subtitle {
  color: #6b5c66;
  margin-top: 8px;
  font-weight: 500;
}

.about-section { background: var(--white); }

.about-blurb {
  max-width: 620px;
  margin: 20px auto 0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* ---------- Story ---------- */

.story-section { background: var(--cream); overflow: hidden; }

.story-strip {
  list-style: none;
  margin: 28px 0 0;
  padding: 4px 4px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 10px;
}

.story-strip li { flex: none; }

.story-strip a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 0.75rem;
}

.story-strip img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 4px 10px var(--shadow);
}

.story-strip a:hover img { box-shadow: 0 0 0 3px var(--coral); }
.story-strip a:focus-visible img { outline: 3px solid var(--sky); outline-offset: 2px; }

.story {
  list-style: none;
  margin: 40px auto 0;
  padding: 0;
  max-width: 960px;
  position: relative;
  text-align: left;
}

.story::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(to bottom, var(--sun) 0 14px, transparent 14px 26px);
  border-radius: 2px;
}

.chapter {
  --accent: var(--sun);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 80px;
  align-items: center;
  margin-bottom: 64px;
  scroll-margin-top: 24px;
}

.chapter:last-child { margin-bottom: 0; }
.chapter:nth-child(5n+2) { --accent: var(--coral); }
.chapter:nth-child(5n+3) { --accent: var(--pink); }
.chapter:nth-child(5n+4) { --accent: var(--sky); }
.chapter:nth-child(5n+5) { --accent: var(--mint); }

.chapter::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--cream);
  box-shadow: 0 0 0 3px var(--accent);
}

.chapter-photo {
  margin: 0;
  width: 100%;
  max-width: 340px;
  justify-self: end;
}

.chapter-photo .chapter-frame {
  display: block;
  aspect-ratio: 4 / 5;
  border: 8px solid var(--white);
  border-radius: 22px;
  overflow: hidden;
  background: #f1e6dc;
  box-shadow: 0 14px 32px rgba(58, 46, 57, 0.16);
  transform: rotate(-1.5deg);
}

.chapter-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-text { max-width: 340px; justify-self: start; }

.chapter:nth-child(even) .chapter-photo { grid-column: 2; grid-row: 1; justify-self: start; }
.chapter:nth-child(even) .chapter-photo .chapter-frame { transform: rotate(1.5deg); }
.chapter:nth-child(even) .chapter-text { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }

.chapter-number {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 5rem;
  line-height: 0.85;
  color: var(--accent);
  opacity: 0.6;
}

.chapter-month {
  display: inline-block;
  margin: 10px 0 0;
  padding: 3px 14px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, white);
  color: var(--ink);
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chapter-title {
  margin: 10px 0 6px;
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--ink);
}

@media (max-width: 720px) {
  .story::before { left: 9px; transform: none; }

  .chapter,
  .chapter:nth-child(even) {
    grid-template-columns: 1fr;
    row-gap: 18px;
    padding-left: 40px;
    margin-bottom: 52px;
    align-items: start;
  }

  .chapter::before { left: 0; top: 6px; margin: 0; }

  .chapter-photo,
  .chapter:nth-child(even) .chapter-photo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: 320px;
  }

  .chapter-text,
  .chapter:nth-child(even) .chapter-text {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    text-align: left;
  }

  .chapter-number { font-size: 3.6rem; }
}

/* ---------- Finale: the first-birthday photo, shown big ---------- */

.finale {
  --accent: var(--pink);
  padding: 56px 0 64px;
  text-align: center;
  background: linear-gradient(180deg, var(--cream) 0%, #ffe9ee 55%, #fff1d6 100%);
}

.finale-text { padding: 0 20px; }

.finale .chapter-month { margin: 0; }

.finale-title {
  margin: 12px 0 0;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  color: var(--ink);
}

.finale-photo { margin: 28px auto 0; }

.finale-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 96vh;
  margin: 0 auto;
  border: 8px solid var(--white);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(58, 46, 57, 0.25);
}

@media (max-width: 720px) {
  .finale { padding: 40px 0 56px; }
  .finale-photo img {
    width: 100%;
    max-height: none;
    border-width: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ---------- Gifts ---------- */

.photos-teaser-section { background: var(--cream); }

.photos-frame {
  display: block;
  width: 100%;
  height: 75vh;
  min-height: 420px;
  border: 0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 24px var(--shadow);
}

.photos-fallback { margin-top: 14px; text-align: center; font-size: 0.95rem; }

.gifts-intro {
  max-width: 560px;
  margin: 20px auto 0;
  font-weight: 500;
}

.gift-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

.gift-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 16px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 8px 20px var(--shadow);
  text-align: center;
}

.gift-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #f0e6dc;
  background: var(--white);
}

.gift-photo img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
}

.gift-photo-empty { background: linear-gradient(135deg, #ffe9ee, #fff1d6); }

.gift-photo-soon {
  padding: 0 16px;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 0.95rem;
  color: #8a6f7d;
}

.gift-card-claimed .gift-photo img,
.gift-card-claimed .gift-photo-soon,
.gift-card-claimed .gift-name { opacity: 0.45; }

.gift-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--white);
  font-family: "Baloo 2", cursive;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gift-badge-claimed { background: #9b8b95; }

.gift-badge-mine {
  background: var(--sky);
  color: var(--ink);
}

.gift-name {
  margin: 0;
  padding: 0 4px;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
}

@media (max-width: 520px) {
  .gift-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gift-card { padding: 8px 8px 12px; border-radius: 16px; gap: 8px; }
  .gift-photo { border-radius: 12px; }
  .gift-badge { top: 6px; left: 6px; padding: 3px 9px; font-size: 0.62rem; }
  .gift-name { font-size: 0.88rem; }
}

/* ---------- Gift list page (PLP) ---------- */

.gifts-page-header {
  background: linear-gradient(160deg, #fff6e0 0%, #ffe4d6 50%, #ffe0ea 100%);
  padding: 48px 20px;
  text-align: center;
}

.gifts-page-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  opacity: 0.7;
}

.back-link:hover { opacity: 1; }

.gifts-page-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin-top: 8px;
}

.gifts-plp-section { background: var(--cream); padding-top: 40px; }

.section-inner-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  text-align: center;
}

.claimed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #6b5c66;
  cursor: pointer;
  margin-bottom: 10px;
}

.empty-state {
  margin-top: 24px;
  color: #6b5c66;
  font-weight: 600;
}

/* ---------- Choosing a gift ---------- */

.gift-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
}

.gift-choose,
.gift-undo,
.claim-confirm,
.claim-cancel {
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

.gift-choose {
  padding: 7px 16px;
  border: 2px solid var(--coral);
  background: var(--white);
  color: var(--ink);
}

.gift-choose:hover { background: var(--coral); color: var(--white); }

.gift-undo {
  padding: 7px 16px;
  border: 2px solid #b8a9b2;
  background: transparent;
  color: var(--ink);
}

.gift-undo:hover { border-color: var(--ink); }

@media (max-width: 520px) {
  .gift-choose,
  .gift-undo { padding: 6px 12px; font-size: 0.82rem; }
}

.gift-choose:focus-visible,
.gift-undo:focus-visible,
.claim-confirm:focus-visible,
.claim-cancel:focus-visible,
.claim-field input:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.gift-status {
  max-width: 640px;
  margin: 8px auto 0;
  padding: 12px 18px;
  border-radius: 16px;
  background: #e8f7ee;
  border: 2px solid var(--mint);
  font-weight: 600;
  text-align: center;
}

.claim-dialog {
  width: min(92vw, 420px);
  padding: 28px 26px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(58, 46, 57, 0.35);
}

.claim-dialog::backdrop { background: rgba(58, 46, 57, 0.5); }

.claim-dialog h2 { font-size: 1.6rem; }

.claim-item {
  margin: 6px 0 0;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  color: var(--coral);
}

.claim-explain {
  margin: 8px 0 18px;
  font-size: 0.92rem;
  color: #6b5c66;
}

.claim-field { display: block; margin-bottom: 14px; }

.claim-field span {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
  font-size: 0.9rem;
}

.claim-field small { font-weight: 500; color: #6b5c66; }

.claim-field input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #e6d9d0;
  border-radius: 14px;
  background: var(--cream);
  font: inherit;
  color: var(--ink);
}

.claim-error {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fde8ec;
  border: 2px solid var(--pink);
  font-weight: 600;
  font-size: 0.9rem;
}

.claim-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.claim-cancel {
  padding: 9px 18px;
  border: 2px solid #b8a9b2;
  background: transparent;
  color: var(--ink);
}

.claim-confirm {
  padding: 9px 20px;
  border: 2px solid var(--coral);
  background: var(--coral);
  color: var(--white);
}

.claim-confirm:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Back to top ---------- */

.to-top-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 600px;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(255, 138, 101, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.to-top:hover { transform: translateY(-3px); }
.to-top:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 40px 20px;
  background: var(--ink);
  color: var(--white);
}

.footer-sub {
  margin: 0;
  color: #c9bcc4;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .party-card { padding: 18px 20px; }
}
