/* 3GEEKS — premium dark system */
:root {
  --bg: #07080a;
  --bg-2: #0a0c0d;
  --surface: #0f1113;
  --surface-2: #14171a;
  --surface-3: #1a1d20;
  --line: rgba(255, 255, 255, 0.055);
  --line-2: rgba(255, 255, 255, 0.10);
  --line-3: rgba(255, 255, 255, 0.18);

  --text: #f1f3ef;
  --text-2: #c9cdc7;
  --text-dim: #8b908b;
  --text-quiet: #5a5e5a;
  --text-faint: #3a3d3a;

  --accent: #b8ff5e;
  --accent-2: #d4ff8f;
  --accent-deep: #5b8a25;
  --accent-glow: rgba(184, 255, 94, 0.22);
  --accent-soft: rgba(184, 255, 94, 0.08);
  --accent-line: rgba(184, 255, 94, 0.35);

  /* Theme channel tokens — swapped per theme so the many inline rgba(...)
     overlays flip cleanly. In dark mode these equal the original literals,
     so dark mode renders pixel-identical to before. */
  --ov-rgb: 255, 255, 255;   /* subtle surface/border/hover overlays */
  --ac-rgb: 184, 255, 94;    /* accent tints, borders and glows */
  --ink-rgb: 7, 8, 10;       /* deep background used for glass + scrims */
  --glass-bg: rgba(7, 8, 10, 0.78);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --font-sans: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
}

/* ===== Light theme — warm ivory "command center" =====
   Soft ivory base, charcoal text, translucent white glass, subtle gray
   hairlines, the same 3GEEKS green at a deeper-but-vivid value (readable on
   light) with a softer, cleaner glow. Dark stays the default. */
html[data-theme="light"] {
  --bg: #f4f2ea;
  --bg-2: #efece2;
  --surface: #fbfaf6;
  --surface-2: #f2f0e8;
  --surface-3: #e9e6db;
  --line: rgba(28, 30, 24, 0.085);
  --line-2: rgba(28, 30, 24, 0.14);
  --line-3: rgba(28, 30, 24, 0.22);

  --text: #1b1e19;
  --text-2: #3d4138;
  --text-dim: #6c7064;
  --text-quiet: #8f9385;
  --text-faint: #bcbcae;

  --accent: #5aa70f;
  --accent-2: #6fbf2c;
  --accent-deep: #3c7a0a;
  --accent-glow: rgba(95, 175, 25, 0.14);
  --accent-soft: rgba(95, 175, 25, 0.10);
  --accent-line: rgba(95, 175, 25, 0.30);

  --ov-rgb: 28, 30, 24;        /* overlays become subtle dark tints */
  --ac-rgb: 95, 175, 25;       /* accent tints/glows shift to readable green */
  --ink-rgb: 246, 244, 237;    /* glass + scrims become translucent ivory */
  --glass-bg: rgba(250, 249, 244, 0.72);
}

/* Smooth, calm cross-fade when toggling (variables drive child colors). */
html { transition: background-color 0.35s ease, color 0.35s ease; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

/* ===== Type primitives ===== */

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mono-tight { font-family: var(--font-mono); letter-spacing: -0.01em; }

.tinylabel {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-quiet);
}

.tinylabel .em { color: var(--text-2); }
.tinylabel .ac { color: var(--accent); }

.section-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-quiet);
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-index .num { color: var(--accent); }
.section-index .dash { color: var(--text-faint); letter-spacing: 0; }
.section-index .ttl { color: var(--text-2); }

/* ===== Atmosphere ===== */

.glow-radial {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
}

.scanline-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(var(--ov-rgb),0.025) 1px, transparent 1px);
  background-size: 80px 100%;
}

