/* ============================================================
   ZERONULL — styles.css
   ============================================================ */

/* --- TOKENS ------------------------------------------------- */
:root {
  --bg:          #0d0d0d;
  --bg-surface:  #141414;
  --bg-raised:   #1c1c1c;
  --text:        #e8e5e0;
  --text-muted:  #8a8785;
  --text-dim:    #4a4845;
  --accent:      #a8e000;
  --accent-dim:  #6b9100;
  --border:      #232220;
  --border-mid:  #2e2c2a;

  --font-sans:  'Space Grotesk', system-ui, sans-serif;
  --font-mono:  'IBM Plex Mono', 'Courier New', monospace;

  --nav-h:      64px;
  --max-w:      1100px;
  --section-py: clamp(80px, 12vw, 160px);
  --gap:        clamp(24px, 4vw, 48px);
}

/* --- RESET -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

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

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(24px, 6vw, 64px);
}

.section {
  padding-block: var(--section-py);
}

.section-anchor {
  /* scroll-padding-top on <html> handles the fixed nav offset */
}

/* --- TYPOGRAPHY -------------------------------------------- */
h1 {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: clamp(24px, 3vw, 40px);
}

h2 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: clamp(32px, 5vw, 64px);
}

h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

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

/* Section coordinate label */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: clamp(24px, 4vw, 48px);
}

/* --- LEITMOTIFS -------------------------------------------- */
/* Both "Less friction…" and "Think longer…" share this treatment */
.leitmotif {
  font-size: clamp(22px, 3.5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--accent);
  margin-block: clamp(40px, 6vw, 80px);
  position: relative;
  padding-left: clamp(20px, 3vw, 32px);
}

.leitmotif::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.1em;
  width: 2px;
  background: var(--accent);
  opacity: 0.5;
}

/* --- NAVIGATION -------------------------------------------- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

#nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(24px, 6vw, 64px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.2s;
}

.nav-logo:hover { color: var(--accent); }

.logo-cursor {
  color: var(--accent);
  animation: blink 1.2s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 40px);
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover { color: var(--text); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.2s;
}

.nav-links a:hover::after { width: 100%; }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 6px 14px;
  transition: background 0.2s, color 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

.nav-cta::after { display: none; }

.nav-links a.active { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-mid);
  color: var(--text);
  width: 36px; height: 36px;
  font-size: 20px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  align-items: center;
  justify-content: center;
}

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

/* --- HERO -------------------------------------------------- */
.section--hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + var(--section-py));
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 22px);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.capabilities span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.capabilities .sep {
  color: var(--text-dim);
}

/* --- CTA BUTTON -------------------------------------------- */
.cta-primary {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.4vw, 14px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: clamp(14px, 2vw, 18px) clamp(24px, 3vw, 36px);
  transition: background 0.2s, color 0.2s;
}

/* ">" prefix — always in DOM, hidden via width/opacity so hover has no layout shift */
.cta-primary .cta-arrow {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.cta-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.cta-primary:hover .cta-arrow {
  max-width: 2ch;
  opacity: 1;
}

/* --- PROBLEM ----------------------------------------------- */
.problem-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: clamp(40px, 6vw, 72px);
}

.problem-text p {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  color: var(--text-muted);
}

.problem-text p:first-child {
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--text);
  font-style: italic;
}

.problem-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border-mid);
  padding: 8px 14px;
  transition: border-color 0.2s, color 0.2s;
}

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

/* --- TERMINAL ---------------------------------------------- */
.terminal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin-bottom: 0;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.t-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-mid);
}

.terminal-body {
  padding: clamp(20px, 3vw, 32px);
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.4vw, 14px);
  line-height: 1.9;
  white-space: pre;
  overflow-x: auto;
}

.terminal-body code {
  font-family: inherit;
  background: none;
}

.t-prompt { color: var(--accent); }
.t-out    { color: var(--text-muted); }
.t-val    { color: var(--accent); }
.t-indent { color: var(--text); padding-left: 2ch; }
.t-step   { color: var(--text); }
.t-num    { color: var(--accent); margin-right: 1ch; }
.t-comment{ color: var(--text-dim); }

/* --- WHY --------------------------------------------------- */
.why-body {
  max-width: 700px;
  margin-bottom: 0;
}

.why-body p {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-muted);
  line-height: 1.7;
}

.why-close {
  max-width: 640px;
  color: var(--text-muted);
  font-size: clamp(16px, 2vw, 19px);
}

