@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Space+Mono:wght@400;700&display=swap');

:root {
  --ink: #32232c;
  --ink-soft: #725a62;
  --plum: #4b2038;
  --wine: #6c2942;
  --copper: #b97859;
  --coral: #d28a72;
  --paper: #f4ede1;
  --paper-deep: #e8dbc9;
  --paper-light: #fbf7f0;
  --night: #291b29;
  --line: rgba(75, 32, 56, .18);
  --shadow: rgba(64, 30, 45, .16);
  --app-font-sans: 'DM Sans', sans-serif;
  --app-font-serif: 'Fraunces', Georgia, serif;
  --app-font-mono: 'Space Mono', monospace;
  --radius: .75rem;
  --background: 35 38% 92%;
  --foreground: 330 19% 17%;
  --border: 33 24% 81%;
  --card: 36 43% 95%;
  --card-foreground: 330 19% 17%;
  --card-border: 33 24% 81%;
  --primary: 331 40% 21%;
  --primary-foreground: 35 38% 92%;
  --secondary: 31 39% 87%;
  --secondary-foreground: 330 19% 17%;
  --muted: 32 29% 87%;
  --muted-foreground: 330 14% 38%;
  --accent: 17 42% 58%;
  --accent-foreground: 330 19% 17%;
  --input: 33 24% 81%;
  --ring: 17 42% 58%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--app-font-sans);
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

