/* ============================================================
   Boda Tania & Edgar — Invitación digital (versión estática)
   Paleta: verde olivo claro, perla y rose gold (oklch)
   ============================================================ */

:root {
  --background: oklch(0.965 0.013 92);
  --foreground: oklch(0.34 0.022 118);
  --card: oklch(0.985 0.008 95);
  --muted-foreground: oklch(0.5 0.022 116);
  --border: oklch(0.86 0.018 95);

  --olive: oklch(0.585 0.055 122);
  --olive-deep: oklch(0.44 0.045 124);
  --pearl: oklch(0.965 0.013 92);
  --rosegold: oklch(0.72 0.058 42);
  --rosegold-deep: oklch(0.6 0.07 38);

  --gradient-rosegold: linear-gradient(135deg, oklch(0.82 0.05 55), oklch(0.7 0.07 38), oklch(0.6 0.08 30));
  --gradient-olive: linear-gradient(160deg, oklch(0.62 0.05 122), oklch(0.46 0.05 126));
  --shadow-elegant: 0 24px 60px -28px oklch(0.44 0.045 124 / 0.45);
  --shadow-soft: 0 12px 40px -20px oklch(0.44 0.045 124 / 0.3);
  --shadow-card: 0 30px 70px -40px oklch(0.4 0.04 40 / 0.4);

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-script: "Pinyon Script", cursive;
  --font-sans: "Jost", ui-sans-serif, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  color: var(--rosegold-deep);
}
.script { font-family: var(--font-script); font-weight: 400; line-height: 1.1; }
.text-rosegold-gradient {
  background: var(--gradient-rosegold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Divider ---------- */
.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; color: var(--rosegold);
}
.divider::before, .divider::after {
  content: ""; height: 1px;
  width: clamp(2.5rem, 12vw, 6rem);
  background: linear-gradient(to right, transparent, var(--rosegold) 60%, var(--rosegold));
}
.divider::before { transform: scaleX(-1); }

/* ---------- Layout helpers ---------- */
section { position: relative; padding: 6rem 1.5rem; }
@media (min-width: 640px) { section { padding: 7rem 1.5rem; } }
.wrap { margin: 0 auto; }
.maxw-md { max-width: 28rem; } .maxw-xl { max-width: 36rem; }
.maxw-2xl { max-width: 42rem; } .maxw-3xl { max-width: 48rem; }
.maxw-4xl { max-width: 56rem; }
.center { text-align: center; }
.paper { background-image: url("assets/paper-texture.jpg"); background-size: cover; background-position: center; }

/* ---------- Section heading ---------- */
.section-heading { max-width: 38rem; margin: 0 auto; text-align: center; }
.section-heading h2 { margin-top: 0.9rem; font-size: 2.6rem; line-height: 1.1; }
@media (min-width: 640px) { .section-heading h2 { font-size: 3.2rem; } }
.section-heading .subtitle {
  margin-top: 1.2rem; font-size: 1rem; font-weight: 300;
  line-height: 1.7; color: var(--muted-foreground);
}

/* ---------- Botones ---------- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  border-radius: 999px; padding: 0.85rem 1.6rem;
  font-size: 0.72rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.22em; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-light {
  background: oklch(0.97 0.012 95); color: var(--olive-deep);
  box-shadow: var(--shadow-card); border: none;
}
.btn-light:hover { transform: scale(1.03); }
.btn-outline {
  border: 1px solid oklch(0.72 0.058 42 / 0.5); color: var(--rosegold-deep);
}
.btn-outline:hover { background-image: var(--gradient-rosegold); color: oklch(0.98 0.012 95); border-color: transparent; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22,1,0.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Sprigs ---------- */
.sprig { position: absolute; pointer-events: none; user-select: none; }
.sprig.flip { transform: scaleX(-1); }
@keyframes float-slow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-slow-flip { 0%,100% { transform: translateY(0) scaleX(-1); } 50% { transform: translateY(-12px) scaleX(-1); } }
.float { animation: float-slow 7s ease-in-out infinite; }
.float.flip { animation: float-slow-flip 7s ease-in-out infinite; }

/* ============================================================
   INTRO — Sobre
   ============================================================ */
#intro {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 1.5rem; background-image: var(--gradient-olive);
  overflow: hidden; transition: opacity 0.9s ease;
}
#intro.hide { opacity: 0; pointer-events: none; }
#intro .halo {
  position: absolute; inset: 0; opacity: 0.6; pointer-events: none;
  background: radial-gradient(circle at 50% 40%, oklch(0.96 0.02 95 / 0.28), transparent 62%);
}
.intro-inner {
  position: relative; width: 100%; max-width: 24rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: rise 0.9s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.intro-inner .names { margin-top: 0.75rem; font-size: 3.75rem; color: oklch(0.99 0.01 95); }
@media (min-width: 640px) { .intro-inner .names { font-size: 4.5rem; } }
.intro-date { margin-top: 1rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.35em; color: oklch(0.94 0.02 95 / 0.85); }
.intro-hint { margin-top: 1.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.4em; color: oklch(0.92 0.03 60); }

/* Sobre */
.envelope {
  position: relative; margin-top: 2.5rem; width: 18rem; height: 11rem;
  perspective: 1200px; background: none; border: none; cursor: pointer; padding: 0;
}
@media (min-width: 640px) { .envelope { width: 20rem; height: 12rem; } }
.env-body {
  position: absolute; inset: 0; border-radius: 0.375rem; overflow: hidden;
  box-shadow: var(--shadow-card);
  background: linear-gradient(155deg, oklch(0.97 0.012 92), oklch(0.92 0.02 90));
  border: 1px solid oklch(0.78 0.05 48 / 0.55);
}
.env-sides {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, transparent 49.6%, oklch(0.88 0.03 60 / 0.45) 50%),
    linear-gradient(-135deg, transparent 49.6%, oklch(0.88 0.03 60 / 0.45) 50%);
}
.env-bottom {
  position: absolute; inset: 0;
  clip-path: polygon(0 100%, 50% 46%, 100% 100%);
  background: linear-gradient(180deg, oklch(0.94 0.02 88), oklch(0.9 0.025 86));
  border-top: 1px solid oklch(0.8 0.05 50 / 0.3);
}
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 62%;
  transform-origin: top; transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4,0,0.2,1); z-index: 10;
}
.env-flap > div {
  width: 100%; height: 100%;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, oklch(0.95 0.018 86), oklch(0.9 0.028 80));
  border-bottom: 1px solid oklch(0.78 0.05 48 / 0.4);
  backface-visibility: hidden;
}
.env-seal {
  position: absolute; left: 50%; top: 44%; z-index: 20;
  width: 4rem; height: 4rem; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center; border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, oklch(0.78 0.07 45), oklch(0.6 0.09 34) 70%, oklch(0.5 0.08 30));
  box-shadow: 0 6px 16px -6px oklch(0.4 0.08 34 / 0.7), inset 0 1px 2px oklch(0.95 0.03 60 / 0.6);
  animation: seal-pulse 2.6s ease-in-out infinite;
}
.env-seal .mono { font-family: var(--font-script); font-size: 1.5rem; color: oklch(0.98 0.02 80); }
.env-seal .mono small { font-size: 1rem; vertical-align: middle; }
@keyframes seal-pulse { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.05); } }

