/* ————————————————————————————————
   Rumeysa & Oğuz · Nişan Davetiyesi
   Gündüz / Gece temalı tek sayfa
———————————————————————————————— */

:root {
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;

  /* Gündüz */
  --bg: #f4efe3;
  --bg-soft: #eee8d8;
  --ink: #4a4438;
  --ink-soft: #837a66;
  --accent: #5d6647;
  --accent-ink: #5d6647;
  --card-bg: rgba(236, 230, 214, 0.55);
  --card-line: rgba(122, 112, 90, 0.28);
  --hairline: rgba(122, 112, 90, 0.4);
  --btn-bg: rgba(244, 239, 227, 0.7);
  --field-bg: rgba(255, 253, 247, 0.6);
  --gold: #b3924f;

  --theme-fade: 1.2s;
}

html[data-theme="night"] {
  --bg: #232746;
  --bg-soft: #272c4e;
  --ink: #e9e3d1;
  --ink-soft: #aaa899;
  --accent: #e3d7ae;
  --accent-ink: #d6cba4;
  --card-bg: rgba(42, 47, 82, 0.5);
  --card-line: rgba(190, 195, 226, 0.22);
  --hairline: rgba(190, 195, 226, 0.35);
  --btn-bg: rgba(35, 39, 70, 0.55);
  --field-bg: rgba(30, 34, 62, 0.6);
  --gold: #d9bd7e;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--ink);
  transition: background-color var(--theme-fade) ease, color var(--theme-fade) ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100dvh; }

/* kağıt dokusu */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.42 0 0 0 0 0.35 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23p)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 2; }

.is-hidden { display: none !important; }

