/* ==========================================================================
   CodeChomper design system — shared by index.html and support.html.
   Page-specific rules live in the stylesheet named after the page, which
   loads after this one and may override it.
   ========================================================================== */

/* ==========================================================================
   Tokens
   Dark by design. The brand is near-black with one working accent; there is
   no light variant, and inventing one here would be a different brand.
   ========================================================================== */
:root {
  /* color */
  --background: #080808;
  --bg-surface: #111111;
  --bg-elevated: #1a1a1a;
  --foreground: #dddddd;
  --muted-foreground: #888888;
  --border: #2a2a2a;
  --primary: #8cc641;
  --primary-foreground: #080808;
  --accent: #bf4e30;
  --dark-green: #5e772c;

  /* the two accents carry meaning, not decoration:
     green  = measured, correct, the thing that fits
     orange = warned, nominal, the thing that bites */
  --measured: var(--primary);
  --warned: var(--accent);

  /* type */
  --font-primary: "Archivo Black", Impact, "Arial Black", sans-serif;
  --font-secondary: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* SUBSTITUTION: the source design system defines no monospace face. Code is
     the whole subject of the guide, so a system mono stack stands in. */
  --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --tracking-label: 2px;
  --tracking-section: 3px;

  /* spacing */
  --s-xs: 4px;
  --s-s: 8px;
  --s-m: 16px;
  --s-l: 24px;
  --s-xl: 32px;
  --s-xxl: 48px;

  /* radius — sharp by design */
  --radius-none: 0px;
  --radius-m: 2px;
  --radius-pill: 4px;

  /* layout */
  --nav-h: 64px;
  --side: 272px;
  --measure: 62rem;
  --main-pad: 48px;
  /* Sidebar + measure + the main column's gutters, traveling as one block so a
     wide monitor centers the pair rather than stranding the nav at the far left. */
  --shell: calc(var(--side) + var(--measure) + var(--main-pad) * 2);
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px)
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto
  }

  * {
    animation: none !important;
    transition: none !important
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-secondary);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground)
}

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(140, 198, 65, .35)
}

a:hover {
  opacity: .85
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px
}

/* ============================================================== navbar === */
/* The bar itself spans the window so its rule reaches both edges; its contents
   are centered at the page's own width (each page sets .topbar-inner's
   max-width). */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s-l);
  padding: 0 var(--s-xl);
}

.wordmark {
  font-family: var(--font-primary);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--primary);
  text-transform: uppercase;
  border: 0;
  white-space: nowrap;
}

.wordmark span {
  color: var(--foreground)
}

.topbar-links {
  display: flex;
  gap: var(--s-xl);
  margin-left: auto
}

.topbar-links a {
  font-family: var(--font-primary);
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--foreground);
  border: 0;
}

.topbar-links a.on {
  color: var(--primary)
}

.topbar-cta {
  font-family: var(--font-primary);
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
  border-radius: var(--radius-none);
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s ease;
}

.topbar-cta:hover {
  opacity: .85
}

/* ================================================================ hero === */
/* padding and the h1's size are set per page */
.hero {
  position: relative;
  overflow: hidden
}

.glitch {
  position: absolute;
  top: 24px;
  right: 0;
  width: 280px;
  height: 88px;
  pointer-events: none
}

.glitch i {
  position: absolute;
  display: block
}

.glitch i:nth-child(1) {
  top: 10px;
  left: 0;
  width: 180px;
  height: 6px;
  background: var(--accent);
  opacity: .7
}

.glitch i:nth-child(2) {
  top: 30px;
  left: 40px;
  width: 220px;
  height: 4px;
  background: var(--primary);
  opacity: .6
}

.glitch i:nth-child(3) {
  top: 50px;
  left: 10px;
  width: 140px;
  height: 6px;
  background: var(--accent);
  opacity: .9
}

.glitch i:nth-child(4) {
  top: 68px;
  left: 60px;
  width: 200px;
  height: 3px;
  background: var(--primary);
  opacity: .5
}

@media (max-width:900px) {
  .glitch {
    display: none
  }
}

.eyebrow {
  font-family: var(--font-primary);
  font-size: 11px;
  letter-spacing: var(--tracking-section);
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 var(--s-m);
}

.hero h1 {
  font-family: var(--font-primary);
  font-weight: 400;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: var(--foreground);
  margin: 0 0 var(--s-l);
  max-width: 20ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary)
}

.lede {
  font-size: 19px;
  color: var(--foreground);
  max-width: 56ch;
  margin: 0 0 var(--s-l)
}

.lede b {
  color: var(--primary);
  font-weight: 700
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-m);
  margin: var(--s-l) 0 var(--s-xl)
}

.btn {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 13px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--radius-none);
  cursor: pointer;
  border: 1px solid;
  transition: opacity .15s ease;
}

.btn:hover {
  opacity: .85
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary)
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary)
}

/* ============================================================ sections === */
section {
  padding: var(--s-xxl) 0;
  border-top: 1px solid var(--border)
}

.sec-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-primary);
  font-size: 10px;
  letter-spacing: var(--tracking-section);
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0 0 var(--s-m);
}

.sec-kicker::before {
  content: "";
  width: 6px;
  height: 24px;
  background: var(--primary);
  flex: 0 0 auto
}

section h2 {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--foreground);
  margin: 0 0 var(--s-m);
  letter-spacing: -0.3px;
}

section h3 {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--foreground);
  margin: var(--s-xl) 0 var(--s-m);
}

/* label / description pairs — the brand's callout grid. The column widths and
   gaps are set per page, along with their collapse on narrow screens. */
.callout {
  display: grid;
  margin: var(--s-l) 0;
  font-size: 15px
}

.callout b {
  font-family: var(--font-primary);
  font-size: 10px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--primary);
  padding-top: 3px;
}

.callout span {
  color: var(--muted-foreground)
}

@media (max-width:640px) {
  .callout span {
    margin-bottom: var(--s-s)
  }
}

.note {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  padding: var(--s-m) var(--s-l);
  margin: var(--s-l) 0;
}

.note.warn {
  border-top-color: var(--accent)
}

.note> :last-child {
  margin-bottom: 0
}

.note p {
  font-size: 15px
}

/* ============================================================= footer ==== */
.foot {
  border-top: 1px solid var(--border);
  padding: var(--s-xxl) 0;
  color: var(--muted-foreground);
  font-size: 14px
}

.foot .wordmark {
  display: inline-block;
  margin-bottom: var(--s-m);
  font-size: 18px
}

.foot p {
  max-width: 64ch
}

/* ============================================================== motion === */
.rise {
  opacity: 0;
  transform: translateY(12px);
  animation: rise .5s ease forwards
}

.rise.d1 {
  animation-delay: .06s
}

.rise.d2 {
  animation-delay: .12s
}

.rise.d3 {
  animation-delay: .18s
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none
  }
}

@media (prefers-reduced-motion: reduce) {
  .rise {
    opacity: 1;
    transform: none
  }
}

/* ============================================================ responsive = */
@media (max-width:1000px) {
  .topbar-links {
    display: none
  }

  .topbar-cta {
    margin-left: auto
  }

  .topbar-inner {
    gap: var(--s-s);
    padding: 0 var(--s-m)
  }
}

@media (max-width:520px) {
  body {
    font-size: 16px
  }
}
