/* ============================================================
   stresser.vip — main stylesheet
   Colors: oklch perceptual palette (SKILL2)
   Design: dark premium-tech (SKILL4 reference)
   ============================================================ */

:root {
  /* Backgrounds — tinted dark navy (SKILL2 §8.2: tinted neutrals) */
  --bg:   oklch(0.14 0.012 255);
  --bg2:  oklch(0.18 0.014 255);
  --bg3:  oklch(0.22 0.014 255);

  /* Borders */
  --border:  oklch(0.30 0.012 255);
  --border2: oklch(0.36 0.012 255);

  /* Accent: orange-red, used sparingly (SKILL4: single accent) */
  --accent:  oklch(0.63 0.21 30);
  --accent2: oklch(0.73 0.17 30);

  /* Text (SKILL2 §8.3: no pure white) */
  --text:  oklch(0.92 0.006 255);
  --text2: oklch(0.62 0.010 255);
  --text3: oklch(0.45 0.010 255);

  /* Links */
  --link:       oklch(0.72 0.14 250);
  --link-hover: oklch(0.82 0.11 250);

  /* Semantic */
  --green:  oklch(0.72 0.17 145);
  --yellow: oklch(0.78 0.16 85);

  /* Spacing scale (SKILL4 §5) */
  --p:  64px; --p2: 48px; --p3: 32px; --p4: 24px;
  --p5: 20px; --p6: 18px; --p7: 14px; --p8: 12px; --p9: 8px;

  /* Radius */
  --r:  48px;   /* pill — badges, buttons */
  --r2: 14px;   /* cards */
  --r3: 10px;

  /* Gradients */
  --hero-grad: linear-gradient(180deg,
    oklch(0.94 0 0) 5%,
    oklch(0.52 0 0) 90%);
  --accent-grad: linear-gradient(180deg,
    oklch(0.78 0.19 30) 0%,
    oklch(0.52 0.22 30) 100%);
  --card-bg: radial-gradient(
    70% 90% at 100% 100%,
    oklch(0.26 0.014 255 / .85) 0%,
    oklch(0.14 0.012 255 / .92) 100%);

  --font-mono: 'Cascadia Code', 'Fira Code', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Page fade-in (SKILL4 §7, wrapped in motion-safe) ── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes pageFade {
    from { opacity: 0; filter: blur(8px); }
    to   { opacity: 1; filter: blur(0);  }
  }
  body { animation: pageFade .55s ease-out both; }
}

/* ── Tactile click (SKILL4 §7) ── */
a, button, .card, details summary {
  transition: transform .15s ease-out, opacity .15s ease-out,
              border-color .18s, background .18s;
}
a:active, .card:active, details summary:active {
  transform: scale(.975);
  opacity: .75;
}

