/* =====================================================================
   FOR MERCIA — style.css
   Palette: deep forest green, near-black, champagne gold,
   leopard print as a quiet texture, and RED hearts only.
   ===================================================================== */

:root {
  --green:       #1B4332;
  --green-deep:  #112B20;
  --green-dark:  #0E241B;
  --black:       #0D0D0D;
  --gold:        #C9A84C;
  --gold-soft:   #E7D194;
  --ivory:       #F2EAD9;
  --ivory-dim:   rgba(242, 234, 217, 0.72);
  --red:         #FF2222;
  --red-deep:    #CC0000;
  --paper:       #F4EFE3;

  --display: 'Italiana', serif;
  --serif:   'Cormorant Garamond', Georgia, serif;
  --sans:    'Jost', system-ui, sans-serif;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

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

::selection { background: var(--gold); color: var(--black); }

/* ------------------------------------------------------------------ */
/* Shared text pieces                                                  */
/* ------------------------------------------------------------------ */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.eyebrow.gold { color: var(--gold); }

.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  letter-spacing: 0.04em;
  margin: 0.5rem 0 1rem;
  color: var(--ivory);
}

.section-note {
  color: var(--ivory-dim);
  max-width: 34ch;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
}

section, .hero { position: relative; }

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

.hero {
  min-height: 100svh;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(201, 168, 76, 0.10), transparent 60%),
    linear-gradient(170deg, var(--green-deep), var(--black) 78%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 8vh, 6rem) clamp(1.2rem, 5vw, 4rem) 6rem;
}

.hero-backdrop {
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(600px 400px at 15% 80%, rgba(27, 67, 50, 0.55), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "text booth" "verse booth";
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
}

.hero-text { grid-area: text; }

.hero-heading {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin: 0.8rem 0 1rem;
}

.hero-heading .accent {
  color: var(--gold);
  font-style: italic;
  font-family: var(--serif);
}

.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--ivory-dim);
  max-width: 36ch;
}

.hero-age {
  margin-top: 1.2rem;
  font-family: var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.45);
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
}

.hero-age[hidden] {
  display: none;
}

/* Photo-booth strips ------------------------------------------------ */

.booth-wall {
  grid-area: booth;
  display: flex;
  gap: clamp(0.7rem, 1.6vw, 1.2rem);
  justify-content: center;
  align-items: flex-start;
  perspective: 900px;
}

.booth-strip {
  background: var(--paper);
  padding: 10px 10px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: clamp(96px, 11vw, 150px);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.booth-strip::after {           /* film grain on the paper */
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.strip-a { transform: rotate(-3.5deg) translateY(14px); }
.strip-b { transform: rotate(1.5deg)  translateY(-10px); }
.strip-c { transform: rotate(4deg)    translateY(20px); }

.booth-frame {
  aspect-ratio: 4 / 5;
  background: var(--green-dark);
  overflow: hidden;
  position: relative;
}
.booth-frame img,
.booth-frame .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1.4s ease;
}
.booth-frame img.fade-out { opacity: 0; }
.booth-frame .ph {
  display: grid;
  place-items: center;
  color: var(--gold);
  background:
    radial-gradient(circle at 30% 30%, rgba(201,168,76,0.16), transparent 60%),
    var(--green-dark);
}
.booth-frame .ph svg { width: 38%; height: 38%; }

/* Featured photo with verse overlay --------------------------------- */

.verse-photo {
  grid-area: verse;
  position: relative;
  border: 1px solid rgba(201, 168, 76, 0.5);
  padding: 8px;
  background: rgba(13, 13, 13, 0.35);
  max-width: 460px;
}

.verse-photo-img {
  aspect-ratio: 16 / 10;
  background: var(--green-dark);
  position: relative;
  overflow: hidden;
}
.verse-photo-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 1.4s ease;
}
.verse-photo-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,0.88) 8%, rgba(13,13,13,0.45) 45%, rgba(13,13,13,0.12));
}

.verse-photo-overlay {
  position: absolute;
  inset: auto 8px 8px 8px;
  padding: 1rem 1.1rem 1.1rem;
}
.verse-photo-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.92rem, 1.7vw, 1.08rem);
  line-height: 1.5;
  color: var(--ivory);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.verse-photo-ref {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  background: rgba(201, 168, 76, 0.35);
  overflow: hidden;
}
.scroll-hint span {
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--gold);
  animation: drip 2.4s ease-in-out infinite;
}
@keyframes drip { to { top: 110%; } }

/* ------------------------------------------------------------------ */
/* Leopard band — the print as a quiet ribbon between sections         */
/* ------------------------------------------------------------------ */

