/* Gestiona tu boda · landing
   Tokens: papel, tinta verde, musgo, rubor, terracota (único acento) */
:root {
  --paper: #faf8f4;
  --paper-2: #f1ede6;
  --ink: #22302a;
  --moss: #5e6f64;
  --line: #ddd6cc;
  --blush: #ecdcd4;
  --terra: #c0725a;
  --terra-dark: #a05a44;
  --ok: #4caf82;
  --warn: #e9a63a;
  --measure: 34rem;
  --wrap: 68rem;
  --gutter: clamp(16px, 4vw, 40px);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-text: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; font-variation-settings: 'SOFT' 60, 'opsz' 96; }
h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 0.6em; }
h3 { font-size: 1.35rem; font-variation-settings: 'SOFT' 60, 'opsz' 24; }
p { max-width: var(--measure); }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* ---------- cabecera ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; gap: 20px; }
.brand { font-family: var(--font-display); font-size: 1.25rem; text-decoration: none; font-variation-settings: 'SOFT' 100; white-space: nowrap; }
.brand-o { display: inline-block; width: 0.62em; height: 0.62em; vertical-align: -0.06em; margin: 0 0.015em; }
.card-brand { font-size: 1.05rem; color: var(--moss); margin-bottom: 10px; }
.top nav { display: flex; gap: 22px; font-size: 0.95rem; }
.top nav a { text-decoration: none; color: var(--moss); }
.top nav a:hover { color: var(--ink); }
.top nav .enter { color: var(--ink); border-bottom: 1px solid var(--line); }

