/* =========================================================
   SORCHEMIST — Ortak Tasarım Sistemi
   Tüm sayfalarda kullanılan tokenlar, imleç, üst bar, menü,
   butonlar, geçişler ve yardımcı sınıflar.
   ========================================================= */
:root {
  --bg: #070d0b;
  --bg-2: #0c1613;
  --panel: linear-gradient(160deg, #12201b, #0a120f);
  --ink-1: #f3ead6;
  --ink-2: #b8c7bd;
  --ink-3: #7d8f86;
  --line: rgba(243,234,214,.12);
  --line-2: rgba(243,234,214,.24);
  --gold: #f6c86a;
  --gold-2: #f59e0b;
  --teal: #5eead4;
  --sky: #7dd3fc;
  --ember: #fb923c;
  --parch-1: #fbf2da;
  --parch-2: #e9cf98;
  --parch-ink: #2a170d;
  --ff-display: "Cinzel", Georgia, serif;
  --ff-serif: "Cormorant Garamond", Georgia, serif;
  --ff-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22,.8,.2,1);
  --ease-in-out: cubic-bezier(.76,0,.24,1);
  --max: 1240px;
  --pad: clamp(16px, 4vw, 48px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink-1);
  font-family: var(--ff-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
sub, sup { font-size: .72em; line-height: 0; }
::selection { background: rgba(246,200,106,.35); color: #fff; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 300; background: var(--gold); color: #1a0f05; padding: 10px 16px; font-weight: 700; transform: translateY(-200%); transition: transform .3s; }
.skip-link:focus-visible { transform: none; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.label { font-family: var(--ff-body); font-size: .7rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3); }
.label.gold { color: var(--gold); }
.h2 { font-family: var(--ff-serif); font-weight: 500; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.02; margin: 14px 0 0; letter-spacing: -.01em; }
.h2 em, .h1 em { font-style: italic; color: var(--gold); }
.lede { color: var(--ink-2); max-width: 52ch; margin: 18px 0 0; }

/* ---------- Özel imleç ---------- */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 400; border-radius: 50%; opacity: 0; transition: opacity .3s; }
.cursor { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(246,200,106,.6); display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s, opacity .3s; }
.cursor span { font-size: .6rem; font-weight: 700; letter-spacing: .2em; color: #1a0f05; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--gold); box-shadow: 0 0 12px 2px rgba(246,200,106,.7); }
.has-cursor .cursor, .has-cursor .cursor-dot { opacity: 1; }
.cursor.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(246,200,106,.08); border-color: rgba(246,200,106,.9); }
.cursor.label-on { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--gold); border-color: var(--gold); }
.cursor.label-on span { opacity: 1; }
.cursor.down { transform-origin: center; }
@media (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button, .has-cursor canvas, .has-cursor label { cursor: none; }
  .has-cursor input[type="search"], .has-cursor input[type="text"] { cursor: text; }
  .has-cursor input[type="range"] { cursor: grab; }
}

/* ---------- Sayfa geçiş perdesi ---------- */
.curtain { position: fixed; inset: 0; z-index: 250; background: var(--bg); pointer-events: none; opacity: 1; transition: opacity .7s var(--ease-in-out); display: grid; place-items: center; }
.curtain svg { width: 64px; height: 64px; opacity: .6; animation: curtainSpin 3s linear infinite; }
.curtain svg * { fill: none; stroke: var(--gold); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
@keyframes curtainSpin { to { transform: rotate(360deg); } }
.page-ready .curtain { opacity: 0; }
.page-leaving .curtain { opacity: 1; transition-duration: .45s; }

/* ---------- Üst bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px var(--pad); pointer-events: none;
  transition: transform .6s var(--ease), background .4s, padding .4s;
}
.topbar > * { pointer-events: auto; }
.topbar.scrolled { background: linear-gradient(to bottom, rgba(7,13,11,.94), rgba(7,13,11,0)); padding-top: 14px; padding-bottom: 26px; }
.topbar.hide { transform: translateY(-110%); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand svg * { fill: none; stroke: var(--ink-1); stroke-width: 1.4; }
.brand svg .dot { fill: var(--gold); stroke: none; }
.brand-txt { font-size: .66rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; white-space: nowrap; }
.brand-txt em { font-style: normal; color: var(--ink-3); margin-left: .4em; }
.top-nav { display: flex; gap: 4px; }
.top-nav a { position: relative; padding: 8px 14px; font-size: .66rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2); transition: color .3s; }
.top-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--ink-1); }
.top-nav a:hover::after, .top-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.top-actions { display: flex; align-items: center; gap: 14px; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }
.menu-btn { height: 40px; padding: 0 20px; border: 1px solid var(--line-2); font-size: .66rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; transition: border-color .3s, background .3s, color .3s; }
.menu-btn:hover { border-color: var(--gold); }
.menu-open .menu-btn { background: var(--ink-1); color: var(--bg); border-color: var(--ink-1); }
@media (max-width: 1080px) { .top-nav { display: none; } }

/* ---------- Tam ekran menü ---------- */
.menu {
  position: fixed; inset: 0; z-index: 110; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  clip-path: circle(0% at calc(100% - 70px) 42px);
  transition: clip-path .9s var(--ease-in-out), visibility .9s;
  visibility: hidden;
}
.menu-open .menu { clip-path: circle(150% at calc(100% - 70px) 42px); visibility: visible; }
.menu::before { content: ""; position: absolute; width: min(90vw, 760px); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); box-shadow: inset 0 0 0 60px rgba(243,234,214,.015); }
.menu ul { list-style: none; margin: 0; padding: 0; text-align: center; position: relative; }
.menu li { overflow: hidden; }
.menu a {
  display: inline-flex; align-items: baseline; gap: 18px; padding: 6px 10px;
  font-family: var(--ff-serif); font-weight: 500; font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.1; color: var(--ink-2);
  transform: translateY(110%); transition: transform .8s var(--ease), color .3s;
}
.menu a small { font-family: var(--ff-mono); font-size: .8rem; color: var(--ink-3); }
.menu a:hover, .menu a[aria-current="page"] { color: var(--ink-1); font-style: italic; }
.menu a[aria-current="page"] small { color: var(--gold); }
.menu-open .menu a { transform: none; }
.menu-open .menu li:nth-child(1) a { transition-delay: .25s; }
.menu-open .menu li:nth-child(2) a { transition-delay: .32s; }
.menu-open .menu li:nth-child(3) a { transition-delay: .39s; }
.menu-open .menu li:nth-child(4) a { transition-delay: .46s; }
.menu-foot { position: absolute; bottom: 32px; left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Butonlar ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 26px; font-size: .72rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; border: 1px solid var(--line-2); overflow: hidden; isolation: isolate; transition: color .45s, border-color .45s; white-space: nowrap; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink-1); transform: translateY(101%); transition: transform .55s var(--ease); z-index: -1; }
.btn:hover { color: var(--bg); border-color: var(--ink-1); }
.btn:hover::before { transform: none; }
.btn-gold { background: var(--gold); color: #1a0f05; border-color: var(--gold); }
.btn-gold::before { background: var(--ink-1); }
.btn-sm { padding: 11px 16px; font-size: .64rem; letter-spacing: .2em; gap: 8px; }
.btn .arr { transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--c, var(--gold)) 18%, transparent); border-color: var(--c, var(--gold)); color: var(--ink-1); }

