/* ============================================================
   DAVETNAME MODERN — Theme Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@1,500&family=Jost:wght@300;400;500&display=swap&subset=latin-ext');
@import '../../shared/core.css';

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --paper:   #FAFAF8;
  --ink:     #141414;
  --ink-55:  rgba(20, 20, 20, 0.55);
  --hair:    rgba(20, 20, 20, 0.14);
  --accent:  #3E6C93;
  --sans:    'Jost', 'Segoe UI', sans-serif;
  --serif:   'Cormorant Garamond', Georgia, serif;
  --content-max: 760px;
  --section-gap: clamp(112px, 20vh, 192px);
  --h-pad: 24px;
}

/* ── Base ───────────────────────────────────────────────────── */
html { font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--h-pad);
}

/* Section label + hairline divider */
.section-label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(11px, 2.5vw, 13px);
  letter-spacing: 0.4em;
  color: var(--ink-55);
  text-transform: uppercase;
  padding-top: var(--section-gap);
  border-top: 1px solid var(--hair);
  margin-bottom: 40px;
}

/* ── Music badge (ink theme) ────────────────────────────────── */
#music-badge { border: 1px solid var(--ink); }
#music-badge .bar { background: var(--accent); height: 12px; }

/* ── Opening ────────────────────────────────────────────────── */
#section-opening {
  position: fixed;
  inset: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.opening-names {
  text-align: center;
  line-height: 0.92;
}

.opening-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(52px, 14vw, 120px);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: uppercase;
  /* individual chars animated by JS */
}

.opening-name span {
  display: inline-block;
  opacity: 0;
}

.opening-amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 5vw, 44px);
  color: var(--accent);
  display: block;
  line-height: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.opening-amp.visible { opacity: 1; }

.tap-hint {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--ink-55);
  position: absolute;
  bottom: 80px;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.tap-hint.visible { opacity: 1; }

#section-opening .brand-mark {
  position: absolute;
  bottom: 24px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--ink-55);
}

@keyframes ink-char {
  to { opacity: 1; filter: blur(0); }
}

/* Fade out on open */
#section-opening.closing {
  animation: fade-out 700ms ease forwards;
  pointer-events: none;
}

@keyframes fade-out {
  to { opacity: 0; }
}

/* ── Hero ───────────────────────────────────────────────────── */
#section-hero {
  padding-top: clamp(80px, 15vh, 140px);
  padding-bottom: 0;
}

#section-hero .section-label { border-top: none; padding-top: 0; }

.hero-names {
  margin-bottom: 40px;
}

.hero-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(52px, 14vw, 128px);
  letter-spacing: -0.01em;
  line-height: 0.92;
  color: var(--ink);
  text-transform: uppercase;
}

.hero-ampersand {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 5vw, 44px);
  color: var(--accent);
  display: block;
  line-height: 2;
}

.hero-invite-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 5vw, 26px);
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 56px;
}

.hero-date {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(36px, 9vw, 80px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
}

.hero-info {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-55);
  margin-top: 8px;
}

.hero-scroll-hint {
  margin-top: 64px;
  width: 48px;
  height: 1px;
  background: var(--accent);
  animation: scroll-pulse 2.5s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { width: 48px; }
  50%       { width: 72px; }
}

/* ── Photo ──────────────────────────────────────────────────── */
#section-photo { padding-bottom: 0; }

.hero-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

#section-photo .content { padding-top: 40px; }

.families {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
}

.families-amp { color: var(--accent); margin: 0 8px; }

.welcome-note {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-55);
  margin-top: 12px;
  line-height: 1.7;
}

/* ── Countdown ──────────────────────────────────────────────── */
#section-countdown { padding-bottom: 0; }

.countdown-row {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 3vw, 24px);
  flex-wrap: wrap;
}

.countdown-cell {
  display: inline-grid;
  grid-template-rows: auto auto;
}

.countdown-num {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(40px, 11vw, 88px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}

.countdown-dash {
  font-family: var(--sans);
  font-size: clamp(24px, 6vw, 56px);
  color: var(--accent);
  line-height: 1;
  align-self: center;
  margin-bottom: 20px;
}

.countdown-lbl {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-55);
  margin-top: 6px;
}

