:root {
  --bg: #ffffff;
  --bg-soft: #fafbfc;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #1f6feb;
  --accent-dark: #1557b0;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.password-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: linear-gradient(120deg, #ffffff, #f8fbff);
}

.password-gate[hidden] {
  display: none;
}

.password-gate-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
  padding: 1.4rem;
}

.password-gate-card h2 {
  margin-bottom: 0.5rem;
}

.password-gate-card p {
  margin-top: 0;
}

.password-form {
  display: grid;
  gap: 0.8rem;
}

.container {
  width: min(1040px, 92%);
  margin: 0 auto;
}

.hero,
.subpage-header {
  background: linear-gradient(120deg, #ffffff, #f8fbff);
  border-bottom: 1px solid var(--border);
}

.hero {
  position: relative;
  background-image: url("assets/header-couple.png");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  border-bottom: none;
  min-height: 86vh;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.35),
    rgba(15, 23, 42, 0.6)
  );
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.hero .nav,
.hero .hero-content {
  position: relative;
  z-index: 1;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0;
  font-family: "Great Vibes", cursive;
  line-height: 1;
}

.hero .brand {
  color: #ffffff;
}

.nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.hero .nav a {
  color: rgba(255, 255, 255, 0.85);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent-dark);
}

.hero .nav a:hover,
.hero .nav a[aria-current="page"] {
  color: #ffffff;
}

.hero-content {
  padding: 8rem 0 9rem;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
}

.hero .kicker {
  color: rgba(255, 255, 255, 0.82);
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  margin: 0.6rem 0 1.1rem;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  letter-spacing: 0;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  line-height: 1.15;
}

h2 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 400;
  margin-top: 0;
}

h3 {
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
}

.lead {
  color: var(--muted);
}

.hero h1,
.hero .lead {
  color: #ffffff;
}

.section {
  padding: 4rem 0;
}

.alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card,
.timeline-item,
.gallery-item,
.rsvp-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.04);
}

.card,
.timeline-item,
.gallery-item {
  padding: 1.2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
}

.gallery-item {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  overflow: hidden;
  margin: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.story-gallery .container {
  width: min(1180px, 94%);
}

.story-intro,
.story-outro {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.05rem;
}

.story-outro {
  margin-top: 2rem;
  margin-bottom: 0;
}

.story-hero {
  margin: 1.5rem 0 2rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(31, 41, 55, 0.08);
}

.story-hero img {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
  display: block;
}

.story-block + .story-block {
  margin-top: 2rem;
}

.story-block h3 {
  margin: 0 0 0.8rem;
}

.gallery-grid.masonry {
  columns: 280px;
  column-gap: 1rem;
}

.gallery-grid.masonry .gallery-item {
  display: block;
  padding: 0;
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-grid.masonry .gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.28s ease;
}

.gallery-grid.masonry .gallery-item:hover img {
  transform: scale(1.02);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(12, 18, 29, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.2rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 90vw);
  max-height: 88vh;
}

.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  border-radius: 12px;
}

.lightbox-figure figcaption {
  color: #e5e7eb;
  text-align: center;
  margin-top: 0.8rem;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.5rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.lightbox-nav {
  flex: 0 0 auto;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.timeline {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.rsvp-form {
  padding: 1.35rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem;
  font: inherit;
  background: #fff;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(31, 111, 235, 0.25);
  border-color: var(--accent);
  outline-offset: 1px;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 1rem 0;
  padding: 1rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0;
}

.checkbox input {
  width: auto;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 0.72rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: #eef4ff;
  color: var(--accent-dark);
  border: 1px solid #d7e4ff;
}

.status {
  min-height: 1.4rem;
  margin-top: 0.7rem;
}

.status.error {
  color: #a33939;
}

.status.success {
  color: #2f6b3a;
}

.extra-info {
  margin-top: 1rem;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 720px) {
  .hero {
    min-height: 76vh;
  }

  .hero-content {
    padding: 6rem 0 6.8rem;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-grid.masonry {
    columns: 1;
  }

  .lightbox {
    padding: 0.7rem;
    gap: 0.5rem;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
  }
}