.invitation {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 2%, rgba(210,138,114,.18), transparent 25rem),
    var(--paper);
}
.invitation::before {
  content: "";
  position: fixed;
  z-index: 20;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
.serif { font-family: var(--app-font-serif); }
.mono {
  font-family: var(--app-font-mono);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .66rem;
}
.eyebrow {
  color: var(--copper);
  font-family: var(--app-font-mono);
  font-size: .63rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.section {
  position: relative;
  padding: 5.5rem 1.25rem;
}
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-label {
  display: flex;
  gap: .8rem;
  align-items: center;
  color: var(--copper);
  font-family: var(--app-font-mono);
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background: var(--copper);
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }

/* Opening keepsake */
.opening {
  position: fixed;
  z-index: 50;
  inset: 0;
  overflow: hidden;
  background: #eadfd7;
  transition: opacity .8s ease, visibility .8s ease;
}
.opening.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.opening-background {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(34,22,27,.10), rgba(34,22,27,.14)),
    url('./capa-inicial-v3.jpg') center center / cover no-repeat;
}
.opening-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 45%, rgba(0,0,0,.08) 100%);
}
.opening-fullscreen-button {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.opening-minimal-ui {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
.opening-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10.5rem;
  min-height: 2.9rem;
  padding: .85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(31,20,24,.28);
  color: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
  font-family: var(--app-font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.opening-note { display:none; }
.open-button, .primary-button, .outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 3.2rem;
  padding: .8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}
.open-button { background: var(--coral); color: var(--night); }
.open-button:hover, .primary-button:hover, .outline-button:hover, .utility-button:hover { transform: translateY(-2px); }
.open-button:active, .primary-button:active, .outline-button:active, .utility-button:active { transform: translateY(0); }
/* Floating controls */
.floating-controls {
  position: fixed;
  z-index: 15;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: .5rem;
}
.utility-button {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251,247,240,.82);
  color: var(--plum);
  box-shadow: 0 8px 24px rgba(64,30,45,.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform .25s ease, background-color .25s ease;
}
.utility-button.active { background: var(--plum); color: var(--paper); }
.utility-button:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.music-note { position: fixed; right: 1rem; bottom: 4.25rem; z-index: 15; color: var(--ink-soft); font-size: .65rem; }

/* Hero */
.hero {
  min-height: max(46rem, 100svh);
  display: flex;
  align-items: center;
  position: relative;
  padding: 5rem 1.25rem 3rem;
  background: var(--paper);
}
.hero-inner { width: 100%; max-width: 1120px; margin: 0 auto; }
.hero-grid { display: grid; gap: 3.5rem; align-items: center; }
.hero-copy { position: relative; z-index: 1; }
.hero-kicker { margin-bottom: 1.4rem; }
.hero h2 {
  margin: 0;
  color: var(--plum);
  font-family: var(--app-font-serif);
  font-size: clamp(4.2rem, 18vw, 10.4rem);
  font-weight: 400;
  line-height: .78;
  letter-spacing: -.085em;
}
.hero h2 span { display: block; margin-left: 1.8rem; color: var(--wine); font-style: italic; }
.hero-date {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.2rem;
  color: var(--ink-soft);
  font-family: var(--app-font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-date::before { content: ""; width: 3rem; height: 1px; background: var(--copper); }
.hero-side { align-self: end; max-width: 24rem; margin-left: auto; }
.hero-side p { margin: 0 0 1.7rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.text-link {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  color: var(--plum);
  font-weight: 700;
  font-size: .82rem;
  text-decoration: none;
}
.text-link svg { transition: transform .2s ease; }
.text-link:hover svg { transform: translateX(4px); }
.hero-ornament { display: none; }
.scroll-cue {
  position: absolute;
  bottom: 1.2rem;
  left: 1.25rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink-soft);
}
.scroll-cue span { writing-mode: vertical-rl; transform: rotate(180deg); }
.scroll-line { display: block; width: 1px; height: 3.8rem; background: var(--copper); transform-origin: top; animation: lineDrop 2s ease-in-out infinite; }
@keyframes lineDrop { 0%,100% { transform: scaleY(.3); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* Story */
.story { background: var(--plum); color: var(--paper); }
.story .section-label { color: var(--coral); }
.story .section-label::before { background: var(--coral); }
.story-grid { display: grid; gap: 2.8rem; }
.story-quote {
  margin: 0;
  font-family: var(--app-font-serif);
  font-size: clamp(2.4rem, 8vw, 5.8rem);
  line-height: 1.01;
  letter-spacing: -.06em;
}
.story-quote em { color: var(--coral); font-style: italic; }
.story-copy { max-width: 25rem; margin-left: auto; color: rgba(244,237,225,.72); font-size: .98rem; line-height: 1.8; }
.story-copy p { margin: 0 0 1.5rem; }
.signature { color: var(--coral); font-family: var(--app-font-serif); font-size: 1.5rem; font-style: italic; }

/* Details */
.details { background: var(--paper-light); }
.details-heading { display: grid; gap: 1.4rem; margin-bottom: 3rem; }
.details h3, .rsvp h3, .closing h3 {
  margin: 0;
  color: var(--plum);
  font-family: var(--app-font-serif);
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.06em;
}
.details-intro { max-width: 22rem; margin: 0; color: var(--ink-soft); line-height: 1.65; }
.detail-layout { display: grid; gap: 1.3rem; }
.detail-feature {
  position: relative;
  min-height: 20rem;
  padding: 2rem;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--night);
  color: var(--paper);
}
.detail-feature::after {
  content: "16";
  position: absolute;
  right: -1rem;
  bottom: -2.2rem;
  color: rgba(210,138,114,.16);
  font-family: var(--app-font-serif);
  font-size: 16rem;
  line-height: 1;
}
.detail-feature .eyebrow { color: var(--coral); }
.detail-feature h4 { max-width: 13rem; margin: 4.2rem 0 0; font-family: var(--app-font-serif); font-size: 2rem; font-weight: 400; line-height: 1; }
.detail-feature p { margin: .7rem 0 0; color: rgba(244,237,225,.62); }
.detail-stack { display: grid; gap: 1.3rem; }
.detail-card {
  min-height: 9.4rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
}
.detail-card-head { display: flex; justify-content: space-between; align-items: flex-start; color: var(--copper); }
.detail-card h4 { margin: 1.2rem 0 .25rem; color: var(--plum); font-family: var(--app-font-serif); font-size: 1.5rem; font-weight: 500; }
.detail-card p { margin: 0; color: var(--ink-soft); font-size: .87rem; line-height: 1.45; }
.map-card { display: flex; flex-direction: column; justify-content: space-between; background: var(--paper-deep); }
.map-link { align-self: flex-start; margin-top: 1.2rem; }
.action-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.2rem; }
.outline-button { border-color: var(--line); color: var(--plum); background: transparent; font-size: .78rem; }
.outline-button:hover { background: var(--paper-deep); }
.primary-button { background: var(--plum); color: var(--paper); font-size: .78rem; }
.primary-button:hover { background: var(--wine); }

/* RSVP */
.rsvp { background: var(--coral); color: var(--night); }
.rsvp .section-label { color: var(--plum); }
.rsvp .section-label::before { background: var(--plum); }
.rsvp-layout { display: grid; gap: 2rem; }
.rsvp h3 { color: var(--night); }
.rsvp-copy { max-width: 28rem; margin: 0; color: rgba(41,27,41,.7); line-height: 1.7; }
.rsvp-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.rsvp .primary-button { background: var(--night); color: var(--paper); }
.rsvp .outline-button { border-color: rgba(41,27,41,.3); color: var(--night); }
.microcopy { width: 100%; margin: 0; color: rgba(41,27,41,.62); font-size: .73rem; }

/* Closing */
.closing { padding-bottom: 6rem; background: var(--night); color: var(--paper); text-align: center; }
.closing::before, .closing::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(80vw, 33rem);
  height: 1px;
  background: rgba(210,138,114,.45);
  transform: translateX(-50%);
}
.closing::before { top: 2.6rem; }
.closing::after { bottom: 2.6rem; }
.closing .section-inner { display: flex; flex-direction: column; align-items: center; }
.closing h3 { max-width: 37rem; color: var(--paper); }
.closing h3 em { color: var(--coral); font-style: italic; }
.closing p { max-width: 25rem; margin: 1.6rem auto 2rem; color: rgba(244,237,225,.65); line-height: 1.7; }
.closing .eyebrow { margin-top: 2.5rem; color: var(--coral); }
.closing-mark { color: var(--coral); font-family: var(--app-font-serif); font-size: 2rem; font-style: italic; }
.footer-line { margin-top: 3.5rem; color: rgba(244,237,225,.35); font-family: var(--app-font-mono); font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; }

@media (min-width: 700px) {
  .section { padding: 8rem 2.5rem; }
  .hero { padding: 6rem 2.5rem 4rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(15rem, .7fr); gap: 4rem; }
  .hero h2 span { margin-left: 5rem; }
  .hero-ornament {
    display: block;
    position: absolute;
    top: 13%;
    right: 9%;
    width: 18rem;
    height: 26rem;
    border: 1px solid var(--line);
    border-radius: 12rem 12rem 0 0;
    transform: rotate(14deg);
  }
  .hero-ornament::before, .hero-ornament::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(185,120,89,.48);
    border-radius: 50%;
  }
  .hero-ornament::before { inset: 2.5rem; }
  .hero-ornament::after { inset: 5rem; }
  .scroll-cue { left: 2.5rem; }
  .story-grid { grid-template-columns: 1.2fr .65fr; align-items: end; gap: 5rem; }
  .details-heading { grid-template-columns: 1fr 1fr; align-items: end; }
  .detail-layout { grid-template-columns: 1.15fr .85fr; }
  .detail-feature { min-height: 25rem; padding: 2.5rem; }
  .detail-feature h4 { margin-top: 7rem; font-size: 2.5rem; }
  .rsvp-layout { grid-template-columns: .9fr 1.1fr; align-items: end; gap: 6rem; }
  .rsvp-actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Desktop correction for the portrait opening artwork.
   On phones the artwork fills the whole screen.
   On wider screens the complete portrait stays visible, while the same image
   is enlarged and blurred behind it to avoid empty side bars. */
@media (min-width: 900px) {
  .opening {
    background: #eadfd7;
  }

  .opening::before {
    content: "";
    position: absolute;
    inset: -2.5rem;
    background: url('./capa-inicial-v3.jpg') center center / cover no-repeat;
    filter: blur(34px) saturate(.82);
    transform: scale(1.08);
    opacity: .52;
  }

  .opening::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(31, 20, 24, .12);
  }

  .opening-background {
    z-index: 1;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(34,22,27,.03), rgba(34,22,27,.08)),
      url('./capa-inicial-v3.jpg') center center / contain no-repeat;
  }

  .opening-background::after {
    background: none;
  }

  .opening-fullscreen-button {
    z-index: 4;
  }

  .opening-minimal-ui {
    z-index: 5;
    bottom: 2.25rem;
  }

  .opening-pill {
    background: rgba(31,20,24,.38);
  }
}

/* Very wide monitors: keep the artwork at a comfortable height rather than
   letting it become visually oversized. */
@media (min-width: 1500px) {
  .opening-background {
    inset: 2rem 0;
  }
}
