:root {
  --bg: #f8f3f1;
  --bg-strong: #f1e7e2;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: #fffaf8;
  --rose: #9d6d68;
  --rose-deep: #704a45;
  --gold: #d1b178;
  --gold-soft: rgba(209, 177, 120, 0.16);
  --text: #2d2422;
  --muted: #6c5a57;
  --line: rgba(112, 74, 69, 0.14);
  --shadow: 0 20px 60px rgba(72, 47, 44, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(209, 177, 120, 0.22), transparent 26%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  position: relative;
  overflow-x: hidden;
}

body.story-page {
  background:
    radial-gradient(circle at top, rgba(209, 177, 120, 0.18), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.22;
}

body::before {
  top: -140px;
  right: -80px;
  background: rgba(157, 109, 104, 0.22);
}

body::after {
  bottom: -150px;
  left: -90px;
  background: rgba(209, 177, 120, 0.18);
}

body::selection {
  background: rgba(157, 109, 104, 0.2);
}

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 6% 2% auto 2%;
  height: 90%;
  border-radius: 42px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.7), transparent 28%),
    radial-gradient(circle at 75% 20%, rgba(157,109,104,0.08), transparent 22%),
    radial-gradient(circle at 50% 80%, rgba(209,177,120,0.08), transparent 24%);
  pointer-events: none;
}

