/* Quatressence ana sayfa — MaLeTiLabs ile aynı tema tokenları */
:root {
  --bg: #ebe3cf;
  --panel: #f4eee0;
  --ink: #1f1d18;
  --muted: #6e6754;
  --line: #d2c7ac;
  --fizik: #1f5c7a;
  --lab: #2f7d4f;
  --mat: #a37800;
  --bg-img: none;               /* açık temada görsel yok (indirilmez de) */
  --radius: 8px;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101214; --panel: #16191c; --ink: #e9e7e0; --muted: #8c8a83;
    --line: #2a2e33; --fizik: #7db9d8; --lab: #5cc98a; --mat: #f2c230; --bg-img: url("arkaplan.jpg"); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101214; --panel: #16191c; --ink: #e9e7e0; --muted: #8c8a83;
  --line: #2a2e33;
  --fizik: #7db9d8; --lab: #5cc98a; --mat: #f2c230; --bg-img: url("arkaplan.jpg"); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100svh; display: flex; flex-direction: column;
  font-family: var(--sans); color: var(--ink); line-height: 1.5;
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}
/* Arka plan görseli: soluk, kenarlara doğru zemin rengine karışır (vinyet) */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background: var(--bg-img) center / cover no-repeat;
  opacity: .32;
}
body::after { background: radial-gradient(ellipse at center, transparent 20%, var(--bg) 92%); }
a { color: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Üst bar */
.bar { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 24px; }
.logo { font-size: 25px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }

/* Soru */
main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 24px; padding-bottom: 64px; }
.ask {
  margin: 0 0 40px; text-align: center; font-weight: 600;
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.03em;
}

/* Kartlar: Fizik sol, Laboratuvar orta, Matematik sağ */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  --c: var(--ink);
  position: relative; overflow: hidden; padding: 24px 24px 20px;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.card.fizik { --c: var(--fizik); }
.card.lab { --c: var(--lab); }
.card.mat { --c: var(--mat); }
.card > .tag { color: var(--c); }
.card h2 { margin: 6px 0 18px; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.card ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.card li { border-bottom: 1px solid var(--line); }
.card li:last-child { border-bottom: 0; }
.card li a, .card li .soon {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 2px; font-size: 16px; font-weight: 500; text-decoration: none;
}
.card li a > span[aria-hidden] { color: var(--c); transition: transform .15s; }
.card li a .src { color: var(--muted); font-weight: 400; }
.card li .soon { color: var(--muted); font-weight: 400; }
.card li .src { display: block; font-style: normal; font-size: 12px; opacity: .8; }
.card li small { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
.card a:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) {
  .card li a:hover { color: var(--c); }
  .card li a:hover > span[aria-hidden] { transform: translateX(4px); }
}

/* Kartlar alttan gelir */
@keyframes rise { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
.card { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.card.fizik { animation-delay: .1s; }
.card.lab { animation-delay: .22s; }
.card.mat { animation-delay: .34s; }
.ask { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) { .card, .ask { animation: none; } }

footer { padding: 24px 0 32px; border-top: 2px solid var(--line); color: var(--muted); font-size: 13px; }

/* Desteklenen cihazlar (MaLeTi'den taşındı) */
.devices { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 40px; }
.devices[hidden] { display: none; }
.devices > .tag { color: var(--ink); font-size: 12.5px; font-weight: 500; }
.devices ul { display: flex; align-items: flex-start; gap: 16px; margin: 0; padding: 0; list-style: none; }
.devices li { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 84px; text-align: center; }
.dev-icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); }
.dev-icon svg { width: 32px; height: 32px; }
.dev-badge, .dev-legend b { display: grid; place-items: center; border-radius: 50%; background: #e8b400; color: #1f1d18; font: 700 11px/1 var(--sans); }
.dev-badge { position: absolute; right: -5px; top: -3px; width: 17px; height: 17px; }
.dev-badge.ok { background: #5cc98a; color: #fff; }
.dev-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.dev-sub { font-size: 12px; line-height: 1.35; color: var(--muted); }
.dev-legend { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.dev-legend b { width: 14px; height: 14px; font-size: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Alt bilgi: GitHub + geri bildirim */
.foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.foot a:not(.gh) { color: var(--muted); }
.foot a:not(.gh):hover { color: var(--ink); }
.foot .copy { margin-left: auto; }
.gh { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--muted); border-radius: 50%; }
.gh:hover { color: var(--ink); }
.gh svg { width: 28px; height: 28px; }
@media (max-width: 820px) { .foot .copy { margin-left: 0; flex-basis: 100%; } .devices { margin-top: 28px; } }

/* Tema anahtarı (MaLeTiLabs ile aynı) */
.theme-switch {
  position: relative; flex: none; width: 66px; height: 36px; padding: 0; cursor: pointer;
  border-radius: 999px; border: 2px solid var(--muted); background: #f6c945; transition: background .25s, border-color .25s;
}
.theme-switch:hover { border-color: var(--ink); }
.theme-switch:focus-visible { outline: 2px solid var(--fizik); outline-offset: 2px; }
.theme-switch .knob {
  position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: #fff7d6; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .28s cubic-bezier(.4, .2, .2, 1.2), background .25s;
}
.theme-switch svg { width: 19px; height: 19px; grid-area: 1 / 1; transition: opacity .2s, transform .28s; }
.theme-switch .sun { color: #f2a900; }
.theme-switch .moon { color: #cfe2ff; opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-theme="dark"] .theme-switch { background: #8ec2ff; border-color: #F20707; }
:root[data-theme="dark"] .theme-switch .knob { transform: translateX(30px); background: #22324a; }
:root[data-theme="dark"] .theme-switch .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="dark"] .theme-switch .moon { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .theme-switch .knob, .theme-switch svg { transition: none; } }

/* Telefon ve dar tablet: kartlar alt alta */
@media (max-width: 820px) {
  .bar { padding: 0 16px; height: 64px; }
  .logo { font-size: 22px; }
  .theme-switch { transform: scale(.85); }
  main { justify-content: flex-start; padding-top: 32px; }
  .ask { margin-bottom: 28px; text-align: left; }
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 20px 18px 14px; }
  .card h2 { font-size: 24px; margin-bottom: 12px; }
}

/* Açık tema şimdilik kapalı (tema.js: ACIK_TEMA): tema anahtarı gizli */
[data-theme-toggle] { display: none !important; }


/* Geri dön düğmeleri: görünür hap düğme */
.bar nav a, .bar .home-link, .back {
  display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap;
}
.bar nav a:hover, .bar .home-link:hover, .back:hover { border-color: var(--ink); color: var(--ink); }
.bar nav + .home-link { margin-left: 10px; }
.back { margin-bottom: 14px; }
@media (max-width: 820px) {
  .bar nav { display: flex; margin-left: auto; }
  .bar nav + .home-link { display: none; }   /* telefonda yalnız bağlamdaki geri düğmesi */
  .bar nav a, .bar .home-link, .back { padding: 6px 11px; font-size: 13px; }
}
