/* ═══════════════════════════════════════════════════════════
   Tuğba & Salih · Nişan Davetiyesi
   Tek sayfa, bağımlılık yok. Yalnızca transform ve opacity
   animasyonlanır; easing her yerde --ease.
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Cormorant';
  src: url('assets/fonts/cormorant.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CoFo Sans';
  src: url('assets/fonts/cofosans-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CoFo Sans';
  src: url('assets/fonts/cofosans-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Kâğıt koyu bir masanın üstünde duruyor. Zemin ahşap tonunda,
     kâğıt onun üstünde ışığı tutan tek yüzey. */
  --ground:      #7E6647;
  --paper:       #FBF6EA;   /* zarf */
  --card:        #FDFAF1;   /* mektup, biraz daha parlak */
  --ink:         #2A2118;
  --ink-soft:    #6B5B47;
  --ink-faint:   #A2907A;
  --ink-ghost:   #C2B096;
  --wax:         #A8443A;
  --wax-deep:    #7E3128;

  /* Gerçek kâğıt gölgesi: geniş ve derin, altta sert bir temas çizgisi. */
  --shadow-soft: 0 30px 44px -18px rgba(38, 24, 10, .58),
                 0  4px 10px  -4px rgba(38, 24, 10, .38);
  --shadow-card: 0 36px 52px -20px rgba(38, 24, 10, .64),
                 0  5px 12px  -5px rgba(38, 24, 10, .42);

  /* Kâğıdın dokusu — iki yönde ince tarama, elyaf hissi. */
  --weave:
    repeating-linear-gradient(102deg, rgba(150,120,80,.055) 0 2px, rgba(150,120,80,0) 2px 5px),
    repeating-linear-gradient( 14deg, rgba(150,120,80,.045) 0 3px, rgba(150,120,80,0) 3px 7px);

  --serif: 'Cormorant', 'Iowan Old Style', Georgia, serif;
  --sans:  'CoFo Sans', ui-sans-serif, -apple-system, 'Helvetica Neue', sans-serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  /* --ease'in tam aynadaki karşılığı: (1-x2, 1-y2, 1-x1, 1-y1).
     Sayfa çevrilirken ilk yarı bununla hızlanır, ikinci yarı --ease ile
     yavaşlar. İki yarıda da yavaşlayan eğri kullanılırsa kâğıt tam
     dikey konumda duruyormuş gibi bir ölü nokta oluşuyor. */
  --ease-in: cubic-bezier(1, 0, 0.68, 0.28);

  --pad: clamp(16px, 4.5vw, 34px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--ground);
  background-image:
    radial-gradient(125% 85% at 50% -8%, #B49871 0%, #8A7150 46%, #6A5439 100%),
    repeating-linear-gradient(96deg, rgba(58,40,20,.10) 0 3px, rgba(58,40,20,0) 3px 9px);
  color: #F0E3CC;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ── Grain ──────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── İskelet ────────────────────────────────────────────── */
.shell {
  position: relative;
  z-index: 1;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: max(12px, env(safe-area-inset-top)) var(--pad)
           max(14px, env(safe-area-inset-bottom));
  gap: clamp(8px, 2vh, 20px);
}

/* ── Başlık — masanın üstünde tek satır künye ───────────── */
.masthead { text-align: center; }

.masthead__kicker {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(8.5px, 2.3vw, 10px);
  letter-spacing: .42em;
  line-height: 1.7;
  color: rgba(246,234,214,.78);
  margin: 0;
  text-shadow: 0 1px 2px rgba(40,26,12,.5);
}

.amp {
  font-style: italic;
  font-weight: 300;
  color: var(--wax);
  padding: 0 .06em;
}

/* Zarf açılınca künye geri çekilir */
.masthead { transition: opacity 700ms var(--ease) 380ms; }
body.is-open .masthead { opacity: .55; }

/* ── Alt bant ───────────────────────────────────────────── */
.footbar {
  min-height: 62px;
  display: grid;
  place-items: center;
  text-align: center;
}

.hint {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(9px, 2.5vw, 10.5px);
  letter-spacing: .34em;
  line-height: 1.6;
  color: rgba(247,236,216,.9);
  text-shadow: 0 1px 3px rgba(40,26,12,.6);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: .9em;
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
.hint__arrow {
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .45;
}
body.is-open .hint {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.countdown {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 700ms var(--ease) 1740ms, transform 700ms var(--ease) 1740ms;
}
body.is-open .countdown { opacity: 1; transform: none; }
.countdown[hidden] { display: none; }

.countdown__label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: .36em;
  line-height: 1.6;
  color: rgba(240,227,204,.55);
  margin: 0 0 .7em;
}
.countdown__grid {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 5vw, 30px);
}
.unit { display: block; text-align: center; }
.unit b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
  font-size: clamp(19px, 5.4vw, 26px);
  line-height: 1.05;
  color: #F7ECD8;
  text-shadow: 0 1px 3px rgba(40,26,12,.55);
}
.unit i {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 8px;
  letter-spacing: .22em;
  line-height: 1.6;
  color: rgba(240,227,204,.48);
  margin-top: .5em;
}

