/* =========================================================
   Invitación — marfil + dorado
   Base = estático (sin JS / reduced motion).
   html.anim = animación ligada al scroll.
   ========================================================= */

:root {
  --ivory: #f8f2e6;
  --ivory-2: #f1e7d4;
  --paper: #ebdfc8;
  --paper-dark: #dccdb0;
  /* Texto: contraste medido sobre marfil (#f8f2e6) */
  --ink: #2b2119;        /* 14.1:1 */
  --ink-soft: #5a4838;   /* 7.8:1 */
  --gold-text: #6f4f14;  /* 6.7:1 — dorado para texto */
  /* Adorno (líneas, filetes, monograma): no se usa para leer */
  --gold: #b8914a;
  --gold-soft: #d8bf85;
  --wine: #7a1c28;       /* 9.3:1 */

  --script: 'Pinyon Script', 'Snell Roundhand', 'Apple Chancery', cursive;
  /* Lectura: serif de letras altas y trazo firme, pensada para pantalla */
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  /* Solo títulos grandes y frases, donde su tamaño la hace legible */
  --display: 'Cormorant Garamond', 'Cormorant', Garamond, Georgia, serif;

  --w: min(86vw, 420px);

  /* Movimiento: curvas y duraciones compartidas */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);       /* entradas y respuestas */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);   /* movimiento en pantalla */
  --dur-press: 120ms;     /* hundirse al presionar */
  --dur-release: 420ms;   /* volver tras soltar */
  --dur-hover: 200ms;
  --dur-reveal: 640ms;    /* contenido que entra al hacer scroll */
  --dur-arrive: 900ms;    /* entrada del sobre al cargar */
  --stagger: 60ms;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory) var(--noise);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;   /* 20px; crece con el tamaño de letra del teléfono */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Intro (base estática) ---------------- */

#intro {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% 40%, #f5ecdc 0%, #e9dcc4 60%, #d9c7a6 100%);
}

.scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 16px;
  overflow: hidden;
}

.stage, .float { display: grid; place-items: center; }

.envelope {
  position: relative;
  width: var(--w);
  perspective: 1400px;
}

.env-part, .seal, .hint, .opener, .card-shade, .card-shine, .scene-fade { display: none; }

/* ---------------- Tarjeta ---------------- */

.card {
  position: relative;
  width: 100%;
  min-height: calc(var(--w) * 0.78);
  transform-origin: 50% 50%;
}

/* Sombra en su propia capa: se anima con opacity/transform, sin repintar */
.card-shadow {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  box-shadow: 0 18px 40px -18px rgba(59, 47, 37, .45);
  pointer-events: none;
}

.card-paper {
  position: relative;
  min-height: inherit;
  border-radius: 6px;
  background: var(--ivory) var(--noise);
  box-shadow: 0 1px 2px rgba(59, 47, 37, .12);
  overflow: hidden;
}

/* doble filete dorado */
.card-frame {
  position: absolute;
  inset: 8px;
  border: 1px solid var(--gold-soft);
  outline: 1px solid rgba(184, 145, 74, .35);
  outline-offset: 3px;
  border-radius: 3px;
  pointer-events: none;
}

.card-inner {
  position: relative;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--w) * 0.008);
  padding: calc(var(--w) * 0.05) calc(var(--w) * 0.07);
  text-align: center;
}

.card-ornament {
  color: var(--gold);
  font-size: calc(var(--w) * 0.05);
  line-height: 1;
}

.card-lead {
  margin: 0;
  font-size: max(0.9375rem, calc(var(--w) * 0.046));
  line-height: 1.25;
  letter-spacing: .02em;
  color: var(--ink-soft);
  font-weight: 600;
}

.card-rule {
  width: 38%;
  height: 1px;
  margin: calc(var(--w) * 0.012) 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.card-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  max-width: 100%;
}

.card-label {
  font-size: max(0.9375rem, calc(var(--w) * 0.044));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-text);
  font-weight: 700;
}

.card-name {
  font-family: var(--script);
  font-size: calc(var(--w) * 0.1);
  line-height: 1.1;
  color: var(--ink);
  overflow-wrap: anywhere;
  padding: 0 .1em;
}

.card-name.is-long { font-size: calc(var(--w) * 0.066); }

/* =========================================================
   Animación
   ========================================================= */

html.anim #intro {
  height: 500vh;
  height: 500svh;
}

html.anim .scene {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  padding: 0;
}

