@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Montserrat:wght@300;400;500;600&display=swap");

:root {
  --ink: #090806;
  --ink-soft: #11100d;
  --warm-black: #17130e;
  --gold: #c6a15b;
  --gold-light: #ead3a1;
  --cream: #f3ead9;
  --muted: #a69d8e;
  --line: #c6a15b3d;
  --error: #ffb4a8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: Montserrat, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; }
img { max-width: 100%; display: block; }
h1, h2, p { margin-top: 0; }
a { color: inherit; }

.container, .narrow {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}
.narrow { max-width: 720px; }

.section { padding: 96px 0; position: relative; }
.section-heading { margin-bottom: 34px; }
.section-heading h2,
.photographer-card h2 {
  color: var(--cream);
  letter-spacing: -0.03em;
  margin: 7px 0 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 11vw, 5.4rem);
  font-weight: 500;
  line-height: 0.92;
}
.eyebrow, .hero-kicker, .kicker {
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 500;
}
.gold-rule {
  background: var(--gold);
  width: 48px;
  height: 1px;
  display: block;
}
.lead {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.55rem, 5.2vw, 2.15rem);
  line-height: 1.5;
}
.body-copy {
  color: #d2c8b8;
  max-width: 550px;
  font-size: 1rem;
  line-height: 1.85;
}

