:root {
  --paper: #f6f1e7;
  --paper-deep: #eee7d9;
  --ink: #36392c;
  --olive: #596343;
  --sage: #a8ad7d;
  --rose: #cb5674;
  --coral: #d68a6e;
  --gold: #c49e5b;
  --white: #fffdf8;
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.65; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.hero { min-height: min(840px, 100svh); position: relative; color: var(--white); display: flex; flex-direction: column; overflow: hidden; background: #525743; }
.hero-photo, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo { object-position: center 49%; }
.hero-shade { background: linear-gradient(180deg, rgba(30,36,27,.40) 0%, rgba(30,36,27,.20) 34%, rgba(30,36,27,.62) 100%); }
.nav { position: relative; z-index: 1; width: min(1180px, calc(100% - 56px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 23px 0; border-bottom: 1px solid rgba(255,255,255,.35); }
.brand-mark { color: inherit; text-decoration: none; font: 500 1.25rem var(--serif); letter-spacing: .12em; }
.brand-mark span, i { color: var(--coral); font-style: italic; }
.nav .brand-mark span { color: #efc79c; }
.nav-links { display: flex; gap: clamp(18px, 4vw, 42px); }
.nav-links a { color: inherit; font-size: .78rem; text-decoration: none; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.nav-links a:hover, .small-link:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-copy { position: relative; z-index: 1; width: min(760px, calc(100% - 34px)); margin: auto; padding: 62px 0 88px; text-align: center; }
.eyebrow { margin: 0 0 14px; color: var(--olive); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .22em; }
.eyebrow.light { color: #f2d9bb; }
.invite-line { margin: 25px 0 0; font-size: .95rem; letter-spacing: .04em; }
.hero h1 { margin: 8px auto 18px; max-width: 700px; font: 500 clamp(2.2rem, 5.7vw, 4.9rem)/1.06 var(--serif); text-wrap: balance; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; color: #efd5ad; font-size: .82rem; }
.ornament span { width: 55px; border-top: 1px solid rgba(240,213,173,.8); }
.couple-names { margin: 9px 0 4px; font: 500 clamp(1.45rem, 3.4vw, 2.55rem) var(--serif); }
.couple-names i { color: #efc79c; }
.hero-date { margin: 7px 0 29px; font-size: .84rem; letter-spacing: .16em; text-transform: uppercase; }
.hero-date span { padding: 0 7px; color: #efc79c; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 48px; padding: 13px 23px; border: 1px solid transparent; border-radius: 2px; text-decoration: none; font-size: .77rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: transform .2s ease, background .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-light { background: var(--paper); color: var(--ink); }
.button-light:hover { background: #fff; }
.button-dark { background: var(--olive); color: var(--white); }
.button-dark:hover { background: #424b32; }
.button-outline { background: transparent; border-color: var(--olive); color: var(--olive); }
.button-outline:hover { background: var(--olive); color: var(--white); }
.scroll-cue { position: absolute; z-index: 1; left: 50%; bottom: 23px; width: 22px; height: 34px; border: 1px solid rgba(255,255,255,.75); border-radius: 20px; transform: translateX(-50%); }
.scroll-cue span { display: block; width: 3px; height: 7px; margin: 7px auto; border-radius: 4px; background: white; animation: scroll 1.6s infinite; }
@keyframes scroll { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }

.section { padding: clamp(72px, 10vw, 132px) 24px; }
.welcome { text-align: center; background: var(--paper); }
h2 { margin: 0; color: var(--ink); font: 500 clamp(2.2rem, 5vw, 4.3rem)/1.1 var(--serif); text-wrap: balance; }
h2 em, .admin-content h1 em { color: var(--olive); font-weight: 500; }
.welcome h2 { margin-bottom: 23px; }
.intro-copy { max-width: 540px; margin: 0 auto; color: #68695d; font-size: .95rem; }
.countdown-wrap { width: min(670px, 100%); margin: 61px auto 0; padding: 28px 20px 24px; border-top: 1px solid #d7cbb4; border-bottom: 1px solid #d7cbb4; }
.countdown-wrap .eyebrow { color: #8b7551; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; }
.countdown div { display: flex; flex-direction: column; gap: 4px; border-right: 1px solid #ddd2bf; }
.countdown div:last-child { border: 0; }
.countdown strong { color: var(--olive); font: 500 clamp(2rem, 5vw, 3rem) var(--serif); line-height: 1; }
.countdown span { color: #747469; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.countdown-note { margin: 20px 0 0; color: #747469; font-size: .78rem; letter-spacing: .07em; }

.story { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, .85fr); align-items: center; gap: clamp(34px, 9vw, 120px); padding-top: 0; }
.story-image { height: clamp(380px, 54vw, 640px); overflow: hidden; }
.story-image img { object-position: center 42%; }
.story-copy { max-width: 460px; padding: 25px 0; }
.story-copy h2 { margin-bottom: 22px; }
.story-copy > p:not(.eyebrow) { color: #68695d; font-size: .94rem; }
.signature { display: inline-block; margin-top: 21px; color: var(--olive); font: 500 2rem var(--serif); letter-spacing: .1em; }
.signature i { color: var(--coral); }

.gallery { padding-top: 58px; background: #eee9dd; }
.section-heading { margin: 0 auto 42px; text-align: center; }
.section-heading h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
.photo-grid { width: min(1080px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: 250px; gap: 14px; }
.photo { margin: 0; overflow: hidden; background: #d8d2c2; }
.photo img { transition: transform .7s cubic-bezier(.2,.6,.3,1); }
.photo:hover img { transform: scale(1.035); }
.photo-tall { grid-row: span 2; }
.photo-wide { grid-column: span 2; }

.event { background: var(--paper); }
.event-card { position: relative; max-width: 720px; margin: 0 auto; padding: clamp(38px, 7vw, 72px) 24px; text-align: center; background: #eee9dd; border: 1px solid #d9cfbc; }
.event-icon { margin-bottom: 10px; color: var(--coral); font-size: 1.4rem; }
.event-card h3 { margin: 8px 0 4px; font: 500 clamp(1.7rem, 4vw, 2.6rem) var(--serif); }
.event-card > p:not(.eyebrow) { margin: 5px 0; color: #68695d; }
.event-divider { width: 58px; margin: 24px auto; border-top: 1px solid var(--gold); }
.event-date { font-weight: 600; }
.event-time { color: var(--olive) !important; font: 500 1.55rem var(--serif); }
.venue-note { margin-top: 16px !important; font-size: .82rem; }
.map-links { display: flex; flex-direction: column; align-items: center; gap: 13px; margin-top: 26px; }
.map-links .button { min-width: 240px; }
.text-link { color: var(--olive); font-size: .8rem; text-decoration: none; }

.attire { display: grid; grid-template-columns: 1fr 1fr; min-height: 540px; padding: 0; background: #e8e7db; }
.attire-photo { min-height: 470px; }
.attire-photo img { object-position: center 37%; }
.attire-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 590px; padding: 70px clamp(30px, 8vw, 105px); }
.attire-copy h2 { margin-bottom: 18px; font-size: clamp(2rem, 4vw, 3.5rem); }
.attire-copy > p:not(.eyebrow) { color: #68695d; font-size: .94rem; }
.swatches { display: flex; gap: 10px; margin: 15px 0 7px; }
.swatches span { width: 29px; height: 29px; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 3px #e8e7db, 0 0 0 4px rgba(70,70,50,.12); }
.attire-copy .attire-note { margin-top: 12px; font-size: .8rem !important; font-weight: 600; color: var(--olive) !important; }

.rsvp { background: #dce0ce; }
.rsvp-card { max-width: 680px; margin: 0 auto; padding: clamp(35px, 7vw, 64px); text-align: center; background: var(--paper); border: 1px solid #c6c9b5; box-shadow: 0 16px 50px rgba(61,68,49,.08); }
.rsvp-card h2 { margin-bottom: 14px; }
.rsvp-intro { max-width: 440px; margin: 0 auto 28px; color: #68695d; font-size: .9rem; }
#rsvp-form { max-width: 460px; margin: 0 auto; text-align: left; }
#rsvp-form fieldset { display: grid; gap: 12px; margin: 0 0 24px; padding: 0; border: 0; }
#rsvp-form legend { margin-bottom: 12px; font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.choice { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #d9d3c4; cursor: pointer; font-size: .88rem; }
.choice:has(input:checked) { border-color: var(--olive); background: #edf0e6; }
.choice input { position: absolute; opacity: 0; }
.choice-mark { width: 17px; height: 17px; flex: 0 0 17px; border: 1px solid #a5a18f; border-radius: 50%; }
.choice input:checked + .choice-mark { border: 5px solid var(--olive); }
.choice input:focus-visible + .choice-mark { outline: 3px solid #dcae83; outline-offset: 3px; }
#rsvp-form > .button { width: 100%; }
.rsvp-message { min-height: 1.5em; margin: 14px 0 0; color: var(--olive); font-weight: 700; text-align: center; }
.rsvp-message.error { color: #a1324f; }
.local-note { margin: 9px 0 0; color: #8a887c; font-size: .69rem; text-align: center; }

.footer { padding: 59px 20px 44px; text-align: center; background: #4f5a3d; color: var(--paper); }
.footer-flower { color: #e3b681; font-size: 1.25rem; }
.footer p { margin: 4px 0; color: #e9e7dd; font-size: .82rem; }
.footer .footer-names { font: 500 2.05rem var(--serif); }
.footer-names i { color: #e3b681; }
.footer .footer-date { margin: 9px 0 22px; letter-spacing: .17em; }
.footer .small-link { color: #e1dbc9; }
.small-link { font-size: .74rem; text-underline-offset: 4px; }

.gate { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: linear-gradient(rgba(43,50,39,.48), rgba(43,50,39,.48)), url('images/portada.jpg') center 48%/cover; }
.gate-card { width: min(500px, 100%); padding: clamp(28px, 7vw, 54px); text-align: center; background: var(--paper); box-shadow: 0 25px 80px rgba(0,0,0,.2); }
.gate-card .flourish { display: block; margin: 8px; color: var(--coral); font-size: 1.2rem; }
.gate-card h1 { margin: 0 0 14px; font: 500 clamp(2.3rem, 8vw, 3.3rem)/1.05 var(--serif); }
.gate-card h1 em { color: var(--olive); }
.gate-card > p:not(.eyebrow) { color: #68695d; font-size: .88rem; }
.code-form { display: grid; gap: 10px; margin: 24px 0 17px; text-align: left; }
.code-form label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.code-form input { min-height: 48px; padding: 12px; border: 1px solid #cfc7b4; background: #fffdf8; text-transform: uppercase; letter-spacing: .12em; }
.code-form input:focus { outline: 2px solid var(--sage); outline-offset: 1px; }
.code-form .button { width: 100%; }
.gate-card .small-link { color: var(--olive); }
.form-error { margin: 0; color: #a1324f; font-size: .83rem; }

.admin-page { min-height: 100vh; background: var(--paper); }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid #ddd4c2; }
.admin-header .eyebrow { margin: 0; }
.admin-content { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 68px 0 90px; }
.admin-content h1 { margin: 0; font: 500 clamp(2.5rem, 6vw, 4rem)/1.1 var(--serif); }
.admin-warning { max-width: 640px; margin: 12px 0 30px; padding: 11px 14px; border-left: 3px solid var(--coral); color: #6e5a4e; background: #f0e5d9; font-size: .83rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0; }
.stat-card { padding: 18px; background: #ebe8da; border: 1px solid #ddd4c2; }
.stat-card strong { display: block; color: var(--olive); font: 500 2rem var(--serif); }
.stat-card span { color: #707065; font-size: .73rem; letter-spacing: .08em; text-transform: uppercase; }
.admin-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.admin-tools label { font-size: .75rem; font-weight: 700; }
.admin-tools select, .admin-tools input { min-height: 43px; padding: 9px 12px; border: 1px solid #d1c9b8; background: var(--white); }
.admin-tools input { flex: 1; min-width: 190px; }
.admin-tools .button { min-height: 43px; padding: 10px 14px; font-size: .67rem; }
.table-wrap { overflow-x: auto; border: 1px solid #ddd4c2; background: var(--white); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 13px 16px; border-bottom: 1px solid #e8e1d4; font-size: .82rem; }
th { color: #626452; background: #efecdf; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: .7rem; font-weight: 700; }
.status.yes { color: #49603a; background: #e1ebd8; }
.status.no { color: #99445e; background: #f5e1e5; }
.status.pending { color: #736c5b; background: #eee9dc; }
.admin-feedback { min-height: 1.5em; color: var(--olive); font-size: .85rem; }

@media (max-width: 720px) {
  .nav { width: calc(100% - 32px); padding: 17px 0; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .62rem; letter-spacing: .04em; }
  .hero { min-height: 750px; min-height: 100svh; }
  .hero-copy { padding: 45px 0 68px; }
  .hero-date { letter-spacing: .09em; font-size: .74rem; }
  .section { padding-right: 20px; padding-left: 20px; }
  .story { grid-template-columns: 1fr; gap: 28px; padding-top: 0; }
  .story-image { height: 105vw; max-height: 570px; }
  .story-copy { max-width: none; padding: 0 4px; }
  .photo-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; gap: 9px; }
  .photo-tall { grid-row: span 2; }
  .photo-wide { grid-column: span 2; }
  .attire { grid-template-columns: 1fr; }
  .attire-photo { min-height: 0; height: 82vw; max-height: 480px; }
  .attire-copy { padding: 46px 25px 53px; }
  .admin-header { flex-wrap: wrap; padding: 16px 20px; }
  .admin-header .eyebrow { order: 3; width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .admin-tools { align-items: stretch; }
  .admin-tools label { flex-basis: 100%; }
  .admin-tools select { flex: 1; }
}
@media (max-width: 390px) {
  .nav-links { gap: 9px; }
  .nav-links a { font-size: .56rem; }
  .countdown-wrap { padding-right: 4px; padding-left: 4px; }
  .countdown span { font-size: .58rem; letter-spacing: .06em; }
  .stats { gap: 7px; }
  .stat-card { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
