/* ===========================================================================
   Laura & Gustavo — Wedding Invitation
   Page stylesheet. Imports the design-system tokens, then layers the
   page-specific styles, responsive overrides and component classes that
   were prototyped via the Claude Design "DC" runtime.
   =========================================================================== */
@import url('./fonts.css');
@import url('./colors.css');
@import url('./typography.css');
@import url('./spacing.css');
@import url('./effects.css');
@import url('./base.css');

/* ---- Global resets (page) ---- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; overflow-wrap: break-word; overflow-x: hidden; }
html { scroll-behavior: smooth; overflow-x: hidden; }

/* Refined, on-brand scrollbar (the default gray looks generic) */
html { scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--taupe) 55%, transparent) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--taupe) 42%, transparent); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in oklab, var(--taupe) 64%, transparent); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }

@keyframes dcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dcRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ===========================================================================
   Component classes — recreated from the design-system React components.
   =========================================================================== */

/* ---- Underlined text link (hero CTA, venue map links) ---- */
.dc-ulink {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--accent-hover);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--clay-400) 45%, transparent);
  transition: border-color var(--dur-base) var(--ease-soft), color var(--dur-base) var(--ease-soft);
}
.dc-ulink:hover { border-bottom-color: var(--clay-500); color: var(--accent); }

/* ---- Button, variant="link" (Enviar confirmación, Ver nuestras cuentas …) ---- */
.dc-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 13px;
  color: var(--accent-hover);
  background: transparent;
  border: none;
  border-bottom: 1px solid color-mix(in oklab, var(--clay-400) 45%, transparent);
  border-radius: 0;
  padding: 0 0 8px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color var(--dur-base) var(--ease-soft), color var(--dur-base) var(--ease-soft);
}
.dc-link-btn:hover { border-bottom-color: var(--clay-500); color: var(--accent); }

/* ---- WhatsApp confirm button (RSVP) ---- */
.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--text-on-dark);
  background: var(--primary);
  border: none;
  border-radius: 999px;
  padding: 15px 30px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-base) var(--ease-soft), transform var(--dur-base) var(--ease-soft), box-shadow var(--dur-base) var(--ease-soft);
}
.wa-btn:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.wa-btn svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* ---- Footer credit — discreet "Desarrollado por" (Byte Lab) ---- */
.dev-credit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity var(--dur-base) var(--ease-soft);
}
.dev-credit:hover { opacity: 0.9; }
.dev-credit .dev-credit-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(244, 238, 226, 0.78);
}
.dev-credit img { display: block; height: 24px; width: auto; }

/* ---- Form field wrapper (Input / Select / Textarea) ---- */
.dc-field { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.dc-field > label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dc-field > label .req { color: var(--accent); }

.dc-control {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text-strong);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 10px 2px;
  outline: none;
  width: 100%;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.dc-control:focus { border-bottom-color: var(--accent); }
.dc-control::placeholder { color: var(--text-muted); opacity: 0.75; }

/* Message textarea reads as its own box, not just an underline —
   makes it clear it's a distinct field from the "Enviar" button below. */
textarea.dc-control {
  resize: vertical;
  line-height: 1.6;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 14px 16px;
}
textarea.dc-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 12%, transparent);
}

/* Select — custom caret, no native chrome */
.dc-select-wrap { position: relative; }
select.dc-control {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding: 10px 36px 10px 2px;
}
.dc-select-wrap .dc-caret {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--accent);
  font-size: 11px;
}

/* ---- Checkbox ---- */
.dc-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-body);
}
.dc-checkbox .dc-box { position: relative; width: 20px; height: 20px; flex: none; }
.dc-checkbox input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; z-index: 1;
}
.dc-checkbox .dc-box-visual {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--paper);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.dc-checkbox .dc-box-visual svg { opacity: 0; transition: opacity var(--dur-fast); }
.dc-checkbox input:checked + .dc-box-visual {
  border-color: var(--accent);
  background: var(--accent);
}
.dc-checkbox input:checked + .dc-box-visual svg { opacity: 1; }

