/* ============================================================
   KSKTech.dev — shared styles
   Dark cinematic theme matching the KSKPix app.
   ============================================================ */

:root {
  --bg:        #0e0f12;
  --bg-2:      #14161b;
  --panel:     #171a21;   /* app-gray */
  --panel-2:   #1d2129;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.14);
  --text:      #f3f4f6;
  --muted:     #a6acb6;
  --muted-2:   #767d88;
  --accent:    #e50914;   /* KSKPIX red */
  --accent-2:  #ff2b36;
  --radius:    16px;
  --radius-sm: 11px;
  --maxw:      1080px;
  --shadow:    0 18px 50px rgba(0,0,0,.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient red glow behind the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(229,9,20,.16), transparent 60%),
    radial-gradient(700px 600px at 88% 12%, rgba(229,9,20,.06), transparent 55%),
    var(--bg);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.85rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(14,15,18,.72);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800;
         letter-spacing: -.02em; color: var(--text); font-size: 1.06rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .tt { color: var(--accent); }
.nav .spacer { flex: 1; }
.nav .links { display: flex; gap: 22px; align-items: center; }
.nav .links a { color: var(--muted); font-size: .94rem; font-weight: 600; }
.nav .links a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 620px) { .nav .links a.hide-sm { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(229,9,20,.35); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: rgba(255,255,255,.05); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255,255,255,.09); }
.btn svg { width: 18px; height: 18px; }

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section-tight { padding: 52px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .76rem;
           font-weight: 800; color: var(--accent-2); margin-bottom: 12px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero .wordmark { height: 64px; width: auto; margin: 0 auto 26px; display: block; }
.hero h1 { margin-bottom: .35em; font-size: clamp(1.9rem, 7vw, 3.6rem); }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted);
              max-width: 660px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.grad { background: linear-gradient(180deg, #fff 0%, #ffd9db 130%);
        -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- store badges ---------- */
.badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
          margin-top: 34px; }
.badge {
  position: relative; display: block;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 13px; padding: 13px 18px;
  transition: border-color .15s ease, transform .12s ease;
}
.badge:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-2px); }
.badge img { height: 38px; width: auto; }
.badge.soon { opacity: .62; cursor: default; }
.badge.soon:hover { transform: none; border-color: var(--line); }
.badge .tag {
  position: absolute; top: -10px; right: -8px;
  background: var(--accent); color: #fff; font-size: .64rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.badge.live .tag { background: #1db954; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(229,9,20,.12); color: var(--accent-2); margin-bottom: 14px;
}
.feature .ico svg { width: 23px; height: 23px; }
.feature h3 { margin-bottom: .3em; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---------- screenshot gallery ---------- */
.tabs { display: flex; gap: 8px; justify-content: center; margin: 6px 0 30px;
        flex-wrap: wrap; }
.tab {
  padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  background: rgba(255,255,255,.05); color: var(--muted);
  border: 1px solid var(--line); cursor: pointer; transition: all .15s ease;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.shots { display: none; }
.shots.active { display: block; }
.shots.phone .row  { grid-template-columns: repeat(3, 1fr); max-width: 760px; margin: 0 auto; }
.shots.tablet .row { grid-template-columns: repeat(2, 1fr); }
.shots.tv .row     { grid-template-columns: repeat(2, 1fr); }
.row { display: grid; gap: 16px; }
@media (max-width: 720px) {
  .shots.phone .row { grid-template-columns: repeat(2, 1fr); }
  .shots.tablet .row, .shots.tv .row { grid-template-columns: 1fr; }
}
.shot {
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--panel); cursor: zoom-in; transition: transform .14s ease, border-color .15s ease;
}
.shot:hover { transform: translateY(-3px); border-color: var(--line-2); }
.shot img { width: 100%; height: auto; display: block; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; display: none;
      background: rgba(6,7,9,.92); align-items: center; justify-content: center; padding: 24px; }
.lb.open { display: flex; }
.lb img { max-width: 94vw; max-height: 90vh; width: auto; border-radius: 12px;
          box-shadow: var(--shadow); }
.lb .x { position: absolute; top: 18px; right: 22px; font-size: 2rem; color: #fff;
         cursor: pointer; line-height: 1; opacity: .8; }
.lb .x:hover { opacity: 1; }

/* ---------- download ---------- */
.dl-card { display: flex; flex-direction: column; gap: 6px; }
.dl-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.dl-card .head .ico { width: 40px; height: 40px; border-radius: 11px; display: grid;
  place-items: center; background: rgba(255,255,255,.05); color: var(--accent-2); }
.dl-card .head .ico svg { width: 22px; height: 22px; }
.dl-card .meta { color: var(--muted-2); font-size: .82rem; }
.dl-card p { color: var(--muted); font-size: .95rem; }
.code-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #0a0b0d; border: 1px solid var(--line-2); color: var(--accent-2);
  border-radius: 9px; padding: 11px 14px; font-size: 1.05rem; font-weight: 600;
  display: inline-block; letter-spacing: .01em;
}
.note { font-size: .86rem; color: var(--muted-2); }
.steps { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: .93rem; }
.steps li { margin: 4px 0; }

/* ---------- faq ---------- */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 18px; background: var(--panel); margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent-2); font-weight: 800;
  font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--muted); margin: 0 0 14px; }

/* ---------- product card (umbrella home) ---------- */
.product {
  display: flex; gap: 18px; align-items: center;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: transform .14s ease, border-color .15s ease;
}
.product:hover { transform: translateY(-3px); border-color: var(--line-2); text-decoration: none; }
.product img.ic { width: 72px; height: 72px; border-radius: 16px; flex: none; }
.product .body { flex: 1; }
.product .body h3 { color: var(--text); margin-bottom: .2em; }
.product .body p { color: var(--muted); margin: 0; font-size: .95rem; }
.product .go { color: var(--accent-2); font-weight: 800; font-size: 1.4rem; }
.product.soon { opacity: .5; }
.pill { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent-2); background: rgba(229,9,20,.12);
  padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }

/* ---------- legal / prose ---------- */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); }
.prose h2 { font-size: 1.2rem; margin-top: 34px; }
.prose .updated { color: var(--muted-2); font-size: .9rem; margin: -6px 0 26px; }
.prose .summary { background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 20px; }
.prose dt { font-weight: 700; margin-top: 18px; }
.prose dd { margin: 4px 0 0; color: var(--muted); }
.prose code { background: #0a0b0d; border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 6px; font-size: .9em; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 40px 0; }
.foot .wrap { display: flex; gap: 18px 30px; flex-wrap: wrap; align-items: center; }
.foot .brand { font-size: 1rem; }
.foot .spacer { flex: 1; }
.foot a { color: var(--muted); font-weight: 600; font-size: .92rem; }
.foot a:hover { color: var(--text); text-decoration: none; }
.foot .fine { width: 100%; color: var(--muted-2); font-size: .82rem; margin-top: 4px; }

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