.countdown-ended {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 5vw, 32px);
  color: var(--ink);
}

/* ── Schedule ───────────────────────────────────────────────── */
#section-schedule { padding-bottom: 0; }

.schedule-table { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hair);
}

.timeline-item:first-child { border-top: 1px solid var(--hair); }
.timeline-dot { display: none; }

.timeline-time {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.timeline-label {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.4;
}

/* ── Gallery ────────────────────────────────────────────────── */
#section-gallery { padding-bottom: 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Venue ──────────────────────────────────────────────────── */
#section-venue { padding-bottom: 0; }

.venue-name {
  font-family: var(--sans);
  font-size: 24px;
  color: var(--ink);
}

.venue-address {
  font-size: 15px;
  color: var(--ink-55);
  margin-top: 4px;
}

.maps-iframe {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--hair);
  margin-top: 24px;
  display: block;
}

.venue-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 28px;
  cursor: pointer;
  transition: opacity 0.18s, background 0.18s, color 0.18s;
  touch-action: manipulation;
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent);
  color: var(--paper);
}
.btn-accent:hover { opacity: 0.88; }

.btn-outline {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── LCV ────────────────────────────────────────────────────── */
#section-lcv { padding-bottom: 0; }
.lcv-sub { font-size: 15px; color: var(--ink-55); margin-bottom: 32px; }
.optional { font-size: 11px; opacity: 0.6; }

#section-lcv .field-label { color: var(--ink-55); }
#section-lcv .field-input {
  border-bottom-color: var(--hair);
  color: var(--ink);
}
#section-lcv .field-input:focus {
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
}
#section-lcv .radio-custom { border-color: var(--hair); }
#section-lcv .radio-option.selected .radio-custom { border-color: var(--accent); }
#section-lcv .radio-option.selected .radio-custom::after { background: var(--accent); }

#section-lcv .lcv-submit {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 32px;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s;
}
#section-lcv .lcv-submit:hover { background: var(--accent); }
#section-lcv .lcv-success {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
}
#section-lcv .lcv-error { color: #A33A2E; font-size: 13px; }

/* ── Memory Wall ─────────────────────────────────────────────── */
#section-memory { padding-bottom: 0; }

.memory-invite-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 32px;
}

#section-memory .field-label { color: var(--ink-55); }
#section-memory .field-input { border-bottom-color: var(--hair); color: var(--ink); }
#section-memory .field-input:focus { border-bottom-color: var(--accent); border-bottom-width: 2px; }
#section-memory .photo-picker-btn { border-color: var(--ink); color: var(--ink); }

.memory-consent { font-size: 12px; color: var(--ink-55); }

.memory-submit {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 32px;
  font-size: 13px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s;
}
.memory-submit:hover { background: var(--accent); }
.memory-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* Masonry-ish feed (2 col desktop) */
.memory-feed {
  column-count: 1;
  column-gap: 24px;
  margin-top: 48px;
}
@media (min-width: 600px) { .memory-feed { column-count: 2; } }

.memory-entry { break-inside: avoid; margin-bottom: 32px; }
.memory-entry img { width: 100%; display: block; }

.memory-entry-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  margin-top: 8px;
}
.memory-entry-note { font-size: 14px; color: var(--ink-55); margin-top: 4px; line-height: 1.6; }
.memory-archived { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-55); }

/* ── Closing ────────────────────────────────────────────────── */
#section-closing {
  padding-top: clamp(140px, 24vh, 220px);
  padding-bottom: clamp(80px, 12vh, 120px);
}

#section-closing .section-label { display: none; }

.closing-block {
  margin-bottom: 64px;
}

.closing-signature {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 12px;
}

.closing-text {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-55);
}

.brand-mark {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(20, 20, 20, 0.35);
  display: block;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.brand-mark:hover { color: rgba(20, 20, 20, 0.60); }

/* Archived */
body.archived .page-content { display: none; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (min-width: 768px) {
  :root { --h-pad: 40px; }
  .hero-name { line-height: 0.88; }
}

/* Load more */
.load-more-btn {
  border-color: var(--ink);
  color: var(--ink);
}
.load-more-btn:hover { border-color: var(--accent); color: var(--accent); }
