/* ===========================================================
   John & Dome · Boda — EvoWEB
   Marca: verde salvia #526750 · crema #e9ddcc · marrón/dorado #643e00
   =========================================================== */
:root {
  /* --- Colores de marca --- */
  --sage-deep: #526750;   /* verde salvia profundo: nombres, títulos, acentos */
  --sage: #6a7d63;        /* verde medio: bordes y secundarios */
  --sage-soft: #aebf95;   /* verde claro: hojas / ilustración */
  --cream: #e9ddcc;       /* crema cálido: fondo papel */
  --cream-deep: #e0d2ba;  /* crema más profundo: bandas */
  --ivory: #f5eee0;       /* crema claro: tarjetas */
  --brown: #643e00;       /* marrón/dorado oscuro: fechas y detalles */
  --terracotta: #643e00;  /* acento principal (= marrón de marca) */
  --terracotta-soft: #d79a78; /* solo ilustración (techos acuarela) */
  --clay: #8a5a1f;
  --gold: #b9974f;        /* dorado del marco y filigranas */
  --sky: #a9c4d4;
  --ink: #3f4636;         /* texto principal */
  --muted: #837d6c;       /* texto suave */
  --shadow: 0 18px 40px -22px rgba(63, 70, 54, .45);
  --display: "TT Ramillas Trial Variable", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --script: "Pinyon Script", "Great Vibes", "Brush Script MT", cursive;
  --sans: "Jost", "Montserrat", system-ui, sans-serif;
}

/* ---------- Disposición del nombre (caligrafía) ---------- */
.names {
  font-family: var(--script);
  color: var(--sage-deep);
  line-height: .9;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .1em;
}
.names__a, .names__b { font-size: 1em; }
.names__b { margin-top: .28em; }            /* "Dome" cae un poco, como en el arte */
.names__amp {
  font-size: 1.15em;
  color: var(--brown);
  margin: 0 .04em;
  align-self: center;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container { width: min(1120px, 92%); margin-inline: auto; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .72rem;
  color: var(--sage-deep);
  font-weight: 500;
}

.script { font-family: var(--script); color: var(--sage-deep); line-height: 1; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin: .3rem 0 .6rem; }
.section-head p { color: var(--muted); }

.divider {
  width: 90px; height: 26px; margin: 1rem auto 0;
  background-repeat: no-repeat; background-position: center;
}

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 248, 242, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(138, 154, 107, .18);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 0;
}
.nav__brand { font-family: var(--script); font-size: 1.9rem; color: var(--sage-deep); text-decoration: none; }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a {
  text-decoration: none; color: var(--ink);
  text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 500;
  transition: color .2s;
}
.nav__links a:hover { color: var(--terracotta); }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--cream); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: clamp(420px, 70vh, 640px);
  padding: 14px;
}
.hero__img { position: relative; overflow: hidden; border-radius: 6px; box-shadow: var(--shadow); }
.hero__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.hero__img:hover img { transform: scale(1.06); }
.hero__img--main { grid-row: 1 / span 2; }
.hero__img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(63,70,54,0) 55%, rgba(63,70,54,.28));
}
.hero__overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; pointer-events: none;
}
.hero__card {
  background: rgba(251, 248, 242, .9);
  border: 1px solid rgba(196, 164, 100, .5);
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(2rem, 6vw, 4rem);
  border-radius: 4px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
}
.hero__card .eyebrow { display: block; margin-bottom: .4rem; }
.hero__names { font-family: var(--script); font-size: clamp(3rem, 9vw, 5.5rem); color: var(--sage-deep); }
.hero__date { letter-spacing: .35em; text-transform: uppercase; font-size: .85rem; color: var(--terracotta); margin-top: .4rem; }
@media (max-width: 720px) {
  .hero__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 1.3fr 1fr; height: 78vh; }
  .hero__img--main { grid-row: 1 / span 1; grid-column: 1 / span 2; }
}

/* ---------- Historia / timeline ---------- */
.story { background: var(--ivory); }
.timeline { position: relative; max-width: 760px; margin: 0 auto; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--sage-soft), var(--terracotta-soft));
  transform: translateX(-50%);
}
.milestone { position: relative; width: 50%; padding: 1.4rem 2.4rem; }
.milestone:nth-child(odd) { left: 0; text-align: right; }
.milestone:nth-child(even) { left: 50%; text-align: left; }
.milestone__dot {
  position: absolute; top: 1.9rem; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ivory); border: 3px solid var(--terracotta);
}
.milestone:nth-child(odd) .milestone__dot { right: -8px; }
.milestone:nth-child(even) .milestone__dot { left: -8px; }
.milestone__year { font-family: var(--serif); font-size: 1.9rem; color: var(--terracotta); font-weight: 700; }
.milestone__title { font-family: var(--serif); font-size: 1.25rem; margin: .1rem 0 .3rem; }
.milestone__text { color: var(--muted); font-size: .94rem; }
@media (max-width: 640px) {
  .timeline::before { left: 12px; }
  .milestone, .milestone:nth-child(even) { width: 100%; left: 0; text-align: left; padding-left: 2.8rem; padding-right: 0; }
  .milestone:nth-child(odd) { text-align: left; }
  .milestone:nth-child(odd) .milestone__dot,
  .milestone:nth-child(even) .milestone__dot { left: 5px; right: auto; }
}

