/* ==========================================================================
   Uri & Mire · 11.09.26
   ========================================================================== */

@font-face {
  font-family: 'Calyx';
  src: url('fonts/Calyx.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-terracota: #b34a2a;
  --color-terracota-dark: #8f3a20;
  --color-beige: #eadfcc;
  --color-beige-dark: #dccdb3;
  --color-cream: #f5e9d5;
  --color-text: #3e1f0e;
  --color-text-on-dark: #f5e9d5;

  --font-serif: 'Calyx', 'Playfair Display', Georgia, serif;
  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;

  --max-width: 440px; /* vista mobile-first, la "tarjeta" se queda centrada en desktop */
}

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-beige);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; }

/* -- Layout contenedor central en desktop -- */
body > header,
body > section,
body > footer {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-align: center;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  min-width: 240px;
}
.btn--cream {
  background: var(--color-cream);
  color: var(--color-text);
}
.btn--cream:hover { background: #ffefd9; }
.btn--terracota {
  background: var(--color-terracota);
  color: var(--color-cream);
}
.btn--terracota:hover { background: var(--color-terracota-dark); }
.btn--full { width: 100%; min-width: 0; }
.btn:active { transform: translateY(1px); }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  background: var(--color-terracota);
  color: var(--color-cream);
  padding: 28px 24px 20px;
  text-align: left;
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Textura de papel sutil en el fondo terracota */
.hero__noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.92  0 0 0 0 0.85  0 0 0 0 0.75  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Monograma custom a modo de marca de agua gigante */
.hero__watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  height: auto;
  max-height: 55%;
  transform: translate(-50%, -45%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  filter: brightness(0) saturate(100%) invert(94%) sepia(15%) saturate(420%) hue-rotate(340deg) brightness(102%) contrast(92%);
  /* Vira el SVG a color crema */
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(64px, 21vw, 110px);
  line-height: 0.95;
  letter-spacing: 0;
  margin: 0;
  text-align: left;
}
.hero__amp {
  font-style: italic;
  margin: 0 -0.02em;
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  line-height: 1.7;
  margin: 10px 0 0;
  text-align: right;
  align-self: flex-end;
  opacity: 0.95;
}

.hero__date {
  font-family: var(--font-serif);
  font-size: clamp(64px, 23vw, 120px);
  line-height: 0.95;
  margin: auto 0 22px;
  letter-spacing: 0;
  text-align: left;
}

/* Botón ghost del hero */
.btn--ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  background: transparent;
  color: var(--color-cream);
  border: 1px solid rgba(245, 233, 213, 0.85);
  border-radius: 999px;
  padding: 18px 28px;
  font-size: 13px;
  letter-spacing: 0.15em;
  box-shadow: inset 0 0 0 1px rgba(245, 233, 213, 0.2);
}
.btn--ghost:hover {
  background: rgba(245, 233, 213, 0.1);
}

/* ==========================================================================
   DARK FRAME (transición foto pareja)
   ========================================================================== */

.dark-frame {
  position: relative;
  background: #160904;
  padding: 40px 22px;
  overflow: hidden;
}
.dark-frame__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url('images/monogram.svg');
  background-repeat: repeat;
  background-size: 110px auto;
  background-position: -20px -20px;
  opacity: 0.09;
  filter: brightness(0) saturate(100%) invert(30%) sepia(80%) saturate(700%) hue-rotate(350deg);
}
.photo-frame--on-dark {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  aspect-ratio: 4 / 5;
}

/* ==========================================================================
   PHOTO SECTIONS
   ========================================================================== */

.photo-section {
  padding: 32px 24px;
  background: var(--color-beige);
}
.photo-frame {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-beige-dark);
}
.photo-frame--wide {
  aspect-ratio: 3 / 2;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   SECTIONS COMUNES
   ========================================================================== */

.section {
  padding: 48px 32px;
  text-align: center;
}
.section__eyebrow {
  font-size: 11px;
  letter-spacing: 0.35em;
  margin: 0 0 24px;
}

/* ==========================================================================
   TIMELINE (La nostra diada)
   ========================================================================== */

.timeline__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.timeline__item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: clamp(40px, 10vw, 52px);
  line-height: 1.05;
  font-style: italic;
}
.timeline__time {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.15em;
  opacity: 0.75;
  transform: translateY(-14px);
}
.timeline__name {
  font-family: var(--font-serif);
}

