/* Boda Banellye + David — invitation styles.
   Ported from boda-banellye-david/invitacion/Main.dc.html (390px artboard),
   made fluid and centered at max-width 430px. */

:root {
  --paper: #F2EEE6;
  --ink: #141311;
  --accent: #6B1E2B;
  --muted: #5A5248;
  --muted-soft: #7A7166;
  --body-serif: #2A2925;
  --card: #EEE8DE;
  --card-border: #D5C9B7;
  --icon-bg: #E4DBCE;
  --icon-border: #CDBFAB;
  --serif: 'Newsreader', 'Times New Roman', Georgia, serif;
  --mono: 'DM Mono', ui-monospace, monospace;
  --sans: 'Instrument Sans', 'Helvetica Neue', Helvetica, sans-serif;
}

* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #E6DFD3;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
a:hover { color: #3a3833; }
input, textarea, button { font-family: inherit; }
input::placeholder, textarea::placeholder {
  color: #8A857A; font-family: var(--serif); font-style: italic; font-size: 15px; font-weight: 400; opacity: 1;
}
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; white-space: nowrap;
}

/* Animations */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .3s; } .d3 { animation-delay: .5s; } .d4 { animation-delay: .8s; }
@keyframes tick { to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: 0; } }
.caret {
  display: inline-block; width: 2px; height: 0.78em; margin-left: 4px; background: currentColor;
  vertical-align: -0.04em; animation: blink 1s steps(1) infinite;
}
.ticker { display: flex; width: max-content; animation: tick 32s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .rise, .ticker { animation: none; }
  html { scroll-behavior: auto; }
}