/* estado abriendo */
#intro.opening .env-flap { transform: rotateX(-178deg); }
#intro.opening .env-seal { opacity: 0; transform: translate(-50%,-50%) scale(0.6); animation: none; transition: opacity 0.4s, transform 0.4s; }

/* ============================================================
   HERO
   ============================================================ */
#hero { display: flex; align-items: center; justify-content: center; min-height: 100svh; }
.hero-inner { position: relative; margin: 0 auto; max-width: 28rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-photo {
  margin: 1.75rem 0; padding: 0.5rem; border-radius: 2rem;
  border: 1px solid oklch(0.72 0.058 42 / 0.3); box-shadow: var(--shadow-elegant);
  overflow: hidden;
}
.hero-photo img { height: 24rem; width: 100%; object-fit: cover; border-radius: 1.6rem; }
@media (min-width: 640px) { .hero-photo img { height: 30rem; } }
.hero-inner h1 { font-family: var(--font-script); font-weight: 400; font-size: 4.5rem; }
@media (min-width: 640px) { .hero-inner h1 { font-size: 6rem; } }
.hero-date { margin-top: 1.25rem; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.35em; color: var(--muted-foreground); }

/* ============================================================
   Secciones olivo
   ============================================================ */
.olive-section { background-image: var(--gradient-olive); color: oklch(0.97 0.012 95); overflow: hidden; }
.olive-section h2 { color: oklch(0.98 0.012 95); }
.olive-section .eyebrow { color: oklch(0.86 0.05 55); }
.olive-soft { color: oklch(0.93 0.02 95); }

/* Save the date */
.std-row { margin-top: 2.25rem; display: flex; align-items: center; justify-content: center; gap: 1.25rem; }
@media (min-width: 640px) { .std-row { gap: 2rem; } }
.std-row .lbl { font-size: 1rem; font-weight: 300; text-transform: uppercase; letter-spacing: 0.3em; }
.std-big { display: flex; flex-direction: column; align-items: center; border-left: 1px solid oklch(0.97 0.012 95 / 0.35); border-right: 1px solid oklch(0.97 0.012 95 / 0.35); padding: 0 1.25rem; }
.std-big span { font-family: var(--font-serif); font-size: 4.5rem; line-height: 1; }
@media (min-width: 640px) { .std-big span { font-size: 6rem; } .std-row .std-big { padding: 0 2rem; } }
.std-time { margin-top: 1.5rem; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.3em; }

/* ============================================================
   Countdown
   ============================================================ */
.countdown { margin: 3.5rem auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; max-width: 42rem; }
@media (min-width: 640px) { .countdown { gap: 1.5rem; } }
.cd-cell {
  display: flex; flex-direction: column; align-items: center;
  border-radius: 0.75rem; border: 1px solid oklch(0.86 0.018 95 / 0.7);
  background: oklch(0.985 0.008 95 / 0.7); backdrop-filter: blur(4px);
  padding: 1.5rem 0.5rem; box-shadow: var(--shadow-soft);
}
.cd-cell .num { font-family: var(--font-serif); font-weight: 500; font-size: 2.25rem; color: var(--foreground); font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .cd-cell .num { font-size: 3.75rem; } .cd-cell { padding: 2rem 0.5rem; } }
.cd-cell .lbl { margin-top: 0.5rem; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--rosegold-deep); }
@media (min-width: 640px) { .cd-cell .lbl { font-size: 0.75rem; } }

