/* ==========================================================================
   Anılarım Burada — misafir sayfası
   Sıcak, düğüne yakışır, koyu/açık tema uyumlu. Telefon öncelikli.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg:        #faf7f2;
  --surface:   #ffffff;
  --text:      #2a2520;
  --text-dim:  #6b6259;
  --line:      #e6ddd1;
  --gold:      #b8860b;
  --gold-soft: #d4a72c;
  --shadow:    0 2px 16px rgba(42, 37, 32, .07);

  --radius: 16px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #16130f;
    --surface:  #221d19;
    --text:     #f2ece4;
    --text-dim: #a89e93;
    --line:     #352e28;
    --gold:     #d4a72c;
    --gold-soft:#b8860b;
    --shadow:   0 2px 16px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* Güvenli alan: iPhone çentiği ve alt çubuğu */
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
}

/* ================= Slayt şeridi ================= */

.strip {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  /* Şerit yüklenirken yumuşak belirsin */
  animation: strip-in .5s ease both;
}

@keyframes strip-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.strip-track {
  display: flex;
  gap: 8px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  /* Şerit kaydırılırken kendiliğinden kaymasın */
  scroll-behavior: smooth;
}

.strip-track::-webkit-scrollbar { display: none; }

/* Yükleme sırasında şerit duraklar: bant genişliği yüklemeye kalsın */
.strip--paused { opacity: .45; }

.slide {
  flex: 0 0 auto;
  margin: 0;
  position: relative;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.slide img {
  display: block;
  height: 124px;
  width: auto;
  max-width: 70vw;
  object-fit: cover;
  /* EXIF döndürme tarayıcıya bırakılır */
  image-orientation: from-image;
}

.slide figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 8px 5px;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
  color: #fff;
  font-size: .7rem;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
}

.slide-name { font-weight: 600; }

.slide-note {
  opacity: .9;
  font-style: italic;
  /* Not uzunsa iki satırda kırpılsın */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= Kapak ================= */

.hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}

.hero-kicker {
  margin: 0 0 .5rem;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.hero-title {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -.01em;
  line-height: 1.15;
}

.hero-date {
  margin: .75rem 0 0;
  color: var(--text-dim);
  font-size: .95rem;
}

/* ================= Kartlar ================= */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.card-title {
  margin: 0 0 .4rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.card-lead {
  margin: 0 0 1.5rem;
  color: var(--text-dim);
  font-size: .9rem;
}

/* ================= Form ================= */

.field { display: block; margin-bottom: 1.25rem; }

.field-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--text-dim);
}

.field-label em {
  font-style: normal;
  font-weight: 400;
  opacity: .7;
}

input[type="text"],
textarea {
  width: 100%;
  padding: .85rem;
  font: inherit;
  font-size: 1rem; /* iOS otomatik yakınlaştırma yapmasın diye 16px şart */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
}

input[type="text"]:focus,
textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: transparent;
}

/* ================= Butonlar ================= */

.btn {
  display: inline-block;
  width: 100%;
  padding: .9rem 1.25rem;
  font: inherit;
  font-weight: 600;
  text-align: center;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}

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

.btn:disabled { opacity: .55; cursor: default; }

.btn-primary {
  background: var(--gold);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .btn-primary { color: #1a1714; }
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
  margin-top: .75rem;
}

.btn-file {
  position: relative;
  overflow: hidden;
}

/* Dosya girdisi görünmez ama etikete tıklanınca açılır */
.btn-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 100px; /* iOS'ta dokunma alanını büyütür */
}

/* ================= Kuyruk ================= */

.queue {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.q-item {
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .8rem;
}

.q-item.done   { border-color: var(--gold); }
.q-item.failed { border-color: #c0392b; }

.q-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: .4rem;
}

.q-bar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.q-fill {
  height: 100%;
  width: 0;
  background: var(--gold);
  border-radius: 2px;
  transition: width .25s ease;
}

.q-item.failed .q-fill { background: #c0392b; }

.q-status {
  margin-top: .35rem;
  color: var(--text-dim);
  font-size: .75rem;
}

/* ================= Teşekkür ================= */

.thanks {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: 12px;
  text-align: center;
}

.thanks-title {
  margin: 0 0 .35rem;
  font-weight: 600;
  color: var(--gold);
}

.thanks-body {
  margin: 0;
  font-size: .9rem;
  color: var(--text-dim);
}

/* ================= Hata ================= */

.status {
  margin: 1rem 0 0;
  padding: .75rem;
  background: rgba(192, 57, 43, .1);
  border-radius: 8px;
  color: #c0392b;
  font-size: .85rem;
}

@media (prefers-color-scheme: dark) {
  .status { color: #ff8a7a; }
}

/* ================= Alt bilgi ================= */

.foot {
  text-align: center;
  color: var(--text-dim);
  font-size: .8rem;
  padding: 1rem 0;
}

/* Gizlilik politikası bağlantısı — düğün gecesi görsel gürültü yapmasın
   diye sönük, ama Google'ın aradığı yerde ve erişilebilir durur. */
.foot-legal {
  margin: .35rem 0 0;
}

.foot-legal a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.foot-legal a:hover {
  color: var(--gold);
}

/* ================= Klavye erişilebilirliği ================= */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Hareket azaltma tercihi olan kullanıcılar için animasyonları kapat */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