.dot-grid {
  background-image: radial-gradient(rgba(var(--ov-rgb),0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(.2,.7,.3,1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0d05;
  box-shadow:
    0 0 0 1px rgba(var(--ac-rgb),0.6),
    0 0 28px rgba(var(--ac-rgb),0.28),
    inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(var(--ac-rgb),0.8), 0 0 40px rgba(var(--ac-rgb),0.45), inset 0 1px 0 rgba(255,255,255,0.5); }
.btn-primary .arrow { background: #0a0d05; color: var(--accent); }

/* Light mode: keep the green button premium but calm the glow. */
html[data-theme="light"] .btn-primary {
  color: #0c1505;
  box-shadow:
    0 0 0 1px rgba(var(--ac-rgb),0.45),
    0 1px 2px rgba(28,30,24,0.10),
    0 0 16px rgba(var(--ac-rgb),0.16),
    inset 0 1px 0 rgba(255,255,255,0.45);
}
html[data-theme="light"] .btn-primary:hover {
  box-shadow:
    0 0 0 1px rgba(var(--ac-rgb),0.6),
    0 3px 10px rgba(28,30,24,0.12),
    0 0 22px rgba(var(--ac-rgb),0.24),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.btn-ghost {
  background: rgba(var(--ov-rgb),0.03);
  color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: rgba(var(--ov-rgb),0.06); border-color: var(--line-3); }

.btn .arrow {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
}

/* ===== Card / surface ===== */

.surface {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hairline { border-top: 1px solid var(--line); }
.hairline-b { border-bottom: 1px solid var(--line); }

/* ===== Reusable bits ===== */

.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--text-dim);
}

.dotlive {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(var(--ac-rgb),0.18);
  display: inline-block;
}

/* ===== Theme toggle — futuristic icon pill ===== */
.theme-toggle {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(var(--ov-rgb), 0.03);
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .22s ease, transform .18s cubic-bezier(.2,.7,.3,1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-line), 0 0 18px var(--accent-glow);
  transform: translateY(-1px);
}
.theme-toggle:active { transform: translateY(0); }
.theme-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-line), 0 0 18px var(--accent-glow); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .ic { position: absolute; transition: opacity .2s ease, transform .25s cubic-bezier(.2,.7,.3,1); }
/* Dark shows the sun (tap → light). Light shows the moon (tap → dark). */
html[data-theme="light"] .theme-toggle .ic-sun  { opacity: 0; transform: rotate(-90deg) scale(.6); }
html[data-theme="light"] .theme-toggle .ic-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="dark"]  .theme-toggle .ic-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
html[data-theme="dark"]  .theme-toggle .ic-sun  { opacity: 1; transform: rotate(0) scale(1); }

/* ===== Iframes inside canvas (DCArtboard hosts) ===== */
iframe.artboard-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg);
}

/* ===== Website Transformation Report (scanner second layer) ===== */
.tr-report { margin-top: 26px; }
.tr-report[hidden] { display: none; }
.tr-report:not([hidden]) { animation: trIn .42s cubic-bezier(.2,.7,.3,1); }
@keyframes trIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.tr-inner {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.5), 0 0 0 1px rgba(var(--ov-rgb),0.02);
  overflow: hidden;
}
.tr-head {
  padding: 30px 32px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(var(--ac-rgb), 0.045);
}
.tr-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.tr-title { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-top: 12px; color: var(--text); line-height: 1.1; }
.tr-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-top: 10px; }
.tr-meta .ac { color: var(--accent); }

.tr-sec { padding: 24px 32px; border-top: 1px solid var(--line); }
.tr-sec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tr-num { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .08em; }
.tr-sec-h h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin: 0; flex: 1; }
.tr-sev { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap; }
.tr-sev-crit { color: #ff8a7a; border-color: rgba(255,138,122,.42); background: rgba(255,138,122,.09); }
.tr-sev-warn { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-soft); }
.tr-sev-ok   { color: var(--text-dim); }

.tr-sec-b { color: var(--text-2); font-size: 14.5px; line-height: 1.62; }
.tr-sec-b p { margin: 0 0 10px; }
.tr-sec-b p:last-child { margin-bottom: 0; }
.tr-sec-b b { color: var(--text); font-weight: 600; }

.tr-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.tr-list li { position: relative; padding-left: 20px; color: var(--text-2); }
.tr-list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.tr-list li b { color: var(--text); font-weight: 600; }

.tr-phase { padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: rgba(var(--ov-rgb),0.015); }
.tr-phase:last-child { margin-bottom: 0; }
.tr-phase-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.tr-phase-n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .06em; }
.tr-phase-t { font-weight: 600; font-size: 14px; color: var(--text); }
.tr-phase .tr-list li::before { background: var(--accent-2); }

.tr-cta-row { padding: 22px 32px 30px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.tr-note { font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: var(--text-quiet); padding: 0 32px 26px; }

/* Mobile build (390) — tighten the padding. */
@media (max-width: 480px) {
  .tr-head { padding: 22px 18px 18px; }
  .tr-title { font-size: 23px; }
  .tr-sec { padding: 20px 18px; }
  .tr-cta-row { padding: 20px 18px 24px; }
  .tr-note { padding: 0 18px 22px; }
}
