:root {
  --ink: #2b1710;
  --muted: #7c553f;
  --sand: #f5d497;
  --sun: #f3ad58;
  --clay: #983a1f;
  --date: #ffe9b8;
  --gold: #d9ad5a;
  --cream: #fff8ea;
  --shadow: 0 24px 70px rgba(60, 24, 8, 0.26);
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  background: linear-gradient(180deg, #fff6e2 0%, #f8c573 36%, #a94324 100%);
  overflow-x: hidden;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.15;
  background-image: radial-gradient(rgba(255,255,255,0.55) 0.8px, transparent 0.8px);
  background-size: 5px 5px;
  mix-blend-mode: soft-light;
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 236, 180, 0.72);
  border-radius: 999px;
  background: rgba(52, 23, 10, 0.55);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(40, 16, 5, 0.24);
  color: var(--cream);
}

.music-bars {
  display: inline-flex;
  align-items: end;
  gap: 3px;
}

.music-bars i {
  width: 4px;
  height: 16px;
  border-radius: 9px;
  background: currentColor;
  transform-origin: bottom;
}

.is-playing .music-bars i {
  animation: bars 0.8s ease-in-out infinite alternate;
}

.music-bars i:nth-child(2) { height: 22px; animation-delay: 0.14s; }
.music-bars i:nth-child(3) { height: 12px; animation-delay: 0.28s; }

@keyframes bars {
  from { transform: scaleY(0.45); opacity: 0.65; }
  to { transform: scaleY(1); opacity: 1; }
}

.cover {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  isolation: isolate;
  overflow: hidden;
}

.cover-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(34, 15, 6, 0.52), rgba(92, 35, 13, 0.14) 42%, rgba(30, 12, 5, 0.72)),
    var(--banner-image, url("assets/one-plus-banner.png")) center / cover;
  transform: scale(1.05);
}

.cover-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 218, 144, 0.24), transparent 38%),
    linear-gradient(90deg, rgba(25, 9, 3, 0.6), transparent 28%, transparent 72%, rgba(25, 9, 3, 0.6));
}

.cover-content {
  width: min(100%, 440px);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
  color: var(--cream);
  transform: translateY(0);
  transition: transform 1s ease, opacity 0.7s ease;
}

.opened .cover-content {
  transform: translateY(-38px) scale(0.96);
  opacity: 0.08;
}

.excel-mark {
  width: 96px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.eyebrow,
.kicker {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}

.theme-logo {
  width: min(82vw, 390px);
  filter: drop-shadow(0 28px 46px rgba(19, 8, 2, 0.45));
}

.shine {
  position: relative;
  animation: floatLogo 4s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.church-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 229, 169, 0.48);
  border-radius: 999px;
  background: rgba(52, 20, 8, 0.38);
  backdrop-filter: blur(12px);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
}

.church-row img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.open-invite,
.actions a {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  background: linear-gradient(120deg, #7a341b, #ffd987 42%, #8b3b1d 72%, #fff1c5);
  color: #351609;
  font: 800 0.86rem Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  box-shadow: 0 16px 42px rgba(49, 18, 5, 0.34);
}

.open-invite::after,
.actions a::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -45%;
  width: 32%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.72), transparent);
  animation: goldSweep 2.6s ease-in-out infinite;
}

@keyframes goldSweep {
  0% { left: -48%; }
  52%, 100% { left: 126%; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 22px;
  height: 38px;
  border: 1px solid rgba(255, 236, 194, 0.66);
  border-radius: 20px;
  transform: translateX(-50%);
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 7px;
  border-radius: 10px;
  background: #fff4ce;
  transform: translateX(-50%);
  animation: scrollDot 1.5s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 14px); opacity: 0; }
}

section:not(.cover) {
  padding: 72px 18px;
}

