/* ============================================================
   Elif & Mert — Nişan Davetiyesi  (mobile-first)
   ============================================================ */
:root {
  --ivory: #f7f1e8;
  --ivory-2: #efe5d6;
  --ink: #3a2c22;
  --ink-soft: #6a584a;
  --gold: #b8924f;
  --gold-light: #d9bd86;
  --gold-deep: #7a5d28;
  --wax: #8a2230;
  --wax-deep: #5e141f;
  --line: rgba(184, 146, 79, 0.35);
  --shadow: 0 18px 50px rgba(40, 24, 12, 0.28);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Cormorant Garamond", cursive;
  --sans: "Montserrat", system-ui, -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--ink);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
body.no-scroll { overflow: hidden; }

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

/* ====================== AÇILIŞ (LOTR görsel) ====================== */
.seal-screen {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(125% 95% at 50% 34%, #e8d8ba 0%, #d6c19a 52%, #b89e76 100%);
  transition: opacity .9s ease, visibility .9s ease;
  overscroll-behavior: contain; touch-action: none;
}
.seal-screen.is-open { opacity: 0; visibility: hidden; pointer-events: none; }

/* görsel: sabit ekrana göre absolute → tam sığar, asla kırpılmaz */
.envelope {
  position: absolute; inset: 0;
  background: url("assets/img/kapak.jpg") center center / contain no-repeat;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .7s ease;
}
.envelope.is-breaking { transform: scale(.99); }
.envelope.is-gone { opacity: 0; transform: scale(1.04); }

/* tüm ekran tıklanabilir buton */
.lotr-open {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* açmak için tıklayın */
.lotr-hint {
  position: absolute; left: 50%; bottom: calc(26px + var(--safe-b));
  transform: translateX(-50%);
  font-family: "Cinzel", serif; font-weight: 600;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: #4a3526;
  background: rgba(244,235,219,.86);
  padding: 10px 22px; border: 1px solid rgba(122,93,40,.5); border-radius: 999px;
  box-shadow: 0 5px 16px rgba(50,34,16,.30);
  white-space: nowrap;
  animation: lotrPulse 2.4s ease-in-out infinite;
}
@keyframes lotrPulse {
  0%,100% { opacity: .8;  transform: translateX(-50%) translateY(0); }
  50%     { opacity: 1;   transform: translateX(-50%) translateY(-2px); }
}

/* ====================== DAVETİYE ====================== */
.invitation {
  opacity: 0;
  transition: opacity 1s ease .15s;
  background:
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
}
.invitation.is-revealed { opacity: 1; }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
  padding: calc(28px + var(--safe-t)) 24px calc(104px + var(--safe-b));
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 10%, #5e4047 0%, #2a1a1f 60%, #160d10 100%);
  z-index: -1;
}
.hero.no-video .hero-video { opacity: 0; }
.hero.no-video:not(.has-music) .sound-toggle { display: none; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(18,10,7,.55) 0%, rgba(18,10,7,.30) 30%, rgba(18,10,7,.42) 58%, rgba(18,10,7,.82) 100%),
    rgba(18,10,7,.30);
}
.sound-toggle {
  position: absolute; top: calc(14px + var(--safe-t)); right: 14px;
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(20,12,8,.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff; font-size: 18px;
  cursor: pointer;
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}

.hero-content {
  position: relative; z-index: 2; width: 100%; max-width: 520px;
  /* tüm hero öğeleri arası eşit boşluk */
  --hero-gap: 28px;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--hero-gap);
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold-light);
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.hero-names {
  font-family: var(--script);
  font-weight: 400;
  line-height: .9;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--hero-gap); /* isimler ve & de aynı boşlukta */
}
.hero-name {
  font-size: clamp(42px, 13.5vw, 72px);
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 4px 22px rgba(0,0,0,.5);
}
.hero-names .amp {
  font-size: clamp(18px, 5vw, 26px);
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 0 3px 16px rgba(0,0,0,.5);
}
/* ince beyaz ayraç + ortasında altın karo */
.hero-divider {
  position: relative;
  width: min(64%, 230px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8) 18%, rgba(255,255,255,.8) 82%, transparent);
}
.hero-diamond {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px; line-height: 1;
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(184,146,79,.6), 0 1px 2px rgba(0,0,0,.6);
}
.hero-date {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 3px;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(30px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 3;
  background: none; border: 0; cursor: pointer;
  color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.scroll-cue-text {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.4);
  padding-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.scroll-cue-arrow {
  font-size: 24px; line-height: 1;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translateY(0); opacity:.7;} 50%{ transform: translateY(6px); opacity:1;} }

/* açılıştan sonra zarif kademeli giriş */
.invitation.is-revealed .hero-content > * {
  animation: heroIn 1s cubic-bezier(.2,.7,.2,1) both;
}
.invitation.is-revealed .hero-eyebrow { animation-delay: .15s; }
.invitation.is-revealed .hero-names   { animation-delay: .30s; }
.invitation.is-revealed .hero-divider { animation-delay: .50s; }
.invitation.is-revealed .hero-date    { animation-delay: .65s; }
.invitation.is-revealed .scroll-cue {
  animation: heroCueIn 1s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: .85s;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
/* alttaki ipucu yatay ortalamayı (translateX -50%) koruyarak girer */
@keyframes heroCueIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%); }
}

