﻿/* ═══════════════════════════════════════════════
   Everlasting Love — Wedding Template
   Dark botanical-editorial aesthetic
   ═══════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --forest:      #0d1f16;
  --forest-mid:  #152c1e;
  --forest-lit:  #1e3d2a;
  --terra:       #c4714a;
  --terra-lt:    #d98c65;
  --ivory:       #f2ede4;
  --ivory-dark:  #e5ddd0;
  --muted:       rgba(242, 237, 228, 0.5);
  --border:      rgba(242, 237, 228, 0.12);

  --ff-serif:  "Bodoni Moda", Georgia, serif;
  --ff-sans:   "Space Grotesk", system-ui, sans-serif;
  --ff-mono:   "Space Mono", monospace;

  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --container: min(1200px, 100% - 3rem);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ff-sans);
  background: var(--forest);
  color: var(--ivory);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── UTILITIES ── */
.section-tag {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.6rem;
}

/* fade-up reveal */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.fade-up.visible { opacity: 1; transform: none; }

/* ── BUTTON ── */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border: 1.5px solid var(--ivory);
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory);
  background: transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover, .btn:focus-visible {
  background: var(--ivory);
  color: var(--forest);
  outline: none;
}
.btn--terra {
  border-color: var(--terra);
  color: var(--terra);
}
.btn--terra:hover, .btn--terra:focus-visible {
  background: var(--terra);
  color: var(--ivory);
}