.leopard-band {
  height: 44px;
  background-color: var(--green-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='90'%3E%3Cg fill='none'%3E%3Cpath d='M18 22q8-7 16-1 2 7-5 11-9 3-12-3-1-4 1-7z' fill='%23C9A84C' opacity='.5'/%3E%3Cpath d='M14 20q6-4 11 0M33 24q3 5-1 9M19 34q-5-1-6-6' stroke='%230D0D0D' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M78 56q9-6 16 0 1 7-6 10-9 2-12-4 0-3 2-6z' fill='%23C9A84C' opacity='.5'/%3E%3Cpath d='M75 53q6-4 12 0M95 58q2 5-2 9M80 67q-5 0-7-5' stroke='%230D0D0D' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M110 10q8-5 14 1 0 6-6 9-8 2-11-4 0-3 3-6z' fill='%23C9A84C' opacity='.45'/%3E%3Cpath d='M107 8q6-4 11 0M126 14q1 5-3 8' stroke='%230D0D0D' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M44 70q7-5 13 0 1 6-5 9-8 2-11-4 0-3 3-5z' fill='%23C9A84C' opacity='.45'/%3E%3Cpath d='M41 68q5-3 10 0M59 73q1 5-3 8' stroke='%230D0D0D' stroke-width='3' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px 90px;
  border-top: 1px solid rgba(201, 168, 76, 0.35);
  border-bottom: 1px solid rgba(201, 168, 76, 0.35);
}
.leopard-band.flip { transform: scaleX(-1); }

/* ------------------------------------------------------------------ */
/* Verse section                                                       */
/* ------------------------------------------------------------------ */

.verse-section {
  background: var(--green);
  text-align: center;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 6vw, 4rem);
  overflow: hidden;
}

.verse-glow {
  position: absolute;
  inset: -30% -20%;
  background: radial-gradient(700px 420px at 50% 20%, rgba(201, 168, 76, 0.14), transparent 65%);
  pointer-events: none;
}

.verse-block {
  position: relative;
  max-width: 760px;
  margin: 1.5rem auto 0;
}
.verse-block::before {
  content: "“";
  font-family: var(--serif);
  font-size: 7rem;
  line-height: 0;
  color: rgba(201, 168, 76, 0.5);
  display: block;
  margin-bottom: 2.2rem;
}
.verse-text {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(12px);
  animation: verse-in 1.2s ease 0.2s forwards;
}
@keyframes verse-in { to { opacity: 1; transform: none; } }

.verse-ref {
  display: inline-block;
  margin-top: 1.6rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  border-top: 1px solid rgba(201, 168, 76, 0.45);
  padding-top: 0.9rem;
}

.verse-themes {
  margin-top: 1.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

/* ------------------------------------------------------------------ */
/* Icon wall                                                           */
/* ------------------------------------------------------------------ */

.icons-section {
  background: var(--black);
  text-align: center;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 6vw, 4rem);
}

.icon-wall {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.6vw, 1.1rem);
  max-width: 880px;
  margin: 0 auto;
}

.icon-tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  gap: 0;
  border: 1px solid rgba(242, 234, 217, 0.12);
  border-radius: 14px;
  color: var(--ivory-dim);
  background: rgba(242, 234, 217, 0.03);
  opacity: 0.38;
  transition: opacity 0.6s ease, transform 0.35s ease, border-color 0.6s ease, box-shadow 0.6s ease, color 0.6s ease;
  padding: 12%;
  position: relative;
}
.icon-tile svg { width: 100%; height: 72%; }
.icon-tile .icon-label {
  font-size: clamp(0.5rem, 1.2vw, 0.66rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.icon-tile:hover { transform: translateY(-4px); opacity: 0.7; }

.icon-tile.lit {
  opacity: 1;
  color: var(--gold-soft);
  border-color: rgba(201, 168, 76, 0.65);
  background: linear-gradient(160deg, rgba(201, 168, 76, 0.12), rgba(27, 67, 50, 0.35));
  box-shadow: 0 0 26px rgba(201, 168, 76, 0.18);
}
.icon-tile.lit .icon-label { color: var(--gold); }

/* ------------------------------------------------------------------ */
/* Photo wall                                                          */
/* ------------------------------------------------------------------ */

.wall-section {
  background: linear-gradient(180deg, var(--green-deep), var(--black));
  text-align: center;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 6vw, 4rem) clamp(6rem, 12vh, 8rem);
}

.photo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: clamp(0.8rem, 2vw, 1.4rem);
  max-width: 1100px;
  margin: 1.5rem auto 0;
}

