@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-roman.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-italic.woff2') format('woff2');
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f1e8;
  --paper-dim: rgba(246, 241, 232, 0.74);
  --gold: #e0a86b;
  --gold-soft: rgba(224, 168, 107, 0.85);
  --hairline: rgba(246, 241, 232, 0.32);
  --ink: #070912;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --tint-far: rgb(122, 90, 66);
  --tint-mid: rgb(74, 53, 39);
  --tint-near: rgb(36, 26, 18);
  --night: 0;
  --haze-o: 0.34;
  --fb-zen: #4a6694;
  --fb-mid: #bc8a6a;
  --fb-hor: #f6c17e;
  --fb-ground: #342820;
  --sun-x: 34%;
  --sun-y: 46%;
  --sun-o: 1;
  --moon-o: 0;
  --ease-slow: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  color: var(--paper);
  background: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--ink); }

/* ---------- deep backdrop layers ---------- */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.sky-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      var(--fb-zen) 0%,
      var(--fb-mid) 46%,
      var(--fb-hor) 74%,
      var(--fb-ground) 100%);
}
html.js.webgl .sky-fallback { display: none; }

.fb-sun {
  position: absolute;
  left: var(--sun-x);
  top: var(--sun-y);
  width: 46vmin;
  height: 46vmin;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 190, 0.95) 0%, rgba(255, 198, 130, 0.5) 22%, rgba(255, 170, 100, 0.12) 48%, transparent 70%);
  opacity: var(--sun-o);
}
.fb-moon {
  position: absolute;
  left: 10%;
  top: 16%;
  width: 9vmin;
  height: 9vmin;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #f4f1e6 0%, #d8d4c4 58%, rgba(216, 212, 196, 0) 72%);
  box-shadow: 0 0 6vmin 2vmin rgba(210, 216, 236, 0.28);
  opacity: var(--moon-o);
}
.fb-stars { position: absolute; inset: 0 0 30% 0; opacity: 0; transition: opacity 2.4s ease-out; }
body.is-night .fb-stars { opacity: 1; }
.fb-stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #e9ecf6;
  animation: twinkle 3.4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 1; } }

.fb-cloud {
  position: absolute;
  width: 64vw;
  height: 16vh;
  border-radius: 50%;
  filter: blur(34px);
  background: rgba(255, 226, 190, 0.34);
}
.fb-cloud-a { top: 18%; left: -12%; animation: drift-a 90s linear infinite; }
.fb-cloud-b { top: 34%; right: -18%; width: 52vw; background: rgba(255, 214, 178, 0.26); animation: drift-b 120s linear infinite; }
@keyframes drift-a { from { transform: translateX(0); } to { transform: translateX(24vw); } }
@keyframes drift-b { from { transform: translateX(0); } to { transform: translateX(-26vw); } }
body.is-night .fb-cloud { opacity: 0.25; }

/* ---------- parallax silhouette planes ---------- */

.planes {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.plane {
  position: absolute;
  left: -4%;
  width: 108%;
  bottom: -2px;
  will-change: transform, opacity;
}
.plane-far { height: 36vh; color: var(--tint-far); }
.plane-mid { color: var(--tint-mid); }
.plane-near { color: var(--tint-near); }
.plane-grass { color: var(--tint-near); }
#pl-anitkabir { height: 52vh; }
#pl-kale { height: 56vh; }
#pl-skyline { height: 48vh; }
#pl-rooftops { height: 34vh; }
#pl-grass-a, #pl-grass-b { height: 24vh; }

.win {
  opacity: 0;
  transition: opacity 1.6s ease-out var(--wd, 0s);
}
body.is-night .win { opacity: var(--wo, 0.92); }

/* ---------- atmosphere overlays ---------- */

.haze {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 14, 0) 52%, rgba(5, 7, 14, 0.62) 100%);
  opacity: var(--haze-o);
}
.vignette {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(120% 92% at 50% 38%, transparent 56%, rgba(3, 4, 10, 0.5) 100%);
}
.readshade {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: var(--read-o, 0);
  background: linear-gradient(90deg,
    rgba(4, 6, 12, 0.7) 0%,
    rgba(4, 6, 12, 0.46) 26%,
    rgba(4, 6, 12, 0.2) 46%,
    rgba(4, 6, 12, 0) 74%);
  transition: none;
}
body.shade-right .readshade { transform: scaleX(-1); }
.grain {
  position: fixed;
  inset: -40px;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- chrome: wordmark, toggle, rail ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 4vw;
  transition: background 0.5s ease-out, padding 0.5s ease-out, border-color 0.5s ease-out;
  border-bottom: 1px solid transparent;
}
body.scrolled .topbar {
  padding: 14px 4vw;
  background: linear-gradient(180deg, rgba(5, 7, 14, 0.64), rgba(5, 7, 14, 0));
  border-bottom-color: rgba(246, 241, 232, 0.1);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}