/* ---- Genel bölüm ---- */
.section {
  position: relative;
  padding: 64px 26px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.section-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 16px;
}
.ornament {
  display: block;
  font-size: 12px;
  letter-spacing: 6px;
  color: var(--gold);
  margin-bottom: 18px;
}

/* ---- Geri sayım ---- */
.countdown-section { padding-top: 56px; padding-bottom: 56px; }
.countdown {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 6px;
}
.cd-item {
  display: flex; flex-direction: column; align-items: center;
  min-width: 64px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 6px 10px;
  box-shadow: 0 8px 20px rgba(58,44,34,.08);
}
.cd-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cd-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}
.cd-sep {
  font-size: 26px; color: var(--gold);
  align-self: center; padding-top: 8px;
}
.countdown-done {
  font-family: var(--script);
  font-size: 32px;
  color: var(--gold-deep);
}

/* ---- Mekan ---- */
.venue-section { background: rgba(255,255,255,.4); }
.venue-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  color: var(--ink);
  margin-bottom: 8px;
}
.venue-address {
  font-size: 19px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 24px;
}
.map-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  background: #e8e0d4;
}
.map-frame { width: 100%; height: 240px; border: 0; }

/* ---- Butonlar ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 15px 26px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--gold);
  transition: transform .15s ease, background .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-outline { color: var(--gold-deep); background: transparent; }
.btn-outline:active { background: rgba(184,146,79,.12); }
.btn-primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-color: var(--gold-deep);
  margin-top: 18px;
  padding: 17px 26px;
  font-weight: 500;
}
.btn-primary[disabled] { opacity: .6; cursor: default; }
.btn-add {
  width: 100%;
  color: var(--gold-deep);
  background: transparent;
  border: 1px dashed var(--gold);
  margin-top: 6px;
}

/* çocuklar için nazik hatırlatma notu */
.guest-note {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: rgba(184, 146, 79, .08);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  margin-top: 16px;
  text-align: center;
}
.guest-note-icon { margin-right: 4px; }

/* ---- Takvime Ekle ---- */
.cal-btn { margin-top: 30px; }
/* hidden attribute'u .btn display'ini ezsin (yoksa gizliyken bile görünür) */
.btn[hidden] { display: none; }
#success-calendar { margin-top: 22px; }

/* ---- RSVP ---- */
.rsvp-section { padding-bottom: calc(72px + var(--safe-b)); }
.rsvp-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  margin-bottom: 8px;
}
.rsvp-sub {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 26px;
}
.rsvp-form { text-align: left; }
.guest-list { display: flex; flex-direction: column; gap: 16px; }

.guest-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 18px;
  box-shadow: 0 6px 18px rgba(58,44,34,.06);
  animation: rowIn .35s ease;
}
@keyframes rowIn { from { opacity:0; transform: translateY(8px);} to { opacity:1; transform:none;} }
.guest-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.guest-index {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.guest-remove {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--ivory);
  color: var(--ink-soft);
  font-size: 13px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* görünür daire küçük kalsın ama dokunma alanı ~46px olsun */
.guest-remove::after { content: ""; position: absolute; inset: -8px; }
.guest-fields { display: flex; gap: 10px; margin-bottom: 12px; }
.guest-fields input {
  flex: 1; min-width: 0;
  font-family: var(--sans);
  font-size: 16px; /* 16px+ : iOS zoom engeli */
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ivory);
  color: var(--ink);
}
.guest-fields input:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}

.attend-toggle { display: flex; gap: 10px; }
.attend-btn {
  flex: 1;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .5px;
  padding: 13px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--ivory);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.attend-btn.attend-yes.is-active {
  background: #2f7d52; border-color: #2f7d52; color: #fff;
}
.attend-btn.attend-no.is-active {
  background: #b14a4a; border-color: #b14a4a; color: #fff;
}
.guest-row.has-error .guest-fields input,
.guest-row.has-error .attend-toggle { box-shadow: 0 0 0 2px rgba(177,74,74,.25); border-radius: 10px; }

.rsvp-status {
  font-family: var(--sans);
  font-size: 13px;
  text-align: center;
  margin-top: 14px;
  min-height: 18px;
  color: #b14a4a;
}
.rsvp-status.is-info { color: var(--ink-soft); }

.rsvp-success {
  text-align: center;
  padding: 30px 10px;
  animation: rowIn .5s ease;
}
.success-check {
  width: 70px; height: 70px; margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f7d52, #3f9a66);
  color: #fff; font-size: 36px;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(47,125,82,.35);
}
.rsvp-success h3 {
  font-family: var(--serif); font-weight: 600; font-size: 28px; margin-bottom: 8px;
}
.rsvp-success p { font-size: 18px; color: var(--ink-soft); }

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 40px 24px calc(46px + var(--safe-b));
  background: var(--ink);
  color: var(--ivory);
}
.footer-monogram { font-family: var(--script); font-size: 46px; color: var(--gold-light); margin-bottom: 8px; }
.footer-text { font-family: var(--sans); font-size: 12px; letter-spacing: 1.5px; opacity: .8; }

/* ---- Erişilebilirlik: hareket azaltma ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}

/* ---- Küçük ekran ince ayar ---- */
@media (max-width: 360px) {
  .countdown { gap: 4px; }
  .cd-item { min-width: 0; flex: 1; padding: 12px 2px 8px; }
  .cd-num { font-size: 26px; }
  .cd-sep { padding-top: 6px; font-size: 20px; }
  .guest-fields { flex-direction: column; }
}