/* ============================================================
   Cards genéricas (venue / place / registry)
   ============================================================ */
.grid { display: grid; gap: 1.5rem; margin: 3.5rem auto 0; }
.grid-2 { max-width: 48rem; }
.grid-3 { max-width: 56rem; }
.grid-4 { max-width: 56rem; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border-radius: 1rem; border: 1px solid var(--border); background: var(--card);
  padding: 2.5rem 2rem; box-shadow: var(--shadow-soft);
}
.card-icon {
  display: flex; align-items: center; justify-content: center;
  height: 4rem; width: 4rem; border-radius: 999px; box-shadow: var(--shadow-soft);
  color: oklch(0.97 0.012 95);
}
.icon-olive { background-image: var(--gradient-olive); }
.icon-rose { background-image: var(--gradient-rosegold); height: 3.5rem; width: 3.5rem; }
.card h3 { margin-top: 1.25rem; font-size: 1.6rem; }
.card .city { margin-top: 0.75rem; font-size: 1rem; font-weight: 300; color: var(--muted-foreground); }
.card .detail { margin-top: 0.5rem; font-size: 0.875rem; font-weight: 300; line-height: 1.6; color: var(--muted-foreground); }
.card .time { margin-top: 1.25rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--rosegold-deep); }
.card .note { margin-top: 1.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--rosegold-deep); }
.card .btn-pill { margin-top: 1.75rem; }

