:root {
  --bg: #f6f4f1;
  --white: #ffffff;
  --ink: #1e1e1e;
  --muted: #7a7a7a;
  --line: #e6e2dd;
  --accent: #b9a07a;
  --max: 1180px;
  --overlay-dark: rgba(20, 22, 28, .65);
  --overlay-light: rgba(245, 245, 245, .88);
 /* --navy-overlay: rgba(12, 18, 32, 0.2);
  --navy-overlay-light: rgba(12, 18, 32, 0.1); */
  --navy-overlay: rgba(0,0,0,.1);
  --navy-overlay-light: rgba(0,0,0,.05);
}

/* RESET */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: none;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--line);
  -webkit-font-smoothing: antialiased;
  position: relative;
  background:
    linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
    url('../media/faroFormentor.webp') center / cover no-repeat;
  background-attachment: fixed;
}

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

.media.soft img {
  filter: contrast(0.65) saturate(0.65);
}

.media.softLight img {
  filter: contrast(0.9) saturate(0.9);
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================
   HEADER & NAV
   ========================== */

.site-header {
  position: relative;
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  transition: background-color .35s ease, box-shadow .35s ease;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  flex-direction: column;
  gap: 14px;
  transition: color .35s ease;
}

.nav-links a {
  margin-left: 20px;
  opacity: .9;
}

.brand {
  letter-spacing: .32em;
}

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

.hero {
  min-height: 100svh;      /* Safari iOS OK */
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  background: transparent;
}

.hero-content {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 24px;
}

.hero-content h1 {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  letter-spacing: .08em;
  margin: 0 0 12px;
  font-size: clamp(40px, 6.5vw, 72px);
}

.hero-date {
  font-weight: 300;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: 12px;
}

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

.section {
  padding: 40px 25px 25px;
  background: var(--navy-overlay);
}

.section.light {
  background: var(--navy-overlay-light);
  color: #fff;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.kicker {
  display: block;
  font-size: 24px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 48px;
}

h2 {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(22px, 4vw, 36px);
  margin: 0 0 35px;
}

.lead {
  line-height: 2;
  font-size: 15px;
  color: var(--line);
}
.lead2 {
  line-height: 2;
  font-size: 15px;
  color: var(--line);
}

/* ==========================
   EDITORIAL LAYOUT (DESKTOP)
   ========================== */

.editorial {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 88px;
  /*min-height: 80vh; desktop */
  min-height: unset;
  align-items: stretch;
}

.editorial.reverse {
  grid-template-columns: .9fr 1.1fr;
}

.editorial.reverse .media {
  order: -1;
}

/* ==========================
   MEDIA (IMAGES)
   ========================== */

.media {
  position: relative;
  width: 100%;
  height: 100%;
  height: 420px;       /* ajusta a tu gusto */
  min-height: unset;
  /*min-height: 420px;*/
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

/* ==========================
   DETAILS
   ========================== */

.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 44px;
}

.detail {
  text-align: center;
}

.detail span {
  display: block;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 8px;
}

.detail strong {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 20px;
}

.cta {
  text-align: center;
}

.btn {
  display: inline-block;
  margin-top: 26px;
  padding: 14px 30px;
  border: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--line);
  background: transparent;
}

.btn:hover {
  background-color: #fff;
  color: var(--muted);
}

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

.site-footer {
  color: #fff;
  text-align: center;
  color: var(--line);
  font-size: 12px;
  padding: 25px;
}

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

.rsvp-form {
  max-width: 520px;
  margin: 0 auto;
  margin-top: 48px;
  margin-bottom: 48px;
}

.rsvp-form label {
  display: block;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 6px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.rsvp-form textarea {
  min-height: 110px;
}

.rsvp-form .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rsvp-form button {
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--line);
  cursor: pointer;
}

/* ==========================
   MOBILE
   ========================== */

@media (min-width: 901px) {
  .grid .full-center {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
}

@media (max-width: 900px) {

  html {
    height: 100%;
    overflow-x: hidden;
  }

  body {
    background: none; /* 👈 importante */
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
      url('../media/faroFormentor.webp') center / cover no-repeat;
  }

  body::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3))
    );
  }

  .section {
    padding-bottom: 0;
  }

/*
  .section {
    padding: 50px 20px 0px;
  }*/

  .media.soft img {
    filter: contrast(0.8) saturate(0.8);
  }

  .media.softLight img {
    filter: contrast(0.7) saturate(0.7);
  }

  .editorial {
    /*gap: 40px;
    min-height: auto;*/
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero {
    min-height: 90vh;
    padding-top: 120px;
  }

  h2 {
    font-size: 28px;
  }

  .lead {
    font-size: 15px;
    line-height: 1.9;
  }

  .lead2 {
    font-size: 15px;
    line-height: 1.9;
  }

  .rsvp-form {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  /* FORM */
  .rsvp-form .grid {
    grid-template-columns: 1fr;
  }

  .rsvp-form input,
  .rsvp-form select,
  .rsvp-form textarea {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 16px;
    transform: scale(0.94);
  }

  .rsvp-form label {
    font-size: 10px;
    margin-bottom: 4px;
    letter-spacing: .18em;
  }

  /* Convertimos editorial a layout vertical */
  .editorial,
  .editorial.reverse {
    display: flex;
    flex-direction: column;
  }

  /* TEXTO SIEMPRE PRIMERO */
  .editorial .copy {
    order: 1;
    padding: 0 20px;
  }

   /* Usamos flex SOLO en mobile */
  .editorial,
  .editorial.reverse {
    display: flex;
    flex-direction: column;
  }

  /* Texto siempre primero */
  .editorial .copy {
    order: 1;
  }

  .editorial.reverse .media {
    order: 2 !important;
  }

  .editorial .media {
    order: 2;
    /*margin-top: 40px;
    margin-left: -20px;
    margin-right: -20px;*/
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    /*width: calc(100% + 40px);*/
    margin-bottom: 0;
    height: 70vh;
    min-height: 70vh;
  }

  .editorial .media img {
    /*position: relative;*/
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

}

/* Links transición */
.nav a {
  transition: color .35s ease, opacity .35s ease;
}

/* ESTADO SCROLLEADO */
.nav.scrolled {
  background-color: rgba(255, 255, 255, 0.95);  /* mismo bg que web */
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}

.nav.scrolled .nav-inner {
  color: var(--muted);
}

.nav.scrolled .nav-links a,
.nav.scrolled .brand {
  color: var(--muted);
  opacity: 1;
}

/* Hover desktop */
@media (hover: hover) {
  .nav-links a:hover {
    opacity: .6;
  }
}

.rsvp-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  background-color: #fff;
}

.rsvp-form select {
  background-image: 
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

/* Placeholder visual en selects */
.rsvp-form select {
  color: var(--muted);
}

.rsvp-form select:focus {
  color: var(--muted);
}

.rsvp-form select:not([value=""]) {
  color: var(--muted);
}

.rsvp-form select.is-placeholder {
  color: var(--muted);
}

.rsvp-form select {
  color: var(--muted);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  pointer-events: none;
  background: transparent;
}