/* ═══════════════════════════════════════════════════════════
   SAHNE — zarf ve mektup aynı hücreyi paylaşır
   ═══════════════════════════════════════════════════════════ */
.stage {
  display: grid;
  place-items: center;
  min-height: 0;
}
.stage > * { grid-area: 1 / 1; }

/* ═══════════════════════════════════════════════════════════
   ZARF
   Zarfın içindeki her ölçü em cinsinden; .envelope'un
   font-size'ı zarf genişliğine bağlı, böylece tek değişkenle
   bütün kompozisyon ölçekleniyor.
   ═══════════════════════════════════════════════════════════ */
.envelope {
  --w: min(88vw, 380px);
  font-size: min(2.3158vw, 10px);
  width: var(--w);
  max-height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: block;
  perspective: 90em;
  transition: transform 640ms var(--ease) 420ms, opacity 640ms var(--ease) 420ms;
  -webkit-tap-highlight-color: transparent;
}
.envelope:focus-visible {
  outline: 2px solid var(--wax);
  outline-offset: 10px;
  border-radius: 3px;
}
body.is-open .envelope {
  transform: translateY(2.8em) rotate(-1.6deg);
  opacity: 0;
  pointer-events: none;
}

.envelope__body {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / .655;
  transform: rotate(-1.4deg);
  transform-style: preserve-3d;
  background: var(--paper);
  background-image:
    var(--weave),
    linear-gradient(168deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 36%,
                            rgba(120,92,58,.09) 100%);
  border-radius: .12em;
  box-shadow: var(--shadow-soft), inset 0 .1em 0 rgba(255,255,255,.6);
}

/* Zarfın içi — kapak açılınca görünen karanlık */
.envelope__inside {
  position: absolute;
  inset: 0 0 auto 0;
  height: 49%;
  border-radius: .3em .3em 0 0;
  background: linear-gradient(180deg, #A98F6C 0%, #C6AF8C 46%, #DDCBAC 100%);
  box-shadow: inset 0 .6em 1.3em rgba(66,44,20,.5);
}

/* Adres bloğu */
.envelope__address {
  position: absolute;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  width: 82%;
  display: block;
  text-align: center;
  color: var(--ink-soft);
}
.addr__to {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .78em;
  letter-spacing: .3em;
  line-height: 1.5;
  color: var(--ink-ghost);
  margin-bottom: .75em;
}
.addr__venue {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.95em;
  line-height: 1.22;
  color: var(--ink);
  letter-spacing: .01em;
}
.addr__lines {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.16em;
  line-height: 1.45;
  margin-top: .35em;
}
.addr__city {
  display: block;
  font-family: var(--sans);
  font-size: .78em;
  letter-spacing: .26em;
  line-height: 1.6;
  color: var(--ink-faint);
  margin-top: .7em;
}

/* Kapak */
.envelope__flap {
  position: absolute;
  inset: 0 0 auto 0;
  height: 49%;
  transform-origin: top center;
  transform: rotateX(0deg);
  backface-visibility: hidden;
  border-radius: .3em .3em 0 0;
  background: #FDFAF1;
  background-image:
    var(--weave),
    linear-gradient(174deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 54%,
                            rgba(120,92,58,.11) 100%);
  box-shadow: 0 .34em .8em -.26em rgba(70,46,20,.45);
  transition: transform 980ms var(--ease) 180ms;
}
body.is-open .envelope__flap { transform: rotateX(-172deg); }

.flap__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(112deg,
    rgba(255,255,255,0) 38%, rgba(255,255,255,.5) 47%,
    rgba(255,255,255,0) 56%);
  pointer-events: none;
}