/* El motor (app.js) escribe `transform` y `opacity` directamente en cada
   nodo animado; aquí solo viven la forma, el origen y el estado inicial. */

/* Capa marfil que funde el final del zoom con el sitio */
html.anim .scene-fade {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: var(--ivory) var(--noise);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* Entrada única al cargar: sube y aparece, sin rebote ni loop */
html.anim .float {
  animation: arrive var(--dur-arrive) var(--ease-out) .15s both;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* Respuesta al presionar: se hunde rápido y vuelve con calma (asimétrico) */
html.anim .stage {
  transition: transform var(--dur-release) var(--ease-out);
}

html.anim .stage:has(.opener:active) {
  transform: scale(.98);
  transition-duration: var(--dur-press);
}

html.anim .envelope {
  height: calc(var(--w) * 0.78);
  perspective: 1100px;
  /* baja un poco para dejar espacio a la tarjeta al salir */
  transform: translateY(calc(var(--w) * 0.22));
}

html.anim .env-part { display: block; position: absolute; }

/* El sobre se aleja (baja, se encoge, se desvanece) y vuelve por el mismo camino */
html.anim .env-back,
html.anim .env-pocket {
  inset: 0;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

/* Sombra de contacto: se contrae al alejarse el sobre */
html.anim .env-shadow {
  z-index: 0;
  left: 6%;
  right: 6%;
  bottom: -9%;
  height: 20%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(59, 47, 37, .38), rgba(59, 47, 37, 0));
  will-change: transform, opacity;
}

html.anim .env-back {
  z-index: 1;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--paper-dark), var(--paper)), var(--noise);
  background-blend-mode: multiply;
  box-shadow: 0 1px 2px rgba(59, 47, 37, .15);
}

html.anim .card {
  position: absolute;
  z-index: 2;
  left: 5%;
  right: 5%;
  top: 5%;
  width: auto;
  height: 90%;
  min-height: 0;
  will-change: transform;
}

html.anim .card-paper {
  position: absolute;
  inset: 0;
  min-height: 0;
}

/* Sombra como degradado radial: sin box-shadow (su interior quedaría hueco
   al desplazarla) ni filter (se re-renderiza cada vez que la tarjeta escala).
   Solo se animan transform y opacity. */
html.anim .card-shadow {
  inset: 4% -6% -14%;
  border-radius: 0;
  box-shadow: none;
  background: radial-gradient(closest-side, rgba(59, 47, 37, .42), rgba(59, 47, 37, .18) 60%, rgba(59, 47, 37, 0));
  opacity: .3;
  will-change: transform, opacity;
}

html.anim .card-frame,
html.anim .card-inner {
  will-change: opacity;
}

/* Sombra que la solapa proyecta sobre la tarjeta mientras se abre */
html.anim .card-shade {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(59, 47, 37, .32), rgba(59, 47, 37, 0) 60%);
  opacity: 0;
  will-change: opacity;
}

/* Destello dorado que recorre la tarjeta al salir */
html.anim .card-shine {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(216, 191, 133, .55) 50%, transparent 65%);
  mix-blend-mode: soft-light;
  opacity: 0;
  will-change: transform, opacity;
}

