/* ============================================================
   Sofía & Diego — Invitación de Matrimonio
   Estética: minimalismo editorial cálido (paleta cañón, aireada)
   ============================================================ */

:root {
  --bone:      #F5F0E6;   /* fondo página */
  --bone-2:    #FBF8F2;   /* bandas / blanco cálido */
  --cream:     #EBE2D2;
  --sand:      #E6D4B8;
  --clay:      #BF6A43;   /* terracota — acento (uso sobrio) */
  --clay-deep: #9B4A2A;
  --rust:      #6F3320;
  --ink:       #332C25;   /* texto casi negro cálido */
  --ink-soft:  #877B6D;   /* texto secundario */
  --sage:      #767551;
  --rose:      #C9988A;
  --line:      rgba(51,44,37,.16);
  --line-soft: rgba(51,44,37,.08);

  --ff-display: "Fraunces", Georgia, serif;
  --ff-body:    "Hanken Grotesk", system-ui, sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow: 0 24px 60px -28px rgba(43,34,27,.4);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  background: var(--bone);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5;
      stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------- Shared bits ---------- */
.eyebrow {
  font-size: .72rem; letter-spacing: .34em; text-transform: uppercase;
  font-weight: 500; color: var(--clay);
}
.eyebrow.center { display: block; text-align: center; }
.muted { color: var(--ink-soft); }
.amp { font-family: var(--ff-body); font-style: normal; font-weight: 400; color: var(--clay); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem; cursor: pointer;
  font-family: var(--ff-body); font-size: .9rem; font-weight: 500;
  letter-spacing: .04em; padding: .9rem 1.6rem; border-radius: 100px;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  border: 1px solid transparent;
}
.btn .ic { font-size: 1.05rem; }
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--clay-deep); color: var(--bone-2); box-shadow: 0 14px 30px -16px rgba(155,74,42,.7); }
.btn--solid:hover { background: var(--rust); box-shadow: 0 18px 36px -16px rgba(111,51,32,.8); }
.btn--outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); background: rgba(51,44,37,.04); }
.btn--lg { padding: 1.05rem 2.2rem; font-size: .98rem; }

/* ---------- Monogram (usado en confirmar.html) ---------- */
.monogram {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-display); font-size: 1.5rem; letter-spacing: .1em;
}
.monogram__amp { width: 34px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; opacity: .85; }

/* ============================================================
   HERO (centrado: nombres | foto)
   ============================================================ */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100svh; background: var(--bone); text-align: center;
  padding: clamp(2.4rem,6vw,3.6rem) clamp(1.5rem,5vw,2.5rem) clamp(3rem,7vw,4.5rem);
}
.hero__brand {
  font-family: var(--ff-display); font-weight: 400;
  font-size: 1.1rem; letter-spacing: .42em; text-align: center; color: var(--ink);
  margin-bottom: clamp(2rem,5vw,3.2rem);
}
.hero__brand .amp { font-family: var(--ff-display); letter-spacing: 0; }

.hero__center { text-align: center; }
.hero__kicker {
  font-size: .72rem; letter-spacing: .42em; text-transform: uppercase;
  color: var(--clay); margin-bottom: 1.7rem; font-weight: 500;
}
.hero__names { display: flex; flex-direction: column; align-items: center; line-height: .9; }
.hero__names .n {
  font-family: var(--ff-display); font-weight: 300; font-optical-sizing: auto;
  font-size: clamp(3.2rem, 6.4vw, 6rem); letter-spacing: -.022em; color: var(--ink);
}
.amp--xl {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem); color: var(--clay);
  margin: .22em 0; font-weight: 400;
}
.hero__meta {
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  flex-wrap: wrap; margin-top: 2.1rem; font-size: .9rem; color: var(--ink-soft);
  letter-spacing: .02em;
}
.hero__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--clay); }
.hero__loc {
  margin-top: .75rem; font-size: .74rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--ink-soft);
}
.hero__photo {
  width: min(92vw, 900px); margin: clamp(2.6rem,6vw,3.8rem) auto 0;
  padding: 6px; background: var(--cream); border: 1px solid var(--line);
  border-radius: 14px;
}
.hero__photo img {
  display: block; width: 100%; height: auto;
  border-radius: 9px;
}

/* ============================================================
   INVITACIÓN
   ============================================================ */
