/* Layout ported from ~/Proyectos/wedding-invitation; palette from the Canva design. */
:root {
  --cream: #f5efe5;
  --paper: #faf6ee;
  --navy: #0d1e34;
  --navy-soft: #1c2b3d;
  --gold: #a77c42;
  --line: #d3b98b;
  --ink: #393833;
  --muted: #6f6a60;
  --white: #fffdf8;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Birthstone', 'Brush Script MT', cursive;
  --sans: 'DM Sans', Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 5px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 30;
  padding: 0.65rem 1rem;
  background: var(--navy);
  color: #fff;
}

.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: auto;
  padding: 1.7rem clamp(1.4rem, 5vw, 5rem);
  color: var(--navy);
}

.brand { text-decoration: none; font: 600 1.6rem var(--serif); letter-spacing: 0.06em; }
.brand span { font: 1.6rem var(--script); color: var(--gold); margin: 0 0.1em; }

.site-header nav { display: flex; gap: clamp(1rem, 3vw, 3rem); }

.site-header nav a {
  font-size: 0.7rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.25s;
}

.site-header nav a:hover { color: var(--gold); }

/* Hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7.5rem clamp(1rem, 3vw, 3rem) 1.5rem;
  background: radial-gradient(circle at 50% 45%, #fff9ee 0%, var(--cream) 65%, #e8ddca 100%);
  overflow: hidden;
}

.ornamental-frame {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 35%, #fffdf7, #f7f0e4 78%, #eee3d2);
  box-shadow:
    inset 0 0 0 7px var(--paper),
    inset 0 0 0 8px rgba(167, 124, 66, 0.55),
    0 22px 65px rgba(75, 55, 35, 0.1);
}

.ornamental-frame::before,
.ornamental-frame::after {
  content: '❦';
  position: absolute;
  z-index: 2;
  color: var(--gold);
  font: 2.2rem/1 var(--serif);
}

.ornamental-frame::before { left: 1px; top: 0; transform: rotate(-42deg); }
.ornamental-frame::after { right: 1px; bottom: 0; transform: rotate(138deg); }

.hero-card {
  width: min(100%, 1090px);
  min-height: min(78svh, 760px);
  display: grid;
  place-items: center;
  padding: clamp(5rem, 10vw, 8rem) clamp(2rem, 8vw, 8rem);
  text-align: center;
  overflow: hidden;
}

.hero-content { position: relative; z-index: 2; max-width: 650px; }

.eyebrow {
  max-width: 30rem;
  margin: 0 auto 1.3rem;
  font: clamp(1.9rem, 3.2vw, 2.6rem)/1.15 var(--script);
  color: var(--navy);
}

.hero-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--gold);
  font-size: 0.7rem;
}

.hero-rule::before,
.hero-rule::after { content: ''; width: 50px; height: 1px; background: var(--line); }

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin: 2.1rem 0 2.3rem;
  font: 500 clamp(5.5rem, 12vw, 10.5rem)/0.79 var(--serif);
  letter-spacing: -0.065em;
  text-transform: uppercase;
  color: var(--navy);
}

h1 span,
h1 em { display: block; }

h1 em {
  margin: 0.27em 0 0.1em;
  font: normal clamp(3.2rem, 6vw, 5rem)/0.75 var(--script);
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}

.hero-date {
  margin: 0 0 2rem;
  font: 500 clamp(1.05rem, 2vw, 1.5rem) var(--serif);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--navy);
}

.hero-date .dot { color: var(--gold); padding: 0 0.2em; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.45rem;
  border: 0;
  font: 600 0.7rem var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.button:hover { transform: translateY(-3px); }
.button span { font-size: 1rem; font-weight: 400; }
.button-primary { background: var(--navy); color: #fff; }
.button-primary:hover { background: #334c65; }
.button[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.flower { position: absolute; z-index: 1; width: clamp(200px, 32%, 360px); pointer-events: none; }
.flower-top { right: -4%; top: -11%; transform: rotate(-15deg); }
.flower-bottom { left: -6%; bottom: -19%; transform: rotate(168deg); }

.seal {
  position: absolute;
  z-index: 3;
  right: clamp(1.8rem, 6vw, 6rem);
  bottom: clamp(1.2rem, 5vw, 4rem);
  width: 86px;
  transform: rotate(-13deg);
  filter: drop-shadow(0 4px 6px rgba(99, 69, 25, 0.35));
}

.hero-footnote {
  position: absolute;
  inset: auto 0 1.6rem;
  margin: 0;
  color: var(--gold);
  font: 0.68rem var(--sans);
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-hint span { width: 35px; height: 1px; background: var(--gold); }

/* Shared section typography */
.section { max-width: 1160px; margin: auto; padding: clamp(5.5rem, 10vw, 9rem) 1.5rem; }
.section-heading { text-align: center; }

