@charset "UTF-8";
/* ==========================================================================
   Mustafa & Hale — Nişan Davetiyesi
   Toz pembe + açık mavi + bej. Süslemeler assets/img/*.svg
   ========================================================================== */

/* ------------------------------------------------------------ değişkenler */
:root {
  color-scheme: light;

  /* bej kağıt zemin (50 en açık) */
  --paper-50: #fffcf8;
  --paper-100: #fbf5ee;
  --paper-200: #f5ebdf;
  --paper-300: #ecdccb;

  /* toz pembe */
  --rose-100: #fbe9ed;
  --rose-200: #f5d4dc;
  --rose-300: #ebb8c4;
  --rose-400: #d999aa;
  --rose-500: #c27d90;

  /* açık mavi */
  --sky-100: #eaf2fa;
  --sky-200: #d5e6f4;
  --sky-300: #b5d1ea;
  --sky-400: #90b7dc;
  --sky-500: #6f98c1;

  /* yazı (sıcak gül kurusu kahve; 900 en koyu) */
  --ink-900: #5a4047;
  --ink-700: #765b62;
  --ink-500: #937a80;
  --ink-400: #ab969b;

  --line: rgba(196, 140, 132, 0.36);
  --line-soft: rgba(196, 140, 132, 0.18);

  /* isimlerde kullanılan gül kurusu degrade */
  --rose-grad: linear-gradient(
    104deg,
    #b8707f 0%,
    #d895a3 28%,
    #ad6877 52%,
    #cf8c9b 76%,
    #a9677a 100%
  );

  --ff-script: "Pinyon Script", "Segoe Script", cursive;
  --ff-serif: "Cormorant Garamond", "Times New Roman", serif;
  --ff-sans: "Jost", "Segoe UI", system-ui, sans-serif;

  /* JS tarafından gerçek görünür yükseklikle güncellenir */
  --app-h: 100vh;
  --pad-x: clamp(0.85rem, 4vw, 2rem);
  --pad-y: clamp(0.85rem, 3.5vh, 2rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@supports (height: 100dvh) {
  :root {
    --app-h: 100dvh;
  }
}

/* ------------------------------------------------------------------ reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  /* Yatay taşmayı keser ama dikey kaydırmayı bozmaz (hidden yerine clip). */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(194, 125, 144, 0.35) transparent;
}

::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(194, 125, 144, 0.3);
  border-radius: 999px;
}

html.no-snap {
  scroll-snap-type: none;
}

/* Sayfa gecis motoru aciksa: tarayicinin kendi kaydirmasi ve yakalamasi
   devre disi. Dikey parmak hareketini JS yonetir, boylece iki bolumun
   arasinda durmak mumkun olmaz. Yakinlastirma (pinch) serbest kalir. */
html.pager-on {
  scroll-snap-type: none;
  scroll-behavior: auto;
  scrollbar-width: none;
}
html.pager-on::-webkit-scrollbar {
  width: 0;
  height: 0;
}
html.pager-on body {
  touch-action: pan-x pinch-zoom;
}

html.is-locked,
html.is-locked body {
  overflow: hidden;
  touch-action: none;
}

body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior-y: none;
  background: var(--paper-100);
  color: var(--ink-900);
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  /* Cormorant varsayılan olarak eski stil rakam kullanır (31 → "3ı"); düz rakam */
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* bej zemin + köşelerde pembe / mavi pus (sabit; kaydırmada oynamaz) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(75% 50% at 0% 0%, rgba(245, 212, 220, 0.75), transparent 70%),
    radial-gradient(75% 50% at 100% 100%, rgba(213, 230, 244, 0.85), transparent 70%),
    radial-gradient(60% 40% at 100% 0%, rgba(236, 220, 203, 0.6), transparent 70%),
    linear-gradient(170deg, var(--paper-50) 0%, var(--paper-100) 55%, var(--paper-200) 100%);
}

/* kağıt dokusu */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("../img/paper-grain.png");
  background-size: 128px 128px;
  opacity: 0.22;
  mix-blend-mode: multiply;
}

