/* ============================================================
   base.css — Tüm temalarda ortak yapısal ve bileşen stilleri.
   Renk/font/dekoratif kararlar theme-*.css dosyalarında,
   CSS custom property (var(--...)) olarak tanımlanır.
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: calc(16px * var(--body-scale, 1));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-style: var(--display-style, normal);
  font-weight: var(--display-weight, 600);
  margin: 0;
  letter-spacing: .01em;
}
.section-title { font-size: calc(24px * var(--heading-scale, 1)); }

section { padding: 80px 20px; max-width: 640px; margin: 0 auto; }
.center { text-align: center; }

p.lede {
  font-size: calc(17px * var(--body-scale, 1));
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 46ch;
  margin: 0 auto;
}

button, .btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 14px 30px;
  border-radius: var(--radius, 8px);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity .15s ease, transform .15s ease;
}
button:hover, .btn:hover { opacity: .88; }
button:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--accent); }

input, textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 14px;
}
label { font-size: 13px; color: var(--text-soft); display: block; margin-bottom: 6px; }

.form-error {
  background: #FBE7E4; color: #8A2C22; border: 1px solid #E7B4AC;
  border-radius: var(--radius, 8px); padding: 12px 16px; font-size: 14px; margin-bottom: 18px;
}
.form-success {
  background: #E8F0E4; color: #33502A; border: 1px solid #B9D2AC;
  border-radius: var(--radius, 8px); padding: 12px 16px; font-size: 14px; margin-bottom: 18px;
}

/* ---- Hero / Açılış ---- */
html.envelope-locked, html.envelope-locked body { height: 100%; overflow: hidden; }
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px; position: relative; overflow: hidden;
}
#site-content { display: none; }
#site-content.revealed { display: block; animation: siteContentFadeIn .6s ease; }
@keyframes siteContentFadeIn { from { opacity: 0; } to { opacity: 1; } }

.hero-front { position: relative; z-index: 1; }
#hero .kicker {
  font-family: var(--font-display);
  font-style: var(--display-style);
  font-size: 20px;
  letter-spacing: .03em;
  color: var(--accent);
  margin-bottom: 18px;
}
#hero h1 { font-size: calc(clamp(40px, 8vw, 68px) * var(--heading-scale, 1)); line-height: 1.05; }
#hero .amp { color: var(--accent); }
#hero .subtitle { margin-top: 14px; font-size: 15px; color: var(--text-soft); }

.envelope-box { margin: 22px auto 0; max-width: 300px; position: relative; cursor: pointer; }
.envelope-box.opened { cursor: default; }
/* Zarf motifinin görsel stili (kenarlık, kapı panelleri) her temada
   opsiyoneldir — bu kural theme-*.css dosyalarında tanımlanır. */

.envelope-door { display: none; } /* varsayılan: bu temada zarf kapısı yok */
.envelope-cover-text { display: none; } /* varsayılan: bu temada kapak metni yok */

#openBtn { margin-top: 40px; max-width: 300px; line-height: 1.4; }

#hero-photo {
  margin-top: 36px; width: 100%; max-width: 340px; aspect-ratio: 4/5;
  border-radius: var(--radius, 8px); overflow: hidden; opacity: 0; transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease; display: none;
}
#hero-photo.revealed { opacity: 1; transform: translateY(0); display: block; }
#hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 500; }

#muteBtn {
  position: fixed; bottom: 20px; right: 20px; z-index: 600;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 19px; display: none; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); cursor: pointer; padding: 0;
}
#muteBtn.visible { display: flex; }

#scrollHint {
  position: fixed; bottom: 20px; right: 20px; z-index: 590;
  width: 50px; height: 50px; border-radius: 50%;
  border: none; background: var(--accent); color: #fff;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.18); cursor: pointer; padding: 0;
  animation: scrollHintBounce 1.6s ease-in-out infinite;
}
#scrollHint.visible { display: flex; }
@keyframes scrollHintBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
/* Müzik düğmesi de açıksa üst üste binmesinler diye biraz yukarı alıyoruz */
#muteBtn { bottom: 82px; }

.leaf-decor { display: none; justify-content: center; gap: 22px; margin-bottom: 6px; opacity: .85; }
.leaf-decor svg { width: 28px; height: 68px; }

/* ---- Aile isimleri ---- */
#family .names { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; margin-top: 10px; }
#family .side { text-align: center; }
#family .side h3 { font-size: 22px; margin-bottom: 6px; }
#family .side p { font-size: 13px; color: var(--text-soft); margin: 0; }

/* ---- Davetiye metni ---- */
#invitation p.lede { white-space: pre-line; }

/* ---- Geri sayım ---- */
#countdown-grid { display: flex; justify-content: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }
.cd-box { min-width: 74px; }
.cd-num { font-family: var(--font-display); font-size: 38px; font-weight: 600; font-style: normal; color: var(--accent); }
.cd-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); margin-top: 4px; }

