/* ===================================================================
   DLG Labs - design system tokens + base (site-v2)
   Offensive-security consultancy. New look only: muted teal accent,
   flat surfaces, editorial dark palette. No neon, no glow, no gradients.
   Single source of truth for :root tokens shared across all pages.
   =================================================================== */

/* Self-hosted variable fonts (latin subset, woff2, SIL Open Font License):
   Inter (body), Space Grotesk (headings), JetBrains Mono (mono/labels).
   Weight ranges match the wght axis each file actually carries. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.c9407645.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-var-latin.a0d054c4.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-var-latin.2c32b9b3.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* --- base surfaces --- */
  --bg:       #0a0d11;              /* landing / global background */
  --bg2:      #0c1119;              /* services section background */
  --bg-room:  #05070b;             /* service room (immersive) background */

  /* --- text --- */
  --text:     #e7ebf0;             /* primary text */
  --muted:    #b0bcc7;             /* secondary text */
  --dim:      #97a5b3;             /* tertiary/labels - raised from #66788a for WCAG AA at small text (~6.3:1 on --bg) */

  /* --- accent (brand) --- */
  --accent:    #7fb0a6;            /* muted teal - flat, no gradient */
  --on-accent: #04120c;           /* text/glyphs sitting on --accent */

  /* --- structure --- */
  --line: rgba(255, 255, 255, .13); /* hairline borders/dividers */

  /* --- per-service-type accents (active row, nexus node, room accent) --- */
  --t-redteam:    #d75a4f;         /* Red Team / Pen Testing */
  --t-ai:         #9d7ce0;         /* AI & LLM */
  --t-social:     #d98ac4;         /* Phishing / Social Engineering */
  --t-reviews:    #4fb0a0;         /* Security Reviews */
  --t-sbd:        #5cb96b;         /* Security by Design */
  --t-threat:     #5a9fd8;         /* Threat Modeling */
  --t-risk:       #e0a24c;         /* Risk */
  --t-compliance: #d4af4e;         /* Compliance */
  --t-ir:         #e07a4c;         /* Incident Response */
  --t-aidev:      #6f9bd8;         /* AI Development */

  /* How hard the accent blooms behind a service room's diagram. On night it is
     depth; on paper the same amount is a stain, so the light theme spends far less. */
  --room-bloom: 14%;
  --room-bloom-2: 13%;

  /* --- radii --- */
  --radius-btn:  2px;              /* buttons */
  --radius-chip: 3px;              /* chips / small labels */
  --radius-row:  8px;              /* service rows / cards */

  /* --- typography --- */
  --font-heading: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- layout --- */
  --container-max: 1200px;
  --container-pad: clamp(20px, 6vw, 96px);
}

/* ===================== Light theme =====================
   Dark is the default and the only theme a visitor gets until they ask for
   this one: theme.js sets data-theme on <html> before first paint, from the
   remembered choice. prefers-color-scheme is deliberately NOT consulted, so
   the site opens dark for everybody, as specified.

   The surface is a warm paper rather than white, and the ink a near-black with
   a little blue in it: the register of a printed prospectus, not of a UI. Every
   pair below clears WCAG AA at its size (measured, not assumed): text 15.5:1,
   muted 7.4:1, dim 5.0:1, accent 5.3:1, and each service accent >= 4.5:1 on
   paper. The service accents are the dark-theme hues walked down in luminance
   until they clear that bar, so the colour coding survives the switch. */
:root[data-theme="light"] {
  --bg:       #f2efe9;             /* warm paper */
  --bg2:      #e9e5dd;             /* services band: a shade deeper, same paper */
  --bg-room:  #f6f3ee;             /* service room */

  --text:     #14181d;
  --muted:    #454e59;
  --dim:      #5c6773;

  --accent:    #2e6d61;            /* the teal taken down to read on paper */
  --on-accent: #f6f3ee;

  --line: rgba(20, 24, 29, .16);   /* ink hairline; the dark theme's is white */

  --t-redteam:    #a6463d;
  --t-ai:         #6f589e;
  --t-social:     #865579;
  --t-reviews:    #316e64;
  --t-sbd:        #387041;
  --t-threat:     #3b688d;
  --t-risk:       #825e2c;
  --t-compliance: #77632c;
  --t-ir:         #975233;
  --t-aidev:      #4a6790;

  --room-bloom: 5%;
  --room-bloom-2: 4%;
}

/* ===================== Reset ===================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }

a { color: inherit; text-decoration: none; }

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

button { font-family: inherit; }

/* ===================== Container ===================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ===================== Buttons ===================== */
/* Flat by design: no gradient, no glow, no box-shadow, no shine sweep. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease, filter .2s ease;
}

.btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  color: var(--on-accent);
  border-color: var(--accent);
  filter: brightness(1.08);
}

.btn:disabled,
.btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
  filter: none;
}

/* ===================== Focus + selection ===================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* ===================== Reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