.intro {
  max-width: 700px; margin: 0 auto; text-align: center;
  padding: clamp(2.2rem,5vw,3.4rem) 1.5rem clamp(3.5rem,8vw,5.5rem);
  display: flex; flex-direction: column; align-items: center;
}
.intro__text {
  font-family: var(--ff-display); font-weight: 300; font-style: italic;
  font-size: clamp(1.45rem, 3.4vw, 2.15rem); line-height: 1.5; color: var(--ink);
  margin-top: 1.7rem; max-width: 22ch;
}
.intro__cta {
  margin-top: 1.9rem; font-size: .8rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--clay); font-weight: 500;
}

/* Countdown minimal */
.count {
  display: inline-flex; align-items: stretch; margin-top: 3.2rem;
  border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--bone-2);
}
.count__cell {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: 1.1rem clamp(.9rem,3.6vw,1.9rem); border-right: 1px solid var(--line);
}
.count__cell:last-child { border-right: 0; }
.count__cell b {
  font-family: var(--ff-display); font-weight: 300; font-variant-numeric: tabular-nums;
  font-size: clamp(1.7rem,4.2vw,2.4rem); line-height: 1; color: var(--ink);
}
.count__cell i {
  font-style: normal; font-size: .6rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ============================================================
   DETALLES
   ============================================================ */
.details {
  max-width: 600px; margin: 0 auto; text-align: center;
  padding: clamp(3rem,8vw,5rem) 1.5rem;
}
.details > .eyebrow { margin-bottom: 3rem; }
.detail__icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px;
  color: var(--clay); font-size: 1.55rem; margin-bottom: 1rem;
}
.detail h3 {
  font-family: var(--ff-display); font-weight: 400; font-size: 1.7rem;
  letter-spacing: -.01em; margin-bottom: .5rem;
}
.detail p { font-size: 1.02rem; }
.detail .muted { font-size: .95rem; }
.detail-sep { width: 42px; height: 1px; background: var(--line); margin: 2.7rem auto; }

.link-underline {
  display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.1rem;
  font-size: .85rem; letter-spacing: .04em; color: var(--clay-deep);
  border-bottom: 1px solid var(--line); padding-bottom: 3px;
  transition: gap .3s var(--ease), border-color .3s var(--ease);
}
.link-underline:hover { gap: .75rem; border-color: var(--clay-deep); }
.link-underline .ic { font-size: 1rem; }

/* ============================================================
   RSVP (banda blanca cálida)
   ============================================================ */
.rsvp {
  background: var(--bone-2); border-block: 1px solid var(--line-soft);
  text-align: center; padding: clamp(4rem,9vw,6rem) 1.5rem;
}
.rsvp > * { max-width: 600px; margin-inline: auto; }
.rsvp > .eyebrow { margin-bottom: 1.1rem; }
.rsvp__title {
  font-family: var(--ff-display); font-weight: 300;
  font-size: clamp(2.1rem,6.5vw,3.2rem); letter-spacing: -.02em;
}
.rsvp__sub { color: var(--ink-soft); margin-top: .8rem; font-size: 1.02rem; }
.rsvp__sub strong { color: var(--clay-deep); font-weight: 600; }
.rsvp__actions {
  display: flex; flex-direction: column; gap: .9rem; max-width: 380px; margin-top: 2.2rem;
}
.rsvp__actions .btn { justify-content: center; padding: 1.05rem 1.5rem; }

/* ============================================================
   NUESTRA FAMILIA (perros)
   ============================================================ */
