/* ═══════════════════════════════════════════════════════════
   XV · Ethel Isabella — estilos
   Mobile-first. Paleta basada en el vestido (verde menta/salvia),
   dragones negros y papel de pergamino con detalles en oro viejo.
   ═══════════════════════════════════════════════════════════ */

:root {
  --mint: #A9D6C3;
  --mint-2: #7FBFA6;
  --ink: #0D1210;
  --ink-2: #14201b;
  --ink-3: #1b2d26;
  --parch: #EADFC8;
  --parch-2: #dccdac;
  --brown: #3a2b15;
  --gold: #B8963E;
  --gold-2: #d8b968;
  --gold-3: #f3dd93;
  --f-title: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --f-cap: 'Cinzel', Georgia, serif;
  --f-body: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --nav-h: 62px;
  --ease: cubic-bezier(.6, .05, .25, 1);

  --tex: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42 0 0 0 0 .30 0 0 0 0 .12 0 0 0 .32 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  --blot: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><filter id='b' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='4' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .55 0 0 0 0 .38 0 0 0 0 .14 0 0 0 .55 -.12'/></filter><rect width='100%25' height='100%25' filter='url(%23b)'/></svg>");
  --paper: var(--tex), var(--blot),
           radial-gradient(ellipse at 18% 12%, rgba(255, 251, 238, .6), transparent 55%),
           radial-gradient(ellipse at 88% 92%, rgba(160, 118, 52, .28), transparent 58%),
           var(--parch);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--parch);
  font-family: var(--f-body);
  font-size: 1.2rem;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: var(--nav-h); }

:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--parch); color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.ico { width: 1.25em; height: 1.25em; flex: none; }

/* ───────────── Botones ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .8em 1.5em;
  font-family: var(--f-cap); font-weight: 600; font-size: .82rem; letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; text-align: center; line-height: 1.2;
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold-3), var(--gold) 55%, #8a6d25); color: #1b1407; box-shadow: 0 6px 18px rgba(184, 150, 62, .3); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--gold); color: var(--brown); background: rgba(255, 255, 255, .25); }
.btn-ink { background: var(--ink); color: var(--parch); box-shadow: 0 6px 18px rgba(13, 18, 16, .35); border-color: var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0 0 2rem; }
.link-btn { background: none; border: 0; padding: 8px 10px; font: inherit; font-size: .95rem; text-decoration: underline; text-underline-offset: 4px; color: inherit; cursor: pointer; opacity: .85; }
.link-btn.light { color: var(--brown); }

/* ═══════════════ LA CARTA SELLADA ═══════════════ */
#carta {
  position: fixed; inset: 0; z-index: 50; overflow: hidden;
  perspective: 1600px; background: #10241c;
  color: var(--brown);
  transition: opacity .8s ease;
}
#carta.gone { opacity: 0; pointer-events: none; }
.env-lining {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(169, 214, 195, .06) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(-45deg, rgba(169, 214, 195, .05) 0 2px, transparent 2px 16px),
    radial-gradient(ellipse at 50% 20%, #1d4a3b, #0b1b15 75%);
}
.env-front {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
  background: var(--paper);
  box-shadow: inset 0 0 120px rgba(110, 70, 20, .4);
}
.env-folds { position: absolute; inset: 0; width: 100%; height: 100%; }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 56%;
  transform-origin: 50% 0; transform: rotateX(0deg);
  filter: drop-shadow(0 10px 12px rgba(30, 15, 0, .45));
  transition: transform 1.15s var(--ease);
  will-change: transform;
}
.env-flap::before {
  content: ''; position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: var(--paper);
  box-shadow: inset 0 0 90px rgba(110, 70, 20, .5);
}
#carta.open .env-flap { transform: rotateX(-178deg); }