img {
  max-width: 100%;
  display: block;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ico {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}
.ico--sm {
  width: 0.95em;
  height: 0.95em;
}
.ico--xs {
  width: 0.85em;
  height: 0.85em;
}

/* gül kurusu degrade yazı */
.rose-text {
  background: var(--rose-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .rose-text {
    background: none;
    color: var(--rose-500);
    -webkit-text-fill-color: currentColor;
  }
}

/* -------------------------------------------------------------- bölümler */
.sc {
  position: relative;
  min-height: var(--app-h);
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad-y) var(--pad-x);
}

/* ------------------------------------------------------- kemerli kart ---- */
.panel {
  position: relative;
  width: 100%;
  max-width: 27rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(3rem, 9vh, 4.4rem) clamp(1.1rem, 5vw, 2.2rem) clamp(1.6rem, 4.5vh, 2.4rem);
  border: 1px solid var(--line);
  border-radius: clamp(80px, 30vw, 168px) clamp(80px, 30vw, 168px) 12px 12px;
  background:
    radial-gradient(110% 50% at 50% 0%, rgba(251, 233, 237, 0.7), transparent 70%),
    radial-gradient(90% 40% at 50% 100%, rgba(234, 242, 250, 0.75), transparent 72%),
    linear-gradient(180deg, rgba(255, 253, 250, 0.94), rgba(255, 251, 247, 0.9));
  box-shadow:
    0 30px 60px -40px rgba(150, 96, 104, 0.45),
    0 6px 18px -12px rgba(150, 96, 104, 0.2);
}

/* ikinci ince çerçeve */
.panel__rule {
  position: absolute;
  inset: 7px;
  border: 1px solid var(--line-soft);
  border-radius: inherit;
  pointer-events: none;
}

/* tepedeki çiçek çelengi */
.panel__crest {
  position: absolute;
  top: 0;
  left: 50%;
  width: clamp(14rem, 74%, 19rem);
  translate: -50% -52%;
  pointer-events: none;
}

/* alt köşe çiçek demetleri */
.panel__corner {
  position: absolute;
  bottom: -14px;
  width: clamp(6.6rem, 34%, 8.8rem);
  aspect-ratio: 1;
  background: url("../img/orn-posy.svg") center / contain no-repeat;
  pointer-events: none;
}
.panel__corner--bl {
  left: -16px;
}
.panel__corner--br {
  right: -16px;
  transform: scaleX(-1);
}

/* İç içe kaydırma kabı yok: içerik uzunsa bölüm büyür, sayfa normal kayar. */
.panel__body {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 1.6vh, 1rem);
}

/* ---------------------------------------------------------- tipografi ---- */
.eyebrow {
  margin: 0;
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(0.6rem, 2.6vw, 0.74rem);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--sky-500);
}
.eyebrow--dim {
  color: var(--ink-500);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
}

.cover__guest {
  margin: 0;
  font-size: clamp(0.84rem, 3.4vw, 1rem);
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--ink-700);
  line-height: 1.45;
}
.cover__guest strong {
  display: block;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1rem, 4.4vw, 1.3rem);
  letter-spacing: 0.1em;
  color: var(--ink-900);
}