/* ============================================================
   Itinerario
   ============================================================ */
.timeline { position: relative; margin: 4rem auto 0; max-width: 36rem; }
.timeline .line { position: absolute; left: 1.85rem; top: 0.5rem; bottom: 0.5rem; width: 1px; background: linear-gradient(to bottom, oklch(0.72 0.058 42 / 0.1), oklch(0.72 0.058 42 / 0.6), oklch(0.72 0.058 42 / 0.1)); }
.tl-item { position: relative; display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2.5rem; }
.tl-dot {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 3.5rem; width: 3.5rem; flex-shrink: 0; border-radius: 999px;
  border: 1px solid oklch(0.72 0.058 42 / 0.4); background: var(--card); color: var(--rosegold-deep); box-shadow: var(--shadow-soft);
}
.tl-dot .t { position: absolute; bottom: -1.5rem; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: var(--rosegold-deep); }
.tl-text p.title { font-family: var(--font-serif); font-size: 1.5rem; color: var(--foreground); }
.tl-text p.desc { margin-top: 0.25rem; font-size: 0.875rem; font-weight: 300; color: var(--muted-foreground); }

/* ============================================================
   Vestimenta
   ============================================================ */
.dress-grid { margin-top: 2.5rem; display: grid; gap: 2rem; }
@media (min-width: 640px) { .dress-grid { grid-template-columns: repeat(2, 1fr); } }
.dress-card { border-radius: 1rem; border: 1px solid oklch(0.97 0.012 95 / 0.25); padding: 2rem 1.5rem; }
.dress-card p.h { font-family: var(--font-serif); font-size: 1.5rem; }
.dress-card p.b { margin-top: 0.75rem; font-size: 0.875rem; font-weight: 300; line-height: 1.6; color: oklch(0.93 0.02 95); }

/* ============================================================
   Galería
   ============================================================ */
.gallery { margin: 3.5rem auto 0; max-width: 56rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; grid-auto-rows: 1fr; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { overflow: hidden; border-radius: 1rem; border: 1px solid oklch(0.72 0.058 42 / 0.25); box-shadow: var(--shadow-soft); }
.gallery figure.tall { grid-row: span 2; }
.gallery img { height: 100%; width: 100%; object-fit: cover; transition: transform 0.7s ease; min-height: 14rem; }
.gallery figure.tall img { min-height: 20rem; }
@media (min-width: 640px) { .gallery figure.tall img { min-height: 34rem; } .gallery img { min-height: 16rem; } }
.gallery img:hover { transform: scale(1.05); }

/* ============================================================
   RSVP
   ============================================================ */
#rsvp-snippet {
  margin: 2.5rem auto 0; max-width: 28rem; min-height: 8rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 1rem; border: 1px dashed oklch(0.97 0.012 95 / 0.4);
  padding: 2rem 1.5rem; font-size: 0.875rem; font-weight: 300; letter-spacing: 0.02em;
  color: oklch(0.9 0.02 95); text-align: center;
}

/* ============================================================
   Footer
   ============================================================ */
footer { padding: 4rem 1.5rem; text-align: center; }
footer .fnames { margin-top: 1rem; font-family: var(--font-script); font-size: 3rem; color: var(--foreground); }
footer .fdate { margin-top: 0.75rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--muted-foreground); }
footer .credit { margin-top: 2rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.3em; color: oklch(0.5 0.022 116 / 0.7); }
footer .credit a { color: var(--rosegold-deep); }

.icon { width: 1.75rem; height: 1.75rem; stroke-width: 1.3; }
.icon-sm { width: 1rem; height: 1rem; stroke-width: 1.6; }
.icon-md { width: 1.5rem; height: 1.5rem; stroke-width: 1.4; }