.mark {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: inset -4.5px 2.5px 0 0 var(--gold);
  transform: rotate(-18deg);
}
.mark::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 1px;
  width: 4px;
  height: 4px;
  background: var(--gold);
  clip-path: polygon(50% 0, 63% 36%, 100% 40%, 70% 62%, 80% 100%, 50% 76%, 20% 100%, 30% 62%, 0 40%, 37% 36%);
}
.wm {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.3em;
}
.wm i {
  font-style: normal;
  font-weight: 400;
  opacity: 0.66;
  letter-spacing: 0.22em;
}
.wordmark.small .wm { font-size: 11px; }

.top-right { display: flex; align-items: center; gap: 22px; }
.soon-tag {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.snd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: rgba(0, 0, 0, 0.82);
  color: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: all 0.5s ease-out;
}
.snd:hover, .snd:focus-visible {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  outline: none;
}
.snd-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.snd-bars i {
  width: 2px;
  height: 4px;
  background: currentColor;
  transition: height 0.5s ease-out;
}
.snd[aria-pressed="true"] .snd-bars i { animation: bars 1.1s ease-in-out infinite alternate; }
.snd[aria-pressed="true"] .snd-bars i:nth-child(2) { animation-delay: 0.22s; }
.snd[aria-pressed="true"] .snd-bars i:nth-child(3) { animation-delay: 0.44s; }
@keyframes bars { from { height: 3px; } to { height: 10px; } }

.rail {
  position: fixed;
  right: 2.4vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-end;
}
.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(246, 241, 232, 0.62);
  transition: color 0.5s ease-out;
  text-shadow: 0 1px 8px rgba(4, 6, 12, 0.6);
}
.rail b {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.08em;
}
.rail span {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.5s ease-out, opacity 0.5s ease-out;
}
.rail a::after {
  content: "";
  order: 3;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width 0.5s ease-out, background 0.5s ease-out;
}
.rail a:hover, .rail a.active { color: var(--paper); }
.rail a.active span { max-width: 110px; opacity: 1; }
.rail a.active::after { width: 34px; background: var(--gold); }

/* ---------- the reading plane ---------- */

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

.chapter {
  min-height: 132vh;
  display: flex;
  align-items: center;
  padding: 18vh 8vw;
  position: relative;
}
.chapter.right { justify-content: flex-end; }

.prose {
  position: relative;
  max-width: 620px;
  z-index: 1;
}
.prose::before {
  content: "";
  position: absolute;
  inset: -20% -26% -26%;
  z-index: -1;
  background: radial-gradient(120% 104% at 50% 48%,
    rgba(5, 7, 14, 0.68) 0%,
    rgba(5, 7, 14, 0.56) 42%,
    rgba(5, 7, 14, 0.38) 64%,
    rgba(5, 7, 14, 0.12) 82%,
    rgba(5, 7, 14, 0) 92%);
}
.prose-mast::before {
  background: radial-gradient(120% 104% at 46% 48%,
    rgba(5, 7, 14, 0.7) 0%,
    rgba(5, 7, 14, 0.58) 42%,
    rgba(5, 7, 14, 0.4) 64%,
    rgba(5, 7, 14, 0.14) 82%,
    rgba(5, 7, 14, 0) 92%);
}

.masthead { min-height: 100svh; align-items: flex-end; padding-bottom: 12vh; }
.prose-mast { max-width: 760px; }

.kicker {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  color: var(--paper-dim);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  text-shadow: 0 1px 10px rgba(4, 6, 12, 0.7);
}
.kicker::before {
  content: "";
  width: 38px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: #fcf8f1;
  text-shadow: 0 1px 2px rgba(4, 6, 12, 0.35), 0 8px 40px rgba(4, 6, 12, 0.5);
}
h1 {
  font-size: clamp(3.1rem, 7.6vw, 5.9rem);
  margin-bottom: 30px;
  text-shadow: 0 2px 3px rgba(4, 6, 12, 0.35), 0 8px 44px rgba(4, 6, 12, 0.55);
}
h1 em, h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
}
h1 em {
  color: #f3ecdd;
  text-shadow:
    0 1px 2px rgba(4, 6, 12, 0.6),
    0 0 16px rgba(4, 6, 12, 0.85),
    0 0 40px rgba(4, 6, 12, 0.6),
    0 0 90px rgba(4, 6, 12, 0.45);
}
h2 {
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  margin-bottom: 26px;
}

.standfirst {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.85;
  max-width: 33em;
  color: var(--paper);
  text-shadow:
    0 1px 2px rgba(4, 6, 12, 0.55),
    0 0 14px rgba(4, 6, 12, 0.75),
    0 2px 24px rgba(4, 6, 12, 0.7),
    0 0 52px rgba(4, 6, 12, 0.45);
}

.body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.9;
  max-width: 34em;
  color: var(--paper);
  text-shadow: 0 1px 2px rgba(4, 6, 12, 0.5), 0 2px 22px rgba(4, 6, 12, 0.62), 0 0 46px rgba(4, 6, 12, 0.4);
}
.body em { font-style: italic; }