.overline {
  margin: 0 0 1rem;
  color: var(--gold);
  font: 600 0.69rem var(--sans);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.section-heading h2,
.countdown-section h2,
.rsvp-section h2 {
  margin: 0;
  font: 500 clamp(3.3rem, 6vw, 5.5rem)/0.95 var(--serif);
  letter-spacing: -0.04em;
  color: var(--navy);
}

.section-heading h2 i,
.rsvp-section h2 i {
  display: block;
  margin-top: 0.1em;
  font: normal clamp(3.8rem, 6.5vw, 6rem)/1 var(--script);
  letter-spacing: 0;
  color: var(--gold);
}

.flourish { margin: 1.4rem 0 2rem; text-align: center; color: var(--gold); font-size: 1.05rem; }

.flourish::before,
.flourish::after { content: '——'; padding: 0 0.8rem; font: 1.1rem var(--serif); letter-spacing: -0.12em; }

.section-lead {
  max-width: 610px;
  margin: 0 auto 3rem;
  text-align: center;
  font: 400 clamp(1.3rem, 2.3vw, 1.75rem)/1.45 var(--serif);
}

/* Invitation: portrait + families */
.story {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 1100px;
  margin: 1rem auto 0;
}

.story-photo .photo { border-radius: 999px 999px 0 0; }
.story-text { text-align: center; }

.family-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 2rem;
}

.family .overline { margin-bottom: 0.5rem; }

.family-names,
.godparents > p:last-child {
  margin: 0;
  font: 400 clamp(1.25rem, 1.7vw, 1.55rem)/1.4 var(--serif);
  color: var(--navy);
}

.family-divider { height: 90px; background: var(--line); }
.godparents { margin-top: 3.2rem; }
.godparents .overline { margin-bottom: 0.4rem; }