.names {
  margin: clamp(0.1rem, 0.8vh, 0.5rem) 0 0;
  font-family: var(--ff-script);
  font-weight: 400;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.names__first,
.names__second {
  display: block;
  font-size: clamp(2.6rem, min(13.5vw, 8.4vh), 4.5rem);
  /* süslü harflerin uçları degradenin dışında kalıp kaybolmasın diye kutu
     genişletilir; fazlalık negatif kenar boşluğu ile alınır */
  padding: 0.3em 0.16em 0.14em;
  margin: -0.14em 0;
}
.names__ring {
  display: block;
  width: clamp(3.4rem, 15vw, 4.4rem);
  aspect-ratio: 64 / 52;
  height: auto;
  margin: 0.05em 0 0.02em;
}
.names--sm .names__first,
.names--sm .names__second {
  font-size: clamp(2.1rem, min(11vw, 6.6vh), 3.5rem);
}
.names--sm .names__ring {
  width: clamp(2.7rem, 12vw, 3.4rem);
}

.cover__date {
  margin: 0;
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(0.72rem, 3vw, 0.86rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--ink-500);
}

.script-title {
  margin: 0;
  font-family: var(--ff-script);
  font-weight: 400;
  font-size: clamp(2.2rem, min(10vw, 6.4vh), 3.2rem);
  line-height: 1;
  padding: 0.22em 0.14em 0.2em;
}

.invite-text {
  margin: 0;
  max-width: 19.5rem;
  padding: 0 0.4rem;
  font-style: italic;
  font-size: clamp(0.92rem, 3.8vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-700);
}

.ornament {
  width: clamp(8rem, 58%, 14rem);
  opacity: 0.85;
  margin: clamp(0.1rem, 0.8vh, 0.5rem) auto;
}
.ornament--tight {
  width: clamp(7rem, 46%, 11rem);
  margin-bottom: 0;
}

.signature {
  margin: 0;
  font-family: var(--ff-script);
  font-size: clamp(1.2rem, 5vw, 1.55rem);
  color: var(--rose-500);
}

/* ------------------------------------------------------ tarih şeridi ---- */
.datebar {
  width: 100%;
  max-width: 21rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 1.4vh, 0.7rem);
  margin: clamp(0.1rem, 0.8vh, 0.4rem) 0;
}
.datebar__line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose-300), var(--sky-300), transparent);
}
.datebar__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.7rem, 3.4vw, 1.3rem);
}
.datebar__day {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  line-height: 1;
  color: var(--rose-500);
}
.datebar__mid,
.datebar__meta {
  display: flex;
  flex-direction: column;
  gap: 0.28em;
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(0.62rem, 2.7vw, 0.76rem);
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--ink-700);
}
.datebar__meta {
  border-left: 1px solid var(--line);
  padding-left: clamp(0.7rem, 3.4vw, 1.3rem);
}
.datebar__mid em,
.datebar__meta em {
  font-style: normal;
}
.datebar__mid i,
.datebar__meta i {
  font-style: normal;
  color: var(--sky-500);
}

/* ---------------------------------------------------------- aileler ---- */
.families {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 5vw, 1.8rem);
  margin-top: clamp(0.1rem, 0.6vh, 0.4rem);
}
.family {
  flex: 1 1 0;
  min-width: 0;
}
.family h3 {
  margin: 0;
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: clamp(1rem, 4.3vw, 1.25rem);
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--ink-900);
}
.family p {
  margin: 0.1em 0 0;
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(0.56rem, 2.5vw, 0.68rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--rose-500);
}
.family small {
  display: block;
  margin-top: 0.45em;
  font-size: clamp(0.8rem, 3.4vw, 0.95rem);
  font-style: italic;
  color: var(--ink-700);
}
.family__sep {
  width: 1px;
  align-self: stretch;
  min-height: 2.8rem;
  background: linear-gradient(180deg, transparent, var(--rose-300), var(--sky-300), transparent);
}

/* ------------------------------------------------------------ konum ---- */
.venue {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: clamp(0.7rem, 3.4vw, 1.1rem);
  padding: clamp(0.8rem, 2.4vh, 1.1rem) clamp(0.8rem, 3.6vw, 1.2rem);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  background: linear-gradient(140deg, rgba(251, 233, 237, 0.55), rgba(234, 242, 250, 0.55));
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.venue:hover,
.venue:focus-visible {
  border-color: var(--rose-400);
  background: linear-gradient(140deg, rgba(251, 233, 237, 0.85), rgba(234, 242, 250, 0.85));
  transform: translateY(-2px);
}
.venue__icon {
  display: grid;
  place-items: center;
  width: clamp(2.1rem, 9vw, 2.6rem);
  aspect-ratio: 1;
  border: 1px solid var(--rose-300);
  border-radius: 50%;
  color: var(--rose-500);
  background: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.95rem, 4vw, 1.15rem);
  flex: 0 0 auto;
  margin-top: 0.1em;
}
.venue__text {
  min-width: 0;
}
.venue__text strong {
  display: block;
  font-family: var(--ff-serif);
  font-weight: 600;
  font-size: clamp(1rem, 4.2vw, 1.2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-900);
  line-height: 1.25;
}
.venue__text small {
  display: block;
  margin-top: 0.3em;
  font-size: clamp(0.8rem, 3.3vw, 0.92rem);
  line-height: 1.5;
  color: var(--ink-700);
}
.venue__hint {
  display: inline-block;
  margin-top: 0.5em;
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(0.55rem, 2.5vw, 0.65rem);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--sky-500);
}

.maplink {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.4em 1em 0.44em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: clamp(0.6rem, 2.7vw, 0.72rem);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.6);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.maplink:hover,
.maplink:focus-visible {
  background: var(--rose-100);
  border-color: var(--rose-400);
  color: var(--ink-900);
}

