/* Josefina & Tomás — sitio de ejemplo tradicional */
:root {
  --ivory: #FAF7F0;
  --paper: #F3EEE3;
  --sage: #6E7F63;
  --forest: #2F3B2C;
  --gold: #A88550;
  --ink: #2B2A26;
  --muted: #6F6A60;
  --line: #DDD5C5;

  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --script: "Pinyon Script", cursive;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}
.title { font-weight: 400; font-size: clamp(36px, 5vw, 60px); line-height: 1.1; margin-top: 10px; }
.lead { color: var(--muted); max-width: 46ch; margin: 18px auto 0; font-size: 21px; }
.names { font-family: var(--script); font-weight: 400; line-height: 1.1; }
.names span { font-family: var(--serif); font-style: italic; font-size: .55em; vertical-align: .25em; margin: 0 .1em; }
.orn { display: block; width: 200px; height: 34px; margin: 0 auto; color: var(--gold); }

/* Botones */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 24px;
  border: 1px solid var(--sage);
  background: transparent;
  color: var(--forest);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover, .btn--solid { background: var(--sage); color: var(--ivory); }
.btn--solid:hover { background: var(--forest); border-color: var(--forest); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Barra superior */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  color: var(--ivory);
  transition: background .3s, color .3s, padding .3s, box-shadow .3s;
}
.topbar.is-solid { background: rgba(250, 247, 240, .96); color: var(--forest); padding-block: 12px; box-shadow: 0 1px 0 var(--line); }
.monogram { font-family: var(--serif); font-size: 26px; letter-spacing: .06em; text-decoration: none; }
.monogram span { font-style: italic; color: var(--gold); }
.menu { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.menu a { text-decoration: none; }
.menu a:hover { color: var(--gold); }
.menu__cta { border: 1px solid currentColor; padding: 10px 16px; }

/* Portada */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; display: grid; place-items: center; text-align: center; color: var(--ivory); overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% center; animation: slowzoom 18s ease-out both; }
@keyframes slowzoom { from { transform: scale(1.08); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(30, 28, 22, .35), rgba(30, 28, 22, .2) 40%, rgba(30, 28, 22, .55)); }
.hero__content { position: relative; z-index: 1; padding: 0 var(--gutter); }
.hero .eyebrow { color: var(--ivory); }
.hero .names { font-size: clamp(64px, 11vw, 150px); margin: 12px 0 8px; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.hero__date { font-variant-numeric: lining-nums; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: .04em; }
.hero__place { font-family: var(--sans); font-size: 12px; letter-spacing: .32em; text-transform: uppercase; margin-top: 8px; }
.hero__scroll { position: absolute; bottom: 32px; left: 50%; z-index: 1; width: 1px; height: 56px; background: rgba(250, 247, 240, .7); transform: translateX(-50%); }
.hero__scroll::after { content: ""; position: absolute; left: -3px; top: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ivory); animation: drop 2.2s ease-in-out infinite; }
@keyframes drop { 0% { top: 0; opacity: 0; } 30% { opacity: 1; } 100% { top: 50px; opacity: 0; } }

/* Secciones */
.section { padding: clamp(80px, 11vw, 160px) var(--gutter); }
.section__head { text-align: center; margin-bottom: clamp(48px, 7vw, 96px); }

/* Invitación */
.invite { text-align: center; max-width: 900px; margin: 0 auto; }
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 40px 0 32px; font-size: 21px; }
.invite__text { color: var(--muted); font-size: 21px; font-style: italic; }
.invite__names { font-family: var(--script); font-size: clamp(56px, 8vw, 96px); color: var(--forest); line-height: 1.2; margin: 18px 0; }
.invite__names span { font-family: var(--serif); font-style: italic; font-size: .5em; color: var(--gold); }
.invite .orn:last-of-type { margin-top: 40px; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 560px; margin: 56px auto 0; border-block: 1px solid var(--line); }
.countdown div { padding: 20px 8px; }
.countdown div + div { border-left: 1px solid var(--line); }
.countdown b { display: block; font-weight: 400; font-size: clamp(36px, 5vw, 54px); line-height: 1; color: var(--forest); font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-family: var(--sans); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* Historia */
.story { background: var(--paper); }
.chapter { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1180px; margin: 0 auto; }
.chapter + .chapter { margin-top: clamp(64px, 9vw, 128px); }
.chapter--alt .chapter__photo { order: 2; }
.chapter__photo { margin: 0; position: relative; }
.chapter__photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--gold); z-index: 0; }
.chapter--alt .chapter__photo::before { inset: 14px 14px -14px -14px; }
.chapter__photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; cursor: zoom-in; }
.chapter__photo--tall img { aspect-ratio: 4 / 5; object-position: center 30%; }
.chapter__year { font-family: var(--sans); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.chapter h3 { font-weight: 400; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; margin-bottom: 16px; }
.chapter__text p:last-child { color: var(--muted); font-size: 21px; }

/* Celebración */
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1000px; margin: 0 auto; }
.event { text-align: center; border: 1px solid var(--line); padding: clamp(32px, 5vw, 56px) 24px; position: relative; background: var(--ivory); }
.event::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); pointer-events: none; }
.event__icon { width: 52px; height: 52px; color: var(--sage); margin: 0 auto 16px; display: block; }
.event__time { font-variant-numeric: lining-nums; font-size: 44px; color: var(--forest); line-height: 1.2; margin-top: 8px; }
.event h3 { font-weight: 500; font-size: 28px; margin-top: 4px; }
.event__address { color: var(--muted); font-style: italic; }
.event__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; position: relative; }

