/* Hallmark · checked: 2026-12-02 · genre: editorial (inferred)
 * floor: 0 FAIL · fixed: 19, 34, 48, 54, 62, 67, 63, 29, 18, 24b, 26b, F1, F4 · structural: printed
 * built: the project · redesign: polish · v2.0.0 */

/* ---------- Tokenlar ---------- */
:root {
  /* Renk: gece laciverti zemin, logonun altını tek vurgu */
  --color-paper: oklch(15.5% 0.014 258);
  --color-paper-2: oklch(19% 0.014 258);
  --color-ink: oklch(94% 0.02 82);
  --color-muted: oklch(82% 0.02 82);
  --color-faint: oklch(68% 0.016 82);
  --color-accent: #dda500;               /* logodan */
  --color-accent-hover: oklch(82% 0.13 86);
  --color-accent-ink: oklch(19% 0.03 80);
  --color-rule: oklch(94% 0.02 82 / 0.28);
  --color-rule-strong: oklch(94% 0.02 82 / 0.5);
  --color-veil: oklch(15.5% 0.014 258 / 0.9);
  --color-veil-mid: oklch(15.5% 0.014 258 / 0.62);
  --color-veil-soft: oklch(15.5% 0.014 258 / 0.3);
  --color-veil-none: oklch(15.5% 0.014 258 / 0);
  --color-press: oklch(70% 0.14 82);
  --shadow-1: 0 1px 2px oklch(10% 0.01 258 / 0.35);

  /* Yazı */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Karla', system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-body: 1rem;
  --text-lead: clamp(1rem, 0.4vw + 0.9rem, 1.1875rem);
  --text-display: clamp(2.5rem, 4.4vw, 4.5rem);
  --text-display-m: clamp(2.125rem, 9vw, 2.75rem);

  /* Boşluk (4px ölçeği) */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --gutter: clamp(16px, 3.2vw, 48px);
  --edge: max(var(--space-lg), 7vw); /* metin, logo ve bölümlerin ortak sol hizası */

  /* Biçim ve hareket */
  --radius: 2px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;
  --dur-fade: 1200ms;
  --dur: 6500ms;

  --z-photo: 1;
  --z-content: 10;
  --z-chrome: 200;
  --z-float: 300;

  color-scheme: dark;
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: clip; overflow-x: clip; }
body {
  height: 100dvh;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  caret-color: var(--color-accent);
}
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
html { scrollbar-color: var(--color-faint) var(--color-paper); }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; transition: none; }

/* ---------- Bulanık arka plan (masaüstü) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: clip; }
.backdrop .bg {
  position: absolute; inset: -8%;
  background-size: cover; background-position: center;
  filter: blur(34px) saturate(1.1) brightness(.6);
  transition: opacity var(--dur-fade) var(--ease-out);
}
.js .backdrop .bg { opacity: 0; }
.js .backdrop .bg.active { opacity: 1; }
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--color-veil) 0%, var(--color-veil-mid) 48%, var(--color-veil-soft) 100%);
}

/* ---------- Üst bar ---------- */
.top {
  position: fixed; z-index: var(--z-chrome);
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + var(--space-lg)) var(--gutter) 0 calc(var(--edge) + max(0px, (100vw - 1600px) / 2));
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { display: block; }
.brand img { display: block; width: clamp(150px, min(13vw, 24vh), 220px); height: auto; aspect-ratio: 342.08 / 151.53; }

.quick { display: flex; gap: var(--space-xs); }
.icon-btn {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  min-height: 44px; padding: 0 var(--space-md) 0 var(--space-sm);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-paper);
  font-size: var(--text-sm);
  transition: border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.icon-btn:hover { border-color: var(--color-accent); color: var(--color-accent-hover); }
.icon-btn:active { color: var(--color-press); border-color: var(--color-press); }
.icon-btn svg, .btn svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .dot { fill: currentColor; }

/* ---------- Sahne düzeni (masaüstü) ---------- */
.stage {
  position: relative; z-index: var(--z-content);
  height: 100dvh;
  max-width: 1600px; margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  column-gap: clamp(32px, 6vw, 112px);
  padding: clamp(120px, 16vh, 168px) calc(var(--gutter) + 152px) max(var(--space-lg), 4vh) var(--edge);
}