.carta-top {
  position: absolute; z-index: 4; top: max(5.5vh, env(safe-area-inset-top)); left: 0; right: 0;
  padding: 0 28px; text-align: center; transition: opacity .5s;
}
.carta-top .eyebrow { color: #6b531f; margin: 0 0 .6em; letter-spacing: .2em; font-size: .72rem; }
.carta-title {
  margin: 0; font-family: var(--f-title); font-weight: 700; color: #2a1d0b;
  font-size: clamp(1.35rem, 5.6vw, 2.5rem); line-height: 1.25; text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 248, 225, .6);
}
.carta-bottom {
  position: absolute; z-index: 4; bottom: max(5vh, calc(env(safe-area-inset-bottom) + 18px)); left: 0; right: 0;
  display: grid; justify-items: center; gap: 10px; padding: 0 24px; transition: opacity .5s;
}
.btn-skip {
  background: rgba(255, 255, 255, .28); border: 1px solid rgba(110, 83, 31, .5); color: #4a3716;
  font-family: var(--f-cap); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 11px 20px; min-height: 44px; border-radius: 999px; cursor: pointer;
  opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .7s, transform .7s;
}
.btn-skip.show, .btn-skip:focus-visible { opacity: .9; transform: none; pointer-events: auto; }
.return-actions { display: grid; justify-items: center; gap: 4px; }
#carta.open .carta-top, #carta.open .carta-bottom { opacity: 0; pointer-events: none; }

/* Sello */
.seal-wrap {
  position: absolute; z-index: 5; left: 50%; top: 56%;
  width: clamp(190px, 58vw, 320px); aspect-ratio: 1; transform: translate(-50%, -50%);
  filter: drop-shadow(0 14px 18px rgba(20, 10, 0, .55));
  transition: opacity .4s;
}
.seal-wrap::after {
  content: ''; position: absolute; inset: -9%; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(184, 150, 62, .55); animation: ring 2.6s ease-out infinite;
}
.seal-wrap.broken::after, .seal-wrap.revealed::after { display: none; }
@keyframes ring { 0% { transform: scale(.88); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }
.seal, .cracks { position: absolute; inset: 0; width: 100%; height: 100%; }
.seal-half { visibility: hidden; }
.seal-l { clip-path: polygon(0 0, 53% 0, 47% 17%, 56% 34%, 46% 51%, 57% 68%, 47% 84%, 52% 100%, 0 100%); }
.seal-r { clip-path: polygon(53% 0, 100% 0, 100% 100%, 52% 100%, 47% 84%, 57% 68%, 46% 51%, 56% 34%, 47% 17%); }
#scratch { position: absolute; inset: 4%; width: 92%; height: 92%; border-radius: 50%; touch-action: none; cursor: crosshair; }
.cracks { visibility: hidden; filter: drop-shadow(0 0 4px rgba(255, 240, 180, .9)); }
.crack { stroke-dasharray: 340; stroke-dashoffset: 340; }

.seal-wrap.broken .seal-base { visibility: hidden; }
.seal-wrap.broken .seal-half, .seal-wrap.broken .cracks { visibility: visible; }
.seal-wrap.broken #scratch { display: none; }
.seal-wrap.broken .crack { animation: crack .38s ease-out forwards; }
@keyframes crack { to { stroke-dashoffset: 0; } }
.seal-wrap.apart .cracks { opacity: 0; transition: opacity .2s; }
.seal-wrap.apart .seal-l { transform: translate(-30%, 34%) rotate(-24deg); opacity: 0; transition: transform .9s cubic-bezier(.5, 0, .8, .6), opacity .9s ease-in; }
.seal-wrap.apart .seal-r { transform: translate(30%, 42%) rotate(26deg); opacity: 0; transition: transform .9s cubic-bezier(.5, 0, .8, .6), opacity .9s ease-in; }
.seal-wrap.shake { animation: shake .38s linear; }
@keyframes shake { 0%, 100% { translate: 0 0; } 20% { translate: -4px 2px; } 40% { translate: 4px -2px; } 60% { translate: -3px -2px; } 80% { translate: 3px 2px; } }

/* ═══════════════ VELO ═══════════════ */
#veil {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(16, 36, 28, .88), rgba(3, 6, 5, .95));
  backdrop-filter: blur(3px); transition: opacity .45s;
}
#veil.show { opacity: 1; pointer-events: auto; }