/* --------------------------------------------------------- geri sayım ---- */
.countdown {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 1.4vh, 0.7rem);
}
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.3rem, 1.8vw, 0.6rem);
  width: 100%;
  max-width: 20rem;
}
.countdown__grid > div {
  padding: clamp(0.35rem, 1.2vh, 0.55rem) 0.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
}
.countdown__grid > div:nth-child(even) {
  background: rgba(234, 242, 250, 0.7);
}
.countdown__grid > div:nth-child(odd) {
  background: rgba(251, 233, 237, 0.7);
}
.countdown__grid b {
  display: block;
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  line-height: 1.15;
  color: var(--ink-900);
  font-variant-numeric: lining-nums tabular-nums;
}
.countdown__grid span {
  display: block;
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(0.48rem, 2.1vw, 0.6rem);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.countdown.is-past .countdown__grid {
  display: none;
}

/* ------------------------------------------------------------ butonlar ---- */
.pill,
.ghost-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-top: clamp(0.8rem, 2.6vh, 1.4rem);
  padding: 0.55em 1.4em 0.6em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: clamp(0.6rem, 2.7vw, 0.72rem);
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.7);
  flex: 0 0 auto;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.pill:hover,
.pill:focus-visible,
.ghost-btn:hover,
.ghost-btn:focus-visible {
  background: var(--rose-100);
  border-color: var(--rose-400);
  transform: translateY(-2px);
}
.pill .ico {
  animation: nudge 2.6s var(--ease) infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.75;
  }
  50% {
    transform: translateY(3px);
    opacity: 1;
  }
}

/* -------------------------------------------------------- müzik düğmesi ---- */
.music {
  position: fixed;
  top: max(0.8rem, env(safe-area-inset-top));
  right: max(0.8rem, env(safe-area-inset-right));
  z-index: 50;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--rose-500);
  background: rgba(255, 252, 248, 0.82);
  box-shadow: 0 6px 18px -10px rgba(150, 96, 104, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease 1.1s, border-color 0.3s ease, background 0.3s ease;
}
body.is-open .music {
  opacity: 1;
  pointer-events: auto;
}
.music:hover,
.music:focus-visible {
  border-color: var(--rose-400);
  background: var(--rose-100);
}
.music .ico {
  width: 18px;
  height: 18px;
}
.music.is-playing .ico {
  animation: sway 3.2s ease-in-out infinite;
}
.music::after {
  /* çalarken yumuşak halka */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--rose-300);
  opacity: 0;
}
.music.is-playing::after {
  animation: ripple 2.8s ease-out infinite;
}
.music__slash {
  position: absolute;
  width: 22px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  rotate: -45deg;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.music.is-playing .music__slash {
  opacity: 0;
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(6deg);
  }
}
@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* --------------------------------------------------- açılış: zarf kapağı ---- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  perspective: 1600px;
  perspective-origin: 50% 45%;
  background: var(--paper-200);
  transition: opacity 0.5s ease 0.85s, visibility 0.5s ease 0.85s;
}
.gate.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.gate.is-gone {
  display: none;
}

.gate__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.door {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 50.4%;
  overflow: hidden;
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(251, 233, 237, 0.8), transparent 70%),
    radial-gradient(90% 50% at 50% 100%, rgba(234, 242, 250, 0.85), transparent 70%),
    linear-gradient(168deg, var(--paper-50) 0%, var(--paper-100) 50%, var(--paper-200) 100%);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 1.6s cubic-bezier(0.62, 0.03, 0.18, 1);
  will-change: transform;
}
.door::after {
  /* dikişteki gölge */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26%;
  pointer-events: none;
}
.door--l {
  left: 0;
  transform-origin: left center;
}
.door--r {
  right: 0;
  transform-origin: right center;
}
.door--l::after {
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(150, 100, 100, 0.12));
  border-right: 1px solid var(--line);
}
.door--r::after {
  left: 0;
  background: linear-gradient(270deg, transparent, rgba(150, 100, 100, 0.12));
  border-left: 1px solid var(--line);
}

.gate.is-open .door--l {
  transform: rotateY(-106deg);
}
.gate.is-open .door--r {
  transform: rotateY(106deg);
}

