/* ============================================================
   actrix — design system
   Brutalist-tech, deep black + concrete + ochre
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Surfaces — warm-cool deep neutrals */
  --bg-0: #0a0a0b;
  --bg-1: #101012;
  --bg-2: #16161a;
  --bg-3: #1d1d22;
  --line: #26262d;
  --line-2: #2f2f37;

  /* Foreground */
  --fg-0: #f4f3ee;     /* concrete white */
  --fg-1: #c8c6bd;
  --fg-2: #84827a;
  --fg-3: #56554f;

  /* Accents — ochre (premium construction) + product greens/blues only inside screenshots */
  --ochre: oklch(74% 0.13 70);     /* #d6a64a-ish */
  --ochre-bright: oklch(82% 0.14 80);
  --ochre-dim: oklch(45% 0.08 70);
  --rust: oklch(60% 0.13 35);

  /* Product hues (used only within product mockups) */
  --client-green: oklch(72% 0.13 150);
  --contractor-blue: oklch(70% 0.12 235);

  /* Semantic */
  --pos: oklch(72% 0.13 150);
  --warn: oklch(78% 0.16 75);
  --neg:  oklch(65% 0.18 30);

  /* Type */
  --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Rhythm */
  --col: 80px;
  --gutter: 24px;
  --radius: 4px;
  --radius-lg: 8px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at top, rgba(214,166,74,0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-0));
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--ochre); color: var(--bg-0); }

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* Engineering grid backdrop (used in heroes) */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.grid-bg.dense {
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
}

/* ----- Type ----- */
.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7.5vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}
.h1 {
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.h2 {
  font-weight: 600;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.h3 {
  font-weight: 600;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--ochre); border-radius: 50%;
  margin-right: 8px; vertical-align: 2px;
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--fg-2); }
.dim   { color: var(--fg-3); }

/* ----- Top bar ----- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10,10,11,0.72);
  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: 12px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.02em;
}
.brand .mark {
  width: 24px; height: 24px; display: grid; place-items: center;
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.nav-links a { color: var(--fg-1); transition: color 160ms; position: relative; padding: 6px 0; }
.nav-links a:hover { color: var(--fg-0); }
.nav-links a.active { color: var(--fg-0); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--ochre);
}
.nav-cta {
  display: flex; gap: 12px; align-items: center;
}
@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--line-2);
  background: transparent; color: var(--fg-0);
  border-radius: var(--radius);
  transition: all 200ms var(--ease-out);
}
.btn:hover { border-color: var(--fg-2); transform: translateY(-1px); }
.btn-primary {
  background: var(--ochre);
  border-color: var(--ochre);
  color: #1a1305;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--ochre-bright); border-color: var(--ochre-bright);
}
.btn-ghost { border-color: transparent; color: var(--fg-1); }
.btn-ghost:hover { color: var(--fg-0); border-color: var(--line); }
.btn .arrow { transition: transform 200ms; }
.btn:hover .arrow { transform: translateX(3px); }

/* ----- Cards / panels ----- */
.panel {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.panel-h {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg-2);
}
.panel-b { padding: 18px; }

/* Corner brackets — engineering motif */
.bracketed { position: relative; }
.bracketed::before, .bracketed::after,
.bracketed > .br-tl, .bracketed > .br-tr {
  content: ''; position: absolute; width: 10px; height: 10px;
  border-color: var(--ochre);
}
.bracketed::before { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.bracketed::after  { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }

/* ----- Footer ----- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 120px;
  padding: 64px 0 36px;
  background: var(--bg-1);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 48px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer h4 {
  font-family: var(--font-mono); font-size: 11px;
  font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-2); margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--fg-1); font-size: 14px; transition: color 160ms; }
.footer ul a:hover { color: var(--ochre); }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.06em;
}

/* ----- FAQ ----- */
.faq { display: flex; flex-direction: column; }
.faq-row {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  cursor: pointer;
  display: grid; grid-template-columns: 40px 1fr 24px;
  align-items: start; gap: 24px;
  transition: padding 200ms;
}
.faq-row:last-child { border-bottom: 1px solid var(--line); }
.faq-row .num {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.1em; padding-top: 6px;
}
.faq-row .q { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.faq-row .a {
  grid-column: 2;
  max-height: 0; overflow: hidden;
  color: var(--fg-1); font-size: 15px; line-height: 1.6;
  transition: max-height 360ms var(--ease-out), padding-top 240ms;
  padding-top: 0;
}
.faq-row.open .a { max-height: 400px; padding-top: 14px; }
.faq-row .toggle {
  width: 24px; height: 24px; position: relative;
  display: grid; place-items: center;
}
.faq-row .toggle::before, .faq-row .toggle::after {
  content: ''; position: absolute; background: var(--fg-1);
}
.faq-row .toggle::before { width: 14px; height: 1px; }
.faq-row .toggle::after { width: 1px; height: 14px; transition: transform 240ms var(--ease-out); }
.faq-row.open .toggle::after { transform: scaleY(0); }

/* ----- Reveal on scroll ----- */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out), filter 800ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; filter: none; }