/* ---- Konum / Hava durumu ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 8px); padding: 24px; margin-top: 20px; }
.map-embed { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius, 8px); border: 1px solid var(--line); overflow: hidden; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.map-placeholder {
  width: 100%; aspect-ratio: 16/8; border-radius: var(--radius, 8px);
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); font-size: 13px; border: 1px solid var(--line);
}
.venue-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.venue-actions .btn { padding: 11px 18px; font-size: 13.5px; }

#weather-row { display: flex; gap: 10px; margin-top: 18px; overflow-x: auto; }
.weather-day { flex: 1; min-width: 76px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 8px); padding: 12px 8px; }
.weather-day.today { border-color: var(--accent); background: var(--accent-soft); }
.weather-day .wd { font-size: 12px; color: var(--text-soft); margin-bottom: 6px; }
.weather-day .wi { font-size: 24px; }
.weather-day .wt { font-size: 12.5px; margin-top: 5px; font-weight: 600; }

/* ---- RSVP ---- */
.radio-row { display: flex; gap: 10px; margin-bottom: 14px; }
.radio-row label {
  flex: 1; text-align: center; border: 1px solid var(--line); border-radius: var(--radius, 8px);
  padding: 12px 8px; cursor: pointer; font-size: 13px; color: var(--text); margin: 0;
}
.radio-row input { display: none; }
.radio-row label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }

/* ---- Onur listesi ---- */
#honor ol { list-style: none; padding: 0; margin: 22px 0 0 0; display: flex; flex-direction: column; gap: 14px; }
#honor li { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
#honor .hn { font-family: var(--font-display); font-size: 19px; font-style: var(--display-style, normal); }
#honor .hr { font-size: 12px; color: var(--text-soft); }

/* ---- Galeri ---- */
#gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }
#gallery-grid .g-item {
  aspect-ratio: 1/1; border-radius: var(--radius, 8px); overflow: hidden;
  background: var(--surface); display: flex; align-items: center; justify-content: center;
}
/* En-boy oranı bozulmadan, taşmadan, kırpılmadan gösterim: object-fit: contain */
#gallery-grid img, #gallery-grid video { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--surface); }
.g-item.is-video { position: relative; }
.g-item.is-video::after {
  content: '▶'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; background: rgba(0,0,0,.18); pointer-events: none;
}
#gallery-empty { text-align: center; color: var(--text-soft); font-size: 14px; margin-top: 20px; }
#gallery-grid .g-item { cursor: pointer; transition: opacity .15s ease; }
#gallery-grid .g-item:hover { opacity: .88; }

/* ---- Lightbox (galeri büyütme) ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(10,10,10,.94);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox-content { max-width: 92vw; max-height: 82vh; display: flex; align-items: center; justify-content: center; }
.lightbox-content img, .lightbox-content video {
  max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px; background: none; border: none;
  color: #fff; font-size: 34px; line-height: 1; cursor: pointer; padding: 6px 10px;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 34px; line-height: 1; width: 52px; height: 52px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
@media (max-width: 560px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 26px; }
}

/* ---- Medya yükleme ---- */
.locked-box {
  text-align: center; padding: 32px 20px; border: 1px dashed var(--line);
  border-radius: var(--radius, 8px); color: var(--text-soft); font-size: 14px; margin-top: 20px;
}
.upload-preview-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.upload-preview-list .up-item { width: 70px; height: 70px; border-radius: var(--radius, 8px); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.upload-preview-list img, .upload-preview-list video { width: 100%; height: 100%; object-fit: contain; }

/* ---- Mesajlar ---- */
.msg-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.msg-item .mn { font-weight: 600; font-size: 14px; }
.msg-item .mt { font-size: 14px; color: var(--text-soft); margin-top: 4px; line-height: 1.5; white-space: pre-line; }
#messages-empty { text-align: center; color: var(--text-soft); font-size: 14px; margin-top: 16px; }

/* ---- IBAN ---- */
.iban-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 8px); padding: 16px; margin-top: 12px; }
.iban-row .iv { font-size: 13.5px; }
.iban-row .iv .who { font-size: 12px; color: var(--text-soft); display: block; margin-bottom: 3px; }
.copy-btn { padding: 8px 14px; font-size: 12.5px; }

/* ---- Footer ---- */
footer { text-align: center; padding: 56px 20px 40px; }
footer .fname { font-family: var(--font-display); font-style: var(--display-style, normal); font-size: 24px; }
footer .priv { font-size: 12px; color: var(--text-soft); margin-top: 16px; max-width: 40ch; margin-left: auto; margin-right: auto; line-height: 1.6; }

@media (max-width: 480px) {
  section { padding: 60px 18px; }
}