/* Countdown band */
.countdown-section {
  padding: 5.5rem 1.5rem;
  text-align: center;
  color: #fff;
  background: var(--navy) radial-gradient(circle at 50% 0%, #354a60 0%, transparent 56%);
}

.countdown-inner { max-width: 770px; margin: auto; }
.countdown-section h2 { color: #faf2e2; }
.countdown-section .overline { color: #d5b57e; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 3rem auto 1.7rem;
}

.countdown > div { border-right: 1px solid rgba(129, 144, 162, 0.53); }
.countdown > div:last-child { border: 0; }

.countdown strong {
  display: block;
  font: 400 clamp(2.8rem, 6vw, 5rem)/1 var(--serif);
  font-variant-numeric: tabular-nums;
}

.countdown span {
  display: block;
  margin-top: 0.6rem;
  color: #d7c2a2;
  font-size: 0.65rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.countdown-caption { margin: 0; font: 1.9rem var(--script); color: #e8d6bb; }

/* Events */
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.event-card {
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  background: #fffdf8;
  text-align: center;
  box-shadow: 0 10px 30px rgba(99, 69, 25, 0.04);
}

.event-icon { margin-bottom: 1rem; font: 2.2rem var(--serif); color: var(--gold); }

.event-card h3 {
  margin: 1.3rem 0;
  font: 500 clamp(2.25rem, 4vw, 3.25rem)/1 var(--serif);
  color: var(--navy);
}

.event-card .event-time { margin-bottom: 1rem; font: 600 1.2rem var(--serif); letter-spacing: 0.08em; color: var(--gold); }
.event-card .event-place { margin-bottom: 1.7rem; font: 1.4rem/1.3 var(--serif); }

.event-map {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 0 1.7rem;
  border: 1px solid var(--line);
  background: #efe5d5;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--gold);
  color: var(--navy);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.text-link:hover { color: var(--gold); }
.map-note { margin: 1.5rem auto 0; text-align: center; color: var(--muted); font-size: 0.76rem; }

/* Dress code */
.dress-section { padding-top: 0; }
.dress-section .section-heading h2 { text-transform: uppercase; letter-spacing: 0.06em; }

.reserved {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.swatch { display: grid; justify-items: center; gap: 0.5rem; }

.swatch-color {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 4px var(--paper), 0 6px 16px rgba(75, 55, 35, 0.12);
}

.swatch-name { font: 500 1.25rem var(--serif); color: var(--navy); }
.reserved-note { margin: 0; font: italic 1.2rem/1.4 var(--serif); color: var(--muted); }

/* Photos and placeholders */
.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #efe5d5;
}

.photo img { width: 100%; height: 100%; object-fit: cover; }
.story-photo .photo { aspect-ratio: 4 / 5; }

.photo--empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(167, 124, 66, 0.06) 14px 15px),
    radial-gradient(circle at 50% 40%, #fffdf7, #efe5d5);
  outline: 1px dashed var(--line);
  outline-offset: -10px;
}

.photo-icon {
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.3rem;
  background: var(--gold);
  opacity: 0.75;
  -webkit-mask: var(--camera) center / contain no-repeat;
  mask: var(--camera) center / contain no-repeat;
  --camera: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h3l2-2.5h6L17 7h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1z'/%3E%3Ccircle cx='12' cy='12.5' r='3.6'/%3E%3C/svg%3E");
}

.photo-label { font: 500 1.3rem var(--serif); color: var(--navy); }

.photo-shape {
  color: var(--gold);
  font: 600 0.6rem var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* RSVP */
.rsvp-section { padding: 0 1.5rem 7rem; }

.rsvp-card {
  max-width: 1090px;
  min-height: 500px;
  margin: auto;
  display: grid;
  place-items: center;
  padding: 5rem 2rem;
  text-align: center;
  overflow: hidden;
}

.rsvp-content { position: relative; z-index: 2; width: 100%; max-width: 610px; }
.rsvp-section h2,
.rsvp-section h2 i { font-size: clamp(3.2rem, 5vw, 5rem); }
.rsvp-section h2 i { font-size: clamp(3.6rem, 5.5vw, 5.6rem); }
.rsvp-lead { font: 1.35rem/1.35 var(--serif); }

.rsvp-deadline {
  margin: 1.8rem auto 1rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font: 1.2rem var(--serif);
}

.rsvp-flower {
  position: absolute;
  right: -5%;
  bottom: -30%;
  width: 300px;
  opacity: 0.9;
  transform: rotate(-20deg);
  pointer-events: none;
}

.rsvp { max-width: 26rem; margin: 0 auto; text-align: left; }
.rsvp__status { text-align: center; font: 1.2rem/1.4 var(--serif); color: var(--navy); }
.rsvp__greeting { text-align: center; font: 1.3rem/1.4 var(--serif); color: var(--navy); }
.rsvp__choice { margin: 0 0 1rem; padding: 0; border: 0; }
.rsvp__choice legend,
.rsvp__field > span:first-child { margin-bottom: 0.5rem; font: 600 0.72rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); }
.rsvp__choice label { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; font: 1.2rem var(--serif); cursor: pointer; }
.rsvp input[type='radio'] { width: 1.1rem; height: 1.1rem; accent-color: var(--navy); }
.rsvp__field { display: grid; gap: 0.2rem; margin-bottom: 1rem; }
.optional { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }

.rsvp select,
.rsvp textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: 1.1rem var(--serif);
}

.rsvp__error { min-height: 1.5em; margin: 0 0 0.5rem; color: #8c1d18; font-size: 0.9rem; }
.rsvp .button { width: 100%; justify-content: center; }

.contact { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.contact .overline { margin-bottom: 0.4rem; }
.contact-text { font: 1.2rem var(--serif); }
.button-outline { border: 1px solid var(--navy); background: transparent; color: var(--navy); }
.button-outline:hover { background: var(--navy); color: #fff; }

/* Music toggle */
.music-toggle {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 20;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 4px rgba(250, 246, 238, 0.85), 0 8px 22px rgba(13, 30, 52, 0.25);
  cursor: pointer;
  transition: transform 0.25s;
}

.music-toggle:hover { transform: translateY(-2px); }

.music-icon { display: flex; align-items: flex-end; gap: 3px; height: 18px; }

.music-icon i {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: #e8d6bb;
}

.music-icon i:nth-child(2) { height: 12px; }

.music-toggle.is-playing .music-icon i { animation: equalizer 1.1s ease-in-out infinite; }
.music-toggle.is-playing .music-icon i:nth-child(2) { animation-delay: -0.4s; }
.music-toggle.is-playing .music-icon i:nth-child(3) { animation-delay: -0.8s; }

@keyframes equalizer {
  0%, 100% { height: 5px; }
  50% { height: 18px; }
}

/* Footer */
.site-footer { padding: 2.7rem 1rem 6rem; text-align: center; background: #efe5d5; color: var(--navy); }
.site-footer > span { color: var(--gold); }
.site-footer p { margin: 0.5rem 0 0; font: 2.1rem var(--serif); }
.site-footer p i { font: 1.9rem var(--script); color: var(--gold); }
.site-footer small { color: var(--muted); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; }
.site-footer .credits { margin: 1.2rem auto 0; max-width: 34rem; color: var(--muted); font: 0.95rem/1.4 var(--serif); font-style: italic; }
.site-footer .credits a { color: var(--navy); text-underline-offset: 2px; }
.noscript { padding: 1rem; text-align: center; }

/* Motion */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Mobile */
@media (max-width: 700px) {
  .site-header { padding: 1.1rem 1.3rem; }
  .site-header nav { gap: 1rem; }
  .site-header nav a { font-size: 0.58rem; letter-spacing: 0.07em; }
  .site-header nav a:first-child { display: none; }

  .hero { min-height: 100svh; padding: 5.5rem 0.85rem 1rem; }
  .hero-card { min-height: calc(100svh - 9rem); padding: 7rem 1.8rem 5.6rem; }
  .hero-content { width: 100%; }
  .flower-top { right: -26%; top: -5%; width: 260px; }
  .flower-bottom { left: -32%; bottom: -12%; width: 255px; }
  h1 { margin: 1.6rem 0 2rem; font-size: clamp(4.5rem, 18vw, 7rem); }
  .eyebrow { max-width: 260px; font-size: 1.8rem; }
  .hero-date { max-width: 230px; margin: 0 auto 1.5rem; font-size: 1rem; line-height: 1.5; }
  .seal { width: 64px; right: 1.1rem; bottom: 1.4rem; }
  .hero-footnote { inset: auto auto 1.2rem 1.5rem; font-size: 0.56rem; }

  .section { padding: 5rem 1.2rem; }
  .story { grid-template-columns: 1fr; gap: 2.5rem; }
  .story-photo { width: min(80%, 300px); margin: 0 auto; }
  .family-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .family-divider { width: 70px; height: 1px; margin: auto; }
  .family-names { font-size: 1.35rem; }

  .countdown { gap: 0.15rem; }
  .countdown strong { font-size: clamp(2.2rem, 9vw, 3.7rem); }
  .countdown span { font-size: 0.5rem; letter-spacing: 0.08em; }

  .event-grid { grid-template-columns: 1fr; }

  .photo-label { font-size: 1.1rem; }

  .rsvp-section { padding: 0 1rem 4rem; }
  .rsvp-card { padding: 4rem 1.4rem; }
  .rsvp-flower { opacity: 0.35; }
}

@media (max-width: 380px) {
  .site-header nav a { font-size: 0.54rem; }
  .hero-card { padding-left: 1.2rem; padding-right: 1.2rem; }
  .hero-date { font-size: 0.9rem; }
}

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

  *,
  *::before,
  *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }

  .js .reveal { opacity: 1; transform: none; }
}
