:root {
  /* Charcoal palette, one ember accent. Contrast ratios are against --bg. */
  --bg: #0E0E10;
  --bg-elev: #161619;
  --border: #26262B;
  --text: #EDEDF0;         /* 16.5:1 */
  --muted: #9C9CA4;        /*  7.1:1 */
  --accent: #FF8A3D;       /* ember — 8.2:1, safe for text and links */
  --accent-soft: #FFA76B;  /* hover / highlight — 10.1:1 */
  --accent-deep: #7F4A29;  /* decorative edges only — 2.7:1, never text */
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Code",
    "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --max: 1080px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
/* --accent-deep is far too dark to read on this background, so hover brightens
   instead of darkening. */
a:hover { color: var(--accent-soft); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header — dark bar carrying the wordmark */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 14, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }
.nav a {
  color: var(--muted);
  font-weight: 600;
  margin-left: 22px;
  font-size: 0.98rem;
}
.nav a:hover, .nav a.active { color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: radial-gradient(120% 120% at 72% 40%, #1B1613 0%, var(--bg) 70%);
  min-height: 560px;
  display: flex;
  align-items: center;
}
/* Dependency-graph animation canvas, sitting behind the text */
.hero-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}
/* Overlay keeps the left half dark so the text stays fully clear of the graph,
   which lives in the right half of the hero. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(14, 14, 16, 0.96) 0%,
    rgba(14, 14, 16, 0.93) 48%,
    rgba(14, 14, 16, 0.34) 74%,
    rgba(14, 14, 16, 0.16) 100%);
}
/* Lift hero text above the ::before overlay so it never darkens (matters on
   the contact page, whose hero uses a plain .container). */
.hero .container {
  position: relative;
  z-index: 2;
}
.hero-content {
  padding: 104px 24px 84px;
  width: 100%;
}

/* Text "float up" entrance, staggered */
@keyframes floatUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content > * { opacity: 0; }
.hero-content > h1 { animation: floatUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.20s both; }
.hero-content > p  { animation: floatUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both; }
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 18ch;
}
.hero p {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 32px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-content > * { animation: none; opacity: 1; transform: none; }
}

/* Sections */
.section { padding: 72px 0; border-bottom: 1px solid var(--border); }
.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.section .lead { color: var(--muted); max-width: 60ch; margin: 0 0 40px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 14px;
}

/* Cards — four of them, so a plain 2x2 above 560px. */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 34px;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
/* accent edge that fills in on hover, Altis-style */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}
.card:hover {
  border-color: var(--accent-deep);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}
.card:hover::before { transform: scaleY(1); }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: rgba(255, 138, 61, 0.10);
  border: 1px solid rgba(255, 138, 61, 0.30);
  color: var(--accent);
}
.card-icon svg { width: 26px; height: 26px; display: block; }
.card h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Contact */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 40px;
  display: grid;
  gap: 4px;
}
.contact-list .label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 20px;
}
.contact-list .value { font-size: 1.15rem; }

/* Footer */
.site-footer {
  padding: 36px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .hero { min-height: 420px; }
  .hero-content { padding: 72px 24px 76px; }
  /* On a narrow screen the copy spans the full width and runs over the graph,
     so the graph steps back rather than the text fighting it. */
  .hero-graph { opacity: 0.4; }
  .section { padding: 56px 0; }
  .nav a { margin-left: 16px; }
  .brand { font-size: 1.15rem; }
}
