/* Dirección C · «Invitación»: página del evento, compra y entrada. Papel, serif y terracota. */

.c-page { min-height: 100dvh; }
.sheet-dialog { overflow-y: auto; }

/* ---------------------------------------------------------------- cabecera */
.masthead {
  max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: max(.75rem, env(safe-area-inset-top)) var(--gutter) .75rem;
  border-bottom: 1px solid var(--rule);
}
.masthead-label { font: 600 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.lang-switch {
  font: 500 .875rem/1 var(--sans); color: var(--ink); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 .25rem; margin-right: -.25rem;
  border-bottom: 1px solid transparent;
}
.lang-switch:active { color: var(--terra-ink); }
.masthead-back {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; min-width: 0;
  font: 500 .92rem/1.3 var(--sans); color: var(--ink); text-decoration: none;
}
.masthead-back span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- la carta */
.letter {
  max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto;
  padding: 1.75rem var(--gutter) 2rem;
}

.from { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.6rem; }
.from-photo {
  width: 84px; height: 105px; object-fit: cover; object-position: 50% 30%; flex: none;
  border: 4px solid var(--paper-3); border-radius: 3px;
  box-shadow: 0 1px 2px rgb(39 30 24 / .18), 0 10px 22px -12px rgb(39 30 24 / .55);
  transform: rotate(-2.5deg);
}
.from-text { min-width: 0; }
.from-kicker { font: italic 400 .98rem/1.3 var(--serif); color: var(--ink-2); }
.from-name { font: 600 1.35rem/1.2 var(--serif); letter-spacing: -.01em; margin: .1rem 0 .2rem; }
.from-meta { font: 400 .82rem/1.45 var(--sans); color: var(--ink-2); }

.title {
  font: 500 clamp(2.3rem, 10.4vw, 3.1rem)/1.04 var(--serif);
  letter-spacing: -.012em; margin-bottom: .8rem;
}
.subtitle { font: italic 400 1.12rem/1.45 var(--serif); color: var(--ink-2); margin-bottom: 1.5rem; max-width: 30rem; }

/* Línea de fecha: quién decide en segundos ve cuándo, cuánto y el botón */
.dateline {
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: 1.05rem 0 1.15rem; margin-bottom: 2.25rem;
  display: grid; gap: .25rem;
}
.dateline-when { font: 500 1.2rem/1.35 var(--serif); letter-spacing: -.005em; }
.dateline-when::first-letter { text-transform: uppercase; }
.dateline-more { font: 400 .95rem/1.4 var(--sans); color: var(--ink-2); margin-bottom: .9rem; }
.dateline-more .price { color: var(--ink); font-weight: 600; }
.dateline .dot { margin: 0 .3rem; }
.dateline-note { font: 400 .84rem/1.45 var(--sans); color: var(--ink-2); margin-top: .7rem; }
.sold { font: italic 400 1rem/1.4 var(--serif); color: var(--terra-ink); margin-top: .35rem; }
.price-approx { color: var(--ink-2); font-weight: 400; }

.letter-body { font-size: 1.0625rem; line-height: 1.62; }
.letter-body p { margin-bottom: 1rem; text-wrap: pretty; }
.salutation { font-style: italic; font-size: 1.15rem; }
.points { list-style: none; counter-reset: point; margin: -.15rem 0 1.25rem; display: grid; gap: .7rem; }
.points li {
  counter-increment: point; position: relative; padding-left: 2.1rem; text-wrap: pretty;
}
.points li::before {
  content: counter(point); position: absolute; left: 0; top: -.08em;
  font: italic 500 1.45rem/1.2 var(--serif); color: var(--terra-ink);
}
.clara-line {
  display: flex; gap: .85rem; align-items: center;
  padding: .85rem 1rem; margin: .25rem 0 1.25rem !important;
  background: var(--paper-2); border-radius: 14px;
  font-style: italic;
}
.clara-line img { width: 44px; height: 44px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--paper-3); }
.closing { font-style: italic; margin: 1.5rem 0 0 !important; }
.letter-body .signature { margin-bottom: .5rem; }