/* Hikâye metni */
.story { max-width: 34rem; min-width: 0; }
.title, .lead { transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out); }
.lead { transition-delay: 60ms; }
.js .story.out .title, .js .story.out .lead { opacity: 0; transform: translateY(8px); }

.title {
  max-width: 16ch;
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--text-display);
  line-height: 1.04; letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word; min-width: 0;
}
.lead {
  margin-top: var(--space-md); max-width: 38ch;
  font-size: var(--text-lead);
  color: var(--color-muted);
  text-wrap: pretty;
}

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); margin-top: var(--space-xl); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 52px; padding: 0 var(--space-lg);
  border-radius: var(--radius);
  font-weight: 600; font-size: var(--text-body);
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.btn-gold { background: var(--color-accent); color: var(--color-accent-ink); font-variant-numeric: tabular-nums; }
.btn-gold:hover { background: var(--color-accent-hover); }
.btn-gold:active { background: var(--color-press); }

/* İkincil eylem: yazı bağlantısı */
.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: color var(--dur-short) var(--ease-out), text-decoration-color var(--dur-short) var(--ease-out);
}
.link:hover { color: var(--color-accent-hover); text-decoration-color: var(--color-accent); }
.link:active { color: var(--color-press); }

.features {
  margin-top: var(--space-xl);
  font-size: var(--text-sm);
  color: var(--color-faint);
}

/* ---------- A-çatı fotoğraf çerçevesi ---------- */
.frame {
  --h: min(calc(100dvh - clamp(160px, 22vh, 232px)), 860px);
  position: relative;
  grid-column: 2; grid-row: 1 / 3;
  height: var(--h);
  aspect-ratio: 916 / 1690;
  align-self: end;
  margin-bottom: var(--space-xs);
}
.slides {
  position: absolute; inset: 0;
  clip-path: polygon(50% 0, 100% 21.6%, 100% 100%, 0 100%, 0 21.6%);
  background: var(--color-paper-2);
  overflow: clip;
}
.slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity var(--dur-fade) var(--ease-in-out);
  user-select: none; -webkit-user-drag: none;
}
.js .slide { opacity: 0; }
.js .slide.active { opacity: 1; }
.frame-line {
  position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px);
  pointer-events: none; overflow: visible;
}
.frame-line polygon { fill: none; stroke: var(--color-accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tap { position: absolute; top: 0; bottom: 0; cursor: pointer; z-index: 2; }
.tap-prev { left: 0; width: 35%; }
.tap-next { right: 0; width: 65%; }
html:not(.js) .tap { display: none; }

/* ---------- Bölümler ve durdurma ---------- */
.chapters {
  grid-column: 1; grid-row: 2; align-self: end;
  display: flex; align-items: flex-end; gap: var(--space-lg);
  max-width: 46rem; width: 100%;
}
html:not(.js) .chapters { display: none; }
.progress { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(max-content, 1fr)); gap: var(--space-xs); }
.seg { text-align: left; padding: var(--space-sm) 0 var(--space-2xs); min-height: 44px; min-width: 0; }
.seg .bar { display: block; height: 2px; background: var(--color-rule); overflow: clip; }
.seg .bar i { display: block; height: 100%; background: var(--color-accent); transform: scaleX(0); transform-origin: left; }
.seg.done .bar i { transform: scaleX(1); }
.seg.active .bar i { animation: fill var(--dur) linear forwards; }
.paused .seg.active .bar i { animation-play-state: paused; }
.seg-label {
  display: block; margin-top: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-faint); white-space: nowrap;
  transition: color var(--dur-short) var(--ease-out);
}
.seg:hover .seg-label, .seg.active .seg-label { color: var(--color-ink); }
.seg:active .seg-label { color: var(--color-accent); }
@keyframes fill { to { transform: scaleX(1); } }

