/* ============================================================
   DAVETNAME GARDEN (BAHÇE) — Theme Stylesheet
   ============================================================ */

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

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --leaf:    #1E3B2F;
  --cream:   #F6F1E7;
  --moss-60: rgba(30, 59, 47, 0.60);
  --sage:    rgba(30, 59, 47, 0.22);
  --bloom:   #C9A227;
  --serif:   'Cormorant Garamond', Georgia, serif;
  --sans:    'Jost', 'Segoe UI', sans-serif;
  --content-max: 640px;
  --section-gap: clamp(96px, 16vh, 144px);
  --h-pad: 24px;
}

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

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

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

/* ── SVG botanical elements ─────────────────────────────────── */
.arch-branch {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.arch-branch path { stroke: var(--sage); stroke-width: 1.5; stroke-linecap: round; }
.arch-static path { stroke: var(--sage); /* already drawn */ }

/* SVG path draw animation (set by JS using dasharray/dashoffset) */
@keyframes draw-path {
  to { stroke-dashoffset: 0; }
}

.divider-sprig {
  width: 64px;
  margin: 0 auto clamp(48px, 8vh, 80px);
}
.divider-sprig svg { width: 100%; }
.divider-sprig path { stroke: var(--sage); stroke-width: 1.5; stroke-linecap: round; }

.corner-leaf {
  position: absolute;
  width: 72px;
  height: 72px;
  pointer-events: none;
  overflow: visible;
}
.corner-leaf path { stroke: var(--sage); stroke-width: 1.5; stroke-linecap: round; fill: none; }

.corner-tl { top: 0; left: 0; transform: translate(-50%, -50%); }
.corner-br { bottom: 0; right: 0; transform: translate(50%, 50%); }

/* ── Music badge ─────────────────────────────────────────────── */
#music-badge { border: 1.5px solid var(--leaf); }
#music-badge .bar { background: var(--bloom); height: 12px; }

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

#section-opening .arch-branch { margin-bottom: 0; }

.opening-names {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 8vw, 52px);
  color: var(--leaf);
  text-align: center;
  line-height: 1.2;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.opening-names.visible { opacity: 1; }

.opening-names .bloom { color: var(--bloom); font-style: italic; }

.tap-hint {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--moss-60);
  opacity: 0;
  transition: opacity 0.5s ease 0.3s;
}
.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(--moss-60);
}

/* Soft upward fade on open */
#section-opening.lifting {
  animation: soft-lift 800ms ease forwards;
  pointer-events: none;
}
@keyframes soft-lift {
  to { opacity: 0; transform: translateY(-24px); }
}

/* ── Eyebrows with sage dashes ─────────────────────────────── */
.eyebrow {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--leaf);
  text-transform: uppercase;
  margin-bottom: 32px;
}

/* ── §2 Hero ─────────────────────────────────────────────────── */
#section-hero {
  position: relative;
  padding-top: clamp(80px, 14vh, 120px);
  padding-bottom: var(--section-gap);
  overflow: hidden;
}

.hero-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 11vw, 88px);
  color: var(--leaf);
  line-height: 1.05;
  /* Lowercase via config formatter */
}

.hero-ampersand {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 6vw, 44px);
  color: var(--bloom);
  line-height: 1.6;
  display: block;
}

.hero-invite-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 4vw, 21px);
  color: var(--leaf);
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-info {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--moss-60);
  line-height: 1.7;
}

.scroll-leaf {
  margin-top: clamp(40px, 8vh, 64px);
  display: flex;
  justify-content: center;
  animation: leaf-float 2.5s ease-in-out infinite;
}
.scroll-leaf svg { width: 12px; height: 18px; }

@keyframes leaf-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ── §3 Photo ─────────────────────────────────────────────────── */
#section-photo { padding-bottom: var(--section-gap); }

.photo-wrap { margin-bottom: 56px; }

/* Arched photo frame — kemer silüeti */
.hero-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border-radius: 999px 999px 12px 12px;
}

.families {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--leaf);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.families-dot { color: var(--bloom); }

.welcome-note {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--moss-60);
  margin-top: 14px;
  line-height: 1.7;
}

/* ── §4 Countdown ────────────────────────────────────────────── */
#section-countdown { padding-bottom: var(--section-gap); }

.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 5vw, 40px);
}

.countdown-cell { text-align: center; }

.countdown-num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 9vw, 64px);
  color: var(--leaf);
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1;
}

.countdown-label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--moss-60);
  margin-top: 8px;
  display: block;
}

.countdown-vline {
  width: 1px;
  height: 40px;
  background: var(--sage);
  align-self: center;
  flex-shrink: 0;
}

[data-cd="ended"] {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--leaf);
}

/* ── §5 Schedule ─────────────────────────────────────────────── */
#section-schedule { padding-bottom: var(--section-gap); }

.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}
.timeline-line {
  position: absolute; left: 8px; top: 0; width: 1px; height: 100%;
  background: var(--sage); transform-origin: top; transform: scaleY(0);
  transition: transform 0.8s ease;
}
.timeline-line.drawn { transform: scaleY(1); }

.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute; left: -28px; top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bloom);
}
.timeline-time { font-family: var(--serif); font-weight: 500; font-size: 20px; color: var(--leaf); }
.timeline-label { font-family: var(--sans); font-size: 14px; color: var(--moss-60); margin-top: 2px; }