.hero {
  position: relative;
  background:
    linear-gradient(rgba(38, 29, 28, 0.46), rgba(38, 29, 28, 0.26)),
    url("https://images.unsplash.com/photo-1520854221256-17451cc331bf?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
  border-radius: 38px;
  box-shadow: var(--shadow);
  padding: 26px 30px 56px;
  min-height: 760px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 18%, transparent 70%, rgba(39,25,24,0.16));
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.brand,
.nav-link,
#coupleNames,
.hero-copy,
.date-block,
.info-card h2,
.section-heading h2 {
  color: #fffaf8;
}

.story-page .brand,
.story-page .nav-link,
.story-page .story-eyebrow,
.story-page .story-hero h1,
.story-page .story-content p {
  color: var(--text);
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 2.5vw, 2.7rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  text-shadow: 0 6px 30px rgba(0,0,0,0.18);
  text-decoration: none;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link {
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.94;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fffaf8;
  border-radius: 999px;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 23, 23, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.story-page .nav-toggle {
  border-color: rgba(112, 74, 69, 0.18);
  background: rgba(255, 255, 255, 0.38);
}

.story-page .nav-toggle span {
  background: var(--text);
}

.story-page .nav-link {
  color: var(--text);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(112, 74, 69, 0.12);
  box-shadow: 0 8px 18px rgba(67, 52, 48, 0.04);
}

.story-page .nav-link:hover {
  background: rgba(255, 255, 255, 0.75);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 700;
  text-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.eyebrow.muted {
  color: var(--muted);
}

#coupleNames {
  margin: 14px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(4.4rem, 9vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
}

.date-block {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.date-label,
.date-year {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.date-separator {
  opacity: 0.85;
  font-weight: 500;
}

.hero-copy {
  margin: 22px auto 0;
  max-width: 620px;
  font-size: 1.1rem;
  line-height: 1.9;
  opacity: 0.98;
  text-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

main {
  margin-top: 38px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.info-card,
.gallery-panel,
.upload-panel {
  background: var(--panel);
  backdrop-filter: blur(9px);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.info-card {
  padding: 28px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), rgba(209, 177, 120, 0.25), transparent);
}

.card-tag {
  margin: 0 0 10px;
  color: var(--rose);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 800;
}

.info-card h2 {
  color: var(--text);
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.3rem, 3vw, 3rem);
  font-weight: 600;
}

.info-card p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

#countdownText {
  font-weight: 700;
  color: var(--rose-deep);
  letter-spacing: 0.08em;
}

.gallery-panel,
.upload-panel {
  padding: 34px clamp(20px, 3vw, 42px);
  position: relative;
  z-index: 1;
}

.story-shell {
  max-width: 1100px;
}

.story-header {
  margin-bottom: 24px;
}

.story-topbar {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(112, 74, 69, 0.1);
  border-radius: 24px;
  padding: 18px 24px;
  box-shadow: 0 12px 28px rgba(67, 52, 48, 0.06);
  backdrop-filter: blur(8px);
}

.story-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.story-brand {
  color: var(--text) !important;
  letter-spacing: 0.1em;
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.story-page .nav-link {
  color: var(--text);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(112, 74, 69, 0.12);
  box-shadow: 0 8px 18px rgba(67, 52, 48, 0.04);
}

.story-page .nav-link:hover {
  background: rgba(255, 255, 255, 0.75);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(82vw, 300px);
    height: 100vh;
    background: rgba(35, 27, 27, 0.94);
    border-left: 1px solid rgba(255,255,255,0.08);
    padding: 88px 18px 18px;
    transform: translateX(102%);
    transition: transform 0.25s ease;
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    border-radius: 0;
    box-shadow: -20px 0 40px rgba(16, 10, 10, 0.18);
  }

  .story-page .nav-panel {
    background: rgba(255,255,255,0.96);
    border-left: 1px solid rgba(112, 74, 69, 0.12);
  }

  .nav-panel.is-open {
    transform: translateX(0);
  }

  .nav-panel .nav-link {
    width: 100%;
    text-align: left;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-size: 0.74rem;
  }

  .story-page .nav-panel .nav-link {
    width: 100%;
    text-align: left;
  }
}

.story-main {
  position: relative;
  z-index: 1;
}

.story-hero {
  background:
    linear-gradient(rgba(38, 29, 28, 0.28), rgba(38, 29, 28, 0.12)),
    url("https://images.unsplash.com/photo-1520854221256-17451cc331bf?auto=format&fit=crop&w=1400&q=80") center/cover no-repeat;
  border-radius: 32px;
  padding: 54px 28px 32px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.story-hero h1 {
  margin: 10px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.1rem, 8vw, 6rem);
  line-height: 0.9;
  color: #fffaf8;
}

.story-eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

.story-content {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(112, 74, 69, 0.1);
  border-radius: 32px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: 0 16px 34px rgba(67, 52, 48, 0.06);
}

.story-content p {
  margin: 0 0 1.5em;
  font-size: 1.06rem;
  line-height: 1.95;
  color: var(--text);
  text-align: left;
}

.story-content p:last-child {
  margin-bottom: 0;
}

.faq-content {
  padding-top: 20px;
}

.faq-intro {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 22px;
}

.faq-item {
  border-top: 1px solid rgba(112, 74, 69, 0.12);
  padding-top: 20px;
  margin-top: 18px;
}

.faq-item:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.faq-item h2 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text);
  line-height: 1;
}

.faq-item p {
  margin: 0;
}

.registry-content {
  padding-top: 20px;
}

.registry-intro {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 1.08rem;
  line-height: 1.9;
}

.registry-box {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(112, 74, 69, 0.12);
  border-radius: 24px;
  padding: 22px 18px;
}

.registry-box h2 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--text);
  line-height: 1;
}

.registry-row {
  display: grid;
  grid-template-columns: minmax(150px, 180px) 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(112, 74, 69, 0.1);
}

.registry-row:first-of-type {
  border-top: none;
}

.registry-row span {
  color: var(--muted);
}

.registry-row strong {
  color: var(--text);
  font-weight: 700;
}

.schedule-main {
  margin-top: 0;
}

.schedule-hero {
  margin-bottom: 26px;
}

.schedule-content {
  padding-top: 22px;
}

.schedule-header-block {
  margin-bottom: 18px;
  text-align: center;
}

.schedule-day-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rose-deep);
}

.schedule-item {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(112, 74, 69, 0.12);
}

.schedule-item:first-of-type {
  border-top: none;
}

.schedule-time {
  color: var(--rose-deep);
  font-weight: 700;
  line-height: 1.6;
  font-size: 1rem;
}

.schedule-details h2 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--text);
}

.schedule-details p {
  margin: 0 0 12px;
}

.schedule-note {
  color: var(--rose-deep);
  font-weight: 600;
}

.schedule-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 14px;
}

.schedule-links a,
.directions-link {
  color: var(--rose-deep);
  font-weight: 700;
  text-decoration: none;
}

.calendar-link {
  border: 1px solid rgba(112, 74, 69, 0.18);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  background: rgba(255, 255, 255, 0.42);
}

.map-box {
  margin-top: 10px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(112, 74, 69, 0.1);
  max-width: 280px;
}

.map-box img {
  width: 100%;
  display: block;
}