/* ── Layout ── */
.wrap    { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-sm { max-width: 800px;  margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ── */
header {
  background: oklch(0.16 0.014 255 / .88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: .85rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-size: 1.45rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -.5px;
}
.logo span {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
nav { display: flex; gap: .1rem; flex-wrap: wrap; }
nav a {
  color: var(--text2);
  text-decoration: none;
  font-size: .82rem;
  padding: .32rem .65rem;
  border-radius: var(--r);
  transition: color .15s, background .15s;
}
nav a:hover, nav a.active {
  color: var(--text);
  background: var(--bg3);
}

/* ── Hero ── */
.hero {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%,
      oklch(0.30 0.08 30 / .18) 0%, transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 0 4rem;
  text-align: center;
}

/* Gradient clip-text on H1 (SKILL4 §4) */
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .75rem;
  background: var(--hero-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-wrap: balance;
}
.hero h1 em {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}

.hero p.lead {
  font-size: 1.12rem;
  color: var(--text2);
  max-width: 620px;
  margin: 0 auto 2rem;
  font-weight: 300;
}

/* Pill badges (SKILL4 §9) */
.badge-row {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.badge {
  background: oklch(0.22 0.014 255 / .8);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .76rem;
  padding: .26rem .85rem;
  color: var(--text2);
  backdrop-filter: blur(6px);
}
.badge.green { border-color: var(--green); color: var(--green); }
.badge.red   { border-color: var(--accent); color: var(--accent2); }

/* ── TOC ── */
.toc {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toc h2 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
  margin-bottom: .75rem;
}
.toc ol  { padding-left: 1.25rem; }
.toc li  { margin: .3rem 0; }
.toc a   { color: var(--link); text-decoration: none; font-size: .93rem; }
.toc a:hover { color: var(--link-hover); text-decoration: underline; }

/* ── Sections ── */
.section { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: none; }

h2.section-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-top: .5rem;
  background: linear-gradient(180deg, var(--text) 30%, var(--text2) 130%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
h2.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--accent-grad);
  border-radius: 2px;
  margin-right: .6rem;
  vertical-align: middle;
  -webkit-text-fill-color: initial;
}

h3 { font-size: 1.15rem; font-weight: 600; margin: 1.75rem 0 .5rem; color: var(--text); }
p  { margin: .75rem 0; color: var(--text2); }
p strong { color: var(--text); }

/* ── Cards — glassmorphism (SKILL4 §6) ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1.3rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .2s, transform .2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card-icon { font-size: 1.5rem; margin-bottom: .65rem; }
.card h3   { font-size: .98rem; margin: 0 0 .4rem; color: var(--text); }
.card p    { font-size: .87rem; margin: 0; }

/* ── Callout ── */
.callout {
  border-left: 3px solid var(--accent);
  background: oklch(0.63 0.21 30 / .07);
  border-radius: 0 var(--r3) var(--r3) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout.info  { border-color: var(--link); background: oklch(0.72 0.14 250 / .07); }
.callout.green { border-color: var(--green); background: oklch(0.72 0.17 145 / .07); }
.callout p { color: var(--text); margin: 0; font-size: .94rem; }

/* ── Table ── */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--r2); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead tr { background: var(--bg3); }
th {
  text-align: left;
  padding: .7rem 1rem;
  color: var(--text3);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); color: var(--text2); }
td strong { color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: oklch(0.22 0.014 255 / .5); }

/* ── FAQ accordion ── */
.faq-list { margin: 1.5rem 0; }
details {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  margin-bottom: .5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
details[open] { border-color: oklch(0.45 0.10 30); }
summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--text3); font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: '−'; color: var(--accent2); }
details p { padding: 0 1.25rem 1rem; margin: 0; font-size: .92rem; color: var(--text2); }

/* ── Code ── */
code {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: .84em;
  padding: .1em .4em;
  color: var(--accent2);
}

/* ── Links ── */
a { color: var(--link); }
a:hover { color: var(--link-hover); }

/* ── Related cards ── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .75rem;
  margin: 1.5rem 0;
}
.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: block;
  transition: border-color .18s, transform .18s;
}
.related-card span { display: block; font-size: .78rem; font-weight: 400; color: var(--text2); margin-top: .25rem; }
.related-card:hover { border-color: var(--link); transform: translateY(-2px); color: var(--text); }

/* ── Footer ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: 48px 48px 0 0;  /* SKILL4: pill top corners */
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-col h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
  margin-bottom: .75rem;
}
.footer-col a  { display: block; color: var(--text2); text-decoration: none; font-size: .86rem; margin-bottom: .35rem; }
.footer-col a:hover { color: var(--link); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text3);
  font-size: .8rem;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  nav { display: none; }
  .hero h1 { font-size: 1.9rem; }
  h2.section-title { font-size: 1.4rem; }
  footer { border-radius: 28px 28px 0 0; }
}
@media (max-width: 450px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ── Selection style (SKILL4 §3) ── */
::selection { background: var(--text); color: var(--bg); }