/* ---- Countdown (tone="bare") ---- */
.dc-countdown {
  display: flex;
  gap: clamp(8px, 3.5vw, 48px);
  justify-content: center;
  flex-wrap: nowrap;
}
.dc-countdown .unit { min-width: clamp(50px, 15vw, 108px); text-align: center; }
.dc-countdown .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 8.5vw, 3.6rem);
  line-height: 1;
  color: var(--olive-600);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'onum' 1;
}
.dc-countdown .lbl {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ===========================================================================
   Gift accounts modal — pure CSS :target (no JS state)
   =========================================================================== */
.gm-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(40,45,32,0.5);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.gm-modal:target { opacity: 1; visibility: visible; }
.gm-modal .gm-close-bg { position: absolute; inset: 0; cursor: default; }
.gm-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto;
  background: var(--bg-page);
  border-radius: 18px;
  box-shadow: 0 40px 90px -30px rgba(40,45,32,0.55);
  padding: clamp(30px,5vw,46px) clamp(26px,5vw,40px);
  text-align: center;
  transform: translateY(14px);
  transition: transform 0.32s cubic-bezier(0.22,1,0.36,1);
}
.gm-modal:target .gm-card { transform: translateY(0); }

/* ===========================================================================
   Inspiración de vestuario — contenido del modal (reusa .gm-modal :target)
   =========================================================================== */