/* ---------- Bölüm & reveal ---------- */
section.block { position: relative; padding: clamp(80px, 12vw, 160px) 0; }
.block-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: block; transform: translateY(105%); transition: transform 1.4s var(--ease); }
.entered .line > span { transform: none; }
.entered .line:nth-child(2) > span { transition-delay: .12s; }
.entered .line:nth-child(3) > span { transition-delay: .24s; }

/* ---------- Alt sayfa hero bandı (3D sahne) ---------- */
.page-hero { position: relative; height: 78vh; height: 78svh; min-height: 520px; overflow: hidden; }
.page-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.page-hero .scene-fallback { position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 30%, #1d3b38, #070d0b 70%); display: none; }
.no-webgl .page-hero .scene-fallback { display: block; }
.page-hero .shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(7,13,11,.75) 100%), linear-gradient(to bottom, rgba(7,13,11,.25), transparent 30%, transparent 55%, var(--bg)); }
.page-hero .inner { position: absolute; left: 0; right: 0; bottom: clamp(48px, 9vh, 96px); }
.h1 { font-family: var(--ff-serif); font-weight: 500; font-size: clamp(2.8rem, 7vw, 6rem); line-height: .96; letter-spacing: -.015em; margin: 16px 0 0; text-shadow: 0 4px 40px rgba(0,0,0,.5); }
.page-hero .label, .page-hero .hero-sub, .page-hero .hero-tools { opacity: 0; transform: translateY(14px); transition: opacity 1.2s .5s, transform 1.2s .5s var(--ease); }
.entered .page-hero .label, .entered .page-hero .hero-sub, .entered .page-hero .hero-tools { opacity: 1; transform: none; }
.hero-sub { color: var(--ink-2); max-width: 56ch; margin: 22px 0 0; font-size: clamp(.98rem, 1.3vw, 1.1rem); text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.entered .page-hero .hero-sub { transition-delay: .7s; }
.entered .page-hero .hero-tools { transition-delay: .9s; }

/* ---------- Parşömen ve paneller ---------- */
.parchment { position: relative; background: linear-gradient(135deg, var(--parch-1), #f1dcae 60%, var(--parch-2)); color: var(--parch-ink); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.panel { position: relative; border: 1px solid var(--line); background: var(--panel); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); font-size: .72rem; font-weight: 600; color: var(--ink-2); }
.formula { font-family: var(--ff-mono); font-size: .9rem; line-height: 1.7; color: #fde9b8; background: rgba(0,0,0,.35); border: 1px solid rgba(246,200,106,.2); padding: 14px 16px; overflow-x: auto; }
.arrow-chem { color: var(--gold); font-weight: 700; padding: 0 .25em; }

/* Spotlight: imleci takip eden ışık */
[data-spot] { position: relative; isolation: isolate; }
[data-spot]::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent, var(--gold)) 16%, transparent), transparent 70%); }
[data-spot]:hover::before { opacity: 1; }

