/* =========================================================
   Sham — candles light up on a cake in the dark; a rooftop
   party over the city at dusk. Grown-up birthdays and jubilees.
   Built on shared/base.css; this sheet is the look.
   ========================================================= */

:root {
  --bg: #120f1d;
  --bg-2: #181427;
  --ink: #f3eadb;
  --ink-soft: #b5aa9a;
  --accent: #d9b679;
  --accent-deep: #e9cc92;
  --accent-soft: rgba(217, 182, 121, 0.14);
  --line: rgba(217, 182, 121, 0.16);
  --line-strong: rgba(217, 182, 121, 0.4);
  --surface: rgba(255, 246, 230, 0.04);
  --on-accent: #1b1526;
  --shadow: 0 0 0;
  --glow: rgba(18, 15, 29, 0.85);
  --intro-bg: #0d0a14;
  --gold: linear-gradient(100deg, #b8904f 0%, #f4dda6 38%, #d9b679 60%, #fff1cc 78%, #b8904f 100%);

  --display: "Playfair", Georgia, serif;
  --body: "Manrope", system-ui, sans-serif;
  --label: "Manrope", system-ui, sans-serif;

  --open-default: url("/styles/sham/media/open-poster.jpg");
  --amb-poster: url("/styles/sham/media/amb-poster.jpg");
  --close-poster: url("/styles/sham/media/close-poster.jpg");
  --dissolve: 2.2s;
  --pulse: rgba(255, 226, 170, 0.9);
  --pulse-glow: rgba(255, 196, 110, 0.45);
  --music-bg: rgba(24, 20, 39, 0.72);
}

body {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.65;
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(90, 60, 120, 0.25), transparent 70%),
    var(--bg);
}

.label {
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.34em;
}