.insp-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--olive-600);
  margin-bottom: 16px;
}
.insp-reserved { display: flex; justify-content: center; gap: clamp(18px,5vw,26px); }
.insp-dot {
  width: clamp(32px, 8.5vw, 40px);
  height: clamp(32px, 8.5vw, 40px);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.insp-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin: 14px 0 0;
}
.insp-people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 34px);
  text-align: center;
}
.insp-cat {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.insp-cat-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--text-strong);
  margin-bottom: 14px;
}
/* Rótulo en dos columnas: Mujeres (sobre las 3 fotos izq) · Hombres (der) */
.insp-people-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}
.insp-people-head span {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}
.insp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.insp-board { display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.insp-board img { display: block; width: 100%; height: auto; }
.insp-board-hint {
  display: block; margin-top: 8px;
  font-family: var(--font-body); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted);
}
/* Visor ampliado de la imagen de looks (:target; cierra volviendo al modal) */
.insp-zoom {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(30, 33, 24, 0.92);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.insp-zoom:target { opacity: 1; visibility: visible; }
.insp-zoom-bg { position: absolute; inset: 0; cursor: zoom-out; }
.insp-zoom img {
  position: relative; z-index: 1;
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.insp-zoom-close {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  font-size: 24px; line-height: 1; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.2s;
}
.insp-zoom-close:hover { background: rgba(255, 255, 255, 0.25); }
.insp-photo {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  background-color: color-mix(in oklab, var(--olive-300) 26%, var(--bg-page));
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-sm);
}
.insp-swatches {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(4px, 1.5vw, 9px);
}
.insp-sw {
  flex: 1 1 0;
  max-width: 38px;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
@media (max-width: 680px) {
  .insp-people { grid-template-columns: 1fr; gap: 26px; }
}

/* ===========================================================================
   Desktop hero motion + frame (web only; mobile untouched)
   =========================================================================== */
@keyframes heroZoom { from { transform: scale(1.09); } to { transform: scale(1); } }
@keyframes heroRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroBob  { 0%,100% { transform: translateY(0); opacity: 0.65; } 50% { transform: translateY(7px); opacity: 1; } }
@keyframes heroFrameIn { from { opacity: 0; transform: scale(1.02); } to { opacity: 0.55; transform: scale(1); } }

.hero-frame { display: none; }
.hero-cue { display: none; }
@media (min-width: 681px) {
  /* Editorial ranged-left hero (desktop only) */
  .hero { align-items: flex-start !important; text-align: left !important; padding: clamp(56px,10vh,110px) clamp(48px,6vw,96px) clamp(56px,10vh,110px) clamp(56px,8vw,140px) !important; }
  .hero-body { align-items: flex-start !important; max-width: 620px; }
  /* Hero "carta": en escritorio todo alineado a la izquierda (no centrado) */
  .hero-greet, .hero-invite-block, .hero-sign { text-align: left !important; }
  .hero-invite-text { margin-left: 0 !important; margin-right: 0 !important; max-width: 32ch !important; }
  .hero-frame { display: none; }
  .hero-cue {
    display: flex; position: absolute; left: 0; right: 0; bottom: 30px; z-index: 2;
    justify-content: center; pointer-events: none;
  }
}
@media (min-width: 681px) and (prefers-reduced-motion: no-preference) {
  .hero-photo { animation: heroZoom 7s cubic-bezier(0.22,1,0.36,1) both; }
  .hero-frame { animation: heroFrameIn 1.8s ease 0.3s both; }
  .hero-body > * { opacity: 0; animation: heroRise 0.95s cubic-bezier(0.22,1,0.36,1) both; }
  .hero-body > *:nth-child(1) { animation-delay: 0.2s; }
  .hero-body > *:nth-child(2) { animation-delay: 0.42s; }
  .hero-body > *:nth-child(3) { animation-delay: 0.66s; }
  .hero-body > *:nth-child(4) { animation-delay: 0.8s; }
  .hero-body > *:nth-child(5) { animation-delay: 0.98s; }
  .hero-cue-inner { animation: heroBob 2.6s ease-in-out 1.6s infinite; }
}

/* ===========================================================================
   Mobile-first responsive overrides (95% mobile audience)
   =========================================================================== */
@media (max-width: 680px) {
  /* Hero: photo as a top banner, invitation text below on cream (better legibility) */
  .hero { min-height: auto !important; justify-content: flex-start !important; padding: 0 !important; background: var(--bg-page) !important; overflow: visible !important; }
  .hero-photo { position: relative !important; inset: auto !important; width: 100% !important; height: 44vh !important; }
  .hero-grad { display: none !important; }
  .hero-body { margin-top: clamp(32px,8vw,48px) !important; padding: 0 24px clamp(48px,10vw,68px) !important; width: 100%; }
  .hero-frame, .hero-cue { display: none !important; }
  /* Force all paragraphs to stay within the viewport on narrow screens */
  p { max-width: 100% !important; }

  /* Two-column "1fr 1px 1fr" panels (vestimenta, regalos) stack vertically */
  .dc-split { grid-template-columns: 1fr !important; gap: 0 !important; }
  .dc-split > .dc-vrule { display: none !important; }
  .dc-split > div:not(.dc-vrule) { padding: 14px 0 !important; }
  .dc-split > .dc-vrule + div:not(.dc-vrule) {
    border-top: 1px solid var(--border-soft) !important;
  }

  /* Climate row -> 2x2 grid */
  .dc-climate { grid-template-columns: 1fr 1fr !important; gap: 32px 16px !important; }
  .dc-climate > .dc-vrule { display: none !important; }

  /* RSVP select pair stacks */
  .dc-two { grid-template-columns: 1fr !important; gap: 26px !important; }

  /* Venue: stack text + map, centered */
  .dc-lugar { grid-template-columns: 1fr !important; gap: 32px !important; }
  .dc-lugar-text { text-align: center !important; }
  .dc-lugar-btns { justify-content: center !important; }

  /* Photo gallery -> swipeable carousel on mobile (saves vertical space) */
  .dc-gallery-hint { display: block !important; }
  .dc-gallery {
    columns: auto !important;
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    padding: 4px 24px 14px !important;
    margin: 0 -24px !important;
    max-width: none !important;
    scrollbar-width: none;
  }
  .dc-gallery::-webkit-scrollbar { display: none; }
  .dc-gallery img {
    flex: 0 0 80% !important;
    width: 80% !important;
    height: 58vh !important;
    max-height: 440px !important;
    object-fit: cover !important;
    margin: 0 !important;
    border-radius: 8px !important;
    scroll-snap-align: center !important;
  }
}

/* ===========================================================================
   Puerta de acceso — verificación de invitado por teléfono
   =========================================================================== */
.gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 24px;
  background: var(--bg-page);
  opacity: 1;
  transition: opacity 0.45s var(--ease-soft);
}
.gate--hidden { opacity: 0; pointer-events: none; }
.gate-card { width: 100%; max-width: 400px; text-align: center; }
.gate-mono {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 500;
  letter-spacing: 0.1em; color: var(--olive-600); line-height: 1;
}
.gate-mono span { font-style: italic; color: var(--olive-500); margin: 0 4px; }
.gate-eyebrow {
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent);
  margin: 12px 0 clamp(20px,4.5vh,28px);
}
.gate-title {
  font-family: var(--font-display); font-weight: 600;
  /* Una sola línea al máximo tamaño: escala con el ancho del card (100vw - 48px
     del padding del overlay) y se topa cuando el card llega a su max-width 400px. */
  font-size: clamp(1.3rem, 8.51vw - 0.255rem, 2.13rem); line-height: 1.1;
  white-space: nowrap;
  color: var(--text-strong); margin: 0 0 12px;
}
.gate-lead {
  font-family: var(--font-body); font-size: 1rem; line-height: 1.55;
  color: var(--text-muted); margin: 0 auto clamp(24px,4vh,32px); max-width: 30ch;
}
.gate-form { display: flex; flex-direction: column; gap: 14px; }
.gate-input {
  font-family: var(--font-body); font-size: 1.05rem; text-align: center;
  color: var(--text-strong); background: var(--paper);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 14px 16px; outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.gate-input::placeholder { color: var(--text-muted); opacity: .7; }
.gate-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 12%, transparent);
}
.gate-btn {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-on-dark);
  background: var(--olive-600); border: none; border-radius: var(--radius-sm);
  padding: 15px; cursor: pointer; transition: background .2s;
}
.gate-btn:hover { background: var(--olive-700); }
.gate-btn:disabled { opacity: .6; cursor: default; }
/* Crédito discreto de Byte Lab — esquina inferior derecha de la puerta */
.gate-credit {
  position: absolute; right: 16px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; opacity: 0.38;
  transition: opacity var(--dur-base) var(--ease-soft);
}
.gate-credit:hover { opacity: 0.85; }
.gate-credit span {
  font-family: var(--font-body); font-size: 8.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
}
.gate-credit img { display: block; height: 15px; width: auto; }

/* ---- Interruptor de idioma ES/EN (flotante, por encima de puerta y modales) ---- */
#lang-toggle {
  position: fixed; top: 14px; left: 14px; z-index: 10001;
  display: inline-flex; align-items: center;
  font-family: var(--font-body); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.1em; line-height: 1;
  background: color-mix(in oklab, var(--bg-page) 84%, transparent);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 7px 12px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-base) var(--ease-soft);
}
#lang-toggle:hover { background: var(--bg-page); }
#lang-toggle [data-lang] { color: var(--text-muted); transition: color var(--dur-base); }
#lang-toggle .lang-sep { color: var(--border-strong); margin: 0 5px; }
:root[lang="es"] #lang-toggle [data-lang="es"],
:root[lang="en"] #lang-toggle [data-lang="en"] { color: var(--olive-700); font-weight: 700; }
.gate-error {
  font-family: var(--font-body); font-size: 0.9rem; line-height: 1.5;
  color: var(--danger); margin: 14px auto 0; max-width: 34ch;
}
