/* =========================================================
   BİZİM HİKÂYEMİZ — Design System
   Premium · Sinematik · Mobil öncelikli
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=Space+Mono:wght@400;700&family=Bebas+Neue&display=swap');

:root {
  --ink: #0a0708;
  --ink-soft: #14101a;
  --bordo: #6b1d2a;
  --bordo-deep: #3d1018;
  --kirmizi: #9e2a3a;
  --krem: #f3e8d8;
  --krem-dim: #cbbba6;
  --beyaz: #faf7f2;
  --altin: #c9a86a;
  --altin-glow: rgba(201, 168, 106, 0.35);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --muted: rgba(243, 232, 216, 0.55);
  --danger: #c45c5c;
  --ok: #7cb89a;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-impact: 'Bebas Neue', Impact, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-cinematic: cubic-bezier(0.76, 0, 0.24, 1);
  --nav-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--krem);
  line-height: 1.55;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button {
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Grain overlay ---------- */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Sound toggle ---------- */
.sound-toggle {
  position: fixed;
  top: calc(12px + var(--safe-top));
  right: 14px;
  z-index: 8000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(10, 7, 8, 0.55);
  backdrop-filter: blur(10px);
  color: var(--krem);
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: border-color 0.3s var(--ease-out), transform 0.2s;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  border-color: var(--altin);
  outline: none;
}

.sound-toggle.is-muted { opacity: 0.55; }

/* ---------- Progress pill (story hub) ---------- */
.progress-pill {
  position: fixed;
  top: calc(12px + var(--safe-top));
  left: 14px;
  z-index: 8000;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(10, 7, 8, 0.55);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--krem-dim);
}

/* ---------- Typography helpers ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--altin);
}

.lede {
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  color: var(--muted);
  max-width: 36ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: transform 0.25s var(--ease-out), background 0.25s, border-color 0.25s, box-shadow 0.25s;
  will-change: transform;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--kirmizi), var(--bordo-deep));
  color: var(--beyaz);
  box-shadow: 0 12px 40px rgba(158, 42, 58, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 16px 48px rgba(158, 42, 58, 0.5), 0 0 0 1px var(--altin-glow);
  outline: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--glass-border);
  color: var(--krem);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--altin);
  outline: none;
}

.btn-gold {
  background: transparent;
  border-color: var(--altin);
  color: var(--altin);
}

.btn-gold:hover {
  background: rgba(201, 168, 106, 0.12);
}

/* ---------- Layout shells ---------- */
.love-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.love-rain span {
  position: absolute;
  left: var(--x, 50%);
  bottom: -12%;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: rgba(243, 232, 216, 0.2);
  white-space: nowrap;
  animation: loveFloat var(--dur, 14s) linear forwards;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
  text-shadow: 0 0 18px rgba(158, 42, 58, 0.15);
}
.love-rain span.is-heart {
  color: rgba(158, 42, 58, 0.34);
  font-style: normal;
  font-family: var(--font-body);
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  padding: calc(24px + var(--safe-top)) 20px calc(40px + var(--safe-bottom));
}

.page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: min(100%, 560px);
}

.stack-wide { width: min(100%, 720px); }

/* ---------- Nav continuum (minimal, not a template navbar) ---------- */
.continue-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7000;
  padding: 16px 20px calc(16px + var(--safe-bottom));
  display: flex;
  justify-content: center;
  background: linear-gradient(to top, rgba(10, 7, 8, 0.95), transparent);
  pointer-events: none;
}

.continue-bar .btn { pointer-events: auto; }

.back-link {
  position: fixed;
  top: calc(18px + var(--safe-top));
  left: 16px;
  z-index: 8000;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--krem-dim);
  opacity: 0.8;
  transition: color 0.2s, opacity 0.2s;
}

.back-link:hover { color: var(--krem); opacity: 1; }

/* ---------- Reveal helpers ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] { transition-delay: 0.12s; }
[data-reveal-delay="2"] { transition-delay: 0.24s; }
[data-reveal-delay="3"] { transition-delay: 0.36s; }
[data-reveal-delay="4"] { transition-delay: 0.48s; }

/* ---------- Cinematic transition overlay ---------- */
.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
}

.transition-overlay.is-active {
  pointer-events: auto;
  opacity: 1;
}

.transition-overlay .shutter-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: #000;
  transform: scaleY(0);
  transform-origin: top;
}

