/* Scot Richard — AI Agency · phosphor terminal system */
:root {
  --void: #030504;
  --void-2: #070b08;
  --panel: #0a120e;
  --panel-2: #0e1a13;
  --grid: rgba(57, 255, 120, 0.06);
  --phosphor: #39ff78;
  --phosphor-dim: #1fa34d;
  --phosphor-soft: rgba(57, 255, 120, 0.72);
  --phosphor-glow: rgba(57, 255, 120, 0.22);
  --amber: #f0b429;
  --cyan: #5eead4;
  --text: #c8e6d0;
  --muted: rgba(200, 230, 208, 0.55);
  --line: rgba(57, 255, 120, 0.18);
  --danger: #ff5c5c;
  --max: 1120px;
  --nav-h: 3.75rem;
  --font-mono: "IBM Plex Mono", "ui-monospace", monospace;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
}

body::before {
  /* subtle CRT vignette */
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

body::after {
  /* scanlines */
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 81;
  opacity: 0.07;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.45) 3px
  );
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    display: none;
  }
}

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

a {
  color: var(--phosphor);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #9dffb8;
}

:focus-visible {
  outline: 1px solid var(--phosphor);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* matrix canvas */
#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.28;
  pointer-events: none;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

/* —— Nav —— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.site-header.is-scrolled {
  background: rgba(3, 5, 4, 0.88);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--phosphor);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand .cursor {
  display: inline-block;
  width: 0.55rem;
  height: 1em;
  background: var(--phosphor);
  box-shadow: 0 0 10px var(--phosphor-glow);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.4rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--phosphor);
}

.nav-cta {
  border: 1px solid var(--phosphor-dim);
  padding: 0.45rem 0.85rem;
  color: var(--phosphor) !important;
  box-shadow: 0 0 16px var(--phosphor-glow);
}

.nav-cta:hover {
  background: rgba(57, 255, 120, 0.1);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 2.4rem;
  height: 2.4rem;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--phosphor);
  cursor: pointer;
  padding: 0.45rem;
}

.nav-toggle span {
  display: block;
  height: 1px;
  background: currentColor;
}

@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

.nav-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0;
  background: rgba(3, 5, 4, 0.97);
  z-index: 49;
  padding: 1.5rem;
  border-top: 1px solid var(--line);
}

.nav-drawer.is-open {
  display: block;
}

.nav-drawer a {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* —— Type —— */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
}

h1,
h2,
h3 {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--phosphor);
  margin: 0;
}

h1 {
  font-size: clamp(1.85rem, 5vw, 3.15rem);
  text-shadow: 0 0 28px var(--phosphor-glow);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

h3 {
  font-size: 1.05rem;
  color: var(--text);
}

.lede {
  color: var(--muted);
  max-width: 38rem;
  font-size: 1.08rem;
}

.muted {
  color: var(--muted);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--phosphor);
  color: var(--void);
  background: var(--phosphor);
  cursor: pointer;
  box-shadow: 0 0 22px var(--phosphor-glow);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn:hover {
  background: #9dffb8;
  color: var(--void);
  box-shadow: 0 0 32px rgba(57, 255, 120, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--phosphor);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(57, 255, 120, 0.08);
  color: var(--phosphor);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* —— Hero terminal —— */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2.5rem) 0 4rem;
}

.terminal {
  width: 100%;
  max-width: 820px;
  background: linear-gradient(160deg, var(--panel) 0%, var(--void-2) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 60px rgba(57, 255, 120, 0.08),
    inset 0 0 80px rgba(57, 255, 120, 0.03);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.terminal-bar .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--phosphor-dim);
  box-shadow: 0 0 8px var(--phosphor-glow);
}

.terminal-body {
  padding: clamp(1.25rem, 3vw, 2rem);
  font-family: var(--font-mono);
  font-size: clamp(0.82rem, 1.6vw, 0.95rem);
  line-height: 1.7;
}

.t-line {
  margin: 0 0 0.35rem;
  color: var(--muted);
}

.t-line .prompt {
  color: var(--phosphor-dim);
}

.t-line .cmd {
  color: var(--phosphor);
}

.t-line .ok {
  color: var(--cyan);
}

.t-line .warn {
  color: var(--amber);
}

.t-output {
  margin: 1.25rem 0 0.5rem;
}

.t-output h1 {
  margin-bottom: 0.75rem;
}

.t-output .lede {
  font-family: var(--font-sans);
  color: var(--text);
  opacity: 0.85;
}

.typing-caret::after {
  content: "▋";
  color: var(--phosphor);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

/* status strip */
.status-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 2rem;
}

