/* =====================================================
   Irene & Guille · invitación de boda
   5 de septiembre de 2026 · Finca Son Sampol, Mallorca

   Mobile-first (≤1023px): columna 390px centrada,
   ilustración del hero a sangre (edge-to-edge).
   Desktop (≥1024px): hero a sangre con pareja izda + texto
   dcha; secciones a 2-col (título+texto junto, ilustración
   sola al otro lado, ritmo alternado izda/dcha/izda).
   Topbar fija arriba con menú hamburguesa.
   ===================================================== */


/* ─────────── 1 · FUENTES ─────────── */

@font-face {
  font-family: 'Moranga';
  src: url('assets/fonts/Moranga/Latinotype - Moranga Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: 'Moranga';
  src: url('assets/fonts/Moranga/Latinotype - Moranga Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Moranga';
  src: url('assets/fonts/Moranga/Latinotype - Moranga Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Moranga';
  src: url('assets/fonts/Moranga/Latinotype - Moranga Light It.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}


/* ─────────── 2 · TOKENS ─────────── */

:root {
  /* Color */
  --color-bg:    #ffffff;
  --color-text:  #000000;
  --color-focus: #ec4d56;

  /* Tipo */
  --font-display: 'Moranga', Georgia, 'Times New Roman', serif;

  /* Rampa tipográfica */
  --text-title-xl: 32px;
  --text-title-lg: 30px;
  --text-body-lg:  24px;
  --text-btn:      22px;
  --text-body:     20px;

  /* Layout */
  --container: 390px;
  --gutter:    24px;
  --topbar-h:  60px;

  /* Espacio vertical */
  --space-section: 160px;
  --space-block:   40px;
  --space-row:     24px;
  --space-tight:   16px;
}


/* ─────────── 3 · RESET MÍNIMO ─────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
  background: #dde4ec;          /* mismo que el footer — evita "blanco" cuando
                                   el canvas del navegador asoma por debajo
                                   (iOS bounce, viewport más alto que la
                                   página, etc.).                            */
}

body {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: 1.35;
  color: var(--color-text);
  background: var(--color-bg);
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--topbar-h);   /* deja espacio para la topbar fija */
  overflow-x: hidden;             /* evita scroll horizontal por el bleed del hero */
}

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

ol, ul { list-style: none; }
a { color: inherit; }
sup { font-size: 0.65em; vertical-align: super; line-height: 0; }


/* ─────────── 4 · ACCESIBILIDAD ─────────── */

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 200ms ease;
  z-index: 110;
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}


/* ─────────── 5 · TOPBAR ─────────── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.topbar__brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--color-text);
  padding: 4px 8px;
}

.topbar__toggle {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.topbar__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 220ms ease, opacity 160ms ease;
}

.topbar__toggle.is-open .topbar__bar:nth-child(1) {
  transform: translate(0, 9px) rotate(45deg);
}
.topbar__toggle.is-open .topbar__bar:nth-child(2) {
  opacity: 0;
}
.topbar__toggle.is-open .topbar__bar:nth-child(3) {
  transform: translate(0, -9px) rotate(-45deg);
}

.topbar__menu {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  padding: 12px 0 20px;
  z-index: 49;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.topbar__menu[hidden] { display: none; }

.topbar__menu a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  text-decoration: none;
  color: var(--color-text);
  padding: 14px 24px;
  text-align: center;
  transition: background-color 200ms ease;
}
.topbar__menu a:hover,
.topbar__menu a:focus-visible {
  background: rgba(0, 0, 0, 0.04);
}


/* ─────────── 6 · LAYOUT GENERAL ─────────── */
/* El main NO tiene padding horizontal — las secciones individuales
   añaden su gutter cuando lo necesitan. Esto permite que el hero
   tenga la ilustración a sangre.                                  */

main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 0 88px;        /* aire al final antes del footer */
  display: flex;
  flex-direction: column;
  gap: var(--space-section);
}

/* Secciones con texto: padding lateral interno (gutter) */
.intro,
.schedule,
.transport,
.dress-code,
.gifts,
.closing {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}


/* ─────────── 7 · COMPONENTES ─────────── */

.btn {
  display: inline-block;
  min-width: 181px;
  padding: 12px 24px;
  background: var(--color-bg);
  color: var(--color-text);
  border: 4px solid var(--color-text);
  border-radius: 60px;
  font-family: inherit;
  font-weight: 500;
  font-size: var(--text-btn);
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 220ms ease, color 220ms ease;
}
.btn:hover,
.btn:focus-visible {
  background: var(--color-text);
  color: var(--color-bg);
}

/* Ilustración específica de sección (bus, vestimenta, regalo).
   En mobile aparece debajo del título; en desktop migra al
   lateral en el 2-col. Tamaño Figma:
     traslado.png   → 244×230 mostrado (casi cuadrado)
     dresscode.png  → 322×165 mostrado (apaisado 2:1)
     regalos.png    → 322×165 mostrado (apaisado 2:1)        */
.section-illustration {
  width: 100%;
  max-width: 322px;
  height: auto;
  margin: var(--space-tight) auto 0;
  display: block;
}

/* Override para traslado (más cuadrado, no necesita tanto ancho) */
.transport .section-illustration {
  max-width: 244px;
}

.section-title {
  font-weight: 500;
  font-size: var(--text-title-lg);
  line-height: 1.1;
}


/* ─────────── 8 · HERO ─────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--gutter);
}

.hero__rings {
  width: 124px;
  height: auto;
  margin-bottom: 20px;
}

.hero__title {
  font-weight: 500;
  font-size: var(--text-title-xl);
  line-height: 1.08;
  margin-bottom: 8px;
}

.hero__date {
  font-weight: 400;
  font-size: var(--text-body-lg);
  line-height: 1.2;
}

/* Pareja a sangre: ocupa los 100vw del viewport rompiendo el
   max-width del main. Aspect natural (sin recorte).
   Uso margin-left: calc(50% - 50vw) que es más robusto que
   el truco con position: relative + left: 50%.                  */
.hero__couple {
  display: block;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 32px;
}
.hero__couple img {
  width: 100%;
  height: auto;
  display: block;
}


/* ─────────── 9 · INTRO ─────────── */

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intro__paragraph {
  padding: 0 8px;
}

.intro__lettering {
  margin-top: 40px;
  width: 88%;
  max-width: 310px;
  height: auto;
}

.intro__heart {
  width: 64px;
  margin-top: 8px;
}

.intro__when {
  margin-top: 18px;                /* algo más de aire tras el corazón */
  font-weight: 500;
  font-size: var(--text-body-lg);
  line-height: 1.25;
}

.intro__where {
  margin-top: 6px;
  font-weight: 300;
}

.intro .btn {
  margin-top: 24px;
}


/* ─────────── 10 · HORARIO (mobile y desktop pequeño) ─────────── */

.schedule {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.schedule__list {
  margin-top: var(--space-tight);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 8px;
  width: 100%;
  padding-bottom: 80px;
}

.hour {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hour:nth-child(even) {
  transform: translateY(80px);
}

.hour__icon {
  width: 115px;
  height: 120px;
  object-fit: contain;
}

.hour__time {
  margin-top: 8px;
  font-weight: 500;
  font-size: var(--text-body-lg);
  line-height: 1.1;
}

.hour__label {
  margin-top: 2px;
  font-weight: 300;
  line-height: 1.2;
}


/* ─────────── 11 · TRASLADO ─────────── */

.transport {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bus-list {
  margin-top: var(--space-tight);
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.bus { padding: 0 8px; }

.bus__time {
  font-weight: 500;
  font-size: var(--text-body-lg);
  line-height: 1.1;
  margin-bottom: 4px;
}

.bus__description {
  font-weight: 300;
}


/* ─────────── 12 · ¿QUÉ ME PONGO? ─────────── */

.dress-code {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dress-code__intro {
  margin-top: var(--space-tight);
  padding: 0 4px;
}

.dress-code__list {
  margin-top: 20px;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;        /* centrado, como pediste */
}

.dress-code__list li {
  font-weight: 300;
}

/* Bullet inline (en lugar de absoluto) para que funcione al centrar */
.dress-code__list li::before {
  content: "· ";
  font-weight: 500;
  font-size: 1.1em;
}

.dress-code__list strong {
  font-weight: 700;
}


/* ─────────── 13 · REGALOS ─────────── */

.gifts {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gifts__intro {
  margin-top: var(--space-tight);
  padding: 0 4px;
}

.gifts__holder {
  margin-top: 32px;
  font-weight: 300;
}

.gifts__iban {
  margin-top: 4px;
  font-weight: 500;
  font-size: 18px;                  /* algo más pequeño para que quepa
                                       en una línea en la mayoría de móviles */
  user-select: all;
  cursor: text;
  padding: 0 4px;
}

/* Grupos de 4 caracteres visualmente separados, pero sin
   whitespace en el DOM → al seleccionar y copiar viene en
   limpio "ES4821007027500200323296".                      */
.gifts__iban span {
  display: inline-block;
  margin-right: 0.35em;
}
.gifts__iban span:last-child {
  margin-right: 0;
}

.gifts__note {
  margin-top: 32px;
  font-weight: 300;
  font-style: italic;
  font-size: var(--text-body);   /* mismo tamaño que el resto del cuerpo (20px) */
  padding: 0 4px;
}


/* ─────────── 14 · CIERRE ─────────── */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing__dogs {
  width: 100%;
  max-width: 304px;
  margin-top: 16px;
  margin-bottom: 24px;
}


/* ─────────── 15 · FOOTER ─────────── */
/* Pequeña banda al final de la página: fondo negro, sign-off
   con crédito de la ilustradora y link a su Instagram.       */

.site-footer {
  background: #dde4ec;                                       /* gris frío con tono azulado suave */
  color: #4d5460;                                            /* gris oscuro frío legible */
  padding: 10px var(--gutter);
  text-align: center;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #1a1a1a;                                            /* link casi negro, contraste */
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: opacity 200ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  opacity: 0.65;
}


/* ─────────── 16 · REDUCED MOTION ─────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =====================================================
   ─── 17 · DESKTOP (≥1024px) ─────────────────────────
   Cada sección con un poco de aire (no full viewport).
   ===================================================== */

@media (min-width: 1024px) {

  :root {
    --text-title-xl: 40px;
    --text-title-lg: 30px;
    --text-body-lg:  24px;
    --topbar-h:      64px;
  }

  main {
    max-width: none;
    padding: 0 0 24px;          /* poco aire al final → footer queda cerca del CTA */
    gap: 80px;                  /* ritmo moderado entre secciones */
  }

  /* Las secciones con padding lateral ahora son full-width
     (no max 390 heredado); cada una pone su propio máximo.   */
  .intro,
  .schedule,
  .transport,
  .dress-code,
  .gifts,
  .closing {
    padding-left: 64px;
    padding-right: 64px;
  }

  /* Min-height contenida: cada sección comanda espacio
     sin ocupar viewport entero.                          */
  .hero,
  .intro,
  .schedule,
  .transport,
  .dress-code,
  .gifts,
  .closing {
    min-height: 70vh;
  }

  /* Centrado vertical para secciones en flex column */
  .intro,
  .schedule,
  .closing {
    justify-content: center;
    max-width: 720px;
    margin: 0 auto;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  /* Contenedores 2-col para Traslado / Dress / Regalos */
  .transport,
  .dress-code,
  .gifts {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 40px;
    padding-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 100px;
    align-items: center;
    align-content: center;
    text-align: left;
  }

  /* ── HERO desktop ── */
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    grid-template-areas: "couple text";
    align-items: center;
    gap: 0 60px;
    padding: 0 80px 0 0;
    max-width: none;
    margin: 0;
    min-height: calc(100vh - var(--topbar-h));   /* hero ocupa el viewport */
  }

  .hero__couple {
    grid-area: couple;
    max-width: none;
    width: 100%;
    margin: 0;                   /* reset del breakout móvil */
  }

  .hero__text {
    grid-area: text;
    padding-left: 32px;
    padding-right: 0;
  }

  .hero__rings {
    width: 112px;
    margin-bottom: 28px;
  }

  .hero__title {
    font-size: var(--text-title-xl);
    margin-bottom: 8px;
  }

  .hero__date {
    font-size: 22px;
  }

  /* ── INTRO desktop ── */
  .intro__paragraph {
    max-width: 560px;
    padding: 0;
  }

  .intro__lettering {
    margin-top: 56px;
    max-width: 420px;
  }

  /* En desktop la fecha "Sábado, 5 de septiembre de 2026" cabe en
     una línea — escondemos el <br> que en mobile la parte en dos. */
  .break-mobile-only {
    display: none;
  }


  /* ── HORARIO desktop pequeño (1024-1279) ── */
  .schedule__list {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }

  /* ── SECCIONES LATERALES ──
     Texto a un lado (título arriba + contenido debajo),
     ilustración sola al otro. Ritmo izda·dcha·izda.       */

  /* Tamaños por sección en desktop (aspect ratio nativo) */
  .transport .section-illustration,
  .dress-code .section-illustration,
  .gifts .section-illustration {
    align-self: center;
    margin: 0 auto;
    width: 100%;
  }

  .transport .section-illustration { max-width: 300px; }   /* casi cuadrado */
  .dress-code .section-illustration { max-width: 380px; }  /* apaisado */
  .gifts .section-illustration { max-width: 380px; }       /* apaisado */

  .transport .section-title,
  .dress-code .section-title,
  .gifts .section-title {
    text-align: left;
    margin-bottom: 24px;
    font-size: var(--text-title-lg);
  }

  /* Las tres secciones (Traslado, Dress, Regalos) siguen el mismo patrón
     en desktop según el Figma final: ilustración IZDA, texto+título DCHA. */

  /* Traslado: ilust IZDA, texto DCHA */
  .transport .section-title       { grid-column: 2; grid-row: 1; }
  .transport .bus-list            { grid-column: 2; grid-row: 2; margin-top: 0; }
  .transport .section-illustration{ grid-column: 1; grid-row: 1 / span 2; }
  .transport .bus { padding: 0; }
  .transport .bus__description { max-width: 48ch; }

  /* Dress code: texto IZDA (todo justificado a la izquierda), ilust DCHA */
  .dress-code .section-title       { grid-column: 1; grid-row: 1; text-align: left; }
  .dress-code .dress-code__intro   { grid-column: 1; grid-row: 2; padding: 0; margin: 0; max-width: 48ch; text-align: left; }
  .dress-code .dress-code__list    { grid-column: 1; grid-row: 3; padding: 0; max-width: 48ch; text-align: left; margin-top: 24px; }
  .dress-code .section-illustration{ grid-column: 2; grid-row: 1 / span 3; }

  /* Regalos: ilust IZDA, texto DCHA */
  .gifts .section-title       { grid-column: 2; grid-row: 1; }
  .gifts .gifts__intro        { grid-column: 2; grid-row: 2; padding: 0; margin: 0; max-width: 48ch; }
  .gifts .gifts__holder       { grid-column: 2; grid-row: 3; margin-top: 24px; }
  .gifts .gifts__iban         { grid-column: 2; grid-row: 4; padding: 0; }
  .gifts .gifts__note         { grid-column: 2; grid-row: 5; padding: 0; margin-top: 24px; font-size: var(--text-body); max-width: 48ch; }
  .gifts .section-illustration{ grid-column: 1; grid-row: 1 / span 5; }

  /* ── CIERRE desktop ── */
  .closing__dogs {
    max-width: 360px;
    margin-top: 24px;
    margin-bottom: 32px;
  }
}


/* =====================================================
   ─── 18 · HORARIO HORIZONTAL (≥1280px) ──────────────
   ===================================================== */

@media (min-width: 1280px) {

  .schedule {
    max-width: 1200px;
    padding: 40px 80px;
  }

  .schedule__list {
    max-width: none;
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    padding-bottom: 80px;
  }

  .hour {
    flex: 0 0 auto;
    width: 160px;
  }

  .hour:nth-child(even) {
    transform: translateY(80px);
  }
}


/* =====================================================
   ─── 19 · DESKTOP AMPLIO (≥1400px) ──────────────────
   ===================================================== */

@media (min-width: 1400px) {
  .hero { padding-right: 120px; }
  .hero__text { padding-left: 64px; }
  .schedule { max-width: 1280px; }
}