/* ---------- héroe ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(28px, 6vh, 64px) 0 clamp(40px, 8vh, 96px); }
.lead { font-size: 1.2rem; color: var(--moss); margin-top: 20px; }

.doors { list-style: none; margin-top: 36px; border-top: 1px solid var(--line); }
.doors li { border-bottom: 1px solid var(--line); }
.doors a { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px 20px; align-items: baseline; padding: 20px 0; text-decoration: none; position: relative; }
.door-title { font-family: var(--font-display); font-size: 1.75rem; font-variation-settings: 'SOFT' 60, 'opsz' 48; transition: color 0.15s; }
.door-desc { color: var(--moss); font-size: 0.98rem; line-height: 1.45; max-width: 28rem; }
.doors a:hover .door-title, .doors a:focus-visible .door-title { color: var(--terra); }
.doors a::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--terra); transition: width 0.25s ease; }
.doors a:hover::after { width: 100%; }
.doors .primary .door-title { color: var(--terra); }

/* plano animado: réplica del gestor */
.plan { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 12px; width: 100%; max-width: 560px; margin-inline: auto; font-family: var(--font-text); }
.mini-side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 10px 30px -18px rgba(34,48,42,0.25); height: 100%; }
.mini-side-h { font-size: 0.82rem; font-weight: 600; display: flex; gap: 6px; align-items: baseline; margin-bottom: 8px; }
.mini-count { color: var(--moss); font-weight: 400; font-size: 0.72rem; }
.mini-chips { display: flex; flex-direction: column; gap: 5px; max-height: 236px; overflow: hidden; }
.mini-chip { display: flex; align-items: center; gap: 6px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 0.72rem; max-height: 32px; transition: opacity 0.35s ease, max-height 0.45s ease 0.15s, padding 0.45s ease 0.15s, margin 0.45s ease 0.15s, border-width 0.45s ease 0.15s; overflow: hidden; }
.mini-chip.gone { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -5px; border-width: 0; }
.mini-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mini-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-seats { color: var(--terra); font-weight: 600; font-size: 0.68rem; }
.mini-done { font-size: 0.78rem; color: var(--moss); margin: 8px 0 0; }
.mini-room { position: relative; aspect-ratio: 1 / 1.05; border: 1px solid var(--line); border-radius: 14px; background: #fff radial-gradient(circle at 50% 20%, #f7ebe5 0, rgba(255,255,255,0) 60%); min-height: 300px; }
.mini-table { position: absolute; width: 72px; height: 72px; transform: translate(-50%, -50%); border-radius: 50%; background: conic-gradient(var(--ok) calc(var(--fill) * 1turn), var(--paper-2) 0); display: grid; place-items: center; transition: --fill 0.5s ease; }
.mini-table.over { background: conic-gradient(#e05252 1turn, #e05252 0); }
.mini-in { width: 60px; height: 60px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.mini-num { font-weight: 700; font-size: 1rem; color: var(--ink); }
.mini-table.pres .mini-num { font-size: 1.15rem; line-height: 1; }
.mini-cap { font-size: 0.62rem; color: var(--moss); }
.mini-chip.dragging { opacity: 0.35; }
.mini-table.dragover { box-shadow: 0 0 0 4px var(--terra); }
.mini-ghost { position: absolute; z-index: 5; pointer-events: none; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--terra); border-radius: 8px; padding: 5px 8px; font-size: 0.72rem; box-shadow: 0 10px 24px -8px rgba(34,48,42,0.45); transform: rotate(-2deg) scale(1.04); transition: left 0.8s cubic-bezier(0.3, 0.8, 0.3, 1), top 0.8s cubic-bezier(0.3, 0.8, 0.3, 1), opacity 0.25s, transform 0.25s; }
.mini-ghost.drop { opacity: 0; transform: scale(0.6); }
.mini-cursor { position: absolute; z-index: 6; pointer-events: none; opacity: 0; transform: translate(-6px, -4px); transition-property: left, top, opacity, transform; transition-timing-function: cubic-bezier(0.3, 0.8, 0.3, 1); transition-duration: 500ms; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25)); left: 60%; top: 60%; }
.mini-cursor.show { opacity: 1; }
.mini-cursor.press { transform: translate(-6px, -4px) scale(0.85); }
@media (prefers-reduced-motion: reduce) { .mini-cursor, .mini-ghost { display: none; } }
.plan-caption { margin-top: 14px; text-align: center; font-size: 0.85rem; color: var(--moss); }
@media (prefers-reduced-motion: reduce) { .mini-chip, .mini-table { transition: none; } html { scroll-behavior: auto; } }
@media (max-width: 480px) { .plan { grid-template-columns: 8.5rem minmax(0, 1fr); } .mini-table { width: 58px; height: 58px; } .mini-in { width: 48px; height: 48px; } .mini-num { font-size: 0.85rem; } }

/* ---------- qué lleva ---------- */
.section { padding: clamp(40px, 8vh, 96px) 0; border-top: 1px solid var(--line); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: 36px 0; }
.feature + .feature { border-top: 1px dashed var(--line); }
.feature p { color: var(--moss); margin-top: 10px; }
.feature ul { color: var(--moss); margin: 10px 0 0 1.1em; }
.feature li + li { margin-top: 4px; }

/* fragmentos de interfaz (imitan la app) */
.ui { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; font-size: 0.9rem; box-shadow: 0 10px 30px -18px rgba(34,48,42,0.25); }
.ui-guest { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 6px; }
.ui-guest + .ui-guest { border-top: 1px solid var(--paper-2); }
.ui-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 0.72rem; }
.ui-name { font-weight: 600; }
.ui-meta { color: var(--moss); font-size: 0.8rem; }
.ui-status { display: flex; gap: 4px; }
.ui-status span { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 0.72rem; color: var(--moss); }
.ui-status .on-ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.ui-status .on-wait { background: var(--warn); color: #fff; border-color: var(--warn); }
.ui-balance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.ui-balance div { padding: 12px 6px; border-radius: 10px; background: var(--paper); }
.ui-balance b { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.ui-balance small { color: var(--moss); }
.ui-bar { height: 8px; border-radius: 99px; background: var(--paper-2); margin-top: 14px; overflow: hidden; }
.ui-bar i { display: block; height: 100%; width: 62%; background: var(--terra); border-radius: 99px; }
.ui-note { margin-top: 8px; font-size: 0.8rem; color: var(--moss); }
.ui-mini-plan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ui-mini-plan div { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); background: conic-gradient(var(--terra) calc(var(--fill) * 1turn), var(--blush) 0); position: relative; }
.ui-mini-plan div::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.ui-mini-plan span { position: relative; font-size: 0.85rem; }
.ui-mini-plan .over { background: conic-gradient(#e05252 1turn, #e05252 0); }

/* ---------- cómo funciona ---------- */
.steps { list-style: none; counter-reset: paso; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 8px; }
.steps li { counter-increment: paso; padding-top: 14px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(paso); font-family: var(--font-display); font-size: 1.6rem; display: block; margin-bottom: 8px; }
.steps h3 { font-family: var(--font-text); font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.steps p { color: var(--moss); font-size: 0.98rem; }
.code-sample { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--paper-2); padding: 2px 8px; border-radius: 6px; font-size: 0.9em; letter-spacing: 0.04em; }

/* ---------- precio ---------- */
.price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.price-big { font-family: var(--font-display); font-size: clamp(4rem, 9vw, 6.5rem); line-height: 1; font-variation-settings: 'SOFT' 100, 'opsz' 144; }
.price-big sup { font-size: 0.4em; vertical-align: super; margin-left: 4px; }
.price-sub { color: var(--moss); margin-top: 8px; }
.included { list-style: none; margin-top: 8px; }
.included li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.included li:first-child { border-top: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 10px; text-decoration: none; font-weight: 600; border: 1px solid transparent; font-size: 1rem; cursor: pointer; font-family: inherit; }
.btn-fill { background: var(--terra); color: #fff; }
.btn-fill:hover { background: var(--terra-dark); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-ghost { color: var(--moss); text-decoration: underline; padding-inline: 4px; }
.gift-note { margin-top: 26px; padding: 18px 20px; border-left: 3px solid var(--terra); color: var(--moss); background: #fff; }

/* ---------- preguntas ---------- */
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--moss); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 10px; color: var(--moss); }

/* ---------- pie ---------- */
footer { padding: 40px 0 48px; border-top: 1px solid var(--line); color: var(--moss); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---------- páginas empezar / regalar ---------- */
.page { max-width: 40rem; padding: clamp(28px, 6vh, 64px) 0 clamp(48px, 8vh, 96px); }
.page .lead { margin-top: 14px; }
.page h2 { margin-top: 44px; font-size: 1.5rem; }
.notify { margin-top: 28px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.notify p { color: var(--moss); }
.notify form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.notify input[type="email"] { flex: 1 1 220px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--paper); }
.notify input[type="email"]:focus { border-color: var(--terra); outline: none; }
.notify .done { color: var(--ok); font-weight: 600; margin-top: 12px; display: none; }
.notify .err { color: #c43c3c; margin-top: 12px; display: none; }
.card-gift { margin-top: 24px; padding: 28px; border: 1px dashed var(--terra); border-radius: 16px; background: #fff; text-align: center; }
.card-gift .code-sample { font-size: 1.1rem; display: inline-block; margin-top: 10px; }
.card-gift small { display: block; margin-top: 12px; color: var(--moss); }

/* ---------- móvil ---------- */
@media (max-width: 820px) {
  .hero, .feature, .price { grid-template-columns: 1fr; }
  .hero { padding-top: 16px; }
  .plan { max-width: 440px; }
  .feature .ui { order: 2; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .doors a { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .top nav { gap: 14px; font-size: 0.9rem; }
  .top nav .hide-sm { display: none; }
}

/* anillo de ocupación animable */
@property --fill { syntax: '<number>'; inherits: false; initial-value: 0; }
