/* Aphid Systems — no external dependencies; system fonts only. */

:root {
  --bg: #0b0510;
  --bg-alt: #110818;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f1ebf4;
  --muted: #a798af;
  --acid: #d4ff5a;
  --acid-dim: rgba(212, 255, 90, 0.14);
  --magenta: #ff2e88;
  --violet: #8b3dff;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain over everything, very subtle */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
img { display: block; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.8rem; }

.eyebrow {
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acid);
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: "// "; color: var(--magenta); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 5, 16, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.nav nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 30px); font-size: 0.92rem; }
.nav nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--text); }
.nav nav a.nav-cta {
  color: var(--bg);
  background: var(--acid);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 600;
}
.nav nav a.nav-cta:hover { color: var(--bg); box-shadow: 0 0 22px rgba(212, 255, 90, .45); }

@media (max-width: 680px) {
  .nav nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 340px) { .brand img { display: none; } }
@media (max-width: 420px) {
  .brand { font-size: 15px; gap: 8px; }
  .nav nav a.nav-cta { padding: 6px 12px; font-size: .85rem; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(255, 46, 136, 0.30), transparent 70%),
    radial-gradient(45% 55% at 92% 85%, rgba(139, 61, 255, 0.28), transparent 70%),
    radial-gradient(40% 50% at 10% 0%, rgba(139, 61, 255, 0.16), transparent 70%);
}
#cube {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
}
.hero-inner { position: relative; padding-top: 72px; padding-bottom: 96px; }
.hero h1 {
  font-size: clamp(2.15rem, 6.4vw, 5.2rem);
  max-width: 13ch;
  margin-bottom: 1.5rem;
}
.hl {
  background: linear-gradient(92deg, var(--acid), #f6ffcf 45%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--acid); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 0 34px rgba(212, 255, 90, .5); }
.btn-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); }

.profiler {
  margin-top: 2.8rem;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(212, 255, 90, .16);
  border-radius: 12px;
  background: rgba(20, 10, 26, .6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 46, 136, .06), 0 12px 40px rgba(255, 46, 136, .10), inset 0 1px 0 rgba(255, 255, 255, .04);
  font: .7rem/1 var(--mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  cursor: help;
}
.prof-tag { display: flex; align-items: center; gap: 8px; color: var(--acid); text-transform: uppercase; letter-spacing: .12em; }
#prof { display: block; width: 100px; height: 22px; }
.prof-total b { color: var(--text); font-size: .95rem; font-weight: 600; display: inline-block; min-width: 2.6em; text-align: right; }
.prof-budget { color: var(--acid); text-shadow: 0 0 12px rgba(212, 255, 90, .35); }
.prof-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.prof-legend li { white-space: nowrap; }
.prof-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.prof-legend b { color: var(--text); font-weight: 500; display: inline-block; min-width: 2.3em; text-align: right; margin-left: 2px; }
.pf-0 i { background: #d4ff5a; box-shadow: 0 0 8px #d4ff5a; }
.pf-1 i { background: #ff2e88; box-shadow: 0 0 8px #ff2e88; }
.pf-2 i { background: #a66bff; box-shadow: 0 0 8px #a66bff; }
.pf-3 i { background: #5fd4ff; box-shadow: 0 0 8px #5fd4ff; }
.pf-4 i { background: #f1ebf4; box-shadow: 0 0 8px rgba(241, 235, 244, .6); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px var(--acid); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 900px) {
  #cube { width: 100%; opacity: .45; }
  .hero { min-height: auto; }
}

/* ---------- ticker ---------- */

.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-alt);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: scroll 40s linear infinite;
}
.ticker span {
  font: 500 0.8rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 18px 28px;
  white-space: nowrap;
}
.ticker span::after { content: "◆"; color: var(--magenta); margin-left: 56px; font-size: .6rem; vertical-align: 2px; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track, .dot { animation: none; } }

/* ---------- clients ---------- */

.clients { padding: clamp(56px, 8vw, 96px) 0 0; text-align: center; }
.clients-inner { display: flex; flex-direction: column; align-items: center; }
.clients-line {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--muted);
  max-width: 28ch;
}
.clients-note { margin-top: 1rem; font: .82rem/1.5 var(--mono); color: var(--muted); opacity: .8; }

/* ---------- sections ---------- */

.section { padding: clamp(72px, 11vw, 136px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); max-width: 40rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
.section-head .muted { margin-top: 1.2rem; font-size: 1.08rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.cards-cap { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .cards-cap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-cap { grid-template-columns: 1fr; } }

.card-cta {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-style: dashed;
  border-color: rgba(212, 255, 90, .3);
  background: linear-gradient(160deg, rgba(212, 255, 90, .06), rgba(255, 46, 136, .05) 70%, transparent);
}
.card-cta-link { margin-top: auto; padding-top: 1.4rem; font: 600 .9rem/1 var(--mono); color: var(--acid); }

.card {
  position: relative;
  padding: 30px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background .25s, border-color .25s, transform .25s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--acid), var(--magenta), transparent);
  opacity: 0;
  transition: opacity .25s;
}
.card:hover { background: var(--surface-hover); border-color: rgba(255, 255, 255, .16); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.28rem; margin-bottom: .8rem; }
.card p { color: var(--muted); font-size: .97rem; }

.tags { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font: .72rem/1 var(--mono);
  color: var(--acid);
  background: var(--acid-dim);
  padding: 6px 9px;
  border-radius: 6px;
}

/* approach */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.principles { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.principles li {
  counter-increment: p;
  position: relative;
  padding: 24px 0 24px 64px;
  border-top: 1px solid var(--line);
}
.principles li:last-child { border-bottom: 1px solid var(--line); }
.principles li::before {
  content: counter(p, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 27px;
  font: 500 .8rem/1 var(--mono);
  color: var(--acid);
}
.principles h3 { font-size: 1.15rem; margin-bottom: .45rem; }
.principles p { color: var(--muted); }

/* engagements */
.plan-kind { font: .74rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); margin-bottom: 1rem; }
.plan-feature {
  border-color: rgba(212, 255, 90, .35);
  background: linear-gradient(160deg, rgba(212, 255, 90, .07), rgba(255, 46, 136, .05) 60%, transparent);
}

.steps {
  list-style: none;
  margin: clamp(56px, 8vw, 88px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
.steps li { border-top: 2px solid var(--line); padding-top: 18px; position: relative; }
.steps li::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--acid);
  box-shadow: 0 0 12px var(--acid);
}
.steps span { font: .78rem/1 var(--mono); color: var(--muted); }
.steps h3 { font-size: 1.05rem; margin: .7rem 0 .4rem; }
.steps p { color: var(--muted); font-size: .94rem; }

/* contact */
.contact {
  text-align: center;
  background:
    radial-gradient(50% 80% at 50% 100%, rgba(255, 46, 136, .25), transparent 70%),
    radial-gradient(35% 60% at 50% 100%, rgba(139, 61, 255, .3), transparent 70%);
  border-top: 1px solid var(--line);
}
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 16ch; margin-bottom: 1.2rem; }
.contact .lede { margin: 0 auto; }
.mail {
  margin-top: 2.4rem;
  font: 600 clamp(1.1rem, 3.4vw, 1.9rem)/1.2 var(--mono);
  color: var(--acid);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(212, 255, 90, .35);
  overflow-wrap: anywhere;
  transition: border-color .2s, text-shadow .2s;
}
.mail:hover { border-color: var(--acid); text-shadow: 0 0 24px rgba(212, 255, 90, .55); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--muted); }

:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; border-radius: 4px; }
.pf-count { color: #5fd4ff; margin-left: 5px; }