/* ═══════════════ PERGAMINO ═══════════════ */
#pergamino { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; }
.scroll {
  display: grid; grid-template-rows: auto 0fr auto; align-content: center;
  width: min(100%, 800px); height: 100%; max-height: 100dvh;
  padding: 0 clamp(14px, 3vw, 22px);
  transition: grid-template-rows 1.15s var(--ease), opacity .55s, transform .55s;
}
.scroll.is-open { grid-template-rows: auto 1fr auto; }
.scroll.rising { animation: rise 1s var(--ease) both; }
@keyframes rise { from { transform: translateY(46vh) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

.rod {
  position: relative; z-index: 3; height: 24px; margin: 0 -2px; border-radius: 12px;
  background: linear-gradient(#b98a4a, #7a5426 48%, #3d280f);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 230, 170, .45);
}
.rod::before, .rod::after {
  content: ''; position: absolute; top: -5px; bottom: -5px; width: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-3), var(--gold) 55%, #5f4914);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5);
}
.rod::before { left: -14px; }
.rod::after { right: -14px; }
.rod i { position: absolute; inset: 5px 14px auto; height: 3px; border-radius: 3px; background: rgba(255, 235, 190, .25); }

.sheet { position: relative; min-height: 0; overflow: hidden; margin: 0 8px; background: var(--paper); color: var(--brown); }
.sheet::before, .sheet::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.sheet::before { background: linear-gradient(90deg, rgba(90, 55, 15, .4), transparent 9%, transparent 91%, rgba(90, 55, 15, .4)); }
.sheet::after { box-shadow: inset 0 0 0 0 transparent; }
.sheet-inner { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 38px clamp(20px, 6vw, 56px) 130px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #9d8250 transparent; }
.sheet-inner:focus { outline: none; }

/* Chamuscado al cerrar */
.scroll.is-burning .sheet::after { animation: char 1s ease-in forwards; }
@keyframes char {
  to { box-shadow: inset 0 0 70px 30px rgba(18, 7, 1, .94), inset 0 0 24px 7px rgba(255, 122, 28, .85); }
}
.scroll.is-burning .rod { animation: rodburn 1.2s ease-in forwards; }
@keyframes rodburn { to { filter: brightness(.38) saturate(1.4); box-shadow: 0 0 26px 6px rgba(255, 120, 30, .75), 0 8px 16px rgba(0, 0, 0, .5); } }
.scroll.is-burning .sheet-inner { transition: opacity .6s .35s; opacity: .15; }
.scroll.is-gone { opacity: 0; transform: scale(.94); }

.btn-cerrar {
  position: fixed; z-index: 80; left: 50%; bottom: max(40px, calc(env(safe-area-inset-bottom) + 34px)); transform: translateX(-50%);
  min-height: 48px; padding: .7em 1.5em; white-space: nowrap;
  font-family: var(--f-cap); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--parch); background: linear-gradient(#1d3a2f, #0d1210); border: 1px solid var(--gold); border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .55), 0 0 0 4px rgba(13, 18, 16, .25); cursor: pointer;
  transition: opacity .4s, filter .2s;
}
.btn-cerrar:hover { filter: brightness(1.2); }
#pergamino:not(.ready) .btn-cerrar, #pergamino.closing .btn-cerrar { opacity: 0; pointer-events: none; }

/* Contenido del decreto */
.decree { text-align: center; max-width: 560px; margin: 0 auto; }
.decree-ico { width: 120px; height: 66px; color: #1e1608; margin-bottom: 4px; }
.eyebrow.dark, .sec-parch .eyebrow { color: #7a5f1f; }
.decree-line { font-size: 1.28rem; font-style: italic; margin: .4em auto 1em; max-width: 30ch; }
.decree-name { font-family: var(--f-title); font-weight: 700; font-size: clamp(2rem, 9vw, 3.3rem); line-height: 1.08; margin: .2em 0 .1em; color: #1e1608; }
.decree-name small { font-size: .62em; font-weight: 400; letter-spacing: .06em; }
.decree-xv {
  font-family: var(--f-title); font-weight: 700; font-size: clamp(2.6rem, 12vw, 4.2rem); line-height: 1; margin: .1em 0 .3em;
  background: linear-gradient(135deg, #8a6d25, var(--gold) 40%, #5f4914); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.orn { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 1.6em 0; }
.orn span { height: 1px; width: min(26vw, 110px); background: linear-gradient(90deg, transparent, #8a6d25); }
.orn span:last-child { transform: scaleX(-1); }
.orn i { width: 9px; height: 9px; background: #8a6d25; transform: rotate(45deg); }
.decree-label, .decree-data dt { font-family: var(--f-cap); font-size: .76rem; letter-spacing: .3em; text-transform: uppercase; color: #7a5f1f; margin: 0; }
.decree-parents { font-size: 1.4rem; font-weight: 500; margin: .3em 0 1.4em; line-height: 1.35; }
.decree-parents em { font-size: .9em; opacity: .75; }
.decree-quote { margin: 0 auto; max-width: 32ch; font-size: 1.32rem; font-style: italic; line-height: 1.5; position: relative; padding: 0 .2em; }
.decree-data { margin: 0; display: grid; gap: 1.1em; }
.decree-data div { display: grid; gap: .1em; }
.decree-data dd { margin: 0; font-size: 1.35rem; font-weight: 500; }
.decree-map { margin: 1.8em 0 1em; padding: 8px; background: #f4ecd8; border: 1px solid var(--gold); border-radius: 10px; box-shadow: 0 8px 22px rgba(60, 40, 10, .3); }
.decree-map img { display: block; width: 100%; height: auto; border-radius: 6px; }
.decree-btns { margin: 0 0 1.8em; }
.code-box {
  margin: 1.6em auto 0; padding: 20px 18px; border: 2px double var(--gold); border-radius: 14px; background: rgba(255, 252, 240, .45);
}
.code-box p { margin: 0 0 .3em; font-family: var(--f-cap); font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; color: #7a5f1f; }
.code-box strong { display: block; font-family: var(--f-cap); font-size: clamp(1.7rem, 8vw, 2.4rem); letter-spacing: .18em; color: #1e1608; user-select: all; }
.code-box small { display: block; margin-top: .4em; font-size: 1rem; opacity: .85; }
.decree-end { margin: 2.2em 0 0; font-style: italic; opacity: .85; }

/* ═══════════════ SITIO ═══════════════ */
body.locked #site * { animation-play-state: paused !important; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 max(14px, env(safe-area-inset-left)) 0 max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(13, 18, 16, .9), rgba(13, 18, 16, 0));
  transition: background .3s, backdrop-filter .3s;
}
.nav.scrolled { background: rgba(13, 18, 16, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(184, 150, 62, .35); }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--f-title); font-weight: 700; letter-spacing: .06em; color: var(--gold-2); font-size: 1.05rem; }
.brand-ico { width: 34px; height: 19px; }
.menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; display: grid; gap: 0;
  background: rgba(13, 18, 16, .98); border-bottom: 1px solid rgba(184, 150, 62, .4);
  transform: translateY(-120%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
}
.menu.open { transform: none; visibility: visible; }
.menu a { padding: 16px 24px; text-decoration: none; font-family: var(--f-cap); letter-spacing: .16em; text-transform: uppercase; font-size: .82rem; border-top: 1px solid rgba(234, 223, 200, .08); }
.menu a:hover { color: var(--mint); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.btn-sello {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 13px; white-space: nowrap;
  font-family: var(--f-cap); font-weight: 600; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  color: #1b1407; background: linear-gradient(135deg, var(--gold-3), var(--gold)); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(184, 150, 62, .35);
}
.btn-sello .ico { width: 18px; height: 18px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; background: rgba(13, 18, 16, .55); color: var(--parch); border: 1px solid rgba(184, 150, 62, .45); border-radius: 50%; cursor: pointer; }
.icon-btn[aria-pressed="true"] { background: var(--mint); color: var(--ink); border-color: var(--mint); box-shadow: 0 0 18px rgba(169, 214, 195, .6); }

@media (min-width: 900px) {
  .nav { padding: 0 clamp(20px, 3vw, 40px); }
  .menu { position: static; display: flex; gap: 6px; transform: none; visibility: visible; background: none; border: 0; }
  .menu a { padding: 8px 14px; border: 0; font-size: .74rem; }
  .hamb { display: none; }
  .btn-sello { font-size: .72rem; padding: 0 18px; }
}

/* HERO */
.hero { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; }
.hero-sky {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 14%, rgba(255, 255, 255, .8), transparent 60%),
    radial-gradient(1.2px 1.2px at 78% 9%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1.4px 1.4px at 46% 21%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1.2px 1.2px at 90% 28%, rgba(255, 255, 255, .6), transparent 60%),
    linear-gradient(180deg, #0D1210 0%, #10201a 26%, #2a4a3e 50%, #5f9482 68%, #a9d6c3 84%, #d3ebdf 100%);
}
.castle { position: absolute; z-index: 1; right: -14%; bottom: 0; width: min(120vw, 1000px); opacity: .96; }
.fog { position: absolute; z-index: 2; left: -30%; width: 160%; height: 52%; bottom: -8%; pointer-events: none; filter: blur(16px); will-change: transform; }
.fog-1 { background: radial-gradient(ellipse at 28% 62%, rgba(220, 240, 230, .6), transparent 60%), radial-gradient(ellipse at 76% 44%, rgba(220, 240, 230, .42), transparent 56%); animation: drift 46s ease-in-out infinite alternate; }
.fog-2 { z-index: 5; height: 34%; bottom: -10%; opacity: .75; background: radial-gradient(ellipse at 60% 60%, rgba(220, 240, 230, .55), transparent 62%), radial-gradient(ellipse at 18% 50%, rgba(220, 240, 230, .4), transparent 55%); animation: drift 60s ease-in-out -20s infinite alternate-reverse; }
@keyframes drift { from { transform: translate3d(-6%, 0, 0); } to { transform: translate3d(8%, -3%, 0); } }

.dragon-main { position: absolute; z-index: 4; left: -4%; bottom: -2%; height: min(46svh, 580px); width: auto; max-width: none; will-change: transform; transform-origin: 50% 100%; animation: breathe 7s ease-in-out infinite; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .55)); }
.hero-ground { position: absolute; z-index: 5; left: -20%; bottom: -9%; width: 85%; height: 20%; background: radial-gradient(ellipse at 50% 100%, #050807 52%, rgba(5, 8, 7, .7) 62%, transparent 74%); pointer-events: none; }
@keyframes breathe { 50% { scale: 1.012; } }
.fly { position: absolute; z-index: 3; max-width: none; will-change: transform; animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -12px; } }
.fly-a { top: 45.5%; left: 2%; width: clamp(120px, 32vw, 380px); opacity: .96; filter: drop-shadow(0 10px 14px rgba(0,0,0,.4)); }
.fly-b { top: 45%; right: 5%; width: clamp(80px, 22vw, 230px); opacity: .88; filter: drop-shadow(0 8px 10px rgba(0,0,0,.4)); animation-duration: 9s; animation-delay: -3s; }

.hero-content { position: relative; z-index: 6; padding: calc(var(--nav-h) + 22px) 20px 0; text-align: center; max-width: 720px; margin: 0 auto; }
.eyebrow { font-family: var(--f-cap); font-size: .76rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--mint); margin: 0; }
.hero-name { margin: .5em 0 0; font-weight: 400; line-height: 1; }
.hero-name span { display: block; font-family: var(--f-title); font-weight: 700; font-size: clamp(2.2rem, 10vw, 4.6rem); color: var(--parch); text-shadow: 0 0 34px rgba(169, 214, 195, .35), 0 2px 0 rgba(0, 0, 0, .4); }
.hero-name b { display: block; font-family: var(--f-title); font-size: clamp(4.2rem, 21vw, 9rem); line-height: 1.02; background: linear-gradient(180deg, #e3f3ea, var(--mint-2) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(127, 191, 166, .45)); }
.hero-date { margin: .5em 0 1.1em; font-family: var(--f-cap); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: .9rem; color: var(--gold-3); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 420px; margin: 0 auto; }
.countdown > div { background: rgba(13, 18, 16, .66); border: 1px solid rgba(184, 150, 62, .6); border-radius: 12px; padding: 10px 2px 8px; backdrop-filter: blur(4px); }
.countdown b { display: block; font-family: var(--f-title); font-size: clamp(1.4rem, 7vw, 2.1rem); line-height: 1.1; color: var(--parch); font-variant-numeric: tabular-nums; }
.countdown small { font-family: var(--f-cap); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mint); }
.countdown-done { font-family: var(--f-title); color: var(--gold-3); font-size: 1.4rem; }
.scroll-hint { position: absolute; z-index: 7; left: 50%; bottom: 14px; width: 28px; height: 44px; margin-left: -14px; border: 2px solid rgba(234, 223, 200, .7); border-radius: 16px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--parch); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(16px); } }
#embers { position: absolute; inset: 0; z-index: 7; width: 100%; height: 100%; pointer-events: none; }

@media (min-width: 900px) {
  .hero-content { margin: 0 6% 0 auto; max-width: 600px; padding-top: calc(var(--nav-h) + 9vh); }
  .dragon-main { left: 1%; height: min(88svh, 860px); }
  .hero-ground { width: 52%; left: -8%; }
  .castle { right: -4%; width: min(70vw, 1000px); }
  .fly-a { top: 7%; left: auto; right: 1%; width: clamp(200px, 20vw, 320px); }
  .fly-b { top: 40%; left: 40%; right: auto; width: clamp(110px, 14vw, 230px); }
}

/* SECCIONES */
.sec { position: relative; padding: clamp(64px, 10vw, 120px) 0; overflow: hidden; text-align: center; }
.sec-dark { background: radial-gradient(ellipse at 50% -10%, var(--ink-3), transparent 62%), var(--ink); color: var(--parch); }
.sec-parch { background: var(--paper); color: var(--brown); box-shadow: inset 0 0 120px rgba(110, 70, 20, .3); }
.wrap { position: relative; z-index: 2; width: min(1080px, 100% - 40px); margin-inline: auto; }
.title {
  margin: .25em 0 .45em; font-family: var(--f-title); font-weight: 700; font-size: clamp(1.9rem, 6.5vw, 3.1rem); line-height: 1.12;
  background: linear-gradient(135deg, var(--gold-3), var(--gold) 55%, #8a6d25); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec-parch .title { background: linear-gradient(135deg, #8a6d25, #5f4914); -webkit-background-clip: text; background-clip: text; }
.lede { max-width: 48ch; margin: 0 auto 2.2rem; font-size: 1.32rem; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 auto 3rem; }
.card { padding: 22px 14px; border: 1px solid rgba(184, 150, 62, .45); border-radius: 16px; background: rgba(234, 223, 200, .05); }
.card .ico { width: 34px; height: 34px; color: var(--mint); margin-bottom: .25em; }
.card h3 { margin: 0 0 .25em; font-family: var(--f-cap); font-size: .76rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-2); font-weight: 600; }
.card p { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.card-wide { grid-column: 1 / -1; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(4, 1fr); } .card-wide { grid-column: auto; } }

.mensaje { margin: 0 auto 2.4rem; max-width: 34ch; }
.mensaje blockquote { margin: 0; font-size: clamp(1.4rem, 4.4vw, 1.9rem); font-style: italic; line-height: 1.45; color: var(--parch); }
.mensaje blockquote::before { content: '“'; display: block; font-family: var(--f-title); font-style: normal; font-size: 3.6rem; line-height: .6; color: var(--gold); }
.mensaje figcaption { margin-top: .8em; font-family: var(--f-cap); letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; color: var(--mint); }
.padres-line { margin: 0; font-size: 1.2rem; opacity: .92; }
.padres-line strong { font-weight: 600; color: var(--gold-3); }

.fly-c { top: 6%; left: -4%; width: clamp(140px, 26vw, 330px); opacity: .22; scale: -1 1; }
.fly-d { bottom: 3%; right: -3%; width: clamp(140px, 24vw, 320px); opacity: .16; }

/* Ubicación */
.loc-grid { display: grid; gap: 22px; text-align: left; margin-bottom: 2rem; }
.frame { margin: 0; padding: 8px; background: #f4ecd8; border: 1px solid var(--gold); border-radius: 12px; box-shadow: 0 10px 30px rgba(60, 40, 10, .25); }
.frame img { display: block; width: 100%; height: auto; border-radius: 7px; }
.frame figcaption { padding: 8px 4px 2px; font-size: 1rem; font-style: italic; text-align: center; opacity: .85; }
.loc-side { display: grid; gap: 18px; align-content: start; }
.tips { margin: 0; padding: 18px 22px 18px 40px; border: 1px dashed var(--gold); border-radius: 12px; background: rgba(255, 252, 240, .45); font-size: 1.22rem; }
.tips li { margin: .3em 0; }
.tips li::marker { color: var(--gold); content: '◆  '; }
.map-embed { aspect-ratio: 4 / 3; border: 1px solid var(--gold); padding: 8px; background: #f4ecd8; border-radius: 12px; box-shadow: 0 10px 30px rgba(60, 40, 10, .25); margin-bottom: 2.4rem; }
.map-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 7px; }
.cal-box h3 { margin: 0 0 1rem; font-family: var(--f-cap); font-size: .86rem; letter-spacing: .22em; text-transform: uppercase; color: #7a5f1f; }
@media (min-width: 900px) {
  .loc-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .map-embed { aspect-ratio: 16 / 7; }
}

/* Ambiente */
.arches { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; max-width: 900px; margin: 0 auto; }
.arches img { width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 3 / 4; object-fit: cover; border: 2px solid var(--gold); border-radius: 999px 999px 16px 16px / 220px 220px 16px 16px; box-shadow: 0 0 0 6px var(--ink), 0 0 0 7px rgba(184, 150, 62, .5), 0 16px 34px rgba(0, 0, 0, .5); }

/* Galería */
.gate { max-width: 460px; margin: 0 auto; text-align: left; }
.gate label, .upload-name label { display: block; margin-bottom: 6px; font-family: var(--f-cap); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: #7a5f1f; }
.gate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gate input, .upload-name input {
  flex: 1 1 200px; min-height: 50px; padding: 0 16px; font: inherit; font-size: 1.15rem; color: var(--brown);
  background: rgba(255, 252, 240, .8); border: 1px solid var(--gold); border-radius: 12px;
}
.gate input { text-transform: uppercase; letter-spacing: .12em; }
.gate-err { margin: .7em 0 0; color: #8a1f1f; font-weight: 600; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-bottom: 1.6rem; }
.tabs [role=tab] { min-height: 46px; padding: 0 20px; font-family: var(--f-cap); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brown); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.tabs [aria-selected="true"] { border-bottom-color: var(--gold); color: #1e1608; }
.count { font-size: .9em; color: #7a5f1f; }

.upload { max-width: 560px; margin: 0 auto; text-align: left; display: grid; gap: 16px; justify-items: stretch; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 30px 18px; text-align: center; border: 2px dashed var(--gold); border-radius: 16px; background: rgba(255, 252, 240, .45); cursor: pointer; transition: background .2s, transform .2s; }
.drop:hover, .drop.over { background: rgba(255, 252, 240, .8); transform: translateY(-1px); }
.drop .ico { width: 40px; height: 40px; color: #7a5f1f; }
.drop strong { font-family: var(--f-cap); letter-spacing: .08em; }
.drop span { font-size: 1rem; opacity: .8; }
.upload > .btn { justify-self: center; }
.previews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.previews li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #d8caa6; }
.previews img { width: 100%; height: 100%; object-fit: cover; display: block; }
.previews .st { position: absolute; inset: auto 0 0; padding: 3px 4px; font-size: .78rem; text-align: center; color: #fff; background: rgba(13, 18, 16, .66); }
.previews .st.ok { background: rgba(35, 110, 80, .85); }
.previews .st.err { background: rgba(140, 30, 30, .88); }
.previews .rm { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(13, 18, 16, .75); color: #fff; font-size: 16px; line-height: 1; }
.progress { height: 10px; border-radius: 99px; background: rgba(110, 83, 31, .25); overflow: hidden; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-3)); transition: width .2s; }
.upload-msg { margin: 0; text-align: center; min-height: 1.4em; font-weight: 500; }
.upload-msg.err { color: #8a1f1f; }
.upload-msg.ok { color: #1f5d43; }

.masonry { display: flex; gap: 10px; align-items: flex-start; text-align: left; }
.masonry .col { flex: 1 1 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ph { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #d3c4a0; aspect-ratio: var(--ar, 1); cursor: zoom-in; box-shadow: 0 4px 14px rgba(60, 40, 10, .25); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .4s; }
.ph img.loaded { opacity: 1; }
.ph:hover img { transform: scale(1.04); }
.ph.fresh { animation: pop .7s var(--ease); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.empty { font-style: italic; opacity: .85; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(5, 9, 7, .95); }
.lb-fig { margin: 0; max-width: 100%; display: grid; justify-items: center; gap: 10px; padding: 0 10px; }
.lb-fig img { max-width: min(96vw, 1200px); max-height: 82vh; max-height: 82dvh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lb-fig figcaption { font-size: 1.05rem; color: var(--parch); min-height: 1.4em; }
.lb-close, .lb-nav { position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(184, 150, 62, .6); background: rgba(13, 18, 16, .75); color: var(--parch); cursor: pointer; }
.lb-close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lb-nav { top: 50%; margin-top: -24px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

/* Pie */
.foot { padding: 70px 24px calc(60px + env(safe-area-inset-bottom)); text-align: center; background: linear-gradient(180deg, var(--ink), #060908); color: var(--parch); }
.foot-ico { width: 120px; height: 66px; color: var(--gold); }
.foot-thanks { max-width: 34ch; margin: 1em auto; font-size: 1.4rem; font-style: italic; }
.foot-sign { margin: 1em 0 .2em; font-family: var(--f-title); font-size: 1.5rem; color: var(--mint); }
.foot-fam { margin: 0; opacity: .75; font-size: 1.05rem; }

/* FX */
#fx { position: fixed; inset: 0; z-index: 70; width: 100%; height: 100%; pointer-events: none; }
#flash { position: fixed; inset: 0; z-index: 65; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 52%, rgba(255, 228, 150, .95), rgba(169, 214, 195, .6) 34%, transparent 70%); }

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .seal-wrap::after, .fog { display: none; }
}