.door__spray {
  position: absolute;
  width: 132%;
  height: 66%;
  background: url("../img/orn-bouquet.svg") no-repeat center / contain;
  pointer-events: none;
}
.door--l .door__spray {
  top: -3%;
  left: -26%;
}
.door--r .door__spray {
  bottom: -3%;
  right: -26%;
  rotate: 180deg;
}

.door__frame {
  position: absolute;
  inset: clamp(12px, 3.4vw, 26px);
  border: 1px solid var(--line);
  pointer-events: none;
}
.door--l .door__frame {
  right: -1px;
  border-right: 0;
}
.door--r .door__frame {
  left: -1px;
  border-left: 0;
}

/* mühür */
.seal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: clamp(116px, 34vw, 180px);
  aspect-ratio: 320 / 396;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: url("../img/orn-seal.svg") center / contain no-repeat;
  filter: drop-shadow(0 12px 22px rgba(150, 96, 104, 0.25));
  translate: -50% -50%;
  cursor: pointer;
  transition: transform 0.6s var(--ease), opacity 0.5s ease;
}
.seal:hover {
  transform: scale(1.04);
}
.seal__glow {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 212, 220, 0.55), transparent 68%);
  animation: breathe 3.6s ease-in-out infinite;
  pointer-events: none;
}
.seal__mono {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--ff-script);
  font-size: clamp(1.8rem, 7.8vw, 2.6rem);
  line-height: 1;
}
.seal__mono > span {
  padding: 0.22em 0.12em 0.08em;
  margin: -0.12em 0;
}
.seal__rings {
  width: 1.15em;
  aspect-ratio: 64 / 52;
  height: auto;
  margin: 0.04em 0;
}
.gate.is-open .seal {
  opacity: 0;
  transform: scale(1.22);
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.gate__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(3.2rem, 12vh, 7rem);
  z-index: 3;
  margin: 0;
  text-align: center;
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: clamp(0.58rem, 2.6vw, 0.72rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink-700);
  transition: opacity 0.4s ease;
}
.gate__hint span {
  padding: 0.5em 1.1em;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.75);
  animation: fadePulse 3.4s ease-in-out infinite;
}
.gate.is-open .gate__hint {
  opacity: 0;
}

@keyframes fadePulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* --------------------------------------------------- süzülen yapraklar ---- */
.petals {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease 0.9s;
}
body.is-open .petals {
  opacity: 1;
}
.petals span {
  position: absolute;
  left: var(--x);
  top: -6vh;
  width: 9px;
  height: 13px;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #fbe3e9, var(--rose-300));
  opacity: 0;
  animation: fall var(--s) linear var(--d) infinite;
}
.petals span:nth-child(even) {
  width: 7px;
  height: 10px;
  background: linear-gradient(135deg, #f0f6fc, var(--sky-300));
}

@keyframes fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  50% {
    transform: translate3d(-26px, 55vh, 0) rotate(160deg);
  }
  85% {
    opacity: 0.45;
  }
  100% {
    transform: translate3d(18px, 112vh, 0) rotate(320deg);
    opacity: 0;
  }
}

/* ------------------------------------------------------ bölüm noktaları ---- */
.dots {
  position: fixed;
  right: clamp(0.45rem, 2vw, 1rem);
  top: 50%;
  translate: 0 -50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.8s ease 1.1s;
  pointer-events: none;
}
body.is-open .dots {
  opacity: 1;
  pointer-events: auto;
}
.dots a {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}
.dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--rose-400);
  transition: all 0.4s var(--ease);
}
.dots a.is-active span {
  background: var(--rose-400);
  box-shadow: 0 0 0 3px rgba(235, 184, 196, 0.35);
  transform: scale(1.2);
}

