:root {
  --cream: #f6efe6;
  --ivory: #fbf7f1;
  --paper: #f3eadf;
  --beige: #e4d5c3;
  --taupe: #c9b59a;
  --olive: #7a8b5c;
  --olive-deep: #5d6b43;
  --olive-soft: #a3b084;
  --chocolate: #4a3226;
  --chocolate-soft: #6b4a3a;
  --ink: #3d2b22;
  --white: #fffdf9;
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  min-width: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 16px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--olive-deep);
}

.script {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  color: var(--chocolate);
  line-height: 1.1;
}

.serif {
  font-family: "Cormorant Garamond", serif;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
  padding: 0 8px;
}

.section-head h2 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(42px, 6vw, 64px);
  margin: 10px 0 14px;
  color: var(--chocolate);
}

.section-head p {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-style: italic;
  color: var(--chocolate-soft);
}

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header.is-scrolled,
.header.menu-open {
  background: rgba(251, 247, 241, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(74, 50, 38, 0.08);
}

.header.is-scrolled .logo,
.header.is-scrolled .nav a,
.header.is-scrolled .menu-btn,
.header.menu-open .logo,
.header.menu-open .nav a,
.header.menu-open .menu-btn {
  color: var(--chocolate);
}

.header-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory);
}

.menu-btn {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
  touch-action: manipulation;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  margin: 0 auto;
  position: relative;
}

.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

/* Hero */
.hero {
  min-height: 100svh;
  min-height: 100dvh;
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ivory);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(61, 43, 34, 0.45) 0%, rgba(61, 43, 34, 0.55) 45%, rgba(61, 43, 34, 0.72) 100%),
    url("../img/hero.png") center/cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: calc(120px + env(safe-area-inset-top, 0px)) 20px 88px;
  width: min(640px, 100%);
}

.hero-date {
  letter-spacing: 0.28em;
  font-size: clamp(11px, 3vw, 13px);
  text-transform: uppercase;
}

.hero-kicker {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 253, 249, 0.82);
}

.hero h1 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(42px, 12vw, 92px);
  margin: 8px 0 12px;
  padding: 0 8px;
  line-height: 1.05;
}

.hero-lead {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(18px, 4.2vw, 22px);
  font-style: italic;
  max-width: 420px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--olive);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
  background: var(--olive-deep);
  color: var(--ivory);
  transition: transform 0.2s ease, background 0.2s ease;
  touch-action: manipulation;
}

.btn:hover {
  background: var(--chocolate);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(255, 253, 249, 0.55);
}

.scroll-hint {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 253, 249, 0.75);
  white-space: nowrap;
}

/* Invite */
.invite {
  background: var(--ivory);
}

.invite-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.invite-card {
  border: 1px solid var(--olive-soft);
  padding: 18px;
  background: var(--white);
}

.invite-frame {
  border: 1px solid rgba(122, 139, 92, 0.4);
  padding: 48px 32px;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 240px 240px;
  gap: 14px;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--beige);
}

.gallery-grid img:first-child {
  grid-row: 1 / 3;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq-list details {
  background: var(--white);
  border: 1px solid var(--beige);
  padding: 18px 22px;
}

.faq-list summary {
  cursor: pointer;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  color: var(--chocolate);
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list p {
  margin-top: 8px;
  color: var(--chocolate-soft);
}

.invite-frame .script {
  font-size: clamp(34px, 8vw, 48px);
  margin: 8px 0 16px;
}

.invite-frame p {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(16px, 4vw, 20px);
  color: var(--chocolate-soft);
}

.ornament {
  width: min(120px, 60%);
  margin: 22px auto;
  color: var(--olive);
}

.big-date {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(64px, 18vw, 88px);
  line-height: 0.85;
  color: var(--chocolate);
}

.month {
  letter-spacing: 0.24em;
  text-transform: lowercase;
  color: var(--olive-deep);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(18px, 5vw, 22px);
}

.invite-copy h2 {
  font-size: clamp(40px, 10vw, 56px);
  margin: 8px 0 18px;
}

.invite-copy p {
  font-size: 17px;
  color: var(--chocolate-soft);
  margin-bottom: 14px;
}

/* Countdown */
.countdown-section {
  background:
    linear-gradient(180deg, rgba(61, 43, 34, 0.62), rgba(61, 43, 34, 0.72)),
    url("../img/botanical.png") center/cover no-repeat;
  color: var(--ivory);
  text-align: center;
}

.countdown-section .eyebrow,
.countdown-section h2 {
  color: var(--ivory);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 140px));
  gap: 12px;
  justify-content: center;
  margin-top: 36px;
}