.transition-overlay .shutter-bar.bottom {
  top: 50%;
  transform-origin: bottom;
}

.transition-overlay.is-shutter .shutter-bar {
  animation: shutterClose 0.55s var(--ease-cinematic) forwards;
}

.transition-overlay.is-fade {
  background: #000;
  transition: opacity 0.6s var(--ease-cinematic);
}

.transition-overlay.is-flash {
  background: #fff;
  transition: opacity 0.15s linear;
}

.transition-overlay.is-blur {
  backdrop-filter: blur(0);
  background: rgba(10, 7, 8, 0.2);
  transition: backdrop-filter 0.5s, background 0.5s, opacity 0.5s;
}

.transition-overlay.is-blur.is-active {
  backdrop-filter: blur(18px);
  background: rgba(10, 7, 8, 0.85);
}

.transition-overlay.is-glitch {
  background: #000;
}

.transition-overlay.is-comic {
  background:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(158, 42, 58, 0.35) 8px,
      rgba(158, 42, 58, 0.35) 16px
    ),
    #0a0708;
}

.transition-overlay.is-zoom {
  background: radial-gradient(circle at center, transparent 0%, #000 70%);
  transform: scale(1.4);
  transition: transform 0.7s var(--ease-cinematic), opacity 0.7s;
}

.transition-overlay.is-zoom.is-active {
  transform: scale(1);
}

.transition-overlay.is-stars {
  background: #020208;
  overflow: hidden;
}

.transition-overlay.is-stars::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 60% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 80% 20%, #fff, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff, transparent),
    radial-gradient(1px 1px at 10% 60%, #fff, transparent);
  opacity: 0;
  animation: starIn 0.8s forwards;
}

/* ---------- Particles canvas ---------- */
.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Form bits ---------- */
.field {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--krem);
  outline: none;
  transition: border-color 0.25s;
}

.field:focus {
  border-color: var(--altin);
}

.field::placeholder {
  color: rgba(243, 232, 216, 0.35);
}

/* ---------- Toast / whisper ---------- */
.whisper {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: 8500;
  max-width: min(90vw, 320px);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(20, 16, 26, 0.92);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}

.whisper.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Site imzası ---------- */
.site-credit {
  position: fixed;
  left: 12px;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 7500;
  max-width: min(46vw, 230px);
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.68rem, 2.6vw, 0.82rem);
  line-height: 1.4;
  color: rgba(243, 232, 216, 0.48);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.site-credit em {
  font-style: italic;
  color: rgba(201, 168, 106, 0.85);
}

/* ---------- Sürpriz buket ---------- */
.surprise-fab {
  position: fixed;
  right: 12px;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 7600;
  max-width: 124px;
  padding: 0.65rem 0.7rem 0.7rem;
  border-radius: 18px;
  border: 1px solid #ff6ad8;
  background: linear-gradient(160deg, rgba(80, 8, 50, 0.75), rgba(12, 4, 18, 0.88));
  color: #ffe9ff;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 0 8px #ff4fd8, 0 0 16px rgba(255, 79, 216, 0.7);
  box-shadow:
    0 0 8px #ff4fd8,
    0 0 22px rgba(255, 79, 216, 0.55),
    0 0 42px rgba(255, 196, 80, 0.22),
    inset 0 0 12px rgba(255, 105, 210, 0.25);
  animation: neonPulse 1.7s ease-in-out infinite;
}
.surprise-fab__tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: #fff4a8;
  text-shadow: 0 0 8px #ffe08a, 0 0 16px #ff4fd8;
  margin-bottom: 0.2rem;
}
.surprise-fab__spark {
  display: block;
  color: #ff8aec;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
  animation: neonFlicker 2.4s ease-in-out infinite;
}
.surprise-fab:hover,
.surprise-fab:focus-visible {
  border-color: #fff4a8;
  outline: none;
  box-shadow:
    0 0 12px #fff4a8,
    0 0 28px rgba(255, 79, 216, 0.8),
    0 0 50px rgba(255, 79, 216, 0.4);
}

.surprise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: grid;
  place-items: center;
  background: rgba(6, 4, 6, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease-out), background 1.1s var(--ease-out);
}
.surprise-overlay.is-on {
  opacity: 1;
  pointer-events: auto;
  background: rgba(6, 4, 6, 0.72);
}