html.anim .env-pocket {
  z-index: 3;
  background: linear-gradient(180deg, #e8dbc1, var(--paper)), var(--noise);
  background-blend-mode: multiply;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 6px 6px;
}

html.anim .env-pocket::before,
html.anim .env-pocket::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* solapa inferior con más sombra para dar volumen */
html.anim .env-pocket::before {
  background: linear-gradient(0deg, #d6c4a3, #e6d7bb);
  clip-path: polygon(0 100%, 50% 46%, 100% 100%);
}

/* filetes dorados en los pliegues */
html.anim .env-pocket::after {
  background:
    linear-gradient(to top right, transparent calc(50% - .6px), rgba(184, 145, 74, .45) 50%, transparent calc(50% + .6px)) left bottom / 50% 54% no-repeat,
    linear-gradient(to top left, transparent calc(50% - .6px), rgba(184, 145, 74, .45) 50%, transparent calc(50% + .6px)) right bottom / 50% 54% no-repeat;
}

/* Solapa: bisagra en el borde superior. Al pasar 90° cambia a su cara
   interior (forro con patrón dorado); en ese instante está de canto, así
   que el cambio es invisible. */
html.anim .env-flap {
  z-index: 4;
  left: 0;
  right: 0;
  top: 0;
  height: 60%;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, #e3d4b7, #d3c09c), var(--noise);
  background-blend-mode: multiply;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  will-change: transform, opacity;
}

/* Luz: la cara exterior se oscurece al girar hacia el canto */
html.anim .flap-light {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(70, 50, 30, .15), rgba(70, 50, 30, .4));
  opacity: 0;
}

html.anim .env-flap.is-behind {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(184, 145, 74, .28) 0 1.2px, transparent 1.6px) 0 0 / 14px 14px,
    radial-gradient(circle at 50% 50%, rgba(184, 145, 74, .16) 0 .9px, transparent 1.3px) 7px 7px / 14px 14px,
    linear-gradient(0deg, #f6eedd, #efe4cd);
  background-blend-mode: normal;
}

/* …y el forro se ilumina al terminar de abrir */
html.anim .env-flap.is-behind .flap-light {
  background: linear-gradient(0deg, rgba(70, 50, 30, .1), rgba(70, 50, 30, .35));
}

/* ---------------- Sello de cera ---------------- */

html.anim .seal {
  display: block;
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 60%;
  width: calc(var(--w) * 0.22);
  aspect-ratio: 1;
  perspective: 500px;
  transform: translate(-50%, -50%);
}

html.anim .seal-half {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 3px 3px rgba(60, 10, 16, .35));
}

html.anim .seal-half svg { width: 100%; height: 100%; display: block; }

/* Sello entero mientras está cerrado: las dos mitades recortadas dejan una
   línea de antialiasing en su borde compartido. Se cambia a las mitades en
   el instante en que empieza a partirse. */
html.anim .seal-left,
html.anim .seal-right {
  opacity: 0;
  will-change: transform, opacity;
}

html.anim .seal-left {
  clip-path: polygon(0 0, 52% 0, 46% 30%, 54% 55%, 45% 78%, 50% 100%, 0 100%);
}

html.anim .seal-right {
  clip-path: polygon(52% 0, 100% 0, 100% 100%, 50% 100%, 45% 78%, 54% 55%, 46% 30%);
}

/* Migas de cera que saltan al romperse */
html.anim .crumb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7%;
  aspect-ratio: 1;
  border-radius: 40% 60% 55% 45%;
  background: #6e1823;
  transform: translate(-50%, -50%);
  opacity: 0;
}

/* Zona táctil: tocar abre la invitación */
html.anim .opener {
  display: block;
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: -70%;
  bottom: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html.anim .opener:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 6px;
}

/* ---------------- Indicador ---------------- */

html.anim .hint {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-soft);
  pointer-events: none;
  will-change: opacity;
}

.hint-arrow {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--gold), transparent);
  animation: drip 1.8s var(--ease-in-out) infinite;
  transform-origin: top;
}

html.anim .hint.is-idle .hint-arrow { animation-play-state: paused; }