/* ---------- Información (iglesia / recepción) ---------- */
.info { background: var(--cream); }
.info__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.2rem); }
@media (max-width: 760px) { .info__grid { grid-template-columns: 1fr; } }
.info__card {
  background: var(--ivory);
  border: 1px solid rgba(138, 154, 107, .25);
  border-radius: 8px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: var(--shadow);
  text-align: center;
}
.info__icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--cream-deep); color: var(--sage-deep);
}
.info__icon svg { width: 32px; height: 32px; }
.info__card h3 { font-size: 1.6rem; margin-bottom: .2rem; }
.info__kicker { color: var(--terracotta); text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; margin-bottom: 1rem; }
.info__row { display: flex; gap: .7rem; align-items: flex-start; justify-content: center; text-align: left; margin: .55rem 0; }
.info__row svg { width: 18px; height: 18px; flex: none; margin-top: .25rem; color: var(--sage-deep); }
.info__row b { display: block; font-family: var(--serif); font-size: 1.05rem; }
.info__row span { color: var(--muted); font-size: .9rem; }
.info__btn {
  display: inline-block; margin-top: 1.3rem;
  text-decoration: none; color: var(--ink);
  border: 1px solid var(--sage); border-radius: 50px;
  padding: .55rem 1.6rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  transition: all .25s;
}
.info__btn:hover { background: var(--sage); color: #fff; }

/* ---------- Countdown ---------- */
.countdown { display: flex; justify-content: center; gap: clamp(1rem, 5vw, 3rem); margin-top: 2.5rem; }
.countdown__cell { text-align: center; }
.countdown__num { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3.2rem); color: var(--terracotta); font-weight: 700; line-height: 1; }
.countdown__lbl { text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; color: var(--muted); }

/* ---------- Mensaje & familias ---------- */
.invite { background: var(--cream); }
.lead { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 3.2vw, 1.7rem); color: var(--sage-deep); max-width: 42ch; margin: 0 auto 1.4rem; line-height: 1.4; }
.message { max-width: 56ch; margin: 0 auto; }
.message p { color: var(--muted); margin-bottom: 1rem; }
.families { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 4vw, 2.6rem); max-width: 760px; margin: 2.6rem auto 0; }
@media (max-width: 640px) { .families { grid-template-columns: 1fr; } }
.family { text-align: center; }
.family__role { display: block; text-transform: uppercase; letter-spacing: .22em; font-size: .68rem; color: var(--terracotta); margin-bottom: .7rem; }
.family__couple { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); line-height: 1.6; }
.family__amp { color: var(--sage); font-style: italic; }

/* ---------- Dress code & indicaciones ---------- */
.dress { display: flex; justify-content: center; gap: clamp(1.5rem, 6vw, 4rem); flex-wrap: wrap; margin-bottom: 2.4rem; }
.dress__col { text-align: center; }
.dress__col span { display: block; text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; color: var(--terracotta); margin-bottom: .3rem; }
.dress__col b { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); font-weight: 600; }
.notes { max-width: 620px; margin: 0 auto; display: grid; gap: 1rem; text-align: left; }
.notes li { list-style: none; display: grid; grid-template-columns: 1.8rem 1fr; gap: .7rem; color: var(--ink); font-size: .95rem; line-height: 1.6; }
.notes li span { font-size: 1.2rem; line-height: 1.3; }

/* ---------- Confirmación / sobre ---------- */
.rsvp { background: var(--cream-deep); text-align: center; }
.rsvp__text { max-width: 48ch; margin: 0 auto 1.6rem; color: var(--muted); }
.rsvp__text strong { color: var(--ink); }
.btn-cta { display: inline-block; text-decoration: none; background: var(--sage-deep); color: #fff; padding: .9rem 2.6rem; border-radius: 50px; letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; transition: background .25s, transform .2s; }
.btn-cta:hover { background: var(--terracotta); transform: translateY(-2px); }

/* ---------- Acceso por invitación (gate) ---------- */
.jd-gate { display: none; }
html.jd-locked body > *:not(.jd-gate) { display: none !important; }
html.jd-locked .jd-gate {
  display: flex; min-height: 100vh; align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
  background:
    radial-gradient(circle at 20% 10%, rgba(174, 191, 149, .18), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(193, 122, 84, .12), transparent 45%),
    var(--cream);
}
.jd-gate__card {
  max-width: 420px; background: var(--ivory);
  border: 1px solid rgba(185, 151, 79, .55); border-radius: 10px;
  padding: 2.6rem 2rem; box-shadow: var(--shadow);
}
.jd-gate__names { font-family: var(--script); font-size: 3.2rem; color: var(--sage-deep); line-height: 1; }
.jd-gate__title { text-transform: uppercase; letter-spacing: .26em; font-size: .72rem; color: var(--terracotta); margin: 1rem 0 .6rem; }
.jd-gate__text { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.jd-gate__icon { color: var(--sage); width: 34px; height: 34px; margin: 0 auto .6rem; display: block; }

/* ---------- Footer ---------- */
.foot { background: var(--sage-deep); color: #f3efe4; text-align: center; padding: 3rem 0; }
.foot__names { font-family: var(--script); font-size: 2.6rem; color: #fff; }
.foot__date { letter-spacing: .3em; text-transform: uppercase; font-size: .8rem; margin: .4rem 0 1rem; opacity: .85; }
.foot small { display: block; opacity: .7; margin-top: 1rem; font-size: .75rem; }
.foot a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
