/* Terrain — AI Employees for Law Firms */

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

:root {
  --bg: #FAFAF7;
  --bg-2: #F2F1EC;
  --ink: #0A0A0B;
  --ink-2: #1F1F22;
  --muted: #6B6B70;
  --muted-2: #9A9A9F;
  --line: #E4E3DD;
  --line-2: #D4D3CB;
  --accent: oklch(0.62 0.12 35);
  --accent-soft: oklch(0.62 0.12 35 / 0.08);
  --accent-line: oklch(0.62 0.12 35 / 0.35);

  --font-display: 'Inter Tight', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Layout primitives */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.eyebrow.no-dot::before { display: none; }

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 250, 247, 0.75);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

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

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .nav-inner { padding: 14px 20px; }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 22px;
  height: 22px;
  position: relative;
}

.logo-mark svg { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-2);
}

.nav-links a {
  position: relative;
  transition: color 0.15s ease;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.nav-cta:hover { background: var(--ink-2); transform: translateY(-1px); }

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
  padding: 13px 22px;
  border-radius: 999px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.08);
}
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 8px 20px rgba(0,0,0,0.12); }

.btn-ghost {
  color: var(--ink);
  background: transparent;
  padding: 13px 18px;
}
.btn-ghost:hover { color: var(--accent); }

.btn .arrow {
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.hero-grid-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-top: 28px;
  text-wrap: balance;
}

.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}

.hero-sub {
  margin-top: 28px;
  font-size: clamp(17px, 1.4vw, 19.5px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 600px;
  text-wrap: pretty;
}

.hero-cta-row {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta-item .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: oklch(0.65 0.15 145);
  box-shadow: 0 0 0 3px oklch(0.65 0.15 145 / 0.15);
}

/* Hero card display */
.hero-display {
  position: relative;
  margin-top: 80px;
  z-index: 2;
}

/* Sections */
section { position: relative; }

.section {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .hero { padding: 120px 0 60px; }
}

.section-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: end;
}

@media (max-width: 900px) {
  .section-header { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-header .lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin-top: 12px;
  text-wrap: pretty;
}

.section-label {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}

/* Employees */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .employees-grid { grid-template-columns: 1fr; }
}

.employee-card {
  background: var(--bg);
  padding: 36px 32px 32px;
  position: relative;
  transition: background 0.25s ease;
  display: flex;
  flex-direction: column;
  min-height: 460px;
}

.employee-card:hover { background: #FFFFFF; }

.employee-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.employee-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.employee-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.employee-id {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  flex-shrink: 0;
}

.employee-desc {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 24px;
  text-wrap: pretty;
}

.employee-tasks {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px dashed var(--line-2);
  padding-top: 16px;
}

.employee-task {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.employee-task:last-child { border-bottom: none; }

.task-check {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}

@media (max-width: 540px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.step p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* Practice areas */
.practice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .practice-row { grid-template-columns: 1fr; }
}

.practice {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  background: var(--bg);
  transition: background 0.2s ease, border-color 0.2s ease;
  cursor: default;
}

.practice:hover {
  background: #FFFFFF;
  border-color: var(--line-2);
}

.practice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.practice-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.practice h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.practice p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.practice-stat {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-2);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.practice-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.practice-stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Security */
.security {
  background: var(--ink);
  color: var(--bg);
  border-radius: 24px;
  padding: 80px 64px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .security { padding: 56px 28px; border-radius: 18px; }
}

.security::before {
  content: "";
  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: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at top right, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top right, black, transparent 70%);
}

.security-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 900px) {
  .security-inner { grid-template-columns: 1fr; gap: 40px; }
}

.security h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

.security .eyebrow { color: rgba(255,255,255,0.6); }
.security .eyebrow::before { background: oklch(0.7 0.14 35); }

.security-sub {
  margin-top: 20px;
  color: rgba(255,255,255,0.65);
  font-size: 16px;
  line-height: 1.6;
  max-width: 480px;
}

.security-list {
  display: grid;
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.security-item {
  background: var(--ink);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.security-item-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.95);
}

.security-item-desc {
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  margin-left: auto;
}

.security-badge {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
}

/* Footer CTA */
.footer-cta {
  padding: 140px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer-cta::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50px;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.footer-cta-inner { position: relative; z-index: 1; }

.footer-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
  margin: 24px auto 0;
  max-width: 900px;
}

.footer-cta h2 .accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}

.footer-cta-sub {
  margin: 24px auto 0;
  max-width: 500px;
  color: var(--muted);
  font-size: 17px;
}

.footer-cta-row {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Hero terminal/preview card */
.preview-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 12px 40px rgba(20,20,20,0.06);
}

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

.preview-dots {
  display: flex; gap: 6px;
}
.preview-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line-2);
}

.preview-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.preview-body {
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 768px) {
  .preview-body { grid-template-columns: 1fr; gap: 24px; padding: 22px; }
}

.preview-col-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  font-size: 13.5px;
  border-bottom: 1px dashed var(--line);
}
.preview-line:last-child { border-bottom: none; }

.preview-line-label {
  color: var(--ink-2);
  display: flex; align-items: center; gap: 10px;
}

.preview-line-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.preview-line-value.up { color: oklch(0.55 0.14 145); }

.tag-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: oklch(0.55 0.14 145);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag-active::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: oklch(0.6 0.16 145);
  box-shadow: 0 0 0 2px oklch(0.6 0.16 145 / 0.2);
  animation: pulse 1.6s ease-in-out infinite;
}

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

/* Logos / trust row */
.trust {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.trust-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 56px;
  align-items: center;
}

.trust-logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--muted);
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.trust-logo:hover { opacity: 1; color: var(--ink); }
.trust-logo .amp { color: var(--muted-2); margin: 0 2px; }

/* Comparison Table */
.comparison-table {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.comparison-header {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.comparison-col {
  background: var(--bg-2);
  padding: 18px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.comparison-col-left {
  text-align: center;
  color: var(--muted-2);
}

.comparison-col-right {
  text-align: center;
  color: var(--accent);
}

.comparison-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.comparison-label {
  background: var(--bg);
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  display: flex;
  align-items: center;
}

.comparison-cell {
  background: var(--bg);
  padding: 20px 24px;
  font-size: 14px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.comparison-cell-left {
  color: var(--muted);
}

.comparison-cell-right {
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 768px) {
  .comparison-header,
  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-col:first-child,
  .comparison-label {
    display: none;
  }

  .comparison-col,
  .comparison-cell {
    text-align: left;
    justify-content: flex-start;
  }

  .comparison-col::before,
  .comparison-cell::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted-2);
    display: block;
    margin-bottom: 4px;
  }
}
