/* ============================================================
   KDRK Design System — Tokens, base, components
   ============================================================ */

:root,
[data-theme="dark"] {
  color-scheme: dark; /* yerel açılır liste, tarih seçici ve kaydırma çubuğu temayla çizilir */
  --bg-primary: #0B1220;
  --bg-secondary: #111B2C;
  --surface: #1A2638;
  --text-primary: #F4F6FA;
  --text-secondary: #94A3B8;
  --border: #1F2A3D;
  --accent-primary: #F97316;
  --accent-secondary: #38BDF8;
  --on-accent: #0B1220;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  --shadow-card: 0 0 0 1px var(--border);
  --shadow-glow: 0 0 0 1px var(--accent-primary), 0 8px 32px -8px rgba(249, 115, 22, 0.18);

  --grad-cinematic: linear-gradient(180deg, rgba(11,18,32,0) 0%, rgba(11,18,32,0.35) 45%, rgba(11,18,32,0.92) 100%);

  --max-w: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad: clamp(72px, 10vh, 120px);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #F4F6FA;
  --bg-secondary: #FFFFFF;
  --surface: #ECEFF5;
  --text-primary: #0B1220;
  --text-secondary: #475569;
  --border: #E2E8F0;
  --accent-primary: #C2410C;
  --on-accent: #FFFFFF;
  --accent-secondary: #0284C7;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;

  --grad-cinematic: linear-gradient(180deg, rgba(11,18,32,0) 0%, rgba(11,18,32,0.35) 45%, rgba(11,18,32,0.92) 100%);
}

/* Always-dark zones (hero etc) keep dark tokens regardless of theme.
   Zemini sabit koyu olan bileşenler de buraya eklenir; yoksa açık temada metin token'ları koyu zeminde kaybolur. */
.always-dark,
.footer, .corp-hero, .join-band, .section-stats, .section-follow {
  --bg-primary: #0B1220;
  --bg-secondary: #111B2C;
  --surface: #1A2638;
  --text-primary: #F4F6FA;
  --text-secondary: #94A3B8;
  --border: #1F2A3D;
  --accent-primary: #F97316;
  --accent-secondary: #38BDF8;
  --on-accent: #0B1220;
  color: var(--text-primary);
  background: var(--bg-primary);
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 200ms ease, color 200ms ease;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
/* img_tag() çıktısı: üst kutuyu tamamen doldurur (kart, hero, kapak) */
.img-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============================================================
   Typography
   ============================================================ */
.h-display, h1, h2, h3 {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--text-primary);
  text-wrap: balance;
}
h1 { font-size: clamp(32px, 5.5vw, 76px); }
h2 { font-size: clamp(26px, 3.6vw, 44px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
p { margin: 0; color: var(--text-secondary); }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent-primary);
}
.eyebrow.no-bar::before { display: none; }
.eyebrow.center { justify-content: center; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}
.section {
  padding: var(--section-pad) 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-light {
  background: var(--bg-primary);
  color: var(--text-primary);
}
.section-dark {
  background: var(--bg-primary);
  color: var(--text-primary);
}
[data-theme="light"] .force-dark,
.force-dark {
  color-scheme: dark;
  --bg-primary: #0B1220;
  --bg-secondary: #111B2C;
  --surface: #1A2638;
  --text-primary: #F4F6FA;
  --text-secondary: #94A3B8;
  --border: #1F2A3D;
  --accent-primary: #F97316;
  --on-accent: #0B1220;
  background: #0B1220;
  color: #F4F6FA;
}
[data-theme="dark"] .force-light,
.force-light {
  color-scheme: light;
  --bg-primary: #F4F6FA;
  --bg-secondary: #FFFFFF;
  --surface: #ECEFF5;
  --text-primary: #0B1220;
  --text-secondary: #475569;
  --border: #E2E8F0;
  --accent-primary: #C2410C;
  --on-accent: #FFFFFF;
  background: #F4F6FA;
  color: #0B1220;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  transition: transform 180ms ease, filter 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-primary {
  background: var(--accent-primary);
  color: var(--on-accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: color-mix(in srgb, currentColor 34%, transparent);
}
.btn-ghost:hover { border-color: currentColor; }
.btn-text {
  height: auto;
  min-height: 44px;
  padding: 4px 0;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-text .arrow { transition: transform 180ms ease; }
.btn-text:hover { transform: none; color: var(--accent-primary); }
.btn-text:hover .arrow { transform: translateX(4px); }

/* ============================================================
   Topographic watermark
   ============================================================ */
.topo-watermark {
  position: absolute;
  inset: 0;
  background-image: url('topo.svg');
  background-size: 720px;
  background-repeat: repeat;
  opacity: 0.05;
  pointer-events: none;
  mix-blend-mode: screen;
}
.force-light .topo-watermark { mix-blend-mode: multiply; opacity: 0.06; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary), 0 12px 40px -16px rgba(249,115,22,0.25), inset 0 0 0 1px rgba(249,115,22,0.08);
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
/* Yalnız JS çalışıyorsa gizli başlar (html.js, site.php); JS yoksa içerik hemen görünür */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 350ms ease-out, transform 350ms ease-out;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Utilities
   ============================================================ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.muted { color: var(--text-secondary); }
.accent { color: var(--accent-primary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Erişilebilirlik ---------- */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; border-radius: 8px; }
.always-dark :focus-visible, .footer :focus-visible, .drawer :focus-visible { outline-color: #F97316; }
.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; }
/* Klavye kullanıcısı menüyü atlayıp içeriğe geçer; yalnız odakta görünür */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 8px; background: var(--accent-primary); color: var(--on-accent); font-weight: 600; }
.skip-link:focus { top: 12px; }
#icerik:focus { outline: none; } /* atlama hedefi; halka bağlantıda görünür */
/* Örnek metin her iki temada da okunur (≥4.5:1); etiket yerine kullanılmaz (§6a) */
::placeholder { color: var(--text-secondary); opacity: 1; }
.btn-sm { height: 44px; padding: 0 16px; font-size: 15px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface); color: var(--text-secondary); border-color: var(--border); cursor: not-allowed; transform: none; filter: none; }
.btn.is-loading { cursor: progress; }
.btn.is-loading::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: kdrk-spin 700ms linear infinite; }
@keyframes kdrk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .reveal { opacity: 1; transform: none; } }

/* Açılır listenin seçenekleri: bazı tarayıcılar color-scheme'e uymaz; zemin ve metin temadan gelir */
select option,
select optgroup {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}