/* ---------------------------------------------------------------- detalles */
.section-title {
  display: flex; align-items: center; gap: .8rem;
  font: 600 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--terra-ink);
  margin-bottom: .4rem;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.details { margin: 2.5rem 0 2.5rem; }
.details dl { margin: 0; }
.details dl > div {
  display: grid; grid-template-columns: 5.9rem 1fr; gap: .75rem;
  padding: .95rem 0; border-bottom: 1px solid var(--rule);
}
.details dt { font: 500 .8rem/1.5 var(--sans); color: var(--ink-2); padding-top: .12rem; }
.details dd { margin: 0; font-size: 1.02rem; line-height: 1.5; min-width: 0; }
.details dd small { display: block; font: 400 .84rem/1.45 var(--sans); color: var(--ink-2); margin-top: .3rem; }
.local-note { display: none !important; }
[data-local-time="true"] .local-note { display: block !important; }
.includes { list-style: none; display: grid; gap: .45rem; }
.includes li { position: relative; padding-left: 1.1rem; }
.includes li::before {
  content: ""; position: absolute; left: 0; top: .66em; width: .42rem; height: .42rem;
  border-radius: 50%; border: 1.5px solid var(--terra-ink);
}

/* ---------------------------------------------------------------- reserva */
.rsvp {
  position: relative; text-align: center;
  background: var(--paper-3); border: 1px solid var(--rule-strong); border-radius: 4px;
  padding: 1.9rem 1.25rem 1.5rem; margin: 0 0 2.75rem;
  box-shadow: 0 18px 30px -24px rgb(39 30 24 / .6);
  scroll-margin-top: 1rem;
}
.rsvp::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid var(--rule); border-radius: 2px; pointer-events: none;
}
.rsvp > * { position: relative; }
.rsvp-title { font: 500 1.9rem/1.1 var(--serif); letter-spacing: -.02em; margin-bottom: .5rem; }
.rsvp-lead { font: 400 1rem/1.5 var(--serif); color: var(--ink-2); margin: 0 auto 1.25rem; max-width: 22rem; }
.rsvp .guarantee { display: block; margin: 1.1rem auto 0; max-width: 21rem; }
.rsvp .guarantee-icon { display: inline-block; vertical-align: -.3em; margin-right: .3rem; }
.pay { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem; margin-top: .9rem; font: 400 .8rem/1.4 var(--sans); color: var(--ink-2); }
.pay-label { margin-right: .1rem; }
.pay-mark {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 .55rem;
  border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--paper);
  font: 600 .76rem/1 var(--sans); color: var(--ink); letter-spacing: -.005em;
}
.age { font: 400 .8rem/1.4 var(--sans); color: var(--ink-2); margin-top: .7rem; }

/* ---------------------------------------------------------------- preguntas */
.faq { margin-bottom: 1rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 52px; padding: .7rem 0; font: 500 1.02rem/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  font: 300 1.35rem/1 var(--sans); color: var(--terra-ink); transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2.5rem 1rem 0; color: var(--ink-2); font-size: 1rem; }

/* ---------------------------------------------------------------- colofón */
.colophon {
  max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto;
  padding: 2.25rem var(--gutter) calc(6.5rem + env(safe-area-inset-bottom));
  text-align: center; border-top: 1px solid var(--rule);
}
.colophon-mark {
  display: inline-block; font: 700 .95rem/1 var(--sans); letter-spacing: .08em; color: var(--ink);
  padding: .45rem .65rem; border: 1.5px solid var(--ink); border-radius: 6px; margin-bottom: 1rem;
}
.colophon-title { font: italic 500 1.15rem/1.35 var(--serif); margin-bottom: .4rem; }
.colophon-text { font: 400 .9rem/1.55 var(--sans); color: var(--ink-2); max-width: 24rem; margin: 0 auto 1.25rem; }
.colophon-links { font: 400 .8rem/1.6 var(--sans); color: var(--ink-2); }