.surprise-close {
  position: absolute;
  top: calc(14px + var(--safe-top));
  right: 14px;
  z-index: 3;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(10, 7, 8, 0.55);
  color: var(--krem-dim);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.surprise-scene {
  position: relative;
  width: min(92vw, 420px);
  height: min(78dvh, 560px);
  perspective: 920px;
  transform-style: preserve-3d;
}

.surprise-note {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  width: min(94%, 360px);
  min-height: 3.6em;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.4vw, 1.6rem);
  font-style: italic;
  line-height: 1.35;
  color: #ffe9ff;
  text-shadow:
    0 0 8px #ff4fd8,
    0 0 18px rgba(255, 79, 216, 0.7),
    0 2px 10px rgba(0, 0, 0, 0.55);
  opacity: 0;
}
.surprise-note.is-on {
  opacity: 1;
  animation: noteIn 0.7s var(--ease-out) both;
}
.surprise-note.is-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 3px;
  background: #ff8aec;
  box-shadow: 0 0 8px #ff4fd8;
  vertical-align: -2px;
  animation: caretBlink 0.7s step-end infinite;
}

.surprise-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.ily-bit {
  position: absolute;
  bottom: 8%;
  left: 50%;
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(243, 232, 216, 0.55);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  animation: ilyDrift linear forwards;
  white-space: nowrap;
  pointer-events: none;
}
.ily-bit.is-heart {
  color: #c45c6a;
  font-style: normal;
  font-family: var(--font-body);
}

.bouquet {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 280px;
  height: 420px;
  transform: translateX(-50%);
  transform-style: preserve-3d;
  z-index: 2;
}

.daisy {
  position: absolute;
  bottom: 78px;
  left: 50%;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--fan)) rotateX(-12deg);
  transform-style: preserve-3d;
  opacity: 0;
}

.daisy-rise {
  transform-style: preserve-3d;
}

.daisy.is-on {
  opacity: 1;
  animation: daisyRise 1.7s var(--ease-out) both;
}

.daisy.is-on .daisy-3d {
  animation: daisySway 5.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.18s);
}

.daisy-bloom {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  transform-style: preserve-3d;
}

.daisy-petal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 26px;
  margin-left: -6.5px;
  margin-top: -26px;
  border-radius: 50% 50% 40% 40%;
  background: linear-gradient(180deg, #fffaf2 0%, #f3e8d8 70%, #e4d2bc 100%);
  transform-origin: 50% 100%;
  transform: rotate(calc(var(--p) * 30deg)) scaleY(0.15);
  opacity: 0;
  box-shadow: 0 0 8px rgba(255, 250, 240, 0.35);
}

.daisy.is-on .daisy-petal {
  animation: petalOpen 0.95s var(--ease-out) forwards;
  animation-delay: calc(0.35s + var(--p) * 0.045s);
}

.daisy-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, #ffe9a8, #e2b34a 55%, #b8860b);
  box-shadow: 0 0 10px rgba(226, 179, 74, 0.55);
  z-index: 2;
}

.daisy-stem {
  width: 4px;
  height: 132px;
  margin: -4px auto 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #5d8f5a, #2f5a32);
  transform-origin: 50% 0;
}

.daisy-leaf {
  position: absolute;
  width: 18px;
  height: 10px;
  background: #3d7a45;
  border-radius: 0 80% 0 80%;
  left: 50%;
  bottom: 110px;
  opacity: 0.85;
}
.daisy-leaf.l { transform: translateX(-16px) rotate(-28deg); }
.daisy-leaf.r { transform: translateX(2px) rotate(32deg) scaleX(-1); }

.bouquet-wrap {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 122px;
  height: 96px;
  transform: translateX(-50%);
  background: linear-gradient(160deg, #d4b57a 0%, #c9a86a 40%, #6b1d2a 100%);
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  z-index: 4;
  opacity: 0;
}
.bouquet-wrap.is-on {
  animation: wrapIn 1.1s var(--ease-out) 0.15s both;
}
.bouquet-ribbon {
  position: absolute;
  top: 18%;
  left: 8%;
  right: 8%;
  height: 10px;
  background: #9e2a3a;
  border-radius: 2px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.bouquet-glow {
  position: absolute;
  left: 50%;
  bottom: 30%;
  width: 220px;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(201, 168, 106, 0.28), transparent 68%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}
.bouquet-glow.is-on {
  animation: glowIn 1.6s ease both;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
