/* ============================================================
   CySA+ 004 Academy — landing page styles
   No external fonts. No external resources. System stack only.
   ============================================================ */

:root {
  /* Palette — dark slate + amber accent + SOC log-level colors */
  --bg:          #0e1116;
  --bg-elev:    #161b22;
  --bg-panel:   #10141a;
  --border:     #2a3038;
  --border-dim: #1c2129;
  --text:       #e6edf3;
  --text-dim:   #8b949e;
  --text-mute:  #6a737d;

  --accent:      #ffb020;         /* amber — used sparingly */
  --accent-dim:  rgba(255,176,32,0.14);
  --accent-line: rgba(255,176,32,0.35);

  --sev-info: #58a6ff;
  --sev-warn: #ffb020;
  --sev-crit: #f85149;
  --sev-ok:   #3fb950;

  /* Type stacks — system only */
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "Roboto Mono", monospace;

  /* Scale */
  --wrap:     72rem;
  --content:  44rem;
  --radius:   6px;
  --radius-lg: 10px;
}

/* ------------------------------------------------------------
   Reset + base
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #000;
  padding: 0.5rem 0.75rem; font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; }

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; border-top: 1px solid var(--border-dim); }
.section--muted { background: var(--bg-elev); }
.section > .wrap { max-width: var(--content); }

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-dim);
  position: sticky; top: 0;
  background: rgba(14,17,22,0.85);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 0.5rem;
  color: var(--text); text-decoration: none;
}
.brand:hover, .brand:focus-visible { text-decoration: none; }
.brand-mark {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.brand-name { font-weight: 600; letter-spacing: -0.01em; }

.site-header nav {
  display: flex; gap: 1.5rem;
  font-size: 0.9rem;
}
.site-header nav a { color: var(--text-dim); }
.site-header nav a:hover, .site-header nav a:focus-visible {
  color: var(--text); text-decoration: none;
}
@media (max-width: 40rem) {
  .site-header nav { display: none; }
}

/* ------------------------------------------------------------
   Type
   ------------------------------------------------------------ */
h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 1rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sev-ok);
  box-shadow: 0 0 0 3px rgba(63,185,80,0.18);
}

.lede {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 40rem;
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero { padding: 5rem 0 4rem; }
.hero .wrap { max-width: 60rem; }
.hero h1 { max-width: 22ch; }

.hero-meta {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-mute);
  font-family: var(--font-mono);
}
.hero-meta time { color: var(--text-dim); }

/* ------------------------------------------------------------
   Log panel — the signature element
   ------------------------------------------------------------ */
.log-panel {
  margin: 2.5rem 0 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 20px 40px -20px rgba(0,0,0,0.5);
}
.log-panel-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border-dim);
  background: var(--bg-elev);
}
.log-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.log-dot--r { background: #f85149; }
.log-dot--y { background: #ffb020; }
.log-dot--g { background: #3fb950; }
.log-panel-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-mute);
  margin-left: 0.35rem;
  letter-spacing: 0.02em;
}
.log-panel-body {
  margin: 0;
  padding: 1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-dim);
  overflow-x: auto;
  white-space: pre;
}
.log-line { display: block; }
.log-panel-body .ts   { color: var(--text-mute); }
.log-panel-body .src  { color: var(--text); }
.log-panel-body .sev  { font-weight: 600; }
.sev--info { color: var(--sev-info); }
.sev--warn { color: var(--sev-warn); }
.sev--crit { color: var(--sev-crit); }

@media (max-width: 34rem) {
  .log-panel-body { font-size: 0.72rem; padding: 0.8rem; }
}

/* ------------------------------------------------------------
   CTAs
   ------------------------------------------------------------ */
.cta-row {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin-top: 1.5rem;
}
.cta {
  display: inline-flex; flex-direction: column;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.1s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.cta:hover, .cta:focus-visible { text-decoration: none; }

.cta--primary {
  background: var(--accent-dim);
  border-color: var(--accent-line);
  color: var(--accent);
}
.cta--primary .cta-label { font-weight: 600; }
.cta--primary .cta-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  margin-top: 0.15rem;
  letter-spacing: 0.02em;
}
.cta--primary.is-disabled {
  cursor: not-allowed;
  opacity: 0.9;
}
.cta--primary.is-disabled:hover { transform: none; }

.cta--ghost {
  color: var(--text-dim);
  border-color: var(--border);
  background: transparent;
  align-self: flex-start;
  padding: 1rem 1.25rem;
}
.cta--ghost:hover, .cta--ghost:focus-visible {
  color: var(--text);
  border-color: var(--text-dim);
}

/* ------------------------------------------------------------
   Cards grid
   ------------------------------------------------------------ */
.grid {
  display: grid; gap: 1rem;
  margin-top: 2rem;
}
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.card h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.card p { color: var(--text-dim); font-size: 0.95rem; }

/* ------------------------------------------------------------
   Coverage
   ------------------------------------------------------------ */
.coverage {
  list-style: none; padding: 0; margin: 2rem 0 0;
  display: grid; gap: 1.5rem;
}
.coverage li {
  border-top: 1px solid var(--border-dim);
  padding-top: 1.25rem;
}
.coverage li:first-child { border-top: none; padding-top: 0; }

.coverage-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.coverage-name { font-weight: 500; }
.coverage-weight {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}
.coverage-bar {
  height: 3px;
  background: var(--border-dim);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.coverage-bar > span {
  display: block; height: 100%;
  background: var(--accent);
  opacity: 0.65;
}
.coverage-note {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0;
}
.coverage-note em { color: var(--text); font-style: normal; font-weight: 500; }

/* ------------------------------------------------------------
   Principles
   ------------------------------------------------------------ */
.principles {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin: 2rem 0 0;
}
.principles > div {
  padding: 1rem 0 0;
  border-top: 1px solid var(--border-dim);
}
.principles dt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.principles dd {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------
   FAQ
   ------------------------------------------------------------ */
.faq { margin-top: 2rem; }
.faq details {
  border-top: 1px solid var(--border-dim);
  padding: 1rem 0;
}
.faq details:last-child { border-bottom: 1px solid var(--border-dim); }
.faq summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p {
  margin-top: 0.75rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  padding-right: 2rem;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border-dim);
  padding: 3rem 0 3.5rem;
  color: var(--text-mute);
  font-size: 0.85rem;
}
.site-footer .wrap { max-width: var(--content); }
.foot-brand {
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.site-footer nav {
  display: flex; gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.site-footer nav a { color: var(--text-dim); }
.site-footer nav a:hover, .site-footer nav a:focus-visible { color: var(--text); }
.foot-legal { max-width: 40rem; }

/* ------------------------------------------------------------
   Legal pages (privacy, support) — simple content styles
   ------------------------------------------------------------ */
.legal { padding: 3.5rem 0 5rem; }
.legal .wrap { max-width: var(--content); }
.legal h1 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); margin-bottom: 0.5rem; }
.legal .updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-mute);
  margin-bottom: 2.5rem;
}
.legal h2 {
  font-size: 1.15rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.legal p, .legal li { color: var(--text-dim); }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.35rem; }
.legal code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  color: var(--text);
}
