/* =====================================================================
   KARA KUTU YOUTUBE AKADEMISI — Brand Kit · tokens.css  (v1.0)
   ---------------------------------------------------------------------
   Framework-agnostic design system shared by every Kara Kutu product:
   hub site (karakutuyoutube.com), Dashboard, ChannelPrompt, Thumbnail…
   Origin: extracted from the Dashboard (src/styles.css). Class names are
   identical on purpose, so every project speaks the same vocabulary.

   Usage:  <link rel="stylesheet" href="tokens.css">  (or import it first)
   Fonts:  Inter + Inter Tight from Google Fonts (see brand-kit/README.md)
   Themes: <html data-theme="blue|mono">  (no attribute = red, the default)

   RULES (do not break):
   - Never hard-code accent colours. Use var(--accent-rgb), var(--grad-btn),
     var(--accent-text), var(--on-accent)… so all three themes keep working.
   - Destructive / error UI uses --danger-* (always red, in every theme).
   - Themes change COLOURS ONLY. Sizes, spacing and layout never depend on theme.
   ===================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  color-scheme: dark;
  /* neutrals (same in every theme) */
  --bg: #070708;
  --bg-2: #0e0e11;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f6f6f7;
  --muted: #a3a3ad;
  --dim: #6e6e78;

  /* ---- THEME BLOCK: only these change per theme (default = red) ---- */
  --accent-rgb: 255, 45, 70;      /* main accent as "r, g, b" → rgba(var(--accent-rgb), a) */
  --glow-rgb: 255, 30, 60;        /* coloured shadows / glows */
  --accent2-rgb: 255, 122, 47;    /* secondary accent (gradient end) */
  --accent: #ff2d46;
  --grad: linear-gradient(92deg, #ff2d55 0%, #ff3b3b 45%, #ff7a2f 100%);   /* text gradient */
  --grad-btn: linear-gradient(180deg, #ff3a4f 0%, #e3122c 100%);          /* primary fill */
  --accent-text: #ff5a6e;         /* accent-coloured text / icons on dark */
  --accent-soft-text: #ffb3bd;
  --accent-link: #ff6b7d;
  --accent-link-hover: #ff95a2;
  --accent-code: #fca5b1;
  --on-accent: #ffffff;           /* text placed ON an accent fill */
  --logo-k: 0.9;                  /* background logo strength */

  /* semantic (never themed) */
  --danger-rgb: 255, 45, 70;
  --danger-line: rgba(255, 45, 70, 0.35);
  --danger-text: #ff7a8a;
  --green: #22c55e;
  --wa: #25d366;
  --amber: #f5b544;

  /* derived accent helpers */
  --accent-soft: rgba(var(--accent-rgb), 0.12);
  --accent-line: rgba(var(--accent-rgb), 0.35);

  /* shape, depth, type */
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --container: 1180px;
}

/* Blue — same hue/saturation ratio as red */
:root[data-theme='blue'] {
  --accent-rgb: 45, 125, 255;
  --glow-rgb: 30, 105, 255;
  --accent2-rgb: 47, 208, 255;
  --accent: #2d7dff;
  --grad: linear-gradient(92deg, #2d6dff 0%, #3b8bff 45%, #2fd0ff 100%);
  --grad-btn: linear-gradient(180deg, #3a8bff 0%, #1257e3 100%);
  --accent-text: #5c9dff;
  --accent-soft-text: #b3d1ff;
  --accent-link: #6ba6ff;
  --accent-link-hover: #95c0ff;
  --accent-code: #a5c8fd;
  --on-accent: #ffffff;
  --logo-k: 0.9;
}

/* Mono (white on black) — primary buttons become white with black text */
:root[data-theme='mono'] {
  --accent-rgb: 255, 255, 255;
  --glow-rgb: 170, 170, 185;
  --accent2-rgb: 190, 190, 205;
  --accent: #f4f4f5;
  --grad: linear-gradient(92deg, #ffffff 0%, #e4e4e7 50%, #a1a1aa 100%);
  --grad-btn: linear-gradient(180deg, #ffffff 0%, #d4d4d8 100%);
  --accent-text: #f4f4f5;
  --accent-soft-text: #e4e4e7;
  --accent-link: #e4e4e7;
  --accent-link-hover: #ffffff;
  --accent-code: #e4e4e7;
  --on-accent: #0a0a0b;
  --logo-k: 0.55;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(var(--accent-rgb), 0.35); }

/* ---------- 3. BACKGROUND (grid + glows + side lights + YouTube logo) ----------
   Markup: see brand-kit/background.html (or Background.tsx in the Dashboard).
   Readability rule: the logo must stay faint; content sits on glass in front of it. */
.bg-fx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(var(--accent-rgb), 0.16), transparent 60%),
    radial-gradient(700px 480px at 100% 110%, rgba(var(--accent2-rgb), 0.10), transparent 60%),
    radial-gradient(600px 400px at 50% 120%, rgba(var(--accent-rgb), 0.07), transparent 70%),
    var(--bg);
}
.bg-fx::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 100%);
}
.bg-fx::after {
  content: ''; position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
.bg-fx > * { position: absolute; pointer-events: none; }
.bg-side { top: 0; bottom: 0; width: min(34vw, 520px); }
.bg-side-l { left: 0; background: radial-gradient(60% 45% at 0% 30%, rgba(var(--accent-rgb), 0.16), transparent 70%), radial-gradient(50% 35% at 0% 85%, rgba(var(--accent2-rgb), 0.08), transparent 70%); }
.bg-side-r { right: 0; background: radial-gradient(60% 45% at 100% 62%, rgba(var(--accent-rgb), 0.13), transparent 70%), radial-gradient(45% 30% at 100% 12%, rgba(var(--accent2-rgb), 0.08), transparent 70%); }
.bg-edge { top: 8%; bottom: 8%; width: 1px; opacity: 0.8; }
.bg-edge-l { left: 0; background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.55) 35%, rgba(var(--accent2-rgb), 0.35) 70%, transparent); box-shadow: 0 0 18px 2px rgba(var(--accent-rgb), 0.35); }
.bg-edge-r { right: 0; background: linear-gradient(180deg, transparent, rgba(var(--accent2-rgb), 0.3) 30%, rgba(var(--accent-rgb), 0.5) 65%, transparent); box-shadow: 0 0 18px 2px rgba(var(--accent-rgb), 0.3); }
/* --logo-x lets a page with a sidebar shift the logo into the content area (Dashboard uses calc(50% + 140px)) */
.bg-logo { top: 62%; left: var(--logo-x, 50%); width: min(34vw, 460px); transform: translate(-50%, -50%); opacity: var(--logo-k, 1); }
.bg-logo::before {
  content: ''; position: absolute; inset: -70% -60%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.1), rgba(var(--accent2-rgb), 0.04) 55%, transparent);
  animation: kk-breathe 9s ease-in-out infinite;
}
.bg-logo svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 0 70px rgba(var(--accent-rgb), 0.16)); animation: kk-breathe 9s ease-in-out infinite; }
.yt-s1 { stop-color: rgb(var(--accent-rgb)); stop-opacity: 0.07; }
.yt-s2 { stop-color: rgb(var(--accent2-rgb)); stop-opacity: 0.02; }
.yt-s3 { stop-color: rgb(var(--accent-rgb)); stop-opacity: 0.2; }
.yt-s4 { stop-color: rgb(var(--accent-rgb)); stop-opacity: 0.05; }
.yt-s5 { stop-color: rgb(var(--accent2-rgb)); stop-opacity: 0.14; }
.yt-halo { fill: rgba(var(--accent-rgb), 0.12); }
.yt-play { fill: rgba(var(--accent-rgb), 0.07); stroke: rgba(var(--accent-rgb), 0.14); stroke-width: 1.2; }
@keyframes kk-breathe { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@media (max-width: 900px) { .bg-logo { left: 50%; top: 64%; width: 62vw; } .bg-side { width: 60vw; } }

/* ---------- 4. SURFACES ---------- */
.glass {
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
}
/* .glow = hero/important card: accent border, top light line, soft inner glow */
.glow { position: relative; border-color: rgba(var(--accent-rgb), 0.28); overflow: hidden; }
.glow::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(120% 60% at 50% -10%, rgba(var(--accent-rgb), 0.16), transparent 60%); }
.glow::after { content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.9), transparent); }
.glow > * { position: relative; }
.card { border-radius: var(--r-xl); padding: 26px; }
.card-title { font-size: 18px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* ---------- 5. TYPOGRAPHY ---------- */
.display { font-size: clamp(40px, 6vw, 72px); font-weight: 900; letter-spacing: -0.045em; line-height: 1.02; }
.h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; letter-spacing: -0.035em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; max-width: 560px; }
.muted { color: var(--muted); }
.fine { color: var(--dim); font-size: 12.5px; }
.eyebrow { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.chip-outline { display: inline-block; padding: 8px 18px; border-radius: 99px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent-text); border: 1px solid var(--accent-line); background: rgba(var(--accent-rgb), 0.08); }
.link { color: var(--accent-link); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--accent-link-hover); }