/* ==========================================================================
   VENUE
   ========================================================================== */

.venue {
  padding-top: 24px;
}
.venue__title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.05;
  margin: 0 0 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.venue__title em {
  font-style: italic;
}
.venue__amp {
  font-style: italic;
  font-family: var(--font-serif);
}
.venue__address {
  font-size: 11px;
  letter-spacing: 0.2em;
  margin: 0 0 24px;
  line-height: 1.8;
}

/* ==========================================================================
   TRANSPORT
   ========================================================================== */

.transport {
  position: relative;
  padding: 64px 32px;
  text-align: center;
  color: var(--color-cream);
  background-color: var(--color-terracota-dark);
  background-image:
    linear-gradient(rgba(125, 45, 25, 0.55), rgba(125, 45, 25, 0.55)),
    url('images/sparklers.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: hidden;
}
.transport__content { position: relative; z-index: 1; }
.transport__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: 0.01em;
}
.transport__text {
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

/* ==========================================================================
   DUBTES
   ========================================================================== */

.dubtes__block {
  margin: 32px 0;
}
.dubtes__label {
  font-size: 11px;
  letter-spacing: 0.35em;
  margin: 0 0 12px;
  font-weight: 600;
}
.dubtes__text {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px;
}
.dubtes__contacts {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.9;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background: var(--color-beige);
  padding: 48px 32px 32px;
  text-align: center;
}
.footer__countdown {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 28px;
  border: 1px solid var(--color-text);
  border-radius: 4px;
  margin-bottom: 32px;
}
.footer__countdown-label {
  font-size: 10px;
  letter-spacing: 0.35em;
}
.footer__countdown-num {
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1;
}
.footer__thanks {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.3em;
  line-height: 2;
  margin: 0 0 24px;
}
.footer__love {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  margin: 0 0 24px;
}
.footer__mark {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin: 0;
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(62, 31, 14, 0.55);
  backdrop-filter: blur(2px);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 32px auto;
  background: var(--color-beige);
  border-radius: 16px;
  padding: 40px 28px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-terracota);
  animation: modalIn 0.25s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 28px;
  line-height: 1;
  color: var(--color-terracota);
  padding: 4px 8px;
}
.modal__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  color: var(--color-terracota);
  text-align: center;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.modal__subtitle {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--color-terracota);
  margin: 0 0 28px;
  line-height: 1.6;
}

/* ==========================================================================
   FORM
   ========================================================================== */

.rsvp-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: block; }
.field input[type="text"],
.field textarea {
  width: 100%;
  background: var(--color-cream);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-terracota);
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-terracota);
  opacity: 0.8;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--color-terracota);
  outline-offset: 1px;
}
.field__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--color-terracota);
  margin: 4px 0 -6px;
  font-weight: 600;
}

.field--radio {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field--radio legend {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--color-terracota);
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.5;
}
.field--radio label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-terracota);
  cursor: pointer;
}
.field--radio input[type="radio"] {
  accent-color: var(--color-terracota);
}

.rsvp-form__status {
  text-align: center;
  font-size: 13px;
  margin: 8px 0 0;
  min-height: 20px;
  color: var(--color-terracota);
}
.rsvp-form__status.is-error { color: #b94a2a; font-weight: 600; }
.rsvp-form__status.is-success { color: #2a7d4a; font-weight: 600; }

/* ==========================================================================
   Desktop polish — la "tarjeta" sigue centrada, el fondo se expande
   ========================================================================== */

@media (min-width: 640px) {
  body {
    background:
      linear-gradient(var(--color-beige), var(--color-beige));
  }
  .hero,
  .photo-section,
  .section,
  .transport,
  .footer {
    box-shadow: 0 0 0 transparent;
  }
}