/* Page shell */
.page {
  width: 100%; max-width: 430px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; background: var(--paper); color: var(--ink); overflow: hidden;
}
@media (min-width: 470px) {
  .page { box-shadow: 0 0 0 1px #D9CFC0, 0 30px 80px rgba(20, 19, 17, 0.08); }
}

/* Shared type */
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.accent { color: var(--accent); }
.eyebrow { display: flex; justify-content: space-between; }
.h2-italic {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px;
  line-height: 1.2; letter-spacing: -0.01em;
}
.h2-display { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1; letter-spacing: -0.02em; }

/* Hero */
.topbar {
  margin: 18px 24px 0; display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--ink);
}
.hero { padding: 72px 24px 32px; display: flex; flex-direction: column; gap: 40px; }
.hero h1 {
  margin: 0; font-family: var(--serif); font-optical-sizing: auto; font-weight: 300;
  font-size: clamp(44px, 15.4vw, 60px); line-height: 0.96; letter-spacing: -0.04em;
  display: flex; flex-direction: column;
}
.hero h1 .line { display: block; min-height: 0.96em; white-space: nowrap; }
.hero h1 em { font-weight: 400; }
html.js .hero h1[data-tw]:not(.tw-ready) { visibility: hidden; }
.names {
  display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--ink);
}
.names span { font-size: 15px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
.hero figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hero img {
  display: block; width: 100%; aspect-ratio: 342 / 456; height: auto; object-fit: cover;
  object-position: 50% 50%; background: #1A1917;
}
.hero figcaption { display: flex; justify-content: flex-end; color: #5E5A52; }

/* Ticker */
.ticker-band {
  height: 64px; background: var(--ink); color: var(--paper); display: flex; align-items: center; overflow: hidden;
}
.ticker { gap: 20px; font-family: var(--serif); font-style: italic; font-size: 26px; white-space: nowrap; }

/* 01 La nota */
.nota { padding: 80px 32px 40px; display: flex; flex-direction: column; gap: 20px; }
.nota h2 { padding: 12px 0 4px; }
.nota p { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 17px; line-height: 1.4; color: var(--body-serif); }
.nota p em { font-weight: 400; color: var(--accent); }

/* 02 La fecha */
.fecha {
  padding: 40px 24px; display: flex; flex-direction: column; gap: 24px;
  background: linear-gradient(180deg, #F2EEE6 0%, #E9E1D4 55%, #DFD4C3 100%);
}
.date-card {
  display: flex; flex-direction: column; gap: 22px; padding: 28px 20px 22px; background: #F5F1EA; border: 1px solid var(--card-border);
}
.date-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: end; padding: 8px 12px 4px;
}
.date-day {
  font-family: var(--serif); font-size: clamp(96px, 32vw, 128px); line-height: 0.8; letter-spacing: -0.05em; white-space: nowrap;
}
.date-meta { display: flex; flex-direction: column; gap: 4px; padding-bottom: 4px; min-width: 0; }
.date-meta .big { font-family: var(--serif); font-size: clamp(22px, 6.7vw, 26px); line-height: 1; }
.date-meta .mono { color: var(--muted); padding-top: 6px; }
.rule { height: 1px; background: #DDD2C2; }
.faltan { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); text-align: center; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.countdown > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.countdown > div + div { border-left: 1px solid #DDD2C2; }
.countdown .n { font-family: var(--serif); font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown .n.sec { font-style: italic; color: var(--accent); }
.countdown .l { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* 03 Itinerario */
.itinerario { padding: 48px 24px 72px; display: flex; flex-direction: column; gap: 32px; background: #DFD4C3; }
.timeline { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; }
.step-rail { display: flex; flex-direction: column; align-items: center; }
.step-rail .stem { width: 1px; flex-grow: 1; min-height: 24px; background: #C4B5A0; }
.step-icon {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid #C4B5A0; background: #EBE3D7;
  display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0;
}
.step-body { padding: 12px 0 36px; display: flex; flex-direction: column; gap: 4px; }
.step:last-child .step-body { padding-bottom: 0; }
.step-time { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; color: var(--accent); }
.step-title { font-family: var(--serif); font-weight: 300; font-size: 24px; line-height: 1.15; letter-spacing: -0.015em; color: var(--ink); }

/* Photo bands */
.band { margin: 0; position: relative; overflow: hidden; background: #1A1917; }
.band img { display: block; width: 100%; aspect-ratio: 390 / 480; height: auto; object-fit: cover; }
.band figcaption {
  position: absolute; left: 24px; right: 24px; bottom: 16px; display: flex; justify-content: flex-end;
  color: var(--paper); text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.band.venue { background: #D8CCBA; }

/* 04 Los detalles */
.detalles { padding: 72px 24px 32px; display: flex; flex-direction: column; gap: 28px; background: var(--card); }
.detalles .h2-display { font-size: 48px; }
.detail {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; align-items: start;
  padding: 20px 0; border-top: 1px solid var(--icon-border);
}
.detail:last-child { padding-bottom: 0; }
.icon-circle {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--icon-border); background: var(--icon-bg);
  display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0;
}
.icon-circle.sm { width: 40px; height: 40px; }
.detail-body { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.detail-body .mono { color: var(--muted); }
.detail-body .big { font-family: var(--serif); font-size: 26px; line-height: 1.15; }
.detail-body .txt { font-size: 15px; }
.detail-body .txt.muted { color: var(--muted); }
.link-action {
  height: 44px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  color: var(--accent); text-decoration: none; align-self: flex-start;
}
.link-action:hover { color: #4f1520; }

/* 05 RSVP — informational cards; guests confirm in the WhatsApp chat */
.rsvp { padding: 72px 24px 80px; display: flex; flex-direction: column; gap: 24px; background: #E6DDCF; }
.rsvp .h2-display { font-size: 56px; }
.card {
  display: flex; flex-direction: column; gap: 18px; padding: 20px; background: var(--card); border: 1px solid var(--card-border);
}
.card-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 14px; align-items: center; }
.card-title { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.1; letter-spacing: -0.01em; }
.card-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--accent); }
.card-num.upper { text-transform: uppercase; }

.info-copy { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.info-copy strong { font-weight: 600; color: var(--ink); }
.info-copy em { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted-soft); }
.card.gifts { gap: 6px; padding: 14px 16px 8px; }
.card.gifts .info-copy { margin-top: 4px; }
.card.gifts .link-action { height: 36px; }

/* Footer */
.cierre {
  flex-grow: 1; padding: 80px 24px 32px; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.cierre-photo {
  display: block; width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: cover;
  object-position: 50% 55%; background: #1A1917;
}
.cierre .big { margin: 0; font-family: var(--serif); font-size: clamp(52px, 16.4vw, 64px); line-height: 0.95; letter-spacing: -0.03em; }
.cierre .sig { font-family: var(--serif); font-style: italic; font-size: 28px; }
.cierre-bar {
  display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #4A4841; color: #BDB7AA;
}
.cierre-bar a { height: 44px; display: flex; align-items: center; gap: 6px; color: var(--paper); text-decoration: none; }