.reveal-up    { opacity: 0; transform: translateY(36px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal-up.in { opacity: 1; transform: none; }
.reveal-left  { opacity: 0; transform: translateX(-36px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(36px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal-right.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.94); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal-scale.in { opacity: 1; transform: none; }

/* clip-reveal: wipes from left -> right like a draftsman's reveal */
.reveal-clip { clip-path: inset(0 100% 0 0); transition: clip-path 1100ms var(--ease-out); }
.reveal-clip.in { clip-path: inset(0 0 0 0); }

/* line-reveal: animates a 1px line drawing in */
.reveal-line { position: relative; }
.reveal-line::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1px;
  width: 100%; background: var(--ochre);
  transform: scaleX(0); transform-origin: left;
  transition: transform 900ms var(--ease-out);
}
.reveal-line.in::after { transform: scaleX(1); }

.reveal-stagger > * { opacity: 0; transform: translateY(24px); filter: blur(4px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out), filter 700ms var(--ease-out); }
.reveal-stagger.in > * { opacity: 1; transform: none; filter: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 350ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 420ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 490ms; }
.reveal-stagger.in > *:nth-child(9) { transition-delay: 560ms; }
.reveal-stagger.in > *:nth-child(10) { transition-delay: 630ms; }

/* Word-by-word reveal (h1 with .reveal-words; layout.js splits into spans) */
.reveal-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em) rotate(2deg);
  filter: blur(8px);
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out), filter 700ms var(--ease-out);
}
.reveal-words.in .word { opacity: 1; transform: none; filter: none; }

/* Numeric counter — set --num and watch it tick. layout.js animates data-count. */
.count-ticker { font-variant-numeric: tabular-nums; display: inline-block; }

/* Hover-lift on cards/panels (opt-in via .lift) */
.lift { transition: transform 360ms var(--ease-out), border-color 360ms var(--ease-out), box-shadow 360ms var(--ease-out); }
.lift:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,0.6), 0 0 0 1px var(--line-2);
}

/* Glow-cursor: tracks mouse via --mx/--my (set by layout.js) */
.glow {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.glow::before {
  content: '';
  position: absolute; inset: -1px;
  background: radial-gradient(280px circle at var(--mx,50%) var(--my,50%), color-mix(in srgb, var(--ochre) 14%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 360ms var(--ease-out);
  pointer-events: none;
  z-index: 0;
}
.glow:hover::before { opacity: 1; }
.glow > * { position: relative; z-index: 1; }

/* Animated underline on inline links/nav items */
.link-u { position: relative; }
.link-u::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 320ms var(--ease-out);
}
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

/* Draw SVG path on scroll. Add .draw to the <path> and set stroke + stroke-dasharray via inline style or css. */
.draw {
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  transition: stroke-dashoffset 1600ms var(--ease-out);
}
.draw.in { stroke-dashoffset: 0; }

/* Subtle floating motion (ambient) */
@keyframes drift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.drift { animation: drift 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-up, .reveal-left, .reveal-right, .reveal-scale, .reveal-clip,
  .reveal-stagger > *, .reveal-words .word, .draw {
    transition: none !important; animation: none !important;
    opacity: 1 !important; transform: none !important; filter: none !important;
    clip-path: none !important; stroke-dashoffset: 0 !important;
  }
  .strip, .drift { animation: none !important; }
}

/* ----- Tag/chip ----- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-1);
}
.tag.ochre { color: var(--ochre); border-color: color-mix(in srgb, var(--ochre) 35%, var(--line)); background: color-mix(in srgb, var(--ochre) 8%, transparent); }
.tag.green { color: var(--client-green); border-color: color-mix(in srgb, var(--client-green) 35%, var(--line)); }
.tag.blue  { color: var(--contractor-blue); border-color: color-mix(in srgb, var(--contractor-blue) 35%, var(--line)); }

/* ----- Marquee strip ----- */
.strip {
  display: flex; align-items: center; gap: 32px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
  animation: marquee 50s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.grow { flex: 1; }

/* page section spacing */
.section { padding: 96px 0; position: relative; }
.section-tight { padding: 56px 0; }

/* divider with label */
.divider {
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 40px;
}
.divider .line { flex: 1; height: 1px; background: var(--line); }
.divider .label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); }
.divider .id { color: var(--ochre); }