.intro,
.countdown,
.venue {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

h1,
h2 {
  margin: 10px 0 14px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(4rem, 20vw, 8rem);
  color: #fff8e7;
  text-shadow: 0 16px 34px rgba(80, 27, 8, 0.28);
}

h2 {
  font-size: clamp(2.2rem, 10vw, 4.6rem);
}

.lead,
.message p,
.desert-copy p,
.venue p {
  margin: 0 auto;
  max-width: 620px;
  font: 1.03rem/1.75 Arial, Helvetica, sans-serif;
  color: #55311e;
}

.info-strip {
  display: grid;
  gap: 8px;
  margin: 28px auto 0;
  max-width: 520px;
  font: 800 0.85rem Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-strip span {
  padding: 13px 16px;
  border: 1px solid rgba(92, 45, 19, 0.18);
  border-radius: 10px;
  background: rgba(255, 247, 226, 0.58);
  box-shadow: 0 12px 34px rgba(101, 43, 13, 0.08);
}

.message-card {
  display: grid;
  gap: 24px;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid rgba(255, 236, 187, 0.52);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.message-card img {
  width: min(52vw, 180px);
  margin: 0 auto;
}

.scratch {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.scratch-card {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1.25;
  margin: 28px auto 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 246, 198, 0.8), transparent 32%),
    linear-gradient(150deg, #8c351c, #efb35d 58%, #6c2b18);
}

.revealed-date {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  color: var(--date);
  text-shadow: 0 10px 24px rgba(42, 14, 4, 0.32);
}

.date-day {
  font-size: clamp(4.8rem, 22vw, 8rem);
  font-weight: 900;
  line-height: 0.82;
}

.date-month {
  font-size: clamp(1.9rem, 9vw, 3.3rem);
  font-weight: 900;
}

.revealed-date p {
  margin: 10px 0 0;
  font: 800 1rem Arial, Helvetica, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#scratchCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.scratch-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(43, 20, 10, 0.46);
  color: #fff5d4;
  font: 800 0.72rem Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.desert-pop {
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.desert-pop span {
  position: absolute;
  bottom: 130px;
  width: 18px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(#6e9e3c, #4d7428);
  opacity: 0;
}

.desert-pop span::before,
.desert-pop span::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 35px;
  border-radius: 20px;
  background: inherit;
}

.desert-pop span::before { left: -10px; top: 28px; }
.desert-pop span::after { right: -10px; top: 16px; }
.desert-pop span:nth-child(1) { left: 14%; }
.desert-pop span:nth-child(2) { left: 32%; transform: scale(0.82); }
.desert-pop span:nth-child(3) { right: 22%; transform: scale(1.15); }
.desert-pop span:nth-child(4) { right: 8%; transform: scale(0.74); }

.revealed + .desert-pop span,
.desert-pop.is-visible span {
  animation: cactusPop 0.9s cubic-bezier(.2,1.7,.35,1) forwards;
}

.desert-pop.is-visible span:nth-child(2) { animation-delay: 0.08s; }
.desert-pop.is-visible span:nth-child(3) { animation-delay: 0.14s; }
.desert-pop.is-visible span:nth-child(4) { animation-delay: 0.21s; }

@keyframes cactusPop {
  from { opacity: 0; translate: 0 80px; scale: 0.3; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 26px;
}

.timer div {
  min-width: 0;
  padding: 16px 8px;
  border: 1px solid rgba(255, 235, 181, 0.5);
  border-radius: 8px;
  background: rgba(59, 23, 9, 0.58);
  color: #fff7dc;
  box-shadow: 0 18px 42px rgba(53, 18, 5, 0.18);
}

.timer strong {
  display: block;
  font: 900 clamp(1.65rem, 8vw, 3.4rem) Arial, Helvetica, sans-serif;
}

.timer span {
  display: block;
  margin-top: 4px;
  font: 700 0.68rem Arial, Helvetica, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.desert {
  display: grid;
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}

.desert img,
.gallery figure {
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.desert-copy {
  align-self: center;
}

.gallery {
  max-width: 980px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 26px;
}

.gallery figure {
  margin: 0;
  min-height: 170px;
  background: rgba(255, 248, 232, 0.54);
}

.gallery .wide {
  grid-column: 1 / -1;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue {
  padding-bottom: 110px !important;
}

.venue-code {
  margin-top: 0 !important;
  font-weight: 800 !important;
  color: #692e18 !important;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.section-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 720px) {
  .cover {
    padding: 42px;
  }

  .message-card,
  .desert {
    grid-template-columns: 0.75fr 1.25fr;
  }

  .desert {
    grid-template-columns: 1.35fr 0.9fr;
  }

  .info-strip {
    grid-template-columns: repeat(3, 1fr);
    max-width: 780px;
  }

  .gallery-grid {
    grid-template-columns: 1.35fr 0.85fr 0.85fr;
  }

  .gallery .wide {
    grid-row: span 2;
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