@media (min-width: 720px) {
  .status-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

.status-cell {
  background: var(--void-2);
  padding: 1rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.status-cell span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.65rem;
}

.status-cell strong {
  color: var(--phosphor);
  font-weight: 500;
  font-size: 0.92rem;
}

/* —— Sections —— */
.section {
  position: relative;
  z-index: 2;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 0.75rem;
}

.section-head p {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.panel-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 780px) {
  .panel-grid.two {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
  .panel-grid.four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .panel-grid.four {
    grid-template-columns: repeat(4, 1fr);
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.5rem 1.4rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.panel:hover {
  border-color: rgba(57, 255, 120, 0.4);
  box-shadow: 0 0 28px rgba(57, 255, 120, 0.08);
  transform: translateY(-2px);
}

.panel .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  margin-bottom: 0.85rem;
}

.panel h3 {
  font-family: var(--font-mono);
  color: var(--phosphor);
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.panel ul {
  margin: 0.85rem 0 0;
  padding: 0 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel li {
  margin-bottom: 0.35rem;
}

/* stack chips */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  color: var(--phosphor);
  background: rgba(57, 255, 120, 0.04);
}

.chip em {
  font-style: normal;
  color: var(--muted);
  margin-left: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.chip-core {
  border-color: var(--phosphor-dim);
  box-shadow: 0 0 16px var(--phosphor-glow);
}

/* training fit */
.fit-block {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
}

.fit-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 780px) {
  .fit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.fit-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.4rem 1.35rem;
}

.fit-card .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.fit-card h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
}

.fit-card ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.fit-card li {
  margin-bottom: 0.5rem;
}

.fit-card li:last-child {
  margin-bottom: 0;
}

.fit-yes {
  border-color: rgba(57, 255, 120, 0.35);
  box-shadow: inset 3px 0 0 var(--phosphor-dim);
}

.fit-yes .tag,
.fit-yes h3 {
  color: var(--phosphor);
}

.fit-no {
  border-color: rgba(240, 180, 41, 0.35);
  box-shadow: inset 3px 0 0 var(--amber);
}

.fit-no .tag,
.fit-no h3 {
  color: var(--amber);
}

/* process */
.path {
  border-top: 1px solid var(--line);
}

.path-row {
  display: grid;
  gap: 0.5rem 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
}

@media (min-width: 720px) {
  .path-row {
    grid-template-columns: 7rem 1fr 9rem;
    align-items: baseline;
  }
}

.path-row .phase {
  color: var(--phosphor);
  font-size: 0.95rem;
}

.path-row p {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: 0.98rem;
}

.path-row .meta {
  color: var(--phosphor-dim);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* manifesto */
.manifesto {
  border: 1px solid var(--line);
  background: linear-gradient(
    135deg,
    rgba(57, 255, 120, 0.06),
    transparent 55%
  );
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.manifesto blockquote {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.45;
  color: var(--phosphor-soft);
}

.manifesto cite {
  display: block;
  margin-top: 1.25rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* page hero */
.page-hero {
  padding: calc(var(--nav-h) + 3rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  margin-top: 0.65rem;
}

.page-hero .lede {
  margin-top: 0.9rem;
}

/* forms */
.form {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}

.form-row.two {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
select,
textarea {
  font: inherit;
  font-family: var(--font-sans);
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  background: var(--void);
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  width: 100%;
  border-radius: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--phosphor-dim);
  box-shadow: 0 0 0 1px var(--phosphor-dim), 0 0 18px var(--phosphor-glow);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-note {
  font-size: 0.88rem;
  color: var(--muted);
}

.form-success,
.form-error {
  display: none;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
  max-width: 36rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.form-success {
  border-color: var(--phosphor-dim);
  color: var(--phosphor);
  background: rgba(57, 255, 120, 0.06);
}

.form-error {
  border-color: var(--danger);
  color: #ffb4b4;
  background: rgba(255, 92, 92, 0.08);
}

.form-success.is-visible,
.form-error.is-visible {
  display: block;
}

/* two col */
.two-col {
  display: grid;
  gap: 2rem;
}

@media (min-width: 860px) {
  .two-col {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: start;
  }
}

.code-panel {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.25rem;
  color: var(--muted);
}

.code-panel .g {
  color: var(--phosphor);
}
.code-panel .c {
  color: var(--cyan);
}
.code-panel .a {
  color: var(--amber);
}

/* footer */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h3 {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  margin: 0 0 0.75rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.site-footer a {
  text-decoration: none;
  color: var(--text);
}

.site-footer a:hover {
  color: var(--phosphor);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

/* reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .brand .cursor,
  .typing-caret::after {
    animation: none;
  }
  .panel:hover {
    transform: none;
  }
}