/* ------------------------------------------------------- giriş animasyonu ---- */
.reveal > *,
.reveal .panel__body > * {
  opacity: 0;
  transform: translateY(16px);
}
body.is-open .reveal > *,
body.is-open .reveal .panel__body > * {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
body.is-open .reveal .r-1 {
  transition-delay: 0.15s;
}
body.is-open .reveal .r-2 {
  transition-delay: 0.32s;
}
body.is-open .reveal .r-3 {
  transition-delay: 0.5s;
}
body.is-open .reveal .r-4 {
  transition-delay: 0.68s;
}
body.is-open .reveal .panel__crest,
body.is-open .reveal .panel__rule,
body.is-open .reveal .panel__corner {
  transition-delay: 0s;
}
/* köşe demeti aynalı; giriş animasyonu bu dönüşümü ezmesin */
.reveal > .panel__corner--br,
body.is-open .reveal > .panel__corner--br {
  transform: scaleX(-1);
}

/* bölüm 2-3: görünür olunca yumuşak giriş */
.sc:not(#sc-1) .panel {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.sc:not(#sc-1).in .panel {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------- uyarlama ---- */
/* çok kısa ekranlar / yatay mod: kart daha derli toplu */
@media (max-height: 600px) {
  :root {
    --pad-y: clamp(0.5rem, 1.8vh, 1rem);
  }
  .panel {
    padding-top: clamp(2rem, 6vh, 2.8rem);
    padding-bottom: clamp(1.1rem, 3vh, 1.6rem);
    border-radius: clamp(60px, 22vw, 110px) clamp(60px, 22vw, 110px) 12px 12px;
  }
  .panel__body {
    gap: clamp(0.35rem, 1.2vh, 0.7rem);
  }
  .panel__crest {
    width: clamp(8rem, 40%, 11rem);
  }
  .panel__corner {
    width: clamp(4.4rem, 20%, 5.8rem);
  }
  .ornament {
    display: none;
  }
  .script-title {
    padding: 0.16em 0.12em 0.14em;
  }
  .pill,
  .ghost-btn {
    margin-top: clamp(0.5rem, 1.6vh, 0.9rem);
  }
  .gate__hint {
    bottom: clamp(1.2rem, 6vh, 2.4rem);
  }
}

/* yatay telefon: kart genişler, kapak süsü kenara oturur */
@media (orientation: landscape) and (max-height: 560px) {
  .panel {
    max-width: 44rem;
    padding: clamp(1.4rem, 7vh, 2.1rem) clamp(1.1rem, 4vw, 2rem) clamp(0.8rem, 3vh, 1.2rem);
    border-radius: clamp(40px, 9vw, 80px) clamp(40px, 9vw, 80px) 12px 12px;
  }
  .panel__body {
    gap: clamp(0.3rem, 1vh, 0.6rem);
  }
  .pill,
  .ghost-btn {
    margin-top: clamp(0.4rem, 1.4vh, 0.8rem);
  }
  .panel__crest {
    width: clamp(7rem, 28%, 10rem);
  }
  .names {
    flex-direction: row;
    gap: 0.4em;
  }
  .names__first,
  .names__second {
    font-size: clamp(1.8rem, 9vh, 2.8rem);
  }
  .names--sm .names__first,
  .names--sm .names__second {
    font-size: clamp(1.5rem, 7vh, 2.3rem);
  }
  .script-title {
    font-size: clamp(1.6rem, 7vh, 2.4rem);
  }
  .datebar,
  .countdown__grid {
    max-width: 26rem;
  }
  .venue {
    max-width: 34rem;
    margin: 0 auto;
  }
  .door__spray {
    width: 58%;
    height: 132%;
    background-size: auto 100%;
  }
  .door--l .door__spray {
    top: -16%;
    left: -6%;
    background-position: left center;
  }
  .door--r .door__spray {
    bottom: -16%;
    right: -6%;
    background-position: right center;
  }
}

/* geniş ekranlarda kart biraz daha ferah */
@media (min-width: 900px) and (min-height: 760px) {
  .panel {
    max-width: 29rem;
    padding-bottom: clamp(1.4rem, 3.5vh, 2.2rem);
  }
}

@media (hover: none) {
  .pill:hover,
  .ghost-btn:hover,
  .venue:hover,
  .seal:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .gate {
    transition: opacity 0.25s ease;
  }
  .door {
    transition: opacity 0.4s ease;
  }
  .gate.is-open .door--l,
  .gate.is-open .door--r {
    transform: none;
    opacity: 0;
  }
  .seal__glow,
  .gate__hint span,
  .pill .ico,
  .petals span,
  .music .ico,
  .music::after {
    animation: none !important;
  }
  .petals {
    display: none;
  }
  .reveal > *,
  .reveal .panel__body > *,
  .sc:not(#sc-1) .panel {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media print {
  .gate,
  .dots,
  .petals,
  .music,
  .pill {
    display: none !important;
  }
  .sc {
    min-height: auto;
    page-break-inside: avoid;
  }
}