.dresscode { text-align: center; margin: clamp(56px, 8vw, 96px) auto 0; max-width: 560px; }
.dresscode__title { font-family: var(--script); font-size: 64px; color: var(--forest); line-height: 1.3; }
.dresscode p:last-child { color: var(--muted); }

/* Frase */
.quote { position: relative; min-height: 70vh; display: grid; place-items: center; text-align: center; color: var(--ivory); overflow: hidden; }
.quote img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quote::after { content: ""; position: absolute; inset: 0; background: rgba(36, 44, 34, .55); }
.quote blockquote { position: relative; z-index: 1; margin: 0; padding: 80px var(--gutter); max-width: 900px; }
.quote p { font-style: italic; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.3; }
.quote cite { display: block; margin-top: 20px; font-style: normal; font-family: var(--sans); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }

/* Regalos */
.gift-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1000px; margin: 0 auto; }
.gift-card { text-align: center; background: var(--paper); padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px); }
.gift-card h3 { font-weight: 500; font-size: 30px; margin-bottom: 8px; }
.gift-card > p { color: var(--muted); }
.gift-card__code { font-variant-numeric: lining-nums; font-size: 40px; letter-spacing: .12em; color: var(--forest) !important; margin: 4px 0 24px; }
.bank { margin: 12px 0 24px; text-align: left; }
.bank div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.bank dt { color: var(--muted); }
.bank dd { margin: 0; text-align: right; font-variant-numeric: lining-nums; }

/* Información */
.info { background: var(--paper); }
.info__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 4vw, 56px); max-width: 1180px; margin: 0 auto; }
.info h3 { font-weight: 500; font-size: 26px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--gold); }
.info p { color: var(--muted); font-size: 19px; }

/* Confirmar */
.form { max-width: 640px; margin: 0 auto; display: grid; gap: 28px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 8px 0;
  border-radius: 0;
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--sage); }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; border: 1px solid var(--line); padding: 10px 20px; cursor: pointer; font-size: 19px; transition: background .15s, border-color .15s; }
.choice input:checked + span { background: var(--sage); border-color: var(--sage); color: var(--ivory); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.if-yes { display: grid; gap: 28px; }
.if-yes[hidden] { display: none; }
.form .btn { justify-self: center; padding-inline: 40px; }
.form__status { text-align: center; color: var(--sage); min-height: 1.6em; font-style: italic; }

/* Pie */
.footer { text-align: center; padding: clamp(72px, 10vw, 128px) var(--gutter) 48px; background: var(--forest); color: var(--ivory); }
.footer .orn { color: var(--gold); }
.names--footer { font-size: clamp(56px, 8vw, 96px); margin: 16px 0 8px; }
.footer__note { margin-top: 48px; font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .5; }

/* Visor de fotos */
.lightbox { position: fixed; inset: 0; z-index: 30; background: rgba(30, 28, 22, .92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; }

/* Aparición al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Celular */
@media (max-width: 900px) {
  .menu a:not(.menu__cta) { display: none; }
  .info__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 19px; }
  .parents { grid-template-columns: 1fr; gap: 12px; }
  .chapter, .events, .gift-cards, .info__grid { grid-template-columns: 1fr; }
  .chapter--alt .chapter__photo { order: 0; }
  .hero__img { object-position: 22% center; }
  .invite__text br { display: none; }
  .chapter__photo::before { inset: 10px -10px -10px 10px !important; }
  .countdown b { font-size: 32px; }
  .countdown span { font-size: 9px; letter-spacing: .14em; }
  .menu__cta { padding: 8px 12px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__img, .hero__scroll::after { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