/* ---------------------------------------------------------------- barra de reserva */
.buybar {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .55rem var(--gutter) calc(.55rem + env(safe-area-inset-bottom));
  background: rgb(245 238 227 / .94); border-top: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  transition: transform .3s var(--ease), opacity .3s ease;
}
.buybar[data-state="hidden"] { transform: translateY(110%); opacity: 0; pointer-events: none; }
.buybar-when { font: 500 .82rem/1.3 var(--sans); color: var(--ink); min-width: 0; }
.buybar-when::first-letter { text-transform: uppercase; }
.buybar-zone { display: block; font-weight: 400; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar .btn { flex: none; }

@media (max-width: 370px) {
  :root { --gutter: 16px; }
  .buybar .btn { padding-inline: .85rem; font-size: .9rem; }
  .details dl > div { grid-template-columns: 5.6rem 1fr; gap: .7rem; }
}

/* ---------------------------------------------------------------- compra (hoja) */
.purchase-page { max-width: 560px; margin: 0 auto; padding: 1rem 0 3rem; }
.purchase-page .sheet { padding-top: 1rem; }
.purchase-page .sheet-close, .purchase-page .sheet-grip { display: none; }
.buy-form .pay-buttons { display: grid; gap: .6rem; margin: 1.25rem 0 1rem; }
.pay-buttons:has(.btn-wallet) .btn-card { background: transparent; color: var(--ink); border-color: var(--rule-strong); box-shadow: none; }
.sim-note { font: 400 .8rem/1.45 var(--sans); color: var(--ink-2); margin-top: .6rem; }
.sim-inline { display: block; font: 400 .78rem/1.4 var(--sans); color: var(--ink-2); margin-top: .2rem; }

/* ---------------------------------------------------------------- la entrada impresa */
.confirmation .sheet-head h2:focus { outline: none; }
.ticket {
  position: relative; background: var(--paper-3); border: 1px solid var(--rule-strong); border-radius: 4px;
  padding: 8px; margin: 0 0 1.25rem;
  box-shadow: 0 1px 2px rgb(39 30 24 / .08), 0 22px 34px -26px rgb(39 30 24 / .7);
}
.ticket-frame { border: 1px solid var(--rule); border-radius: 2px; padding: 1.4rem 1.1rem 1.1rem; }
.ticket-kicker { text-align: center; font: 600 .68rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--terra-ink); }
.ticket-invites { text-align: center; font: italic 400 1rem/1.4 var(--serif); color: var(--ink-2); margin-top: .9rem; }
.ticket-title { text-align: center; font: 500 1.7rem/1.1 var(--serif); letter-spacing: -.02em; margin-top: .3rem; }
.ticket-ornament { text-align: center; color: var(--terra-ink); font-size: .9rem; margin: .7rem 0 .4rem; }
.ticket-data { margin: 0; }
.ticket-data > div { padding: .7rem 0; border-top: 1px solid var(--rule); }
.ticket-data dt { font: 500 .74rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .2rem; }
.ticket-data dd { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.ticket-link { display: block; font: 400 .82rem/1.45 var(--sans); margin-bottom: .2rem; }
.ticket-data .btn-quiet { margin-left: -.6rem; }
.ticket-data .help { display: block; }
.ticket-note { border-top: 1px solid var(--rule); padding-top: .9rem; }
.ticket-note p:first-child { font: italic 400 1.05rem/1.45 var(--serif); }
.ticket-actions { display: grid; gap: .6rem; }
.reminder { font: 400 .86rem/1.5 var(--sans); color: var(--ink-2); text-align: center; margin-top: .9rem; }
.details .price { font-weight: 600; }