/* ---------- 6. BRAND MARK ---------- */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-btn); color: var(--on-accent); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 8px 28px -4px rgba(var(--glow-rgb), 0.65); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: -0.015em; }
.brand-text span { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 7. BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--r-md); font-weight: 650; font-size: 14.5px; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s, border-color .2s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.45; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad-btn); color: var(--on-accent); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 10px 30px -10px rgba(var(--glow-rgb), 0.8); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 14px 38px -10px rgba(var(--glow-rgb), 0.95); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); }
.btn-text { color: var(--muted); }
.btn-text:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.btn-danger { background: rgba(var(--danger-rgb), 0.14); border: 1px solid var(--danger-line); color: var(--danger-text); }
.btn-wa { background: linear-gradient(180deg, #2fe06f, #1fb457); color: #04210f; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 10px 30px -12px rgba(37, 211, 102, 0.8); }

/* ---------- 8. FORMS ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-size: 13.5px; font-weight: 650; color: #e4e4e7; }
.field-hint { font-size: 12px; color: var(--dim); }
.input { width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-md); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 90px; }
.input::placeholder { color: #5b5b64; }
.input:hover { border-color: var(--line-2); }
.input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12); background: rgba(0, 0, 0, 0.5); }

/* ---------- 9. CHIPS · BADGES · NOTICES ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 13.5px; color: #d4d4d8; transition: all .15s; }
.chip.active { background: var(--accent-soft); border-color: var(--accent-line); color: #fff; box-shadow: 0 0 20px -6px rgba(var(--accent-rgb), 0.6); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid; }
.badge-live { color: #4ade80; background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); }
.badge-soon { color: var(--amber); background: rgba(245, 181, 68, 0.1); border-color: rgba(245, 181, 68, 0.3); }
.badge-muted { color: var(--muted); background: rgba(255, 255, 255, 0.05); border-color: var(--line-2); }
.notice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 18px; border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 14px; color: #d4d4d8; }
.pill-status { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; font-size: 13.5px; color: #d4d4d8; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); }
.pill-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ---------- 10. MARKETING LAYOUT (hub site) ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { margin-top: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-3 > * { min-width: 0; }
.site-nav { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(7, 7, 8, 0.6); border-bottom: 1px solid var(--line); }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.site-nav nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
.site-nav nav a:not(.btn):hover { color: var(--text); }
/* product card: one per Kara Kutu product on the hub */
.product { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: var(--r-xl); transition: transform .2s ease, border-color .2s ease; }
.product:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.product-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); border: 1px solid rgba(var(--accent-rgb), 0.22); }
.product h3 { font-size: 20px; font-weight: 800; }
.product p { color: var(--muted); font-size: 14.5px; flex: 1; }
.site-foot { border-top: 1px solid var(--line); padding: 32px 0; color: var(--dim); font-size: 13px; }
.site-foot .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot a:hover { color: var(--text); }

/* ---------- 11. RESPONSIVE + MOTION ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .site-nav nav a:not(.btn) { display: none; }
}
@media (max-width: 640px) {
  .site-nav .container { height: 60px; }
  .site-nav nav { gap: 10px; }
  .site-nav .brand { gap: 10px; }
  .site-nav .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .site-nav .brand-text span { display: none; }
  .site-nav .brand-text strong { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