@keyframes drip {
  0% { transform: scaleY(0); opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* =========================================================
   Sitio: clase en vivo
   ========================================================= */

#site {
  position: relative;
  padding: 0 20px calc(48px + env(safe-area-inset-bottom, 0px));
}


/* ---------------- Portada ---------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(4px, 1.1svh, 10px);
  padding-block: 48px 8px;
}

/* Con animación, la portada es el estado final de la escena: aparece en su
   lugar sobre la tarjeta ya a pantalla completa, en cascada ligada al scroll. */
html.anim .hero {
  position: absolute;
  inset: 0;
  z-index: 10;
  padding:
    max(20px, env(safe-area-inset-top, 0px)) 20px
    max(20px, env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

/* cascada: el motor escribe opacity/transform de cada elemento */
html.anim .hero > * {
  opacity: 0;
  will-change: transform, opacity;
}

.hero-mono {
  font-family: var(--script);
  font-size: clamp(36px, 6svh, 52px);
  line-height: 1;
  color: var(--gold);
}

.hero-kicker, .hero-lead {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.hero-kicker { font-style: italic; font-weight: 500; }

/* Nombre del invitado en letra clara: es lo primero que busca quien lo lee */
.hero-name {
  margin: 0;
  max-width: 16ch;
  font-weight: 700;
  font-size: clamp(2rem, min(10vw, 6.4svh), 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.hero-name.is-long { font-size: clamp(1.625rem, min(7.4vw, 4.8svh), 2.75rem); max-width: 20ch; }

.hero-lead {
  margin-top: clamp(6px, 1.8svh, 18px);
  font-weight: 600;
  color: var(--ink);
}

.event-title {
  margin: 2px 0 0;
  max-width: 13ch;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.125rem, min(11vw, 7svh), 4.25rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.event-sub {
  margin: 4px 0 0;
  font-style: italic;
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--gold-text);
}

.event-when {
  margin-top: clamp(10px, 2.6svh, 26px);
  padding: clamp(10px, 2svh, 18px) 28px clamp(8px, 1.8svh, 16px);
  border-block: 1px solid rgba(184, 145, 74, .45);
}

.event-when p { margin: 0; }

.event-date {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
}

.event-time {
  font-size: clamp(2.5rem, 7svh, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}

.event-zone {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--gold-text);
}

.event-ref {
  margin-top: 4px !important;
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------------- Cuenta regresiva y botón ---------------- */

.event-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 32px;
  text-align: center;
}

.countdown-status {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.countdown[data-phase="live"] .countdown-status {
  color: var(--wine);
  font-weight: 700;
}

.countdown[data-phase="live"] .countdown-status::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--wine);
  vertical-align: 1px;
  animation: live 1.6s ease-in-out infinite;
}

@keyframes live {
  50% { opacity: .35; }
}

.countdown {
  width: min(100%, 22rem);
}

/* los cuatro recuadros se reparten el ancho: nunca se salen en pantallas angostas */
.countdown-units {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 12px 6px 10px;
  border: 1px solid rgba(111, 79, 20, .45);
  border-radius: 6px;
  background: #fffdf8;
}

.unit b {
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.unit small {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------------- Botón ---------------- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  width: min(100%, 22rem);
  margin-top: 26px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(59, 47, 37, .6);
  transition:
    transform var(--dur-release) var(--ease-out),
    background-color var(--dur-hover) ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .cta:hover { background: #1c1510; }
}

.cta:active {
  transform: scale(.97);
  transition-duration: var(--dur-press), var(--dur-hover);
}

.cta:focus-visible {
  outline: 3px solid var(--gold-text);
  outline-offset: 4px;
}

/* ---------------- Frases ---------------- */

.quote {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 8px;
  text-align: center;
}

.quote p {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.75rem, 7.6vw, 2.375rem);
  line-height: 1.25;
  color: var(--ink);
}

.quote::before {
  content: '❦';
  display: block;
  margin-bottom: 12px;
  font-size: 20px;
  color: var(--gold);
}

/* ---------------- Temario ---------------- */

.topics {
  max-width: 640px;
  margin: 72px auto 0;
  text-align: center;
}

.section-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.125rem, 9vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section-lead {
  margin: 8px 0 0;
  font-style: italic;
  font-weight: 500;
  color: var(--gold-text);
}

.topic-list {
  display: grid;
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.topic {
  position: relative;
  padding: 22px 20px 22px 70px;
  border: 1px solid rgba(111, 79, 20, .3);
  border-radius: 6px;
  background: #fffdf8;
}

@media (max-width: 380px) {
  .topic { padding: 20px 16px 20px 58px; }
  .topic-num { left: 14px; }
}

/* número en círculo: se reconoce de un vistazo, sin caligrafía */
.topic-num {
  position: absolute;
  left: 18px;
  top: 20px;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--gold-text);
  color: #fffdf8;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.topic h3 {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.25;
  color: var(--ink);
}

.topic p {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------------- Cierre ---------------- */

.closing {
  margin: 64px auto 0;
  text-align: center;
}

.closing-when {
  margin: 10px 0 0;
  font-size: 1.375rem;
  font-weight: 600;
}

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 72px;
  text-align: center;
}

.foot-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

.foot-role {
  max-width: 22rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Aparición al entrar en pantalla. Los elementos que entran juntos se
   escalonan con --stagger (lo asigna app.js en --i). */
html.anim .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}

html.anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Movimiento reducido: sin desplazamientos, solo un fundido breve */
html.calm .reveal {
  opacity: 0;
  transition: opacity 240ms ease;
}

html.calm .reveal.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hint-arrow, .countdown-status::before { animation: none; }
}

/* Alto contraste activado en el teléfono: tinta casi negra y bordes firmes */
@media (prefers-contrast: more) {
  :root {
    --ink: #140e09;
    --ink-soft: #2b2119;
    --gold-text: #4d360b;
  }

  .unit, .topic { border-color: var(--ink); }
  .event-when { border-color: var(--ink); }
}