/* Katlama çizgisi */
.envelope__crease {
  position: absolute;
  left: 0; right: 0;
  top: 49%;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(120,92,58,0) 0%, rgba(120,92,58,.4) 10%,
    rgba(120,92,58,.4) 90%, rgba(120,92,58,0) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}

/* ── Posta pulu ─────────────────────────────────────────── */
.stamp {
  --r: .38em;                    /* zımba deliği yarıçapı */
  position: absolute;
  top: 8%;
  right: 6%;
  width: 7.3em;
  aspect-ratio: 1 / 1.24;
  display: block;
  transform: rotate(2.2deg);
  filter: drop-shadow(0 .14em .3em rgba(120,96,68,.32));
}
.stamp__inner {
  position: absolute;
  inset: 0;
  display: block;
  background: #FBF5E6;
  -webkit-mask:
    radial-gradient(var(--r) at 50% 0,    #0000 98%, #000 100%) 50% 0   / calc(4*var(--r)) 100% repeat-x,
    radial-gradient(var(--r) at 50% 100%, #0000 98%, #000 100%) 50% 100%/ calc(4*var(--r)) 100% repeat-x,
    radial-gradient(var(--r) at 0 50%,    #0000 98%, #000 100%) 0 50%   / 100% calc(4*var(--r)) repeat-y,
    radial-gradient(var(--r) at 100% 50%, #0000 98%, #000 100%) 100% 50%/ 100% calc(4*var(--r)) repeat-y;
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(var(--r) at 50% 0,    #0000 98%, #000 100%) 50% 0   / calc(4*var(--r)) 100% repeat-x,
    radial-gradient(var(--r) at 50% 100%, #0000 98%, #000 100%) 50% 100%/ calc(4*var(--r)) 100% repeat-x,
    radial-gradient(var(--r) at 0 50%,    #0000 98%, #000 100%) 0 50%   / 100% calc(4*var(--r)) repeat-y,
    radial-gradient(var(--r) at 100% 50%, #0000 98%, #000 100%) 100% 50%/ 100% calc(4*var(--r)) repeat-y;
  mask-composite: intersect;
  overflow: hidden;
}
.stamp__frame {
  position: absolute;
  inset: .5em;
  border: 1px solid rgba(96,70,44,.7);
  box-shadow: inset 0 0 0 1px rgba(255,252,246,.9),
              inset 0 0 0 2px rgba(126,98,72,.2);
  pointer-events: none;
  z-index: 3;
}

.stamp__sky {
  position: absolute;
  inset: .5em .5em auto .5em;
  height: 62%;
  display: block;
  background:
    radial-gradient(80% 68% at 50% 40%, #EADAB4 0%, #C9AC7C 52%, #9C7F52 100%);
  box-shadow: inset 0 0 1.4em rgba(88,62,32,.42);
  overflow: hidden;
}
.stamp__orbits {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.stamp__orbits circle {
  fill: none;
  stroke: rgba(56,38,18,.42);
  stroke-width: .8;
  stroke-dasharray: 1 3.4;
}

.jupiter {
  position: absolute;
  left: 50%; top: 50%;
  width: 3.5em;
  transform: translate(-50%, -50%);
  display: block;
  filter: drop-shadow(0 .06em .12em rgba(96,68,40,.35)) saturate(1.12) contrast(1.06);
}
.jupiter img { width: 100%; height: auto; display: block; }

.orbit {
  position: absolute;
  left: 50%; top: 50%;
  display: block;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: orbit 22s linear infinite;
}
.orbit--1 { width: 3.9em; height: 3.9em; animation-duration: 13s; animation-delay: -3s; }
.orbit--2 { width: 4.7em; height: 4.7em; animation-duration: 19s; animation-delay: -11s; }
.orbit--3 { width: 5.5em; height: 5.5em; animation-duration: 27s; animation-delay: -6s; }
.orbit--4 { width: 6.3em; height: 6.3em; animation-duration: 37s; animation-delay: -19s; }

.moon {
  position: absolute;
  left: 0; top: 50%;
  width: .84em; height: .84em;
  margin: -.42em 0 0 -.42em;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
  /* Üretimden gelen soğuk griyi pulun sıcak paletine çek */
  filter: sepia(.55) saturate(1.5) brightness(.92) contrast(1.15);
}
.moon--1 { background-image: url('assets/ay-1.webp'); }
.moon--2 { background-image: url('assets/ay-2.webp'); width: .7em; height: .7em; margin: -.35em 0 0 -.35em; }
.moon--3 { background-image: url('assets/ay-3.webp'); }
.moon--4 { background-image: url('assets/ay-4.webp'); width: .66em; height: .66em; margin: -.33em 0 0 -.33em; }

@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.stamp__caption {
  position: absolute;
  left: .5em; right: .5em; bottom: .5em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 27%;
  gap: .3em;
}
.stamp__ts {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35em;
  line-height: 1;
  letter-spacing: .06em;
  color: var(--ink);
}
.stamp__date {
  font-family: var(--sans);
  font-weight: 400;
  font-size: .66em;
  letter-spacing: .16em;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ── Damga ──────────────────────────────────────────────── */
.postmark {
  position: absolute;
  top: 16%;
  right: 20.5%;
  width: 6.4em; height: 6.4em;
  transform: rotate(-13deg);
  opacity: .62;
  mix-blend-mode: multiply;
  overflow: visible;
}
.postmark path {
  fill: none;
  stroke: #6E4438;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.postmark text {
  fill: #6E4438;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.6px;
}
.postmark .pm-big { font-size: 17px; letter-spacing: .4px; }

/* ── Mühür ──────────────────────────────────────────────── */
.seal {
  position: absolute;
  left: 50%; top: 49%;
  width: 6.2em; height: 6.2em;
  margin: -3.1em 0 0 -3.1em;
  display: block;
  filter: drop-shadow(0 .22em .3em rgba(70,26,18,.62));
  animation: breathe 3.6s var(--ease) infinite;
  transition: transform 440ms var(--ease), opacity 440ms var(--ease);
}
.seal svg { width: 100%; height: 100%; display: block; }
.seal__blob { fill: url(#waxGrad); }
.seal__mark path {
  fill: none;
  stroke: rgba(255,248,244,.78);
  stroke-width: 2.6;
  stroke-linecap: round;
}
.seal__mark .sprig { stroke-width: 1.7; opacity: .72; }
.seal__mark text {
  fill: rgba(255,242,236,.94);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
}
body.is-open .seal {
  transform: scale(1.28);
  opacity: 0;
  animation: none;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.022); }
}

/* ═══════════════════════════════════════════════════════════
   MEKTUP
   Üçe katlanmış kâğıt: üst ve alt panel ortadakinin üstüne
   kapanmış durumda başlar, rotateX ile açılır. Açılma bitince
   gerçek sayfa (metin taşıyan katman) sessizce devralır.
   ═══════════════════════════════════════════════════════════ */
.letter {
  /* Genişliği boyla sınırla ki kâğıt hep portre kalsın, kare olmasın. */
  width: min(94vw, 420px, calc((100dvh - 190px) / 1.36));
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vh, 14px);
  opacity: 0;
  transform: translateY(46px);
  pointer-events: none;
  transition: opacity 700ms var(--ease) 620ms,
              transform 700ms var(--ease) 620ms;
}
body.is-open .letter {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.letter__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  transform: rotate(.85deg);          /* elden bırakılmış gibi */
}

/* ── Katlar ─────────────────────────────────────────────── */
.folds {
  position: absolute;
  inset: 0;
  perspective: 150em;
  pointer-events: none;
}
.fold {
  position: absolute;
  left: 0; right: 0;
  height: 33.34%;
  display: block;
  background: var(--card);
  background-image:
    var(--weave),
    linear-gradient(166deg, rgba(255,255,255,.78) 0%, rgba(255,255,255,0) 42%,
                            rgba(120,92,58,.07) 100%);
  transition: transform 780ms var(--ease) 820ms,
              opacity 300ms var(--ease) 1580ms;
}
.fold--mid {
  top: 33.33%;
  box-shadow: var(--shadow-card);
}
.fold--top {
  top: 0;
  transform-origin: bottom center;
  transform: rotateX(180deg);
  box-shadow: 0 .5px 3px rgba(120,96,68,.16);
}
.fold--bot {
  bottom: 0;
  transform-origin: top center;
  transform: rotateX(-180deg);
  box-shadow: 0 -.5px 3px rgba(120,96,68,.16);
}
body.is-open .fold--top,
body.is-open .fold--bot { transform: rotateX(0deg); }
body.is-open .fold { opacity: 0; }

/* ── Kâğıt ──────────────────────────────────────────────── */
.letter__flip {
  position: absolute;
  inset: 0;
  perspective: 170em;
}
.letter__paper {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  background: var(--card);
  background-image:
    var(--weave),
    linear-gradient(166deg, rgba(255,255,255,.8) 0%, rgba(255,255,255,0) 40%,
                            rgba(120,92,58,.07) 100%),
    linear-gradient(112deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.4) 49%,
                            rgba(255,255,255,0) 57%);
  border-radius: 1px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  opacity: 0;
  transition: opacity 320ms var(--ease) 1580ms,
              transform 380ms var(--ease),
              box-shadow 380ms var(--ease);
}
body.is-open .letter__paper { opacity: 1; }

/* Kâğıt kenara geldiğinde masadan biraz kalkar — gölge sıkışır */
body.is-turning .letter__paper {
  backface-visibility: hidden;
  box-shadow: 0 46px 60px -22px rgba(38, 24, 10, .7),
              0 8px 18px -6px rgba(38, 24, 10, .5);
}

/* ── Z katlaması ────────────────────────────────────────────
   Kâğıt üçe katlandığında üç panel aynı düzlemde durmaz; zikzak
   yapar. Işık yukarıdan geldiğine göre:

     panel A  ⟍   üstten aşağı kararır      (çukura iner)
     33.8%    ﹀   ÇUKUR — en koyu çizgi
     panel B  ⟋   aşağıdan yukarı aydınlanır (tepeye çıkar)
     66.2%    ︿   TEPE — en parlak çizgi
     panel C  ⟍   tepenin hemen altı sert gölge, sonra toparlar

   Üç panel tek bir dikey geçişle sürekli tutuluyor; kopuk gradyan
   kullanmak katları düz bir çizgi gibi gösteriyordu. Üstüne iki ince
   katman keskin çukur ve tepe çizgisini koyuyor — ikisi de hafif ve
   ters eğik, çünkü elle katlanmış kâğıtta izler tam yatay olmaz. */
.letter__creases {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image:
    /* çukurun keskin çekirdeği */
    linear-gradient(179.35deg,
      rgba(118, 90, 54, 0) 0%,
      rgba(118, 90, 54, .3) 46%,
      rgba(118, 90, 54, .3) 58%,
      rgba(118, 90, 54, 0) 100%),
    /* tepenin parlaması */
    linear-gradient(180.6deg,
      rgba(255, 253, 247, 0) 0%,
      rgba(255, 253, 247, .92) 44%,
      rgba(255, 253, 247, .92) 56%,
      rgba(255, 253, 247, 0) 100%),
    /* üç panelin eğimi */
    linear-gradient(180deg,
      rgba(118, 90, 54, .07)   0%,
      rgba(255, 255, 255, .32)  7%,
      rgba(255, 255, 255, .1)  21%,
      rgba(118, 90, 54, .1)    30%,
      rgba(118, 90, 54, .21) 33.8%,
      rgba(118, 90, 54, .1)    37%,
      rgba(255, 255, 255, .13) 46%,
      rgba(255, 255, 255, .31) 58%,
      rgba(255, 255, 255, .56) 65%,
      rgba(255, 255, 255, .6) 66.2%,
      rgba(118, 90, 54, .18)   69%,
      rgba(118, 90, 54, .085)  76%,
      rgba(255, 255, 255, .12) 88%,
      rgba(118, 90, 54, .08)  100%);
  background-repeat: no-repeat;
  background-size: 100% 4px, 100% 3px, 100% 100%;
  background-position: 0 33.8%, 0 66.2%, 0 0;
}

/* Köşe kıvrımları */
.corner {
  position: absolute;
  width: 26px; height: 26px;
  pointer-events: none;
  z-index: 2;
  opacity: .5;
}
.corner--tl {
  top: 0; left: 0;
  background: linear-gradient(135deg, rgba(150,124,96,.16) 0%, rgba(150,124,96,0) 62%);
}
.corner--br {
  bottom: 0; right: 0;
  background: linear-gradient(315deg, rgba(150,124,96,.16) 0%, rgba(150,124,96,0) 62%);
}

/* ── Sayfa taşıyıcı ─────────────────────────────────────── */
.pages {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}
.pages__track {
  position: absolute;
  inset: 0;
}
.page {
  position: absolute;
  inset: 0;
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(22px, 6vw, 34px) clamp(20px, 6vw, 32px) clamp(42px, 11vw, 54px);
  scrollbar-width: none;
}
.page.is-on { display: flex; }
.page::-webkit-scrollbar { display: none; }

/* ═══════════════════════════════════════════════════════════
   SAYFA İÇERİĞİ
   Büyük harfli her satırda line-height ≥ 1.4 — aksi hâlde
   İ'nin noktası üstteki satıra değiyor. text-transform yok.
   ═══════════════════════════════════════════════════════════ */
.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(8.5px, 2.4vw, 10px);
  letter-spacing: .3em;
  line-height: 1.75;
  color: var(--ink-faint);
  margin: 0 0 .4em;
  max-width: 27em;
}

.rule {
  width: 34px;
  height: 1px;
  background: var(--ink-ghost);
  opacity: .7;
  margin: clamp(14px, 3vh, 22px) 0;
  flex: 0 0 auto;
}
.rule--wide { width: 58px; }
.rule--short { width: 22px; }

/* 1 · Davet */
.couple {
  font-family: var(--serif);
  font-size: clamp(30px, 9.4vw, 42px);
  line-height: 1.14;
  margin: 0;
  color: var(--ink);
}
.couple__first {
  display: block;
  font-weight: 300;
  letter-spacing: .015em;
}
.couple__last {
  display: block;
  font-weight: 700;
  font-size: .58em;
  letter-spacing: .13em;
  line-height: 1.45;
  margin-top: .12em;
}
.couple__amp {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 6vw, 26px);
  line-height: 1;
  color: var(--wax);
  margin: clamp(8px, 1.8vh, 14px) 0;
}

.when {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 16px);
  margin: 0;
  flex-wrap: wrap;
}
.when__date, .when__time {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(10px, 2.9vw, 12px);
  letter-spacing: .2em;
  line-height: 1.6;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}
.when__time { font-weight: 400; color: var(--ink-soft); }
.when__sep {
  width: 1px; height: 12px;
  background: var(--ink-ghost);
}

.concept {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(15px, 4.4vw, 19px);
  line-height: 1.5;
  color: var(--wax-deep);
  margin: clamp(16px, 3.4vh, 26px) 0 0;
}

/* 2 · Aileler */
.families {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(14px, 4.5vw, 24px);
  width: 100%;
}
.family { flex: 1 1 0; min-width: 0; }
.family__given {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(15px, 4.2vw, 18px);
  line-height: 1.35;
  color: var(--ink-soft);
  margin: 0;
}
.family__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(13px, 3.6vw, 15px);
  letter-spacing: .14em;
  line-height: 1.5;
  color: var(--ink);
  margin: .3em 0 0;
}
.families__bar {
  width: 1px;
  background: linear-gradient(180deg,
    rgba(150,124,96,0), rgba(150,124,96,.3) 30%,
    rgba(150,124,96,.3) 70%, rgba(150,124,96,0));
  flex: 0 0 1px;
}

/* 3 · Nişan yeri */
.venue {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(23px, 6.6vw, 30px);
  line-height: 1.25;
  letter-spacing: .01em;
  margin: 0;
  color: var(--ink);
}
.address {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(13.5px, 3.8vw, 15px);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: .7em 0 0;
}

.map {
  width: 100%;
  margin: clamp(16px, 3.2vh, 24px) 0 clamp(16px, 3vh, 22px);
  padding: 6px;
  background: var(--paper);
  border: 1px solid rgba(150,124,96,.22);
  box-shadow: inset 0 1px 3px rgba(120,96,68,.12);
}
.map iframe {
  display: block;
  width: 100%;
  height: clamp(120px, 22vh, 176px);
  border: 0;
  filter: saturate(.68) contrast(.94) sepia(.12) brightness(1.02);
}

.cta {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(9px, 2.5vw, 10px);
  letter-spacing: .28em;
  line-height: 1.6;
  color: var(--wax-deep);
  text-decoration: none;
  padding: .95em 1.6em;
  border: 1px solid rgba(180,121,107,.42);
  border-radius: 2px;
  transition: transform 260ms var(--ease), border-color 260ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.cta:hover { border-color: rgba(180,121,107,.8); }
.cta:active { transform: scale(.97); }
.cta:focus-visible { outline: 2px solid var(--wax); outline-offset: 3px; }

/* 4 · Menü */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu li {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(16px, 4.6vw, 19px);
  line-height: 1.85;
  color: var(--ink);
}

/* 5 · Bağış */
.giving {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(15px, 4.2vw, 17px);
  line-height: 1.68;
  color: var(--ink);
  margin: 0;
  max-width: 21em;
}
.giving b { font-weight: 600; }
.giving--soft {
  color: var(--ink-soft);
  font-size: clamp(13.5px, 3.8vw, 15px);
  margin-top: .9em;
}
.tegv {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(15px, 4.4vw, 18px);
  letter-spacing: .34em;
  line-height: 1.6;
  color: var(--wax-deep);
  margin: clamp(18px, 3.4vh, 26px) 0 0;
}

/* ═══════════════════════════════════════════════════════════
   UYARLAMA
   ═══════════════════════════════════════════════════════════ */

/* Alçak ekran (yatay telefon, küçük dizüstü) */
@media (max-height: 620px) {
  .masthead__meta { display: none; }
  .masthead__names { font-size: clamp(24px, 6vw, 32px); }
  .countdown__label { margin-bottom: .5em; }
  .map iframe { height: clamp(96px, 18vh, 130px); }
}
@media (max-height: 480px) {
  .masthead__kicker { display: none; }
  .masthead__names { font-size: 22px; margin: 0 0 .2em; }
  .footbar { min-height: 48px; }
  .unit b { font-size: 17px; }
}

/* Geniş ekranda mektup biraz daha ferah */
@media (min-width: 720px) and (min-height: 660px) {
  .letter { width: 440px; }
  .envelope { --w: 440px; font-size: 11.58px; }
}

/* ── Hareket azaltma ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .folds { display: none; }
  .letter__paper { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   İKİNCİ SAYFA
   Yer, menü, aileler ve bağış tek yaprakta. Sığmadığında
   kâğıdın içinde kayar; alt kenardaki solma daha fazlası
   olduğunu söyler.
   ═══════════════════════════════════════════════════════════ */
.page--flow {
  justify-content: flex-start;
  padding-top: clamp(24px, 7vw, 36px);
  padding-bottom: clamp(30px, 8vw, 42px);
}

/* Daha aşağısı var işareti — sayfanın kendisine maske uygulanamaz,
   içindeki harita iframe'i boyanmıyor. */
.pages__fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, rgba(253,250,241,0) 0%, var(--card) 82%);
  transition: opacity 300ms var(--ease);
}
body.on-flow .pages__fade { opacity: 1; }
.page--flow .eyebrow { margin-bottom: .7em; }
.page--flow .rule { margin: clamp(14px, 3vw, 20px) 0; }
.page--flow .venue { font-size: clamp(21px, 6vw, 26px); }
.page--flow .address { font-size: clamp(12.5px, 3.5vw, 13.5px); margin-top: .5em; }
.page--flow .map { margin: clamp(11px, 2.8vw, 16px) 0 clamp(11px, 2.8vw, 15px); }
.page--flow .map iframe { height: clamp(92px, 15vh, 124px); }
.page--flow .menu li { font-size: clamp(13.5px, 3.8vw, 15px); line-height: 1.62; }
.page .families { margin-top: clamp(18px, 4vh, 30px); opacity: .92; }
.page .family__given { font-size: clamp(12.5px, 3.5vw, 13.5px); }
.page .family__name { font-size: clamp(11px, 3vw, 12px); letter-spacing: .16em; }
.page--flow .giving { font-size: clamp(13px, 3.6vw, 14.5px); max-width: 25em; }
.page--flow .tegv { margin-top: .9em; font-size: clamp(13px, 3.7vw, 15px); }
.page--flow 
/* Kâğıdın kendi kenar gölgesi — masaya değdiği yer */
.letter__paper::after,
.envelope__body::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(120,92,58,.14),
              inset 0 -1px 0 rgba(120,92,58,.1);
  border-radius: inherit;
}
.letter__paper::after { z-index: 3; }

/* ═══════════════════════════════════════════════════════════
   ÇEVİRME KONTROLÜ
   Kâğıdın sağ alt köşesinde "çevir" ve iki ucu birbirine bakan
   üçgen — aradaki noktalı eksen kâğıdın döndüğü çizgi. Kâğıdın
   iki yüzü olduğu için tek düğme yeter; yön belirsizliği yok.
   ═══════════════════════════════════════════════════════════ */
.turn {
  position: absolute;
  right: clamp(16px, 4.5vw, 26px);
  bottom: clamp(13px, 3.5vw, 20px);
  z-index: 4;
  padding: 8px 2px 8px 10px;
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .62em;
  color: var(--ink-soft);
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transition: opacity 600ms var(--ease) 2200ms,
              transform 260ms var(--ease),
              color 260ms var(--ease);
}
body.is-open .turn { opacity: 1; }
.turn:hover  { color: var(--wax-deep); }
.turn:active { transform: scale(.94); }
.turn:focus-visible { outline: 2px solid var(--wax); outline-offset: 2px; border-radius: 2px; }

.turn__word {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(14px, 3.9vw, 16px);
  line-height: 1;
  letter-spacing: .02em;
}
.turn__icon {
  width: clamp(20px, 5.4vw, 23px);
  height: auto;
  fill: currentColor;
  overflow: visible;
}
.turn__axis line {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: .75;
}

/* Solma katmanı düğmenin altına girmesin */
.pages__fade { right: 0; }