@media (max-width: 720px) {
  .story-topbar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
  }

  .story-brand {
    width: 100%;
    text-align: center;
  }

  .story-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .story-hero {
    padding: 36px 16px 24px;
    border-radius: 24px;
  }

  .story-content {
    padding: 18px 16px 20px;
    border-radius: 24px;
  }

  .schedule-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-time {
    font-size: 0.9rem;
  }

  .schedule-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

.upload-panel {
  margin-top: 34px;
}

.upload-box {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(112, 74, 69, 0.1);
  border-radius: 24px;
  padding: 22px;
}

.upload-status {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-button,
.secondary-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: white;
  box-shadow: 0 12px 22px rgba(112, 74, 69, 0.2);
}

.primary-button:disabled {
  opacity: 0.8;
  cursor: default;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border: 1px solid rgba(112, 74, 69, 0.15);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.upload-preview {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.upload-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(112, 74, 69, 0.1);
  border-radius: 12px;
  color: var(--muted);
}

.upload-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item small {
  color: var(--rose-deep);
  font-weight: 700;
}

.upload-progress {
  margin-top: 18px;
  color: var(--rose-deep);
  min-height: 1.2em;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(112, 74, 69, 0.12);
}

.section-heading h2 {
  color: var(--text);
  margin: 8px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.7rem, 5vw, 4rem);
  line-height: 0.96;
}

.gallery-status {
  color: var(--muted);
  margin-bottom: 22px;
  font-size: 0.98rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.photo-card {
  overflow: hidden;
  background: var(--panel-strong);
  border-radius: 22px;
  border: 1px solid rgba(112, 74, 69, 0.12);
  box-shadow: 0 10px 26px rgba(67, 52, 48, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-height: 220px;
}

.photo-card--wide {
  grid-column: span 2;
}

.photo-card--tall {
  grid-row: span 2;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(67, 52, 48, 0.12);
}

.photo-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.photo-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.photo-card:hover img {
  transform: scale(1.04);
}

.photo-card figcaption {
  padding: 12px 14px 16px;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

@media (max-width: 720px) {
  body {
    background:
      linear-gradient(180deg, rgba(248, 243, 241, 0.94) 0%, rgba(241, 231, 226, 0.98) 100%);
  }

  .page-shell {
    padding: 14px 12px 48px;
  }

  .page-shell::before {
    inset: 4% 0 auto 0;
    height: 95%;
  }

  .hero {
    min-height: 540px;
    padding: 18px 14px 24px;
    border-radius: 24px;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
  }

  .brand {
    letter-spacing: 0.1em;
    font-size: 1.25rem;
    width: auto;
  }

  .nav-link {
    width: auto;
    min-width: 110px;
    text-align: center;
    padding: 0.7rem 1rem;
    margin-left: auto;
  }

  .hero-content {
    width: 100%;
    padding-top: 18px;
    max-width: 100%;
  }

  .eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.68rem;
  }

  #coupleNames {
    font-size: clamp(3.2rem, 18vw, 5.1rem);
    line-height: 0.92;
    margin-top: 10px;
  }

  .date-block {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr 0.8fr;
    width: min(100%, 440px);
    margin: 18px auto 0;
    gap: 8px;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
  }

  .date-label,
  .date-year {
    padding: 0.5rem 0.6rem;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
  }

  .hero-copy {
    font-size: 0.98rem;
    line-height: 1.75;
    max-width: 100%;
    margin-top: 18px;
  }

  main {
    margin-top: 22px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 18px;
  }

  .info-card,
  .gallery-panel,
  .upload-panel {
    border-radius: 22px;
  }

  .info-card {
    padding: 22px 18px;
  }

  .card-tag {
    letter-spacing: 0.12em;
  }

  .gallery-panel,
  .upload-panel {
    padding: 22px 16px;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .section-heading h2 {
    font-size: 2.5rem;
    line-height: 1;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .photo-card--wide {
    grid-column: span 2;
  }

  .photo-card--tall {
    grid-row: span 1;
  }

  .photo-card {
    border-radius: 16px;
    min-height: 180px;
  }

  .photo-card figcaption {
    padding: 10px 9px 12px;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
  }

  .upload-box {
    padding: 16px 14px;
  }

  .upload-item {
    font-size: 0.82rem;
    padding: 10px 12px;
  }

  .upload-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    justify-content: center;
    padding: 0.95rem 1rem;
    font-size: 0.96rem;
  }

  .upload-preview {
    grid-template-columns: 1fr;
  }

  .upload-item {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
}