/* ————— Tipografi ————— */
.caps {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-indent: 0.32em; /* ortalama düzeltmesi */
  font-size: 0.78rem;
  line-height: 2;
  color: var(--ink-soft);
  transition: color var(--theme-fade) ease;
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--accent);
  transition: color var(--theme-fade) ease;
}
.serif { font-family: var(--font-serif); font-weight: 400; font-size: 1.06rem; }
.serif-it { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.amp { font-style: italic; padding: 0 0.06em; }

/* ————— Zarf / Giriş (poster + video) ————— */
.intro {
  position: fixed; inset: 0; z-index: 100;
  background: #5f6c55;
  cursor: pointer;
  transition: opacity 1.2s ease, visibility 1.2s;
}
.intro:focus-visible { outline: 3px solid #e8dfc4; outline-offset: -3px; }
.intro.closing { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.intro-video { opacity: 0; transition: opacity 0.5s ease; }
.intro.playing .intro-video { opacity: 1; }
/* yatay/geniş ekranda kırpma yerine zarif çerçeveleme */
@media (min-aspect-ratio: 1/1) {
  .intro-media { object-fit: contain; }
}

.intro-text {
  position: absolute; left: 0; right: 0;
  bottom: calc(6% + env(safe-area-inset-bottom));
  text-align: center;
  padding: 0 24px;
  transition: opacity 0.6s ease;
  text-shadow: 0 1px 18px rgba(30, 40, 26, 0.55);
}
.intro.playing .intro-text { opacity: 0; }
.intro-script {
  font-family: var(--font-script);
  font-size: clamp(2rem, 9vw, 2.9rem);
  color: #f2ecd9;
  margin-bottom: 10px;
  line-height: 1.2;
}
.intro-caps {
  font-family: var(--font-serif);
  letter-spacing: 0.3em; text-indent: 0.3em;
  font-size: 0.72rem; font-weight: 500;
  color: #ddd6bf;
}
.tap-wrap { display: flex; justify-content: center; margin-top: 20px; }
.tap-icon { width: 42px; height: auto; overflow: visible; filter: drop-shadow(0 2px 8px rgba(30, 40, 26, 0.4)); }
.tap-hand {
  fill: #f2ecd9;
  animation: tap-press 1.9s ease-in-out infinite;
}
@keyframes tap-press {
  0%, 100% { transform: translateY(0); }
  32% { transform: translateY(5px); }
  52% { transform: translateY(0); }
}
.tap-ripples circle {
  fill: none; stroke: #f2ecd9; stroke-width: 1.6;
  opacity: 0;
  transform-box: fill-box; transform-origin: center;
}
.tap-ripples .r1 { animation: tap-ripple 1.9s ease-out infinite 0.34s; }
.tap-ripples .r2 { animation: tap-ripple 1.9s ease-out infinite 0.48s; }
@keyframes tap-ripple {
  0% { opacity: 0; transform: scale(0.35); }
  14% { opacity: 0.9; }
  55% { opacity: 0; transform: scale(1.55); }
  100% { opacity: 0; transform: scale(1.55); }
}
.intro-hint {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.98rem;
  color: #e9e2cc;
  animation: hint-pulse 2.6s ease-in-out infinite;
}
@keyframes hint-pulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ————— Sabit kontroller ————— */
.theme-toggle {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 60;
  display: flex; align-items: center; gap: 6px;
  width: 92px; height: 40px;
  padding: 0 8px;
  border: none; border-radius: 999px;
  background: rgba(103, 112, 79, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(40, 40, 30, 0.25);
  transition: background-color var(--theme-fade) ease, opacity .6s ease, transform .6s ease;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
}
body.opened .theme-toggle { opacity: 1; transform: none; pointer-events: auto; }
html[data-theme="night"] .theme-toggle { background: rgba(52, 58, 96, 0.85); }
.tt-icon { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; }
.tt-icon svg { width: 18px; height: 18px; transition: fill 0.55s ease, stroke 0.55s ease; }
.tt-sun svg { fill: #4d573b; stroke: #4d573b; stroke-width: 1.6; }
.tt-sun svg circle { stroke: none; }
html[data-theme="night"] .tt-sun svg { fill: #eae4d2; stroke: #eae4d2; }
.tt-moon svg { fill: #e6e2d0; }
html[data-theme="night"] .tt-moon svg { fill: #3a4064; }
.tt-knob {
  position: absolute; top: 4px; left: 5px;
  width: 32px; height: 32px; border-radius: 50%;
  background: #f6f1e2;
  box-shadow: 0 2px 6px rgba(30, 30, 20, 0.3);
  transition: transform 0.55s cubic-bezier(0.5, 0, 0.2, 1.2);
}
html[data-theme="night"] .tt-knob { transform: translateX(50px); background: #e9e6f2; }
.tt-sun, .tt-moon { position: relative; z-index: 1; }

.music-btn {
  position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(103, 112, 79, 0.85);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(40, 40, 30, 0.3);
  display: grid; place-items: center;
  transition: background-color var(--theme-fade) ease;
}
html[data-theme="night"] .music-btn { background: rgba(52, 58, 96, 0.88); }
.music-btn svg { width: 24px; height: 24px; fill: #f2ecd7; stroke: #f2ecd7; stroke-width: 1.6; }
.music-btn .mb-off { display: none; }
.music-btn.muted .mb-on { display: none; }
.music-btn.muted .mb-off { display: block; }

/* ————— Kahraman ————— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.scene { position: absolute; inset: 0; overflow: hidden; background: var(--bg); transition: background-color var(--theme-fade) ease; }
.scene img {
  position: absolute; bottom: 0; left: 50%;
  height: 100%; width: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}
.scene .img-night { opacity: 0; transition: opacity 1.9s ease; }
html[data-theme="night"] .scene .img-night { opacity: 1; }
.night-extras {
  position: absolute; inset: 0 0 45% 0;
  opacity: 0;
  transition: opacity 1.9s ease;
  pointer-events: none;
}
html[data-theme="night"] .night-extras { opacity: 1; }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars circle { fill: #f3ecd6; }
.stars .tw { animation: twinkle 3.4s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { opacity: 0.15; } 50% { opacity: 0.9; } }
.stars .spark { fill: none; stroke: #f3ecd6; stroke-width: 0.28; stroke-linecap: round; }
/* geniş ekranda görsel kenarları arka plana karışsın */
@media (min-aspect-ratio: 5/8) {
  .scene img {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
  }
}

.hero-content {
  position: relative; z-index: 3;
  text-align: center;
  padding: max(11svh, 76px) 20px 0;
}
.hero-pre { font-size: 0.82rem; color: var(--ink-soft); }
.names {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.6rem, 11vw, 4.8rem);
  line-height: 1.2;
  color: var(--accent);
  margin: 10px 0 12px;
  transition: color var(--theme-fade) ease;
  text-shadow: 0 1px 24px rgba(255, 244, 214, 0);
}
html[data-theme="night"] .names { color: #f3ecdb; text-shadow: 0 1px 26px rgba(255, 240, 200, 0.28); }
html[data-theme="night"] .hero-pre,
html[data-theme="night"] .hero-date { color: #cfcbbc; }
.hero-date { font-size: 0.8rem; }

.hero-bottom {
  position: absolute; z-index: 4;
  left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ghost-btn {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.26em; text-indent: 0.26em;
  font-size: 0.72rem;
  color: var(--ink);
  text-decoration: none;
  padding: 13px 26px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--btn-bg);
  backdrop-filter: blur(6px);
  transition: background-color var(--theme-fade) ease, color var(--theme-fade) ease, border-color var(--theme-fade) ease, transform .3s ease;
}
.ghost-btn:hover { transform: translateY(-2px); }
.chevron { width: 22px; height: 11px; stroke: var(--ink-soft); animation: chev 2.2s ease-in-out infinite; }
@keyframes chev { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(6px); opacity: 1; } }

/* ————— Bölümler ————— */
.section {
  position: relative;
  padding: 90px 24px;
  background: var(--bg);
  transition: background-color var(--theme-fade) ease;
  text-align: center;
}
.section:nth-of-type(even) { background: var(--bg-soft); }
.wrap { max-width: 480px; margin: 0 auto; }

.section-title {
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  line-height: 1.3;
  margin-bottom: 10px;
}
.section-sub { margin-bottom: 40px; font-size: 0.74rem; }

/* Davet */
.davet { padding-top: 100px; }
.date-display {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-bottom: 8px;
}
.dd-side { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.dd-side .caps { font-size: 0.78rem; letter-spacing: 0.24em; text-indent: 0.24em; color: var(--ink); }
.dd-rule { display: block; width: 58px; height: 1px; background: var(--hairline); transition: background-color var(--theme-fade) ease; }
.dd-num {
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 15vw, 4.6rem);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  transition: color var(--theme-fade) ease;
}
.day-name { color: var(--ink); margin-bottom: 34px; }
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 6px auto 40px;
}
.ornament span { width: 64px; height: 1px; background: var(--hairline); transition: background-color var(--theme-fade) ease; }
.ornament i {
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  transition: background-color var(--theme-fade) ease;
}
.small-label { font-size: 0.7rem; }
.venue-script { font-size: clamp(2.2rem, 9.5vw, 3rem); line-height: 1.4; margin: 8px 0 6px; }
.venue-sub { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 26px; }
.time-line { color: var(--ink); }

.map-link {
  display: inline-block;
  margin-top: 26px;
  font-size: 0.72rem; font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--hairline);
  transition: color var(--theme-fade) ease, border-color var(--theme-fade) ease, opacity .3s;
}
.map-link:hover { opacity: 0.7; }

/* Akış */
.timeline {
  text-align: left;
  max-width: 340px;
  margin: 0 auto;
  position: relative;
  padding-left: 26px;
}
.timeline::before {
  content: "";
  position: absolute; left: 4px; top: 10px; bottom: 26px;
  width: 1px; background: var(--hairline);
  transition: background-color var(--theme-fade) ease;
}
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
  transition: background-color var(--theme-fade) ease, box-shadow var(--theme-fade) ease;
}
.section:nth-of-type(even) .tl-dot { box-shadow: 0 0 0 4px var(--bg-soft); }
.tl-time { font-size: 0.78rem; color: var(--ink); letter-spacing: 0.24em; text-indent: 0; }
.tl-text { font-size: 1.12rem; margin-top: 2px; color: var(--ink); }

/* Not */
.note-text { line-height: 1.9; color: var(--ink); font-size: 1.12rem; }

/* LCV */
.rsvp-form { text-align: left; }
.field { margin-bottom: 28px; }
.field-label {
  display: block;
  font-size: 0.68rem;
  margin-bottom: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.26em; text-indent: 0;
}
.req { color: #b0713d; }
input[type="text"], textarea {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .3s ease, background-color var(--theme-fade) ease, color var(--theme-fade) ease;
}
input[type="text"]:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 90px; }
::placeholder { color: var(--ink-soft); opacity: 0.65; }

.pill-group { display: flex; flex-direction: column; gap: 12px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  padding: 14px 18px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  text-align: center;
  cursor: pointer;
  color: var(--ink);
  background: var(--field-bg);
  transition: all .35s ease;
}
.pill input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.stepper { display: flex; align-items: center; gap: 14px; }
.step-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--card-line);
  background: var(--field-bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all .3s ease;
}
.step-btn:hover { border-color: var(--accent); }
.stepper input {
  width: 72px; text-align: center;
  font-size: 1.3rem;
  border-radius: 12px;
}
#countField { transition: opacity .4s ease; }
#countField.dimmed { opacity: 0.35; pointer-events: none; }

.hp { position: absolute !important; left: -5000px !important; width: 1px; height: 1px; opacity: 0; }

.form-error {
  font-family: var(--font-serif);
  font-style: italic;
  color: #b0713d;
  margin: -6px 0 18px;
}

.submit-btn {
  display: block;
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.76rem; font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3em;
  transition: all .35s ease;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(60, 66, 40, 0.25); }
.submit-btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.rsvp-thanks { padding: 30px 0 10px; }
.thanks-seal { width: 92px; height: 92px; filter: drop-shadow(0 6px 12px rgba(74, 84, 54, 0.3)); }
.thanks-script { font-size: 2.4rem; margin: 16px 0 6px; }

/* ————— Alt ————— */
.footer {
  background: var(--bg-soft);
  text-align: center;
  padding: 80px 24px calc(110px + env(safe-area-inset-bottom));
  transition: background-color var(--theme-fade) ease;
}
.foot-mono { width: 66px; height: 66px; color: var(--accent); margin-bottom: 18px; }
.mono-letter {
  font-family: var(--font-serif);
  font-size: 26px; font-weight: 600;
  fill: var(--accent);
  transition: fill var(--theme-fade) ease;
}
.foot-names { font-size: 2.3rem; margin-bottom: 10px; }
.foot-date { font-size: 0.7rem; margin-bottom: 26px; }
.foot-love { font-family: var(--font-serif); font-style: italic; font-size: 0.92rem; color: var(--ink-soft); }

/* ————— Görünme animasyonları ————— */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .chevron, .intro-hint, .tap-hand { animation: none !important; }
  .stars .tw { animation: none; }
  .tap-ripples circle { animation: none !important; opacity: 0.5; transform: none; }
  .tap-ripples .r2 { opacity: 0; }
}

/* ————— Geniş ekran ————— */
@media (min-width: 720px) {
  .hero-content { padding-top: 13svh; }
  .palace-wrap { width: min(88vw, 1060px); }
  .caps { font-size: 0.84rem; }
  .section { padding: 110px 24px; }
}
