/* =============================
   RESET & BASE
   ============================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-accent: #A7A5A0;
  --color-light: #DFE0E2;
  --color-dark: #383839;
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Montserrat', 'Helvetica Neue', sans-serif;
  --site-max-width: 1500px;
  --gutter: 4vw;
  --header-height: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-black);
  background: var(--color-white);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

a:hover {
  opacity: 0.7;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  letter-spacing: 0.01em;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.02em;
}

.text-large {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  line-height: 1.9;
}

.text-center {
  text-align: center;
}

.text-date {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.3rem);
  letter-spacing: 0.3em;
  font-weight: 400;
}

.required {
  color: var(--color-accent);
}

/* =============================
   PASSWORD SCREEN
   ============================= */
.password-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.password-screen.password-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.password-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.password-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px);
  transform: scale(1.05);
}

.password-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
}

.password-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  padding: 0 var(--gutter);
}

.password-content h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 16px;
}

.password-content .text-large {
  margin-bottom: 32px;
  opacity: 0.8;
  letter-spacing: 0.05em;
}

.password-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.password-form input {
  width: 280px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  text-align: center;
  outline: none;
  letter-spacing: 0.1em;
  transition: border-color 0.3s;
}

.password-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.password-form input:focus {
  border-color: rgba(255, 255, 255, 0.8);
}

.password-form .btn {
  width: 280px;
}

.password-error {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #ff6b6b;
  opacity: 0;
  transition: opacity 0.3s;
}

.password-error.visible {
  opacity: 1;
}

/* Hide site content until authenticated */
body.locked .site-header,
body.locked .mobile-menu,
body.locked section,
body.locked footer {
  display: none;
}

/* =============================
   CONTAINER
   ============================= */
.container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =============================
   BUTTONS
   ============================= */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 16px 36px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn--outline {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
}

.btn--outline:hover {
  background: var(--color-black);
  color: var(--color-white);
  opacity: 1;
}

.btn--solid {
  border: 1px solid var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

.btn--solid:hover {
  background: transparent;
  color: var(--color-black);
  opacity: 1;
}

.section--dark .btn--solid {
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-black);
}

.section--dark .btn--solid:hover {
  background: transparent;
  color: var(--color-white);
}

.btn--full {
  width: 100%;
}

/* =============================
   HEADER
   ============================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  color: var(--color-white);
}

.site-header.header--solid {
  background: var(--color-white);
  color: var(--color-black);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.header-inner {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav {
  display: flex;
  gap: 32px;
}

.header-nav a {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
  transition: opacity 0.3s;
  position: relative;
}

.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
}

.header-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-align: center;
  flex-shrink: 0;
}

.header-actions .btn {
  font-size: 0.82rem;
  padding: 12px 28px;
}

/* =============================
   BURGER MENU
   ============================= */
.header-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger-line {
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger--open .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger--open .burger-line:nth-child(2) {
  opacity: 0;
}

.burger--open .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================
   MOBILE MENU
   ============================= */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu--open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.mobile-menu-nav a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-black);
}

.mobile-menu-nav .btn {
  margin-top: 16px;
}

/* =============================
   SECTIONS — GENERAL
   ============================= */
.section {
  position: relative;
  overflow: hidden;
}

.section--dark {
  color: var(--color-white);
}

.section--bright {
  color: var(--color-black);
}

.section-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.section-background img {
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center center;
  will-change: transform;
}

.section-background img.img-bw {
  filter: grayscale(100%);
}

/* Parallax inline images — container stays fixed, image moves inside */
.ceremony-image,
.story-hero-image,
.story-collage-main {
  overflow: hidden;
}

.ceremony-image img,
.story-hero-image img,
.story-collage-main img,
.story-collage-grid img {
  will-change: transform;
  height: 130%;
  object-fit: cover;
}

.section-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
}

.section--hero .section-overlay {
  background: rgba(0, 0, 0, 0.60);
}

.section--registry .section-overlay {
  background: rgba(0, 0, 0, 0.75);
}

.section-overlay--light {
  background: rgba(255, 255, 255, 0.15);
}