.facts {
  display: flex;
  gap: 44px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.fact {
  border-left: 1px solid var(--hairline);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fact-v {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.1;
  color: #fcf8f1;
  text-shadow: 0 1px 14px rgba(4, 6, 12, 0.6);
}
.fact-k {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-dim);
  text-shadow: 0 1px 8px rgba(4, 6, 12, 0.65);
}

.turkish-line {
  margin-top: 34px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--gold);
  border-top: 1px solid var(--hairline);
  padding-top: 22px;
  max-width: 26em;
  text-shadow: 0 1px 16px rgba(4, 6, 12, 0.6);
}
.turkish-line span {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--paper-dim);
  margin-top: 8px;
}

.scrollcue {
  margin-top: 9vh;
  display: flex;
  align-items: center;
  gap: 18px;
}
.cue-line {
  position: relative;
  width: 74px;
  height: 1px;
  background: rgba(246, 241, 232, 0.28);
  overflow: hidden;
}
.cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 26px;
  background: var(--gold);
  animation: cue 2.6s var(--ease-slow) infinite;
}
@keyframes cue {
  0% { transform: translateX(-30px); }
  60% { transform: translateX(78px); }
  100% { transform: translateX(78px); }
}
.cue-text {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  color: var(--paper-dim);
  text-shadow: 0 1px 8px rgba(4, 6, 12, 0.65);
}

/* ---------- quote interstitial ---------- */

.quote-chapter { min-height: 96vh; justify-content: center; }
.quote-panel {
  max-width: 720px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 54px 8px;
  text-align: center;
  position: relative;
}
.quote-panel::before {
  content: "";
  position: absolute;
  inset: -22% -14%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(5, 7, 14, 0.5), rgba(5, 7, 14, 0) 78%);
}
.quote-panel .q {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.25;
  color: #fcf8f1;
  text-shadow: 0 2px 26px rgba(4, 6, 12, 0.5);
}
.quote-panel .q-attr {
  margin-top: 26px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.12em;
  line-height: 2;
  color: var(--paper-dim);
  text-shadow: 0 1px 10px rgba(4, 6, 12, 0.6);
}
.quote-panel .q-attr span {
  display: block;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 6px;
}

/* ---------- closing ---------- */

.closing { min-height: 150vh; justify-content: center; }
.prose-close { max-width: 720px; margin: 0 auto; text-align: center; }
.prose-close .kicker { justify-content: center; }
.prose-close .kicker::before { display: none; }
.prose-close .body { margin: 0 auto; }

.count-panel {
  margin: 64px auto 0;
  max-width: 620px;
  border: 1px solid var(--hairline);
  background: rgba(6, 8, 16, 0.3);
  padding: 44px 30px 38px;
}
.cp-label {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: 26px;
  text-shadow: 0 1px 8px rgba(4, 6, 12, 0.6);
}
.count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
}
.cd-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cd-cell b {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 4.8rem);
  line-height: 1;
  color: #fcf8f1;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  text-align: center;
}
.cd-cell i {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.cd-sep {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--gold-soft);
  transform: translateY(-0.6em);
}
.cp-note {
  margin-top: 26px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(246, 241, 232, 0.95);
  text-shadow: 0 1px 10px rgba(4, 6, 12, 0.7);
}

.final-line {
  margin-top: 11vh;
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.08;
  color: #fcf8f1;
  text-shadow: 0 2px 30px rgba(4, 6, 12, 0.55);
}
.final-line em { color: var(--gold); font-style: italic; }
.final-sub {
  margin-top: 18px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-dim);
  text-shadow: 0 1px 8px rgba(4, 6, 12, 0.65);
}

/* ---------- footer ---------- */

.site-foot {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(246, 241, 232, 0.14);
  padding: 34px 8vw 44px;
  background: linear-gradient(180deg, rgba(4, 6, 12, 0), rgba(4, 6, 12, 0.6));
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-meta {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 241, 232, 0.5);
}

/* ---------- reveals ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.1s ease-out var(--rd, 0s), transform 1.1s var(--ease-slow) var(--rd, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .rail { display: none; }
}
@media (max-width: 720px) {
  .chapter { padding: 16vh 7vw; min-height: 118vh; }
  .chapter.right { justify-content: flex-start; }
  .topbar { padding: 18px 6vw; }
  body.scrolled .topbar { padding: 12px 6vw; }
  .soon-tag { display: none; }
  .facts { gap: 26px; }
  #pl-kale { height: 44vh; }
  #pl-anitkabir { height: 42vh; }
  .quote-panel { padding: 40px 4px; }
  .count { gap: 8px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s linear;
  }
  .cue-line::after,
  .fb-cloud-a,
  .fb-cloud-b,
  .fb-stars i,
  .snd[aria-pressed="true"] .snd-bars i { animation: none; }
  .win, .fb-stars { transition: none; }
}