.family {
  max-width: 820px; margin: 0 auto; text-align: center;
  padding: clamp(3.2rem,7vw,5rem) 1.5rem clamp(2.5rem,6vw,3.5rem);
}
.family__title {
  font-family: var(--ff-display); font-weight: 300;
  font-size: clamp(2.2rem,6.5vw,3.2rem); letter-spacing: -.02em; margin-top: .3rem;
}
.family__title .amp { color: var(--clay); }
.family__lead {
  color: var(--ink-soft); font-size: 1.04rem; line-height: 1.7;
  margin: 1rem auto 0; max-width: 36ch;
}
.dogs { display: flex; justify-content: center; gap: clamp(1.4rem,5vw,3rem); margin: 2.4rem 0 1.6rem; flex-wrap: wrap; }
.dog__ring {
  position: relative; display: block; width: clamp(150px,40vw,300px); aspect-ratio: 1; padding: 6px;
  border: 1px solid var(--line); border-radius: 20px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .3s var(--ease);
  animation: dogIdle 2.4s ease-in-out infinite;   /* balanceo permanente: invita a tocar */
}
.dog__ring::after {                                 /* halo pulsante estilo "tócame" */
  content: ""; position: absolute; inset: -4px; border-radius: 24px;
  border: 1.5px solid var(--clay); opacity: 0; pointer-events: none;
  animation: dogPulse 2.4s ease-out infinite;
}
.dog:nth-child(2) .dog__ring::after { animation-delay: -1.2s; }
.dog__ring:hover { border-color: var(--clay); }
.dog__ring.is-wiggle { animation: dogWiggle .62s var(--ease); }
@keyframes dogIdle {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-3px) rotate(-3deg); }
  50% { transform: translateY(0) rotate(0); }
  75% { transform: translateY(-3px) rotate(3deg); }
}
@keyframes dogPulse {
  0%   { transform: scale(1);    opacity: .5; }
  70%  { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}
@keyframes dogWiggle {
  0%,100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-8deg) scale(1.06); }
  32% { transform: rotate(7deg)  scale(1.07); }
  49% { transform: rotate(-5deg) scale(1.05); }
  66% { transform: rotate(4deg)  scale(1.03); }
  83% { transform: rotate(-2deg) scale(1.01); }
}
.dog__ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.dog:nth-child(1) .dog__ring img { object-position: 50% 38%; }  /* Jano */
.dog:nth-child(2) .dog__ring img { object-position: 50% 45%; }  /* Trixie */
.dog figcaption {
  font-family: var(--ff-display); font-style: italic; font-size: 1.2rem;
  color: var(--clay-deep); margin-top: 1rem;
}
.dogs__hint {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: var(--ff-display); font-style: italic; font-size: .95rem;
  color: var(--clay); margin-top: -1.4rem; margin-bottom: 2.4rem;
  animation: hintBlink 2.4s ease-in-out infinite;
}
.dogs__hint .ic { font-size: 1.1rem; }
@keyframes hintBlink { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.gift {
  max-width: 660px; margin: 0 auto; text-align: center;
  padding: clamp(4rem,9vw,6rem) 1.5rem clamp(4rem,9vw,6rem);
}
.gift__title {
  font-family: var(--ff-display); font-weight: 300;
  font-size: clamp(2.2rem,6.5vw,3.2rem); letter-spacing: -.02em; margin-top: .3rem;
}
.gift > .eyebrow { margin-bottom: 1.4rem; }
.gift__text { margin-top: 1.6rem; }
.gift__text p { color: var(--ink-soft); font-size: 1.04rem; line-height: 1.78; margin-top: 1rem; }
.gift__text em { font-family: var(--ff-display); font-style: italic; color: var(--clay-deep); font-size: 1.05em; }
.gift__causes-label {
  font-family: var(--ff-display); font-style: italic; font-size: 1.12rem;
  color: var(--clay); margin: 2.4rem 0 1.2rem;
}
.gift__causes { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.cause {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.2rem; border: 1px solid var(--line); border-radius: 100px;
  font-size: .84rem; color: var(--ink);
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.cause .ic { color: var(--clay); font-size: 1.15rem; }
.cause:hover { border-color: var(--clay); color: var(--clay-deep); transform: translateY(-2px); }
.gift .btn--lg { margin-top: 2.4rem; }

/* ============================================================
   CIERRE
   ============================================================ */
.closing {
  text-align: center; background: var(--bone-2); border-top: 1px solid var(--line-soft);
  padding: clamp(4rem,9vw,6.5rem) 1.5rem clamp(3rem,6vw,4.5rem);
}
.rule-c { width: 46px; height: 1px; background: var(--clay); margin: 0 auto 2rem; }
.closing__title {
  font-family: var(--ff-display); font-weight: 300; font-style: italic;
  font-size: clamp(2.4rem,8vw,3.8rem); color: var(--ink); letter-spacing: -.01em;
}
.closing__names {
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(1.5rem,5vw,2.2rem); margin-top: 1.4rem; letter-spacing: .01em;
}
.closing__names .amp { color: var(--clay); }
.closing__date {
  margin-top: 1rem; font-size: .73rem; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ============================================================
   Floating RSVP pill
   ============================================================ */
.rsvp-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 20;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.25rem; border-radius: 100px;
  background: var(--clay-deep); color: var(--bone-2);
  font-size: .85rem; font-weight: 500; letter-spacing: .03em;
  box-shadow: 0 14px 30px -12px rgba(111,51,32,.7);
  opacity: 0; transform: translateY(20px) scale(.92); pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease), background .3s var(--ease);
}
.rsvp-float.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.rsvp-float:hover { background: var(--rust); }
.rsvp-float .ic { font-size: 1.05rem; }

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal { opacity: 0; }
.hero .reveal { transform: translateY(20px); animation: heroIn .95s var(--ease) forwards; }
.hero .reveal[data-d="0"] { animation-delay: .15s; }
.hero .reveal[data-d="1"] { animation-delay: .3s; }
.hero .reveal[data-d="2"] { animation-delay: .42s; }
.hero .reveal[data-d="3"] { animation-delay: .54s; }
.hero .reveal[data-d="4"] { animation-delay: .64s; }
.hero .reveal[data-d="5"] { animation-delay: .82s; }
.hero .reveal[data-d="6"] { animation-delay: .95s; }
.hero .reveal[data-d="7"] { animation-delay: 1.15s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, [data-reveal] { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .hero__photo { width: min(92vw, 640px); }
}

@media (max-width: 440px) {
  .count__cell { padding: 1rem .8rem; }
  .dogs { gap: 1.4rem; }
}

/* ============================================================
   PÁGINA DE CONFIRMACIÓN (confirmar.html)
   ============================================================ */
.page-confirm {
  min-height: 100svh;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--sand) 0%, transparent 50%),
    var(--bone);
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.2rem;
}
.confirm { width: 100%; max-width: 560px; }
.confirm__back {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; letter-spacing: .04em; color: var(--ink-soft);
  margin-bottom: 1.2rem; transition: color .3s var(--ease);
}
.confirm__back:hover { color: var(--clay-deep); }
.confirm__back .ic { font-size: 1.05rem; }

.confirm__card {
  background: var(--bone-2); border: 1px solid var(--line-soft);
  border-radius: 26px; padding: clamp(2rem, 6vw, 3.2rem) clamp(1.4rem, 5vw, 2.6rem);
  box-shadow: var(--shadow); text-align: center;
}
.monogram--ink {
  color: var(--ink); justify-content: center; margin-bottom: 1.6rem;
  font-family: var(--ff-display); font-size: 1.35rem; letter-spacing: .1em;
  display: inline-flex; align-items: center; gap: .5rem;
}
.monogram--ink .monogram__amp { width: 32px; height: 20px; fill: none; stroke: var(--clay); stroke-width: 1.3; }

.confirm__eyebrow {
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--clay); font-weight: 500; margin-bottom: .9rem;
}
.confirm__title {
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(1.9rem, 6vw, 2.7rem); line-height: 1.05; letter-spacing: -.015em;
}
.confirm__lead { color: var(--ink-soft); margin-top: .8rem; font-size: 1rem; line-height: 1.6; }