.section-overlay--rsvp {
  background: rgba(0, 0, 0, 0.60);
}

.section-content {
  position: relative;
  z-index: 1;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-content--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.section-content--bottom {
  justify-content: flex-end;
  padding-bottom: 60px;
}

/* =============================
   HERO
   ============================= */
.section--hero {
  min-height: 100vh;
}

.section--hero .section-content {
  min-height: 100vh;
  padding-top: var(--header-height);
}

.section--hero h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  margin: 8px 0;
}

.section--hero .text-large {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  letter-spacing: 0.1em;
}

/* =============================
   AGENDA HERO
   ============================= */
.section--agenda-hero {
  min-height: 50vh;
}

.section--agenda-hero .section-overlay {
  background: rgba(0, 0, 0, 0.70);
}

.section--agenda-hero .section-content {
  min-height: 50vh;
}

/* =============================
   CEREMONY & RECEPTION
   ============================= */
.section--ceremony {
  padding: 80px 0;
}

.ceremony-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 80px;
}

.ceremony-block:last-child {
  margin-bottom: 0;
}

.ceremony-block--reverse {
  direction: rtl;
}

.ceremony-block--reverse > * {
  direction: ltr;
}

.ceremony-image {
  overflow: hidden;
}

.ceremony-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.ceremony-details {
  text-align: center;
  padding: 40px;
}

.ceremony-details h1 {
  margin-bottom: 20px;
}

.ceremony-details h3 {
  margin-bottom: 16px;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}

.ceremony-details .text-large {
  margin-bottom: 12px;
}

.ceremony-details a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ceremony-note {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding-top: 16px;
}

.ceremony-note p {
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  line-height: 1.8;
  opacity: 0.65;
}

/* (CTA story section removed) */

/* =============================
   NUESTRA HISTORIA
   ============================= */
.section--story {
  padding: 80px 0 60px;
}

.section--story > .container {
  margin-bottom: 60px;
}

.section--story > .container:last-child {
  margin-bottom: 0;
}

.section--story > .container:first-child h2 {
  margin-bottom: 32px;
}

.story-hero-image {
  width: 100%;
  overflow: hidden;
}

.story-hero-image img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
}

/* Quotes */
.quote {
  padding: 40px 0;
  max-width: 65%;
}

.quote h2 {
  font-style: italic;
  margin-bottom: 12px;
}

.quote p {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.quote--left {
  margin-right: auto;
}

.quote--right {
  margin-left: auto;
}

/* Story collage */
.story-collage {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.story-collage-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
}

.story-collage-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 500px;
}

.story-collage-title {
  position: absolute;
  top: 32px;
  left: 32px;
  color: var(--color-white);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.story-collage-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 0;
}

.story-collage-text .text-large:first-child {
  font-size: 2rem;
  margin-bottom: 12px;
}

.story-collage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.story-collage-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Story closing */
.story-closing {
  padding: 40px 0;
  max-width: 700px;
  margin: 0 auto;
}

.story-closing h2 {
  margin-bottom: 20px;
}

/* (CTA RSVP section removed) */

/* =============================
   VIAJE Y ESTADIA
   ============================= */
.section--travel {
  min-height: 60vh;
}

.section--travel .section-content {
  min-height: 60vh;
  padding-top: var(--header-height);
}

.section--travel h1 {
  margin-bottom: 12px;
}

/* Accommodations */
.section--accommodations {
  padding: 80px 0;
}

.section--accommodations h2 {
  margin-bottom: 16px;
}

.section--accommodations > .container > .text-large {
  margin-bottom: 48px;
}

.accommodations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}

.accommodation-card h3 {
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.accommodation-card p {
  margin-bottom: 20px;
  line-height: 1.8;
}

/* =============================
   LISTA DE REGALOS
   ============================= */
.section--registry {
  min-height: 70vh;
}

.section--registry .section-content {
  min-height: 70vh;
  padding: 80px var(--gutter);
}

.section--registry h1 {
  text-align: center;
}

.section--registry .text-large {
  max-width: 600px;
  text-align: center;
  opacity: 0.85;
}

.registry-methods {
  display: flex;
  gap: 60px;
  margin-top: 24px;
}

.registry-method {
  text-align: center;
}

.registry-method-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.7;
}