.wall-frame {
  background: var(--paper);
  padding: 7px 7px 20px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.wall-frame::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--grain);
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
}
.wall-frame:nth-child(4n + 1) { transform: rotate(-2deg); }
.wall-frame:nth-child(4n + 2) { transform: rotate(1.4deg); }
.wall-frame:nth-child(4n + 3) { transform: rotate(-1deg); }
.wall-frame:nth-child(4n)     { transform: rotate(2.2deg); }

.wall-frame .booth-frame { aspect-ratio: 1; }

.wall-note {
  margin: 2.5rem auto 0;
  max-width: 46ch;
  color: var(--ivory-dim);
  font-size: 0.9rem;
}
.wall-note code {
  color: var(--gold);
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
}

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

.site-footer {
  background: var(--black);
  text-align: center;
  padding: 3.5rem 1.5rem 7.5rem;   /* room above the floating buttons */
  border-top: 1px solid rgba(201, 168, 76, 0.25);
}
.footer-mono {
  font-family: var(--display);
  font-size: 1.9rem;
  letter-spacing: 0.3em;
  color: var(--gold);
}
.footer-line {
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
}
.heart-inline {
  width: 1em; height: 1em;
  vertical-align: -0.12em;
  display: inline-block;
}
.footer-small {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ivory-dim);
}

/* ------------------------------------------------------------------ */
/* Floating buttons — text only, never overlapping                     */
/* ------------------------------------------------------------------ */

.fab {
  position: fixed;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: linear-gradient(160deg, var(--green), var(--green-dark));
  border: 1px solid rgba(201, 168, 76, 0.65);
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  max-width: 42vw;                  /* the two buttons can never collide */
  white-space: nowrap;
}
.fab:hover, .fab:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(201, 168, 76, 0.25);
}
.fab:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.fab-left  { left:  calc(1.1rem + env(safe-area-inset-left, 0px)); }
.fab-right { right: calc(1.1rem + env(safe-area-inset-right, 0px)); }

/* ------------------------------------------------------------------ */
/* Modals                                                              */
/* ------------------------------------------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(201, 168, 76, 0.10), transparent 60%),
    linear-gradient(170deg, var(--green-deep), var(--black) 85%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.modal.open { opacity: 1; }
.modal[hidden] { display: none; }

.modal-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding:
    calc(2rem + env(safe-area-inset-top, 0px))
    clamp(1.4rem, 6vw, 4rem)
    calc(4rem + env(safe-area-inset-bottom, 0px));
}

.modal-content {
  max-width: 680px;
  margin: 0 auto;
  transform: translateY(26px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s, opacity 0.5s ease 0.08s;
}
.modal.open .modal-content { transform: none; opacity: 1; }

.modal-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  margin: 0.4rem 0 1.6rem;
  color: var(--ivory);
}

.modal-body p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  line-height: 1.75;
  color: var(--ivory);
  margin-bottom: 1.4em;
}
.prayer-body p { font-style: italic; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  background: var(--gold);
  margin: 2.5rem auto 0;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 5;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(13, 13, 13, 0.55);
  border: 1px solid rgba(201, 168, 76, 0.5);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.modal-close:hover { background: rgba(201, 168, 76, 0.18); }
.modal-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ------------------------------------------------------------------ */
/* Birthday layers                                                     */
/* ------------------------------------------------------------------ */

#confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  display: none;
}
body.birthday #confetti { display: block; }

#balloons { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.balloon {
  position: absolute;
  bottom: -140px;
  width: 46px;
  height: 58px;
  border-radius: 50% 50% 48% 48%;
  opacity: 0.85;
  animation: float-up linear infinite;
}
.balloon::after {
  content: "";
  position: absolute;
  left: 50%; top: 100%;
  width: 1px; height: 70px;
  background: rgba(242, 234, 217, 0.4);
}
@keyframes float-up {
  to { transform: translateY(-130vh) rotate(8deg); }
}

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

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "text" "booth" "verse";
    text-align: center;
  }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .booth-wall { margin-top: 1rem; }
  .verse-photo { margin: 0 auto; width: 100%; }
  .icon-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .hero { padding-bottom: 7rem; }
  .booth-strip { width: clamp(86px, 27vw, 110px); }
  .strip-c { display: none; }            /* two strips breathe better on a phone */
  .icon-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fab { font-size: 0.74rem; padding: 0.7rem 1.05rem; }
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                      */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .parallax { transform: none !important; }
  .scroll-hint span, .balloon { animation: none; }
  .verse-text { animation-duration: 0.01s; }
  .booth-frame img, .verse-photo-img img { transition: none; }
}
