/* HQN — hqn.com.tr
   Fikir: "yayın defteri". Mühendislik kâğıdı zemin, mürekkep siyahı, uygulama başına bir vurgu rengi
   (.accent-<slug> -> --accent, apps.css üretir), ofset gölgeli düğmeler ve terminal görünümlü release.log. */

:root {
  --bg: #f6f5f1;
  --paper: #fffefb;
  --ink: #121316;
  --muted: #5d6270;
  --line: #dedbd2;
  --grid: rgba(18, 19, 22, .045);
  --accent: #2f5bff;
  --ok: #138a4b;
  --warn: #b36b00;
  --term: #0e0f12;
  --term-ink: #d7d8dc;
  --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 5px 5px 0 var(--ink);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1013;
    --paper: #16181c;
    --ink: #ecebe7;
    --muted: #9ba1ac;
    --line: #2a2d34;
    --grid: rgba(236, 235, 231, .04);
    --ok: #3ecf7c;
    --warn: #f0a93a;
    --shadow: 5px 5px 0 #000;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.6 var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
.mono { font-family: var(--mono); font-size: .88em; }
.dim { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 16px; }

/* ---- üst çubuk */
.top { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 3px; text-decoration: none; }
.brand-mark { font: 700 1.35rem/1 var(--mono); letter-spacing: -.04em; }
.caret { display: inline-block; width: .55em; height: 1.05em; background: var(--accent); vertical-align: -.15em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.top nav a { text-decoration: none; margin-left: 22px; font-size: .95rem; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
.top nav .lang { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* ---- düğmeler */
.btn {
  display: inline-flex; align-items: center; gap: .4em; padding: .7em 1.2em; border-radius: 10px;
  background: var(--ink); color: var(--bg); border: 2px solid var(--ink); text-decoration: none; font-weight: 600;
  box-shadow: 3px 3px 0 var(--accent); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--accent); }
.btn:active { transform: none; box-shadow: 1px 1px 0 var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: 3px 3px 0 var(--line); }
.btn-ghost:hover { box-shadow: 5px 5px 0 var(--line); }
.btn-small { padding: .4em .8em; font-size: .88rem; border-radius: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4rem 0 0; }

/* ---- hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding: 72px 0 40px; }
.kicker { color: var(--muted); margin: 0 0 1rem; }
.kicker::before { content: "// "; color: var(--accent); }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 750; max-width: 14ch; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; margin: 0; }
.stats { margin-top: 1.4rem; }

/* ---- release.log (her zaman terminal koyusu) */
.log { background: var(--term); color: var(--term-ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 2px solid var(--ink); font-family: var(--mono); font-size: .86rem; }
.log-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #23252b; color: #8b8f99; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3d45; }
.dots i:first-child { background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.log-lines { list-style: none; margin: 0; padding: 12px 0; }
.log-lines a { display: grid; grid-template-columns: 6.2em 1fr auto auto; gap: 12px; padding: 4px 16px; text-decoration: none; }
.log-lines a:hover { background: #1a1c21; }
.log-lines time { color: #6f7480; }
.log-app { color: var(--accent); filter: brightness(1.35) saturate(1.1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-ver { color: #fff; }
.log-ch { font-size: .78em; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; align-self: center; }
.log .ch-stable { color: #3ecf7c; } .log .ch-beta { color: #f0a93a; }
.ch-stable { color: var(--ok); } .ch-beta { color: var(--warn); }
.log-cursor { padding: 4px 16px; color: #6f7480; }
.log-all { display: block; padding: 10px 16px; border-top: 1px solid #23252b; color: #8b8f99; text-decoration: none; }
.log-all:hover { color: #fff; }

/* ---- bölümler */
.section { padding: 56px 0; }
.page-top { padding-top: 40px; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; margin-bottom: 28px; }
.section-head h1, .section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0; }
.section-head p { color: var(--muted); margin: 0; }
.num { display: block; font-size: .8rem; color: var(--accent); letter-spacing: .08em; margin-bottom: .4rem; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

/* ---- kartlar */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 22px 20px; text-decoration: none;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--accent); text-decoration: none; }
.card-bar { position: absolute; inset: 0 0 auto; height: 6px; background: var(--accent); }
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-name { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.card-tag { color: var(--muted); font-size: .95rem; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); font-family: var(--mono); padding-top: 12px; border-top: 1px dashed var(--line); }
.ver { color: var(--accent); font-weight: 700; }
.logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; }
.mono-logo { display: inline-grid; place-items: center; background: var(--accent); color: #fff; font: 700 1.2rem/1 var(--mono); }
.app-title .logo { width: 96px; height: 96px; border-radius: 22px; }
.app-title .mono-logo { font-size: 2rem; }

.badge { font: 600 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 5px 9px; border-radius: 999px; border: 1.5px solid currentColor; white-space: nowrap; }
.st-available { color: var(--ok); } .st-beta { color: var(--warn); } .st-soon { color: var(--accent); }
.st-development, .st-archived { color: var(--muted); }

/* ---- yetenekler: manifest */
.manifest { margin: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.manifest-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 18px 24px; border-bottom: 1px dashed var(--line); }
.manifest-row:last-child { border-bottom: 0; }
/* Küçük harf CSS ile: tarayıcı <html lang="tr">'de İ->i, I->ı dönüşümünü doğru yapar (PHP mb_strtolower yapmaz) */
.manifest dt { color: var(--accent); padding-top: 4px; text-transform: lowercase; }
.manifest dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: .9rem; padding: 3px 11px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }

/* ---- şirket */
.company { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 30px 32px; border: 2px dashed var(--ink); border-radius: var(--radius); }
.company h2 { font-size: 1.5rem; margin-bottom: .25em; }
.company p { margin: 0; color: var(--muted); }

/* ---- uygulama sayfası */
.app-head { padding-bottom: 24px; }
.app-title { display: flex; align-items: center; gap: 22px; }
.app-title h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin: 0 0 .15em; }
.app-title h1::after { content: ""; display: block; width: 64px; height: 6px; background: var(--accent); margin-top: 12px; border-radius: 3px; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 28px 0 0; padding: 16px 0; border-block: 1px solid var(--line); }
.facts dt { font: .72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 600; }
.shots { padding: 16px 0 8px; }
.shots-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 22px; }
.shot { flex: 0 0 auto; scroll-snap-align: start; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); background: var(--paper); }
.shot img { display: block; height: min(420px, 56vw); width: auto; }
.app-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; padding: 32px 0 64px; }
.app-body h2 { font-size: 1.5rem; }
.app-body > section > h2:first-child { margin-top: 0; }

/* ---- metin */
.prose { max-width: 70ch; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.4em; }
.prose h3 { font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .2em 0; }
.prose li::marker { color: var(--accent); }
.prose code, .mono code { font-family: var(--mono); font-size: .88em; background: var(--paper); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.prose p { margin: .7em 0; }

/* ---- sürümler */
.rels { list-style: none; margin: 0 0 24px; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
.rel { position: relative; padding: 0 0 26px 8px; }
.rel::before { content: ""; position: absolute; left: -31px; top: .45em; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.rel:target .rel-ver { background: var(--accent); color: #fff; }
.rel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rel-ver { font: 700 1.05rem var(--mono); text-decoration: none; padding: 0 6px; border-radius: 6px; margin-left: -6px; }
.rel-app { font-weight: 700; text-decoration: none; color: var(--accent); }
.rel-head time { font-size: .88rem; color: var(--muted); }
.rel-notes { font-size: .96rem; }
.rel-notes > :first-child { margin-top: .4em; }
.rel-notes h3, .rel-notes h4 { font: 700 .74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1em 0 .3em; }
.rel-notes ul { margin: 0; }
.rel-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 0; font-size: .85rem; }
.month { font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 32px 0 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters a { text-decoration: none; font-size: .9rem; padding: 5px 12px; border: 1.5px solid var(--line); border-radius: 999px; }
.filters a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.notfound h1 { font-size: clamp(2rem, 5vw, 3.2rem); }

/* ---- alt bilgi */
.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px 0; font-size: .88rem; color: var(--muted); }
.foot p { margin: 0; }
.foot-links { display: flex; gap: 18px; }

/* ---- duyarlı */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; gap: 36px; }
  .section-head, .app-body { grid-template-columns: 1fr; }
  .manifest-row { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top nav a { margin-left: 12px; font-size: .88rem; }
  .top nav a:nth-child(3) { display: none; }
  .log-lines a { grid-template-columns: 1fr auto; }
  .log-lines time, .log-ch { display: none; }
  .app-title { flex-direction: column; align-items: flex-start; }
  .company { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