/* Range (kaydırıcı) */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--c, var(--gold)) var(--p, 50%), var(--line-2) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line-2); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--c, var(--gold)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%; background: var(--bg); border: 2px solid var(--c, var(--gold)); box-shadow: 0 0 14px -2px var(--c, var(--gold)); transition: transform .2s; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--c, var(--gold)); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.3); }

/* ---------- Footer ---------- */
.footer { position: relative; padding: clamp(80px, 12vw, 160px) 0 36px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-cta { display: block; text-align: center; }
.footer-cta .label { display: block; margin-bottom: 18px; }
.big-link { display: inline-block; font-family: var(--ff-serif); font-weight: 500; font-size: clamp(3rem, 11vw, 9.5rem); line-height: .95; letter-spacing: -.02em; position: relative; }
.big-link em { font-style: italic; color: var(--gold); }
.big-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .8s var(--ease); }
.footer-cta:hover .big-link::after { transform: scaleX(1); transform-origin: left; }
.footer-row { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; margin-top: clamp(60px, 8vw, 120px); padding-top: 24px; border-top: 1px solid var(--line); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer-row a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .topbar { padding: 16px var(--pad); }
  .brand-txt em { display: none; }
  .block-head { grid-template-columns: 1fr; }
  .menu-foot { flex-direction: column; gap: 6px; }
  .page-hero { min-height: 480px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