.pause {
  flex-shrink: 0;
  min-height: 44px; padding: 0 var(--space-2xs);
  font-size: var(--text-sm); font-weight: 600;
  color: var(--color-muted);
  text-decoration: underline; text-decoration-color: var(--color-rule); text-underline-offset: 0.25em;
  transition: color var(--dur-short) var(--ease-out);
}
.pause:hover { color: var(--color-ink); }
.pause:active { color: var(--color-accent); }

/* ---------- WhatsApp ---------- */
.wa {
  position: fixed; z-index: var(--z-float);
  right: var(--gutter); bottom: calc(env(safe-area-inset-bottom) + clamp(24px, 4vh, 44px));
  display: inline-flex; align-items: center; gap: var(--space-xs);
  min-height: 52px; padding: 0 var(--space-lg) 0 var(--space-md);
  border-radius: var(--radius);
  background: var(--color-paper);
  border: 1px solid var(--color-accent);
  color: var(--color-ink); font-weight: 600; font-size: var(--text-body);
  box-shadow: var(--shadow-1);
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.wa svg { flex-shrink: 0; width: 22px; height: 22px; fill: var(--color-accent); transition: fill var(--dur-short) var(--ease-out); }
.wa:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.wa:hover svg { fill: var(--color-accent-ink); }
.wa:active { background: var(--color-press); color: var(--color-accent-ink); }

/* ---------- Mobil / dar ekran: tam ekran fotoğraf ---------- */
@media (max-width: 899px) {
  .backdrop { display: none; }
  .stage { display: block; padding: 0; }
  .frame {
    position: fixed; top: 0; left: 0; z-index: var(--z-photo);
    width: 100%; height: 100dvh; aspect-ratio: auto; margin: 0;
  }
  .slides { clip-path: none; }
  .frame-line { display: none; }
  .frame::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background:
      linear-gradient(180deg, var(--color-veil) 0%, var(--color-veil-mid) 13%, var(--color-veil-none) 30%),
      linear-gradient(0deg, var(--color-veil) 0%, var(--color-veil-mid) 36%, var(--color-veil-none) 62%);
  }

  .top { padding: calc(env(safe-area-inset-top) + 36px) var(--space-lg) 0; }
  .brand img { width: clamp(128px, 38vw, 156px); }
  .icon-btn { padding: 0; width: 44px; justify-content: center; }
  .icon-btn .label { display: none; }

  .chapters {
    position: fixed; z-index: var(--z-chrome);
    top: calc(env(safe-area-inset-top) + var(--space-xs)); left: var(--space-lg); right: var(--space-lg);
    max-width: none; width: auto; gap: var(--space-sm); align-items: center;
  }
  .progress { gap: var(--space-2xs); }
  .seg { padding: var(--space-xs) 0; min-height: 20px; }
  .seg-label { display: none; }
  .pause { min-height: 28px; font-size: 0.8125rem; color: var(--color-ink); }

  .story {
    position: fixed; z-index: var(--z-content); left: 0; right: 0; bottom: 0;
    max-width: none;
    padding: 0 var(--space-lg) calc(env(safe-area-inset-bottom) + var(--space-lg));
    pointer-events: none;
  }
  .story a { pointer-events: auto; }
  .title { font-size: var(--text-display-m); max-width: 18ch; }
  .lead { margin-top: var(--space-sm); font-size: var(--text-body); }
  .cta { margin-top: var(--space-lg); padding-right: 68px; flex-wrap: nowrap; }
  .btn-gold { flex: 1 1 auto; white-space: nowrap; }
  .cta .link, .features { display: none; } /* konum üst barda */

  .wa { right: var(--space-lg); bottom: calc(env(safe-area-inset-bottom) + var(--space-lg)); width: 52px; padding: 0; justify-content: center; }
  .wa span { display: none; }
}

@media (max-width: 899px) and (max-height: 640px) {
  .lead { display: none; }
  .brand img { width: 120px; }
}
@media (min-width: 900px) and (max-width: 1199px) { .features { display: none; } }
@media (min-width: 900px) and (max-height: 720px) { .features { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .slide, .backdrop .bg, .title, .lead { transition: none; }
  .js .story.out .title, .js .story.out .lead { transform: none; }
  .seg.active .bar i { animation: none; transform: scaleX(1); }
}