/* —— Hero —— */
.hero {
  align-items: stretch;
  min-height: 100svh;
  padding: 14px;
  display: flex;
  position: relative;
}
.hero-frame {
  border: 1px solid var(--gold);
  width: 100%;
  min-height: calc(100svh - 28px);
  position: relative;
  overflow: hidden;
}
.hero-image, .hero-shade {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.hero-image {
  object-fit: cover;
  object-position: 62% center;
}
.hero-shade {
  background:
    linear-gradient(#00000040, #00000026 35%, #000000db),
    linear-gradient(90deg, #0605038c, #0000 70%);
}
.hero-content {
  z-index: 2;
  text-align: center;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-height: calc(100svh - 28px);
  padding: 56px 24px 90px;
  display: flex;
  position: relative;
}
.hero-content h1 {
  color: #fff;
  letter-spacing: -0.05em;
  text-shadow: 0 6px 40px #00000073;
  margin: 10px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(5rem, 24vw, 10rem);
  font-weight: 500;
  line-height: 0.75;
}
.hero-subtitle {
  color: #fff;
  margin: 22px 0 30px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-style: italic;
}
.countdown {
  border-top: 1px solid #ead3a173;
  border-bottom: 1px solid #ead3a173;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 520px);
  display: grid;
}
.countdown-item {
  flex-direction: column;
  gap: 4px;
  padding: 14px 4px 12px;
  display: flex;
}
.countdown-item + .countdown-item { border-left: 1px solid #ead3a140; }
.countdown strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  font-weight: 500;
}
.countdown span {
  color: var(--gold-light);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.57rem;
}
.scroll-cue { display: none; }

/* —— Sections —— */
.welcome {
  background: radial-gradient(circle at 50% 20%, #c6a15b14, transparent 42%), var(--ink);
  text-align: center;
}
.welcome .gold-rule,
.dress-section .gold-rule,
.rsvp-section .gold-rule,
.photographer-section .gold-rule,
.info-section .gold-rule {
  margin-inline: auto;
}
.featured-image { width: 100%; overflow: visible; }
.featured-image img { width: 100%; height: auto; }

.info-section { background: var(--ink-soft); text-align: center; }
.info-grid {
  background: var(--line);
  gap: 1px;
  margin: 48px 0 42px;
  display: grid;
}
.info-grid article {
  background: var(--ink-soft);
  padding: 38px 20px;
}
.info-icon {
  border: 1px solid var(--gold);
  width: 54px;
  height: 54px;
  color: var(--gold-light);
  border-radius: 50%;
  place-items: center;
  margin: 0 auto 25px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  display: grid;
}
.info-grid h3, .qr-card h3 {
  margin: 10px 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 500;
}
.info-grid article > p:last-child,
.qr-card > p:last-child {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.button {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #15100a;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, transform 0.25s;
  display: inline-flex;
}
.button:hover {
  color: var(--gold-light);
  background: transparent;
  transform: translateY(-2px);
}
.button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}
.button:disabled,
.btn-disabled,
a.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.button-ghost {
  min-height: 40px;
  color: var(--gold-light);
  background: transparent;
  padding: 0 15px;
  font-size: 0.58rem;
}
.button.primary,
.button.yellow,
.button.dark { /* aliases for fotos/galeria pages */ }

.dress-section {
  color: #17110b;
  text-align: center;
  background: #e7d5b7;
  overflow: hidden;
}
.dress-section h2,
.dress-section .eyebrow,
.dress-section .dress-value { color: #17110b; }
.dress-section .gold-rule { background: #5e482c; }
.dress-value {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 8vw, 3.3rem);
  font-style: italic;
}
.ornament {
  color: #48341d0d;
  font-family: "Cormorant Garamond", serif;
  font-size: 25rem;
  line-height: 0;
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gift-section { background: var(--warm-black); }
.split { gap: 50px; display: grid; }
.gift-card-panel {
  border: 1px solid var(--line);
  padding: 28px;
}
.gift-card-panel > div + div {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 25px;
}
.gift-card-panel strong {
  margin: 8px 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.65rem;
  font-weight: 500;
  display: block;
}
.gift-card-panel .small-data {
  overflow-wrap: anywhere;
  font-size: clamp(1.05rem, 4.6vw, 1.55rem);
}
.gift-card-panel small { color: var(--gold-light); display: block; margin-top: 8px; }
.bank-data[hidden] { display: none !important; }

/* —— RSVP —— */
.rsvp-section {
  background: radial-gradient(circle at 50% 0%, #c6a15b1a, transparent 35%), var(--ink);
  text-align: center;
}
.rsvp-form {
  text-align: left;
  max-width: 560px;
  margin: 42px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rsvp-form label {
  color: var(--gold-light);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-size: 0.67rem;
  font-weight: 500;
  display: block;
}
.rsvp-form input[type="text"],
.rsvp-form textarea {
  border: 0;
  border-bottom: 1px solid var(--gold);
  color: #fff;
  background: #ffffff0a;
  border-radius: 0;
  width: 100%;
  padding: 16px 18px;
  resize: vertical;
}
.rsvp-form textarea { min-height: 90px; line-height: 1.45; }
.rsvp-form .button { width: 100%; margin-top: 8px; }
.rsvp-details { display: flex; flex-direction: column; gap: 14px; }
.rsvp-details[hidden] { display: none !important; }
.rsvp-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.rsvp-fieldset legend {
  padding: 0;
  margin-bottom: 8px;
  color: var(--gold-light);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.67rem;
  font-weight: 500;
}
.rsvp-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  color: var(--cream);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}
.rsvp-choice input {
  width: auto;
  margin: 0;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.rsvp-choice:has(input:focus-visible) {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}
.success {
  border: 1px solid var(--line);
  margin: 40px auto 0;
  padding: 34px;
  display: grid;
  gap: 10px;
  max-width: 560px;
}
.success strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 500;
}
.form-error { font-size: 0.85rem; color: var(--error); }

/* —— Gallery CTA on index —— */
.gallery-section { background: #15120e; }
.gallery-layout { gap: 55px; display: grid; }
.qr-card {
  border: 1px solid var(--line);
  text-align: center;
  align-self: center;
  padding: 35px;
}
.qr-placeholder {
  aspect-ratio: 1;
  background: #e8dcc6;
  border: 12px solid #e8dcc6;
  place-items: center;
  width: min(100%, 220px);
  margin: 0 auto 28px;
  display: grid;
}
.qr-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  background: #fff;
}

/* —— Photographer —— */
.photographer-section {
  background:
    linear-gradient(#070707e6, #070707f0),
    radial-gradient(circle at 40% 20%, #46351e, #050505 65%);
}
.photographer-card {
  text-align: center;
  width: min(100% - 40px, 760px);
  margin-inline: auto;
}
.photographer-logo {
  width: min(75%, 390px);
  margin: 0 auto 34px;
}
.photographer-name {
  font-size: clamp(1.4rem, 5.6vw, 2.45rem) !important;
}
.contact-list {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  display: flex;
}
.contact-list a {
  color: #bbb2a5;
  align-items: center;
  gap: 11px;
  font-size: 0.86rem;
  text-decoration: none;
  transition: color 0.25s;
  display: inline-flex;
}
.contact-list a:hover { color: var(--gold-light); }
.contact-icon {
  width: 28px;
  height: 28px;
  color: var(--gold-light);
  border: 1px solid #c6a15b94;
  border-radius: 50%;
  flex: 0 0 28px;
  place-items: center;
  display: grid;
  font-size: 0.75rem;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #050504;
  padding: 65px 20px;
  font-size: 0.7rem;
}
footer p { margin: 7px 0; }
.footer-title {
  color: var(--cream);
  letter-spacing: 0;
  text-transform: none;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.65rem;
}
.footer-rule {
  background: var(--gold);
  width: 38px;
  height: 1px;
  margin: 25px auto;
  display: block;
}
footer small {
  display: block;
  margin-top: 18px;
  color: var(--gold);
  letter-spacing: 0.1em;
}
footer small a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— Upload / gallery pages —— */
.upload-page,
.gallery-page {
  min-height: 100svh;
  padding: 25px 18px 70px;
  background: radial-gradient(circle at top, #2a2218, var(--ink));
}
.back-link {
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
  display: inline-block;
  margin-bottom: 25px;
}
.upload-card,
.gallery-shell {
  max-width: 680px;
  margin: auto;
  background: var(--ink-soft);
  color: var(--cream);
  border: 1px solid var(--line);
  padding: 38px 22px;
}
.gallery-main { width: min(100%, 960px); margin: 0 auto; }
.gallery-shell { max-width: none; text-align: center; }
.upload-card h1,
.gallery-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 10vw, 4.5rem);
  line-height: 0.92;
  font-weight: 500;
  margin: 8px 0 16px;
}
.upload-card h1 em,
.gallery-title em {
  color: var(--gold);
  font-style: italic;
}
.upload-card > p,
.gallery-lead {
  line-height: 1.7;
  color: #d2c8b8;
}
.file-picker {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed #c6a15b8c;
  background: #c6a15b0a;
  color: var(--gold-light);
  font-weight: 500;
  text-align: center;
  padding: 25px;
  cursor: pointer;
  margin-top: 20px;
}
.file-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.upload-card ul {
  margin: 16px 0;
  padding-left: 20px;
  font-size: 0.85rem;
}
.upload-gallery-link { margin-top: 28px; text-align: center; }
.upload-gallery-link .button { width: 100%; max-width: 320px; }
.upload-card .countdown { color: var(--cream); margin-top: 20px; }
.upload-card .countdown span { color: var(--gold-light); }

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.gallery-tab {
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 22px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-light);
  cursor: pointer;
}
.gallery-tab.is-active {
  background: var(--gold);
  color: #15100a;
}
.gallery-panel { min-height: 120px; margin-bottom: 28px; }
.gallery-view[hidden] { display: none !important; }
.gallery-loading,
.gallery-empty,
.gallery-error,
.gallery-loading-more {
  font-size: 1rem;
  color: var(--muted);
  padding: 2rem 1rem;
}
.gallery-error { color: var(--error); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  text-align: left;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  background: #1a1610;
  transition: 0.15s transform;
}
.gallery-item:hover,
.gallery-item:focus { transform: scale(1.02); outline: none; }
.gallery-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item--video { background: #050504; }
.gallery-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.gallery-sentinel { width: 100%; height: 1px; }
.gallery-upload-link { margin-top: 8px; }
.gallery-upload-link .button { min-width: 240px; }

.gallery-modal-open { overflow: hidden; }
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.gallery-modal[hidden] { display: none; }
.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 4, 0.9);
}
.gallery-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: min(960px, 96vw);
  max-height: 90vh;
  width: 100%;
}
.gallery-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.gallery-modal-content img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  margin: 0 auto;
  background: #000;
}
.gallery-video-embed {
  position: relative;
  width: min(960px, 96vw);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
}
.gallery-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

[hidden] { display: none !important; }

@media (min-width: 760px) {
  .section { padding: 130px 0; }
  .hero { padding: 28px; }
  .hero-frame { min-height: calc(100svh - 56px); }
  .hero-content {
    text-align: left;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100svh - 56px);
    padding: 60px;
  }
  .hero-content h1 { font-size: clamp(7rem, 13vw, 12rem); }
  .hero-subtitle { font-size: 1.7rem; }
  .countdown { width: 510px; }
  .countdown-item { align-items: flex-start; padding-left: 22px; }
  .scroll-cue {
    z-index: 4;
    color: #fff;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    align-items: center;
    gap: 12px;
    font-size: 0.58rem;
    display: flex;
    position: absolute;
    bottom: 60px;
    right: 52px;
  }
  .scroll-cue span {
    background: var(--gold);
    width: 1px;
    height: 45px;
  }
  .info-grid { grid-template-columns: repeat(3, 1fr); }
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .gallery-layout {
    grid-template-columns: 1.35fr 0.65fr;
    align-items: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: fade-in linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 28%;
  }
  @keyframes fade-in {
    from { opacity: 0.25; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 480px) {
  .gallery-tabs { gap: 0.5rem; }
  .gallery-tab {
    flex: 1 1 0;
    max-width: 11rem;
    padding: 0.75rem 0.5rem;
    font-size: 0.65rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .gallery-modal-close {
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.5rem;
  }
}
