:root {
  --bg: #0a0908;
  --ink: #f1dcc4;
  --gold: #d9b48c;
  --gold-deep: #b98d63;
  --muted: #a8917b;
  --line: rgba(217, 180, 140, 0.35);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Lato", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(185, 141, 99, 0.10), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

.card {
  max-width: 560px;
  margin: 0 auto;
  /* room for the floating music button */
  padding: 0 0 calc(96px + env(safe-area-inset-bottom));
}

/* Hero */
.hero { position: relative; margin: 0; }
.hero img { display: block; width: 100%; height: auto; }
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 18%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* "Farmeá el aura" — the song */
.aura {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 20px 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  text-wrap: balance;
  background: rgba(217, 180, 140, 0.05);
  animation: glow 3.2s ease-in-out infinite;
}
.aura svg { flex: none; width: 20px; height: 20px; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 rgba(217, 180, 140, 0); }
  50% { box-shadow: 0 0 22px rgba(217, 180, 140, 0.28); }
}

/* Message */
.message {
  margin: 40px 28px 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 6vw, 27px);
  line-height: 1.4;
  text-align: center;
  color: var(--ink);
}

.rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 40px auto 0;
  width: 60%;
  color: var(--gold);
  font-size: 12px;
}
.rule span { flex: 1; height: 1px; background: var(--line); }

/* Countdown */
.countdown { margin: 36px 20px 0; text-align: center; }
.countdown h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.clock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.clock div {
  padding: 14px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.clock b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 10vw, 44px);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}
.clock small {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.arrived {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  color: var(--ink);
}

/* Buttons */
.actions {
  display: grid;
  gap: 14px;
  margin: 44px 20px 0;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 20px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { background: rgba(217, 180, 140, 0.10); }
.btn:active { transform: scale(0.98); }
.btn-solid {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent;
  color: #1a120b;
}
.btn-solid:hover { background: linear-gradient(135deg, #e6c39d, var(--gold)); }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sign {
  margin-top: 48px;
  text-align: center;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
  font-variant-numeric: lining-nums;
  color: var(--muted);
}
.sign span { color: var(--gold); margin: 0 6px; }

/* Dress code page */
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 16px;
  padding: 8px 12px 8px 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.back svg { width: 18px; height: 18px; }
.dress { margin: 0; }
.dress img { display: block; width: 100%; height: auto; }

/* Entrance */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .aura { animation: none; }
}

/* Opening screen */
.cover { display: none; }
.js .cover {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--bg);
  text-align: center;
  transition: opacity .8s ease, visibility .8s;
}
/* Her photo, blurred, so its own lettering doesn't fight the title. */
.js .cover::before {
  content: "";
  position: absolute;
  inset: -40px;
  background:
    linear-gradient(rgba(10, 9, 8, 0.72), rgba(10, 9, 8, 0.9)),
    url("/adela-maria/img/hero.webp") 20% 30% / cover no-repeat;
  filter: blur(14px);
}
.cover-inner { position: relative; }
.opened .cover { opacity: 0; visibility: hidden; }
.js:not(.opened) body,
.sheet-open body { overflow: hidden; }

.cover-inner { width: 100%; max-width: 360px; }
.cover-kicker {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.cover-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(64px, 20vw, 88px);
  line-height: 0.95;
  color: var(--ink);
}
.cover-line {
  display: block;
  width: 120px;
  height: 1px;
  margin: 26px auto 18px;
  background: var(--gold);
  opacity: .6;
}
.cover-age {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}
.cover-age small {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: 0.3em;
}
.cover-open { width: 100%; }
.cover-hint {
  margin: 16px 0 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* Buttons that are <button>s */
button.btn, button.back {
  font-family: inherit;
  cursor: pointer;
  background-color: transparent;
}
button.btn { width: 100%; }
button.btn-solid { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); }
button.back { border: 0; }

/* Dress code sheet */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  animation: sheet-in .35s ease;
}
.sheet[hidden] { display: none; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }

/* Floating music toggle */
.music {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--gold);
  cursor: pointer;
}
.music[hidden] { display: none; }
.music svg { width: 22px; height: 22px; }
.bars { display: none; align-items: flex-end; gap: 3px; height: 18px; }
.bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--gold);
  transform-origin: bottom;
  animation: bar 1s ease-in-out infinite;
}
.bars i:nth-child(2) { animation-delay: -.3s; }
.bars i:nth-child(3) { animation-delay: -.6s; }
.bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.music.is-playing .bars { display: flex; }
.music.is-playing .muted-icon { display: none; }

@media (prefers-reduced-motion: reduce) {
  .bars i { animation: none; transform: scaleY(.7); }
  .sheet { animation: none; }
}