/* ── §6 Gallery ──────────────────────────────────────────────── */
#section-gallery { padding-bottom: var(--section-gap); }

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

.gallery-row { display: grid; gap: 12px; margin-bottom: 12px; }
.gallery-row.large  { grid-template-columns: 1fr; }
.gallery-row.pair   { grid-template-columns: 1fr 1fr; }

.gallery-img { width: 100%; object-fit: cover; display: block; border-radius: 12px; }
.gallery-row.large .gallery-img { aspect-ratio: 4 / 3; }
.gallery-row.pair  .gallery-img { aspect-ratio: 1; }

/* ── §7 Venue ─────────────────────────────────────────────────── */
#section-venue { padding-bottom: var(--section-gap); }

.venue-name { font-family: var(--serif); font-size: 24px; color: var(--leaf); margin-bottom: 4px; }
.venue-address { font-family: var(--sans); font-size: 14px; color: var(--moss-60); }

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

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

.btn {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.1em;
  padding: 12px 28px; cursor: pointer; border-radius: 999px;
  transition: opacity 0.2s, background 0.2s; touch-action: manipulation;
}
.btn-primary { background: var(--leaf); color: var(--cream); }
.btn-primary:hover { opacity: 0.88; }
.btn-outline { border: 1px solid var(--leaf); color: var(--leaf); background: transparent; }
.btn-outline:hover { background: rgba(30,59,47,0.06); }

/* ── §8 LCV ──────────────────────────────────────────────────── */
#section-lcv { padding-bottom: var(--section-gap); }
.lcv-sub { font-family: var(--sans); font-size: 14px; color: var(--moss-60); margin-bottom: 28px; }

.lcv-card {
  background: #FBF8F1; border: 1px solid var(--sage);
  border-radius: 16px; padding: clamp(28px, 6vw, 48px);
  text-align: left;
}

#section-lcv .field-label { color: var(--moss-60); }
#section-lcv .field-input { border-bottom-color: var(--sage); color: var(--leaf); }
#section-lcv .field-input:focus { border-bottom-color: var(--bloom); border-bottom-width: 2px; }
#section-lcv .radio-custom { border-color: var(--sage); }
#section-lcv .radio-option.selected .radio-custom { border-color: var(--bloom); }
#section-lcv .radio-option.selected .radio-custom::after { background: var(--bloom); }
#section-lcv .lcv-submit {
  background: var(--leaf); color: var(--cream); border-radius: 999px;
  padding: 12px 32px; font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; transition: opacity 0.2s;
}
#section-lcv .lcv-submit:hover { opacity: 0.85; }
#section-lcv .lcv-success { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--leaf); }
#section-lcv .lcv-error { color: #8C3B2E; font-size: 13px; }

/* ── §8B Memory Wall ─────────────────────────────────────────── */
#section-memory { padding-bottom: var(--section-gap); }
.memory-invite-line { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--leaf); margin-bottom: 28px; }

.memory-upload-card {
  background: #FBF8F1; border: 1px solid var(--sage);
  border-radius: 16px; padding: clamp(28px, 6vw, 48px); margin-bottom: 40px; text-align: left;
}

#section-memory .field-label { color: var(--moss-60); }
#section-memory .field-input { border-bottom-color: var(--sage); color: var(--leaf); }
#section-memory .field-input:focus { border-bottom-color: var(--bloom); border-bottom-width: 2px; }
#section-memory .photo-picker-btn { border-color: var(--leaf); color: var(--leaf); border-radius: 999px; }
.memory-consent { font-size: 12px; color: var(--moss-60); }
.memory-submit {
  background: var(--leaf); color: var(--cream); border-radius: 999px;
  padding: 12px 28px; font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; transition: opacity 0.2s;
}
.memory-submit:hover { opacity: 0.85; }
.memory-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.memory-entry-name { font-family: var(--serif); font-weight: 500; font-size: 17px; color: var(--leaf); }
.memory-entry-note { font-size: 13px; color: var(--moss-60); line-height: 1.6; }
.memory-entry img { border-radius: 12px; }
.memory-archived { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--moss-60); }

/* ── §9 Closing ──────────────────────────────────────────────── */
#section-closing {
  position: relative;
  min-height: 70vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--section-gap) var(--h-pad);
  overflow: hidden; text-align: center;
}

.closing-names {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 6vw, 40px);
  color: var(--leaf); margin-bottom: 16px;
}

.closing-text {
  font-family: var(--serif); font-style: italic;
  font-size: 18px; color: var(--moss-60); margin-bottom: 48px;
}

.brand-mark {
  font-family: var(--sans); font-weight: 300; font-size: 11px;
  letter-spacing: 0.3em; color: rgba(30,59,47,0.40);
  text-transform: uppercase; text-decoration: none;
  transition: color 0.2s;
}
.brand-mark:hover { color: rgba(30,59,47,0.70); }

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

/* ── Responsive ────────────────────────────────────────────────── */
@media (min-width: 768px) {
  :root { --h-pad: 40px; }
}

.load-more-btn { border-color: var(--leaf); color: var(--leaf); border-radius: 999px; }