/* ── NAV OVERLAY ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--forest-mid);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.overlay-close {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-close span {
  position: absolute;
  width: 24px; height: 1.5px;
  background: var(--ivory);
}
.overlay-close span:first-child { transform: rotate(45deg); }
.overlay-close span:last-child  { transform: rotate(-45deg); }

.overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.overlay-nav a {
  font-family: var(--ff-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ivory);
  opacity: 0.35;
  transition: opacity 0.2s, color 0.2s;
  position: relative;
}
.overlay-nav a::before {
  content: attr(data-num);
  position: absolute;
  left: -3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--terra);
  opacity: 0;
  transition: opacity 0.2s;
}
.overlay-nav a:hover,
.overlay-nav a:focus-visible { opacity: 1; color: var(--terra); outline: none; }
.overlay-nav a:hover::before { opacity: 1; }

.overlay-date {
  margin-top: 3rem;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── TOP BAR ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  transition: background 0.35s var(--ease);
}
.topbar.scrolled {
  background: rgba(13, 31, 22, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-brand {
  font-family: var(--ff-mono);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--ivory);
}
.brand-x { color: var(--terra); }

.menu-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ivory);
}
.menu-label {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.menu-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.menu-lines span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ivory);
  transition: width 0.25s var(--ease);
}
.menu-lines span:last-child { width: 14px; }
.menu-btn:hover .menu-lines span { width: 22px; }

/* ── HERO ── */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  position: relative;
  overflow: hidden;
}
.hero-left {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 4rem 4rem 5vw;
  gap: 1.75rem;
  position: relative;
  z-index: 1;
}
.hero-pre {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.hero h1 {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hname {
  font-family: var(--ff-serif);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3.5rem, 7.5vw, 7rem);
  line-height: 0.9;
  color: var(--ivory);
  letter-spacing: -0.02em;
}
.hamp {
  font-family: var(--ff-serif);
  font-size: clamp(4rem, 9vw, 9rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  color: var(--terra);
  align-self: center;
  margin: 0.1em 0;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta-sep { color: var(--terra); }

.hero-right {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 3rem 3rem;
  color: var(--terra);
  opacity: 0.45;
}
.hero-botanical {
  width: min(340px, 80%);
  height: auto;
}

/* Countdown strip (full width, bottom row) */
.countdown-strip {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--forest-mid);
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 3rem;
  border-right: 1px solid var(--border);
  gap: 0.3rem;
}
.cd-unit:last-child { border-right: none; }
.cd-num {
  font-family: var(--ff-serif);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--terra);
}
.cd-lbl {
  font-family: var(--ff-mono);
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-sep {
  font-family: var(--ff-mono);
  color: var(--terra);
  opacity: 0.3;
  font-size: 1.5rem;
  padding: 0 0.5rem;
  display: none; /* hidden — border separates units */
}

/* ── STORY ── */
.story {
  background: var(--forest-lit);
  padding-block: clamp(5rem, 10vw, 9rem);
}
.story-inner {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.story-block {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 3rem;
  padding-block: 4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.story-block:last-child { border-bottom: none; }

/* alt alignment */
.story-block--b .story-content { text-align: right; }
.story-block--b .story-num { text-align: right; }

.story-num {
  font-family: var(--ff-serif);
  font-size: clamp(5rem, 10vw, 9rem);
  font-weight: 700;
  font-style: italic;
  color: var(--terra);
  opacity: 0.08;
  line-height: 0.8;
  align-self: start;
  user-select: none;
  pointer-events: none;
}

.story-content { padding-top: 0.5rem; }
.story-chapter {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.9rem;
}
.story-quote {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ivory);
  margin-bottom: 1.25rem;
  max-width: 36ch;
}
.story-block--b .story-quote { margin-inline-start: auto; }
.story-body {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--muted);
  max-width: 55ch;
}
.story-block--b .story-body  { margin-inline-start: auto; }

/* ── DETAILS ── */
.details {
  background: var(--forest);
  padding-block: clamp(5rem, 10vw, 9rem);
}
.details-header {
  width: var(--container);
  margin-inline: auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.details-title {
  font-family: var(--ff-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1;
  color: var(--ivory);
}
.details-title em { color: var(--terra); font-style: italic; }

.details-cards {
  width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.dcard {
  padding: 3rem 2.5rem;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: background 0.3s var(--ease);
}
.dcard:last-child { border-right: none; }
.dcard:hover { background: var(--forest-mid); }
.dcard-ordinal {
  position: absolute;
  top: -0.5rem;
  right: 1.5rem;
  font-family: var(--ff-serif);
  font-size: clamp(5rem, 8vw, 8rem);
  font-style: italic;
  font-weight: 700;
  color: var(--terra);
  opacity: 0.06;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}
.dcard-time {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--terra);
  margin-bottom: 0.6rem;
}
.dcard-name {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ivory);
  margin-bottom: 0.9rem;
}
.dcard-venue {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ivory);
  opacity: 0.8;
  margin-bottom: 0.35rem;
}
.dcard-address {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.dcard-link {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.dcard-link:hover { border-color: var(--terra); }

.details-footnote {
  width: var(--container);
  margin-inline: auto;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pipe { color: var(--terra); opacity: 0.5; }

/* ── GALLERY (POLAROIDS) ── */
.gallery {
  background: var(--forest-lit);
  padding-block: clamp(5rem, 10vw, 9rem);
}
.gallery-header {
  width: var(--container);
  margin-inline: auto;
  margin-bottom: 4rem;
}
.gallery-title {
  font-family: var(--ff-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  color: var(--ivory);
}
.gallery-title em { color: var(--terra); }

.polaroid-grid {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
}

.polaroid {
  background: var(--ivory);
  padding: 1rem 1rem 3rem;
  width: 220px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  cursor: default;
}
.polaroid:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.04) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,0.5);
  z-index: 2;
}
.polaroid--tl    { transform: rotate(-2.5deg); }
.polaroid--tr    { transform: rotate(2deg);    }
.polaroid--tl-sm { transform: rotate(-1deg);   }
.polaroid--tr-sm { transform: rotate(1.5deg);  }

.polaroid-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--ivory-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a8f84;
}
.polaroid--tall .polaroid-img { aspect-ratio: 0.75; }

.polaroid figcaption {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  text-align: center;
  color: #6a5f55;
  letter-spacing: 0.08em;
  margin-top: 0.9rem;
  text-transform: uppercase;
}

/* ── RSVP ── */
.rsvp {
  background: var(--forest);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}
.rsvp-deco {
  background: var(--forest-mid);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 3rem;
  border-right: 1px solid var(--border);
  color: var(--terra);
  text-align: center;
  gap: 0.5rem;
}
.rsvp-deco-tag {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.rsvp-deco-date {
  font-family: var(--ff-serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--ivory);
}
.rsvp-deco-date em {
  display: block;
  font-weight: 400;
  font-size: 0.65em;
  color: var(--terra);
}
.rsvp-botanical {
  width: 160px;
  margin: 1.5rem 0;
  color: var(--terra);
  opacity: 0.5;
}
.rsvp-deco-couple {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--ivory);
  opacity: 0.5;
}

.rsvp-form-wrap {
  padding: 5rem clamp(2rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rsvp-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ivory);
  margin-bottom: 2.5rem;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 480px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.field label {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field label span { color: var(--terra); }
.field input,
.field select,
.field textarea {
  background: var(--forest-mid);
  border: 1px solid var(--border);
  color: var(--ivory);
  padding: 0.75rem 1rem;
  font-family: var(--ff-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(196, 113, 74, 0.15);
}
.field select { appearance: none; cursor: pointer; }

.toggle-attendance {
  display: flex;
  gap: 0;
}
.toggle-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-opt input { display: none; }
.toggle-opt span {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.7rem 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.toggle-opt:first-child span { border-right: none; }
.toggle-opt input:checked + span {
  background: var(--terra);
  border-color: var(--terra);
  color: var(--ivory);
}

.form-success {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--terra);
  min-height: 1.2em;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--forest-mid);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1.5rem;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-credit a {
  color: var(--terra);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.footer-credit a:hover { border-color: var(--terra); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-left { padding: 8rem 3rem 3rem; }
  .details-cards { grid-template-columns: 1fr; }
  .dcard { border-right: none; border-bottom: 1px solid var(--border); }
  .dcard:last-child { border-bottom: none; }
}
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-left { padding: 8rem 2rem 3rem; grid-column: 1; grid-row: 1; }
  .hero-right { display: none; }
  .countdown-strip { grid-column: 1; grid-row: 2; }
  .cd-unit { padding: 1rem 1.5rem; }

  .story-block { grid-template-columns: 60px 1fr; gap: 0 1.5rem; }
  .story-num { font-size: 3.5rem; }
  .story-block--b .story-content,
  .story-block--b .story-quote,
  .story-block--b .story-body { text-align: left; margin-inline-start: 0; }

  .rsvp { grid-template-columns: 1fr; }
  .rsvp-deco { display: none; }
  .rsvp-form-wrap { padding: 4rem 2rem; }

  .polaroid-grid { gap: 1.25rem; }
  .polaroid { width: 160px; }
}
@media (max-width: 480px) {
  .hero-left { padding: 7rem 1.5rem 2.5rem; }
  .cd-unit { padding: 0.9rem 1rem; }
  .field-row { grid-template-columns: 1fr; }
}