/* --- BELIEFS ----------------------------------------------- */
.beliefs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.belief {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.belief:hover {
  border-color: var(--border-mid);
}

.belief p {
  color: var(--text-muted);
  line-height: 1.65;
}

/* --- PROCESS (TERMINAL) ------------------------------------ */
.process-note {
  margin-top: clamp(32px, 4vw, 48px);
  font-size: clamp(16px, 2vw, 20px);
  font-style: italic;
  color: var(--text-muted);
  padding-left: clamp(20px, 3vw, 32px);
  border-left: 2px solid var(--border-mid);
}

/* --- SERVICES ---------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service {
  background: var(--bg);
  padding: clamp(28px, 4vw, 48px);
  transition: background 0.2s;
}

.service:hover {
  background: var(--bg-surface);
}

.service p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.service-tags {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-dim) !important;
  line-height: 1.8;
  margin-bottom: 0 !important;
}

/* --- WHO WE WORK WITH -------------------------------------- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: clamp(40px, 5vw, 64px);
}

.client-type {
  padding-top: clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--border);
}

.client-type p {
  color: var(--text-muted);
}

.clients-close {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- SELECTED WORK ----------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.work-card {
  background: var(--bg);
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}

.work-card:hover {
  background: var(--bg-surface);
}

.work-case-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.work-card h3 {
  font-family: var(--font-sans);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
  flex-grow: 0;
}

.work-excerpt {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.work-details {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}

.work-details li {
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.work-details li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border-mid);
}

.work-quote {
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.work-outcomes {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  line-height: 1.9;
  margin-bottom: 24px;
}

.work-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
  transition: letter-spacing 0.2s;
  display: inline-block;
}

.work-link:hover {
  letter-spacing: 0.16em;
}

.work-card--lab {
  background: var(--bg-surface);
}

.work-card--lab:hover {
  background: var(--bg-raised);
}

.work-lab-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: auto;
}

/* --- WHY ZERONULL ------------------------------------------ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: clamp(40px, 6vw, 72px);
}

.value {
  background: var(--bg);
  padding: clamp(24px, 3vw, 40px) clamp(20px, 2.5vw, 32px);
  transition: background 0.2s;
}

.value:hover {
  background: var(--bg-surface);
}

.value p {
  color: var(--text-muted);
  font-size: 14px;
}

.values-close {
  max-width: 540px;
}

.values-close p {
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.values-close p:last-child {
  color: var(--text);
}

/* --- BEHIND ZERONULL --------------------------------------- */
.behind-body {
  max-width: 680px;
  margin-bottom: clamp(48px, 7vw, 80px);
}

.behind-body p {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-muted);
  line-height: 1.75;
}

.lab-block {
  border: 1px solid var(--border);
  padding: clamp(24px, 3.5vw, 48px);
  background: var(--bg-surface);
  max-width: 680px;
}

.lab-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.lab-desc {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.lab-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}

/* --- FINAL CTA --------------------------------------------- */
.section--cta {
  border-top: 1px solid var(--border);
  text-align: left;
}

.cta-sub {
  font-size: clamp(18px, 2.5vw, 28px);
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.cta-note {
  margin-top: clamp(20px, 3vw, 32px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* --- FOOTER ------------------------------------------------ */
.footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(40px, 6vw, 64px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.footer-logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.footer-location {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.footer-legal {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-self: end;
  align-self: end;
}

.footer-legal a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-legal a:hover { color: var(--text-muted); }

.footer-legal span {
  color: var(--text-dim);
  font-size: 11px;
}

/* --- SECTION BORDER SEPARATORS ----------------------------- */
#problem, #why, #beliefs, #process {
  border-bottom: 1px solid var(--border);
}

#clients, #selected-work {
  border-bottom: 1px solid var(--border);
}

#why-zeronull, #behind {
  border-bottom: 1px solid var(--border);
}

/* --- FOCUS STYLES (accessibility) -------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- RESPONSIVE -------------------------------------------- */
@media (max-width: 900px) {
  .beliefs-grid       { grid-template-columns: 1fr; }
  .services-grid      { grid-template-columns: 1fr; }
  .clients-grid       { grid-template-columns: 1fr; }
  .work-grid          { grid-template-columns: 1fr; }
  .values-grid        { grid-template-columns: 1fr 1fr; }
  .footer-inner       { grid-template-columns: 1fr 1fr; }
  .footer-legal       { justify-self: start; }
  .problem-body       { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links         { display: none; flex-direction: column; }
  .nav-links.open    { display: flex; }
  .nav-toggle        { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 24px clamp(24px, 6vw, 64px);
    gap: 20px;
  }

  .nav-links a { font-size: 13px; }

  .values-grid        { grid-template-columns: 1fr; }
  .footer-inner       { grid-template-columns: 1fr; gap: 32px; }
  .footer-legal       { justify-self: start; }

  .terminal-body      { font-size: 11px; }

  .section--hero      { padding-top: calc(var(--nav-h) + 48px); min-height: auto; }
}

@media (max-width: 480px) {
  .capabilities       { gap: 6px 12px; }
  .cta-primary        { width: 100%; justify-content: center; }
}

/* --- REDUCED MOTION ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html                { scroll-behavior: auto; }
  .logo-cursor        { animation: none; opacity: 1; }
  *                   { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
