/* Empresa · Norte Atlas Cena Anual
 * macrostructure: sealed card → agenda → RSVP + badge → team totals
 * theme: cool stationery · slate paper · navy seal · no botanical
 */

:root {
  color-scheme: light;
  --paper: oklch(97% 0.008 250);
  --paper-2: oklch(94% 0.012 250);
  --cloth: oklch(88% 0.02 250);
  --cloth-light: oklch(92% 0.015 245);
  --ink: oklch(22% 0.03 255);
  --ink-soft: oklch(40% 0.025 255);
  --rule: oklch(55% 0.03 250);
  --seal: oklch(32% 0.07 255);
  --seal-hover: oklch(26% 0.07 255);
  --seal-ink: oklch(97% 0.008 250);
  --accent: oklch(55% 0.08 230);
  --accent-deep: oklch(42% 0.07 235);
  --focus: oklch(32% 0.07 255);
  --error: oklch(42% 0.14 22);
  --shadow: oklch(20% 0.03 255 / 0.22);
  --font-display: "Cormorant Garamond", Palatino, "Palatino Linotype", "Times New Roman", serif;
  --font-ui: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
}

[hidden] { display: none !important; }

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

html,
body {
  overflow-x: clip;
  margin: 0;
}

html { background: var(--cloth); }

body {
  min-height: 100vh;
  padding: var(--space-4) var(--space-2) 4rem;
  background:
    radial-gradient(ellipse at 50% 0%, var(--cloth-light), transparent 58%),
    linear-gradient(180deg, oklch(90% 0.02 250), var(--cloth));
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

h1, h2, p {
  overflow-wrap: anywhere;
  margin: 0;
}

h1, h2 {
  font-style: normal;
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--space-2);
  top: 0;
  transform: translateY(-120%);
  background: var(--paper);
  color: var(--ink);
  padding: var(--space-1) var(--space-2);
  z-index: 5;
}
.skip:focus { transform: none; }

.suite {
  width: min(100%, 40rem);
  margin: 0 auto;
}

.menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
  margin: 0 auto var(--space-3);
  width: min(100%, 40rem);
}

.tab {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-1);
  border: 1px solid oklch(48% 0.03 250 / 0.55);
  border-radius: 0.55rem 0.55rem 0 0;
  background: oklch(97% 0.008 250 / 0.35);
  color: var(--ink);
  font: 600 0.95rem/1 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.tab:hover { background: var(--paper-2); }
.tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.tab.is-current,
.tab[aria-current="page"] {
  background: var(--paper);
  border-bottom-color: var(--paper);
  box-shadow: inset 0 -2px 0 var(--seal);
}

