/* =========================================================
   Anı Sitesi — Tasarım Sistemi
   Renkler: mürekkep moru (koyu), sıcak kağıt (açık), şarap gülü (vurgu),
   soluk altın (ikincil vurgu), adaçayı yeşili (üçüncül, az kullanım)
   Tipografi: Fraunces (başlık/isim) + Work Sans (gövde metin)
   ========================================================= */

:root {
  --ink-plum: #2b1f2d;
  --ink-plum-soft: #3a2b3d;
  --paper: #fbf4ec;
  --paper-warm: #f4e9db;
  --wine: #a24b5c;
  --wine-deep: #832f40;
  --gold: #be9a54;
  --gold-soft: #e6d3a8;
  --sage: #6e7b5e;
  --charcoal: #2a2129;
  --charcoal-soft: #6b5f68;
  --white: #ffffff;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-card: 0 10px 30px -12px rgba(43, 31, 45, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.17  0 0 0 0 0.12  0 0 0 0 0.18  0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--wine-deep); }

/* Erişilebilirlik: klavye odağı görünür olsun */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- HERO ---------------- */

.hero {
  background: radial-gradient(120% 140% at 50% -10%, var(--ink-plum-soft) 0%, var(--ink-plum) 62%);
  color: var(--paper);
  padding: 88px 24px 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero__frames {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.hero__photo {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-soft);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  background: var(--ink-plum-soft);
}

.hero__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold-soft);
}

.hero__names {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0;
  letter-spacing: -0.01em;
}

.hero__names em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-soft);
  padding: 0 0.15em;
}

.hero__subtitle {
  margin: 18px auto 0;
  max-width: 46ch;
  color: var(--paper-warm);
  font-size: 1.05rem;
  opacity: 0.9;
}

.hero__flourish {
  margin: 34px auto 0;
  width: 120px;
  height: auto;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.hero__counter {
  margin: 20px auto 0;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-plum);
  background: var(--gold-soft);
  padding: 7px 18px;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}

.hero__note {
  margin: 22px auto 0;
  max-width: 40ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-soft);
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

/* Hafif, tek seferlik kalp animasyonu — dikkat çekmek için ölçülü kullanılır */
.hero__hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__hearts .heart {
  position: absolute;
  bottom: -10%;
  width: 18px;
  height: 18px;
  fill: var(--wine);
  opacity: 0;
  animation: heart-float 9s ease-in infinite;
}

.hero__hearts .heart--1 { left: 18%; animation-delay: 0s; }
.hero__hearts .heart--2 { left: 52%; width: 13px; height: 13px; animation-delay: 3s; }
.hero__hearts .heart--3 { left: 80%; width: 15px; height: 15px; animation-delay: 6s; }

@keyframes heart-float {
  0%   { transform: translateY(0) scale(0.8); opacity: 0; }
  15%  { opacity: 0.35; }
  85%  { opacity: 0.2; }
  100% { transform: translateY(-320px) scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__hearts { display: none; }
}

/* ---------------- TIMELINE ---------------- */

.timeline-section {
  padding: 64px 0 100px;
}

.timeline {
  position: relative;
  margin-top: 12px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--gold-soft) 4%, var(--gold-soft) 96%, transparent);
}

@media (min-width: 720px) {
  .timeline::before { left: 50%; transform: translateX(-1px); }
}

.memory {
  position: relative;
  padding-left: 52px;
  margin-bottom: 52px;
}

.memory:last-child { margin-bottom: 0; }

.memory__dot {
  position: absolute;
  left: 20px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--wine);
  border: 3px solid var(--paper);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--gold-soft);
}

@media (min-width: 720px) {
  .memory {
    width: calc(50% - 40px);
    padding-left: 0;
    margin-bottom: 64px;
  }
  .memory--right { margin-left: calc(50% + 40px); }
  .memory--left  { margin-left: 0; text-align: right; }
  .memory--left .memory__card { text-align: left; }
  .memory--left .memory__dot { left: auto; right: -52px; }
  .memory--right .memory__dot { left: -52px; }
}

.memory__date {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--wine-deep);
  background: var(--gold-soft);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.memory__card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.memory__gallery {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-warm);
}

.memory__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory__gallery-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(43, 31, 45, 0.72);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}

.memory__gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(43, 31, 45, 0.55);
  color: var(--paper);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.memory__gallery-nav:hover { background: rgba(43, 31, 45, 0.8); }
.memory__gallery-nav--prev { left: 10px; }
.memory__gallery-nav--next { right: 10px; }

.memory__body { padding: 20px 22px 24px; }

.memory__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink-plum);
}

.memory__desc {
  margin: 0;
  color: var(--charcoal-soft);
  white-space: pre-line;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--charcoal-soft);
}

.empty-state h2 { font-family: var(--font-display); color: var(--ink-plum); }

/* Lightbox (fotoğrafı büyütme) */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 21, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

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

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 8px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--paper);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
}
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.8rem;
  cursor: pointer;
}

footer.site-footer {
  text-align: center;
  padding: 28px 24px 40px;
  color: var(--charcoal-soft);
  font-size: 0.85rem;
}

/* ---------------- ADMIN & AUTH ---------------- */

.admin-body {
  background: var(--paper-warm);
  min-height: 100vh;
}

.admin-header {
  background: var(--ink-plum);
  color: var(--paper);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header a { color: var(--gold-soft); text-decoration: none; font-weight: 600; }
.admin-header a:hover { text-decoration: underline; }

.admin-header__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.admin-nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

.admin-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 24px;
}

.card h1, .card h2 {
  font-family: var(--font-display);
  color: var(--ink-plum);
  margin-top: 0;
}

.form-group { margin-bottom: 20px; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--ink-plum);
}

.hint { font-size: 0.82rem; color: var(--charcoal-soft); margin-top: 4px; }

input[type="text"],
input[type="date"],
input[type="password"],
input[type="file"],
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e4d7c4;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--paper);
  color: var(--charcoal);
}

textarea { min-height: 120px; resize: vertical; }

input:focus, textarea:focus { border-color: var(--wine); }

.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn--primary { background: var(--wine); color: var(--white); }
.btn--primary:hover { background: var(--wine-deep); }

.btn--ghost { background: transparent; color: var(--ink-plum); border: 1.5px solid var(--ink-plum); }

.btn--danger { background: #fff; color: #a23c3c; border: 1.5px solid #a23c3c; }
.btn--danger:hover { background: #a23c3c; color: #fff; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.alert--success { background: #e6f0e1; color: #3d5a2e; }
.alert--error { background: #fbe4e2; color: #8a2c22; }

table.admin-table {
  width: 100%;
  border-collapse: collapse;
}
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #ede0cd;
  font-size: 0.92rem;
  vertical-align: middle;
}
table.admin-table th { color: var(--charcoal-soft); font-weight: 600; }
table.admin-table img.thumb {
  width: 52px; height: 52px; object-fit: cover; border-radius: 8px;
}

.existing-images { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.existing-images figure {
  margin: 0; position: relative; width: 88px;
}
.existing-images img {
  width: 88px; height: 88px; object-fit: cover; border-radius: 8px;
}
.existing-images label {
  display: flex; gap: 6px; align-items: center; font-weight: 400; font-size: 0.78rem;
  margin-top: 4px; color: var(--charcoal-soft);
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-plum);
  padding: 24px;
}

.login-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-card);
}

.login-card h1 {
  font-family: var(--font-display);
  color: var(--ink-plum);
  margin-top: 0;
  text-align: center;
}