.countdown div {
  border: 1px solid rgba(255, 253, 249, 0.28);
  padding: 18px 6px 14px;
  background: rgba(61, 43, 34, 0.25);
  min-width: 0;
}

.countdown strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 8vw, 48px);
  line-height: 1;
}

.countdown span {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Timeline */
.timeline {
  display: grid;
  gap: 0;
  max-width: 680px;
  margin: 0 auto;
}

.t-item {
  display: grid;
  grid-template-columns: 110px 28px 1fr;
  gap: 18px;
  align-items: start;
}

.t-time {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  color: var(--chocolate);
  text-align: right;
}

.t-dot {
  width: 14px;
  height: 14px;
  border: 1px solid var(--olive);
  border-radius: 50%;
  margin: 12px auto 0;
  background: var(--ivory);
  position: relative;
}

.t-item:not(:last-child) .t-dot::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 1px;
  height: 72px;
  background: var(--olive-soft);
}

.t-item h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
}

.t-item p {
  color: var(--chocolate-soft);
  font-size: 15px;
}

.t-body {
  padding-bottom: 36px;
}

/* Dress */
.dress-note {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 42px 36px;
  border: 1px solid var(--beige);
  background: var(--white);
}

.dress-note p {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  line-height: 1.45;
  color: var(--chocolate);
}

.dress-note p + p {
  margin-top: 14px;
  font-size: 20px;
  font-style: italic;
  color: var(--chocolate-soft);
}

.dress-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 860px;
  margin: 32px auto 0;
}

.dress-photos figure {
  background: var(--white);
  border: 1px solid var(--beige);
  padding: 10px 10px 18px;
}

.dress-photos img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.dress-photos figcaption {
  margin-top: 12px;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-style: italic;
  color: var(--chocolate-soft);
}

/* Gifts */
.gifts {
  background: var(--ivory);
}

.gift-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.gift-card {
  padding: 36px 32px;
  border: 1px solid var(--beige);
  background: var(--white);
}

.gift-mark {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--olive-deep);
  margin-bottom: 10px;
}

.gift-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  margin-bottom: 10px;
}

/* Footer */
.footer {
  padding: 48px 16px calc(36px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: var(--chocolate);
  color: var(--beige);
}

.footer .script {
  color: var(--ivory);
  font-size: clamp(32px, 8vw, 40px);
  margin-bottom: 8px;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s ease forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

body.menu-locked {
  overflow: hidden;
  height: 100dvh;
}

@media (hover: none) {
  .btn:hover {
    transform: none;
    background: var(--olive-deep);
  }
}

@media (max-width: 860px) {
  .menu-btn { display: grid; place-items: center; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--ivory);
    padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
  }

  .nav.is-open { display: flex; }

  .nav a {
    color: var(--chocolate);
    padding: 16px 24px;
    min-height: 48px;
    border-top: 1px solid var(--beige);
  }

  .invite-grid,
  .gift-cards,
  .gallery-grid,
  .dress-photos {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-rows: none;
  }

  .gallery-grid img {
    min-height: 200px;
    height: 42vw;
    max-height: 280px;
  }

  .gallery-grid img:first-child {
    grid-row: auto;
  }

  .dress-photos img {
    height: 220px;
  }

  .t-item {
    grid-template-columns: 72px 20px minmax(0, 1fr);
    gap: 10px;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 160px));
  }

  .section { padding: 64px 0; }

  .section-head {
    margin-bottom: 36px;
  }

  .invite-frame {
    padding: 32px 18px;
  }

  .invite-card {
    padding: 12px;
  }

  .hero-actions .btn {
    width: min(100%, 280px);
  }

  .dress-note,
  .gift-card {
    padding: 28px 20px;
  }

  .faq-list details {
    padding: 16px 18px;
  }

  .faq-list summary {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .eyebrow {
    letter-spacing: 0.22em;
    font-size: 11px;
  }

  .t-item {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .t-time {
    grid-column: 2;
    text-align: left;
    font-size: 22px;
  }

  .t-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 10px;
  }

  .t-item:not(:last-child) .t-dot::after {
    height: calc(100% + 18px);
  }

  .scroll-hint {
    display: none;
  }

  .countdown span {
    letter-spacing: 0.08em;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