#rsvpForm { text-align: left; margin-top: 2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field > span { font-size: .8rem; font-weight: 500; letter-spacing: .03em; color: var(--ink); }
.field > span i { color: var(--clay); font-style: normal; }
.field > span em { color: var(--ink-soft); font-weight: 400; font-style: normal; font-size: .76rem; }
.field input, .field select, .field textarea {
  font-family: var(--ff-body); font-size: .98rem; font-weight: 300; color: var(--ink);
  background: var(--bone); border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem .95rem; width: 100%;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #b3a797; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--clay); background: #fff;
  box-shadow: 0 0 0 3px rgba(191,106,67,.13);
}
.field-group { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field-group .field--sm { min-width: 0; }

.form-error {
  color: #a23b22; font-size: .86rem; background: rgba(162,59,34,.08);
  border: 1px solid rgba(162,59,34,.2); border-radius: 10px; padding: .6rem .8rem;
}

.btn--block { width: 100%; justify-content: center; margin-top: .4rem; position: relative; }
.btn__spinner {
  position: absolute; width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(250,243,231,.4); border-top-color: var(--bone-2);
  animation: spin .7s linear infinite; display: none;
}
.btn.is-loading .btn__label { opacity: 0; }
.btn.is-loading .btn__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.confirm__switch { margin-top: 1.6rem; font-size: .88rem; color: var(--ink-soft); }
.confirm__switch a { color: var(--clay-deep); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.confirm__switch a:hover { color: var(--rust); }

.confirm__check {
  display: inline-grid; place-items: center; width: 66px; height: 66px;
  border-radius: 50%; background: var(--clay-deep); color: var(--bone-2);
  font-size: 1.9rem; margin-bottom: 1.4rem; animation: pop .5s var(--ease) both;
}
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
#doneWrap .btn { margin-top: 1.8rem; }

.confirm__foot {
  text-align: center; margin-top: 1.6rem; font-size: .76rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft);
}
.confirm__foot .amp { text-transform: none; letter-spacing: 0; }

@media (max-width: 440px) {
  .field-group { grid-template-columns: 1fr; }
}