.sample-tool {
  width: min(100%, 40rem);
  margin: 0 auto var(--space-3);
  padding: var(--space-2);
  border: 1px dashed oklch(48% 0.03 250 / 0.55);
  background: oklch(97% 0.008 250 / 0.55);
  font-size: 0.85rem;
}
.sample-tool-label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.sample-tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pill {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.95rem;
  border: 1px solid oklch(48% 0.03 250 / 0.45);
  border-radius: 999px;
  color: var(--ink);
  background: oklch(97% 0.008 250 / 0.55);
  text-decoration: none;
  font: 600 0.85rem/1 var(--font-ui);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.pill:hover { background: var(--paper); border-color: oklch(48% 0.03 250 / 0.7); }
.pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pill.is-on {
  background: oklch(36% 0.08 255 / 0.9);
  border-color: transparent;
  color: var(--seal-ink);
  box-shadow: 0 4px 12px oklch(18% 0.03 255 / 0.14);
}

.entrega {
  background: var(--paper);
  box-shadow: 0 16px 32px var(--shadow);
  padding: var(--space-2);
}

.stage {
  position: relative;
  aspect-ratio: 1080 / 1916;
  overflow: hidden;
  background: var(--paper-2);
}

.stage-photo,
.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-fin {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
}

.stage-fin.is-on:not(.stage-fin-texto) {
  opacity: 1;
}

.stage-fin-texto {
  z-index: 2;
  opacity: 0;
}

.entrega-actions {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: radial-gradient(
    ellipse at center,
    oklch(18% 0.03 255 / 0.28) 0%,
    oklch(18% 0.03 255 / 0.08) 42%,
    transparent 68%
  );
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.entrega-actions:has(#abrir-sobre[hidden]) {
  opacity: 0;
  visibility: hidden;
}
.entrega-actions .btn {
  pointer-events: auto;
}

.carta {
  height: 0;
  overflow: hidden;
  interpolate-size: allow-keywords;
  transition: height 0.85s ease;
}
.carta.is-open { height: auto; }

.paper {
  position: relative;
  background: var(--paper);
  box-shadow: 0 16px 28px var(--shadow);
  border: 1px solid oklch(55% 0.03 250 / 0.35);
  outline: 1px solid oklch(55% 0.08 230 / 0.28);
  outline-offset: -0.55rem;
}

.fold {
  padding: var(--space-4) var(--space-3);
  border-bottom: 1px solid oklch(55% 0.03 250 / 0.28);
}
.fold:last-child { border-bottom: 0; }
.fold-body { position: relative; }

.greet { text-align: center; padding-top: var(--space-5); }

.kicker {
  font: 600 0.75rem/1 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.mono {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.greet h2,
.fold h2 {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 7.5vw, 3rem);
  font-weight: 500;
  line-height: 0.98;
  color: var(--seal);
}

.voice {
  margin: var(--space-2) auto 0;
  max-width: 24rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.4vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
}

.seats-line,
.host-line {
  margin-top: var(--space-2);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.host-line { font-size: 0.88rem; }

.rule-drop {
  display: flex;
  justify-content: center;
  margin-top: var(--space-3);
}
.rule-drop span {
  width: 4.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  position: relative;
}
.rule-drop span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--seal);
  transform: translate(-50%, -50%) rotate(45deg);
}

.lead {
  margin-top: var(--space-2);
  max-width: 28rem;
  color: var(--ink-soft);
}
.lead.soft { font-size: 0.95rem; }

.event-place {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--seal);
}
.event-note { margin-top: var(--space-2); color: var(--ink-soft); font-size: 0.95rem; }

.dress {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-go { margin-top: var(--space-3); }

.timeline {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  border-left: 2px solid oklch(55% 0.04 250 / 0.45);
}
.timeline li {
  position: relative;
  padding: 0 0 var(--space-3) var(--space-3);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -0.4rem;
  top: 0.35rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--seal);
  border: 2px solid var(--paper);
}
.time {
  display: block;
  font: 600 0.8rem/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.timeline h3 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--seal);
}
.timeline p {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.btn {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: oklch(36% 0.08 255 / 0.92);
  color: var(--seal-ink);
  font: 600 0.95rem/1 var(--font-ui);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px oklch(18% 0.03 255 / 0.14);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.btn:hover {
  background: var(--seal-hover);
  box-shadow: 0 8px 20px oklch(18% 0.03 255 / 0.18);
}
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 10px oklch(18% 0.03 255 / 0.12);
}
.btn.quiet {
  background: oklch(97% 0.008 250 / 0.55);
  border-color: oklch(36% 0.08 255 / 0.35);
  color: var(--seal);
  box-shadow: none;
}
.btn.quiet:hover {
  background: var(--paper-2);
  border-color: oklch(36% 0.08 255 / 0.55);
}
.btn.soft {
  border-color: oklch(36% 0.08 255 / 0.28);
  background: oklch(97% 0.008 250 / 0.72);
  color: var(--seal);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px oklch(18% 0.03 255 / 0.28);
}
.btn.soft:hover {
  background: oklch(97% 0.008 250 / 0.9);
  border-color: oklch(36% 0.08 255 / 0.45);
  box-shadow: 0 12px 28px oklch(18% 0.03 255 / 0.32);
}
.btn.soft:active { transform: none; }
.btn.soft:disabled {
  opacity: 0;
  pointer-events: none;
  box-shadow: none;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-3) 0 0;
  padding: 0;
  border: 0;
}
.choice legend {
  padding: 0;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  width: 100%;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 0.95rem;
  border: 1px solid oklch(48% 0.03 250 / 0.45);
  border-radius: 999px;
  background: oklch(97% 0.008 250 / 0.7);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.chip:hover {
  background: var(--paper);
  border-color: oklch(48% 0.03 250 / 0.7);
}
.chip:has(input:checked) {
  border-color: transparent;
  background: oklch(92% 0.02 250);
  box-shadow: inset 0 0 0 1px oklch(36% 0.08 255 / 0.45);
}
.chip input { accent-color: var(--seal); }

.field {
  display: block;
  margin-top: var(--space-3);
}
.field span {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.field.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.field.check span { margin: 0; font-weight: 500; }
.field.check input { accent-color: var(--seal); width: 1.1rem; height: 1.1rem; }
.field input,
.field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.3 var(--font-ui);
}
.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.form-alert {
  margin-top: var(--space-2);
  color: var(--error);
  font-weight: 600;
}
.rsvp-done {
  margin-top: var(--space-3);
  text-align: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.stat {
  padding: var(--space-2);
  border: 1px solid oklch(55% 0.03 250 / 0.35);
  background: var(--paper-2);
  min-width: 0;
}
.stat span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stat strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--seal);
  overflow-wrap: anywhere;
}
.stat.is-long strong {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.venue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.venue-grid figure { margin: 0; min-width: 0; }
.venue-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-2);
}
.venue-grid figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

dialog {
  border: 1px solid var(--rule);
  padding: var(--space-3);
  max-width: min(92vw, 24rem);
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: oklch(18% 0.03 255 / 0.55); }
dialog img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: var(--space-2);
}

@media (max-width: 420px) {
  .venue-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .carta,
  .stage-fin-texto { transition: none; }
  .stage-fin-texto.is-on { transition: none; }
}

@media print {
  .menu,
  .sample-tool,
  .entrega-actions,
  .map-go { display: none !important; }
  body { background: white; padding: 0; }
  .carta { height: auto !important; overflow: visible; }
}