.registry-method-detail {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.registry-method-detail a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.registry-method-small {
  font-size: clamp(0.8rem, 1.2vw, 0.95rem) !important;
  opacity: 0.7;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .registry-methods {
    flex-direction: column;
    gap: 32px;
  }
}

/* =============================
   RSVP HERO
   ============================= */
.section--rsvp-hero {
  min-height: 50vh;
}

.section--rsvp-hero .section-content {
  min-height: 50vh;
}

/* =============================
   RSVP FORM
   ============================= */
.section--rsvp-form {
  padding: 80px 0;
  background: var(--color-white);
}

.rsvp-title {
  margin-bottom: 12px;
}

.rsvp-subtitle {
  margin-bottom: 48px;
  opacity: 0.7;
}

.section--rsvp-form h3 {
  margin-bottom: 40px;
}

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

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  padding: 14px 16px;
  border: 1px solid var(--color-light);
  background: var(--color-white);
  color: var(--color-black);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-black);
}

.form-group textarea {
  resize: vertical;
}

/* Radio buttons */
.radio-group {
  display: flex;
  gap: 24px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: none;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s;
  flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: var(--color-black);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-black);
}

.form-note {
  text-align: center;
  padding: 20px 0;
  opacity: 0.6;
  font-size: 0.85rem;
  line-height: 1.8;
  font-style: italic;
}

/* Form submit */
.form-submit {
  margin-top: 12px;
}

.form-submit .btn {
  font-size: 0.8rem;
  padding: 18px 36px;
}

/* Success message */
.form-success {
  text-align: center;
  padding: 60px 0;
}

.form-success h3 {
  margin-bottom: 12px;
  font-size: 1.8rem;
}

.form-success p {
  font-size: 1rem;
}

/* =============================
   FOOTER
   ============================= */
.site-footer {
  padding: 60px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  text-align: center;
}

.footer-col p {
  font-size: 0.8rem;
  line-height: 2;
}

.footer-col a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav a {
  font-size: 0.8rem;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* =============================
   RESPONSIVE — TABLET & MOBILE
   ============================= */
@media (max-width: 768px) {
  :root {
    --gutter: 6vw;
    --header-height: 60px;
  }

  /* Header */
  .header-nav--left,
  .header-actions {
    display: none;
  }

  .header-burger {
    display: flex;
  }

  .header-inner {
    justify-content: space-between;
  }

  .header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Hero */
  .section--hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.6rem);
  }

  /* Ceremony */
  .section--ceremony {
    padding: 40px 0;
  }

  .ceremony-block {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 60px;
  }

  .ceremony-block--reverse {
    direction: ltr;
  }

  .ceremony-block--reverse .ceremony-image {
    order: -1;
  }

  .ceremony-image img {
    height: 350px;
  }

  .ceremony-details {
    padding: 20px;
  }

  /* Story */
  .section--story {
    padding: 40px 0 40px;
  }

  .section--story > .container {
    margin-bottom: 40px;
  }

  .story-hero-image img {
    height: 40vh;
  }

  .quote {
    max-width: 100%;
    padding: 24px 0;
  }

  .story-collage {
    grid-template-columns: 1fr;
  }

  .story-collage-main img {
    min-height: 350px;
  }

  .story-collage-grid img {
    height: 150px;
  }

  /* Travel */
  .accommodations-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Registry */
  .section--registry {
    min-height: 50vh;
  }

  .section--registry .section-content {
    min-height: 50vh;
  }

  /* RSVP */
  .section--rsvp-hero {
    min-height: 40vh;
  }

  .section--rsvp-hero .section-content {
    min-height: 40vh;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section--hero h1 {
    font-size: 2.4rem;
  }

  .ceremony-image img {
    height: 280px;
  }

  .story-collage-grid {
    grid-template-columns: 1fr;
  }

  .story-collage-grid img {
    height: 220px;
  }
}