/* gold text, used for the name, the day and the big numbers */
.gilt {
  background: var(--gold);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Opening ---------- */

.intro__kicker {
  color: var(--accent);
}

.intro__to {
  font-style: italic;
  color: var(--ink);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.intro__hint {
  background: rgba(18, 15, 29, 0.62);
  color: var(--accent-deep);
  font-weight: 500;
  letter-spacing: 0.24em;
}

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

.hero__veil {
  background:
    radial-gradient(ellipse 90% 34% at 50% 22%, rgba(18, 15, 29, 0.55), rgba(18, 15, 29, 0) 75%),
    linear-gradient(to bottom, rgba(18, 15, 29, 0) 76%, rgba(18, 15, 29, 0.85) 93%, var(--bg) 100%);
}

.hero__kicker {
  margin: 0 0 6px;
  font-family: var(--label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* the age, drawn in a thin gold line behind the name */
.hero__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
}

.hero__age {
  grid-area: 1 / 1;
  font-family: var(--display);
  font-size: clamp(150px, 46vw, 210px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 204, 146, 0.55);
  font-variant-numeric: lining-nums;
}

.name {
  white-space: nowrap;
  grid-area: 1 / 1;
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(54px, 16vw, 76px);
  line-height: 1.05;
  background: var(--gold);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(18, 15, 29, 0.9));
}

.hero__date {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(104px, calc(env(safe-area-inset-bottom) + 92px));
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-family: var(--label);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--ink);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.hero__date i {
  width: 4px;
  height: 4px;
  rotate: 45deg;
  background: var(--accent);
}

.cue {
  background: rgba(18, 15, 29, 0.7);
  color: var(--accent-deep);
}

.hero.is-in .hero__kicker {
  animation: spread 2.2s var(--ease) 0.5s both;
}

.hero.is-in .hero__age {
  animation: drawIn 3.2s var(--ease) 0.9s both;
}

/* the name comes into focus, then a light runs across the gold now and then */
.hero.is-in .name {
  animation:
    gildIn 2.4s var(--ease) 1.6s both,
    shimmer 7s ease-in-out 4.5s infinite;
}

/* like base "focus", but keeps the shadow that lifts the gold off the sky */
@keyframes gildIn {
  from {
    opacity: 0;
    transform: scale(1.04);
    filter: blur(14px) drop-shadow(0 2px 14px rgba(18, 15, 29, 0.9));
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0) drop-shadow(0 2px 14px rgba(18, 15, 29, 0.9));
  }
}

.hero.is-in .hero__date {
  animation: spread 2.2s var(--ease) 3.2s both;
}

.hero {
  --cue-d: 4.2s;
}

@keyframes spread {
  from {
    opacity: 0;
    letter-spacing: 0.7em;
  }
  to {
    opacity: 1;
  }
}

@keyframes drawIn {
  from {
    opacity: 0;
    transform: scale(0.92);
    -webkit-text-stroke-color: rgba(233, 204, 146, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shimmer {
  0%,
  60% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* ---------- Sparks ---------- */

.sparks {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 3s var(--ease-soft);
}

body.is-open .sparks {
  opacity: 1;
}

.sparks i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffe7b0;
  box-shadow: 0 0 6px 1px rgba(255, 214, 140, 0.8);
  opacity: 0;
  animation: twinkle var(--d) ease-in-out var(--delay) infinite;
}

.sparks i:nth-child(1) { --x: 8%; --y: 14%; --d: 5s; --delay: 0s; }
.sparks i:nth-child(2) { --x: 88%; --y: 22%; --d: 6s; --delay: -2s; }
.sparks i:nth-child(3) { --x: 18%; --y: 48%; --d: 7s; --delay: -4s; }
.sparks i:nth-child(4) { --x: 92%; --y: 58%; --d: 5.5s; --delay: -1s; }
.sparks i:nth-child(5) { --x: 6%; --y: 78%; --d: 6.5s; --delay: -3s; }
.sparks i:nth-child(6) { --x: 76%; --y: 86%; --d: 7.5s; --delay: -5s; }
.sparks i:nth-child(7) { --x: 50%; --y: 6%; --d: 6s; --delay: -2.5s; }
.sparks i:nth-child(8) { --x: 34%; --y: 92%; --d: 8s; --delay: -6s; }
.sparks i:nth-child(9) { --x: 64%; --y: 36%; --d: 9s; --delay: -7s; }

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
  50% {
    opacity: 0.9;
    transform: scale(1);
  }
}

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

.section {
  padding: 92px 28px 76px;
}

.head .label {
  margin-bottom: 4px;
}

.title {
  font-style: italic;
  font-size: clamp(42px, 12vw, 54px);
  color: var(--ink);
}

.divider {
  width: min(66%, 240px);
  margin-top: 14px;
  opacity: 0.9;
}

/* confetti falls onto the first section */
.confetti {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(120%, 620px);
  max-width: none;
  translate: -50% 0;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}

.invite {
  padding-top: 120px;
}

.invite__greet {
  font-style: italic;
  color: var(--accent-deep);
}

.invite__text {
  font-size: 19px;
  font-weight: 300;
}

.invite .divider {
  margin: 0 auto 30px;
}

.parents__col .label {
  color: var(--ink-soft);
}

.parents__names {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 400;
}

.invite__quote {
  font-style: italic;
  color: var(--accent);
}

/* ---------- Date ---------- */

.bigdate {
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  justify-items: stretch;
  margin-bottom: 8px;
}

.bigdate__side {
  padding: 10px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bigdate__day {
  font-size: 120px;
  line-height: 1;
  background: var(--gold);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bigdate__meta {
  margin: 0 0 34px;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
}

.cal {
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 400;
}

.cal__d.is-day {
  color: var(--accent-deep);
}

/* the day: a candle-lit ring */
.cal__d.is-day::before {
  background: rgba(233, 204, 146, 0.08);
  border: 1px solid var(--accent);
  box-shadow: 0 0 18px rgba(255, 200, 120, 0.45), inset 0 0 10px rgba(255, 200, 120, 0.3);
  animation: candle 3s ease-in-out infinite;
}

@keyframes candle {
  50% {
    box-shadow: 0 0 26px rgba(255, 200, 120, 0.65), inset 0 0 14px rgba(255, 200, 120, 0.4);
  }
}

.cd__num {
  font-size: 44px;
  font-weight: 400;
  background: var(--gold);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cd__cell {
  border-left-color: var(--line-strong);
}

.cd__past {
  font-style: italic;
  color: var(--accent-deep);
}

/* ---------- Buttons ---------- */

.btn {
  border-radius: 4px;
  background: transparent;
  font-weight: 500;
  letter-spacing: 0.26em;
}

.btn--solid {
  background: linear-gradient(100deg, #c9a466, #f0d69f 50%, #c9a466);
  color: var(--on-accent);
  box-shadow: 0 10px 30px -12px rgba(217, 182, 121, 0.55);
}

.copy {
  border-radius: 4px;
  background: transparent;
  font-weight: 500;
}

/* ---------- Program ---------- */

.tl__time {
  font-style: italic;
  font-size: 22px;
}

.tl__ico {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--accent-deep);
  box-shadow: 0 0 20px rgba(217, 182, 121, 0.12);
}

.tl::before {
  background: linear-gradient(var(--accent), transparent);
  opacity: 0.5;
}

.tl__title {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 400;
}

.tl__note {
  font-weight: 300;
}

.detail {
  border-radius: 6px;
}

.detail__ico {
  background: transparent;
  border: 1px solid var(--line-strong);
}

.detail__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
}

/* ---------- Venue ---------- */

.venue__art {
  width: min(92%, 360px);
  opacity: 0.95;
}

.venue__name {
  font-style: italic;
  color: var(--accent-deep);
}

.mapcard {
  border-radius: 8px;
  padding: 5px;
}

.map {
  border-radius: 4px;
  background: #1b1730;
}

/* ---------- Gifts: black cards with gold ---------- */

.ccard {
  border-radius: 14px;
  color: var(--ink);
  border: 1px solid rgba(233, 204, 146, 0.35);
  background: linear-gradient(135deg, #221c33, #0f0c18);
}

.ccard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 35%, rgba(255, 230, 180, 0.12) 48%, transparent 60%),
    repeating-linear-gradient(135deg, rgba(233, 204, 146, 0.05) 0 1px, transparent 1px 9px);
}

.ccard--humo {
  background: linear-gradient(135deg, #2a1d2c, #120c16);
}

.ccard--visa {
  background: linear-gradient(135deg, #1c2233, #0c0f18);
}

.ccard__sys,
.ccard__num {
  color: var(--accent-deep);
}

.ccard__chip {
  background: linear-gradient(135deg, #f4dda6, #a9844a);
}

/* ---------- Answer ---------- */

.reply {
  border-radius: 8px;
}

.field input[type="text"],
.field textarea {
  font-weight: 300;
}

.choice span {
  border-radius: 4px;
}

.stepper {
  border-radius: 4px;
}

.sent__art {
  width: 220px;
}

.sent__title {
  font-style: italic;
  color: var(--accent-deep);
}

/* ---------- Closing ---------- */

.closing__veil {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(18, 15, 29, 0.6) 8%, rgba(18, 15, 29, 0) 22%),
    radial-gradient(ellipse 90% 20% at 50% 18%, rgba(18, 15, 29, 0.78), transparent 78%),
    linear-gradient(to top, var(--bg) 0%, rgba(18, 15, 29, 0) 16%);
}

.closing__wait {
  font-style: italic;
  background: var(--gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.8));
}

.closing__names {
  font-weight: 500;
  color: var(--ink);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.footer__sign {
  font-family: var(--display);
  font-style: italic;
  font-size: 21px;
}

/* ---------- Small and wide screens ---------- */

@media (max-height: 700px) and (max-aspect-ratio: 3/4) {
  .hero__text {
    top: max(6%, calc(env(safe-area-inset-top) + 50px));
  }

  .hero__age {
    font-size: clamp(120px, 38vw, 160px);
  }

  .name {
    font-size: clamp(46px, 14vw, 60px);
  }
}

@media (min-aspect-ratio: 3/4) {
  .hero__age {
    font-size: min(210px, 22vh);
  }

  .name {
    font-size: min(76px, 8vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sparks {
    display: none;
  }

  .cal__d.is-day::before {
    animation: none;
  }
}
