/* =========================================================
   Reality Web Services — site styles
   ========================================================= */

:root {
  --bg: #f2ead6;
  --bg-elev: #ebe2c8;
  --surface: #e6dcc0;
  --surface-2: #dfd4b4;
  --border: rgba(45, 90, 61, 0.18);
  --border-strong: rgba(45, 90, 61, 0.38);

  --text: #1a2419;
  --text-dim: #4a5248;
  --text-muted: #6b7265;

  --brand: #2d5a3d;          /* dark green — primary */
  --brand-2: #1f4329;
  --brand-3: #0f2a18;
  --accent: #b8621b;         /* rust */
  --accent-2: #5a7a3d;       /* olive */
  --accent-pink: #a85c6a;    /* dusty rose */
  --accent-amber: #c48f1a;   /* mustard */
  --accent-blue: #5a7a9a;    /* denim */
  --accent-lime: #6e8a3a;    /* moss */
  --nv-green: #4a7a1e;
  --warn: #c66b28;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-1: 0 1px 0 rgba(255,255,255,0.6) inset, 0 8px 24px -12px rgba(40,50,35,0.18);
  --shadow-glow: 0 0 0 1px rgba(45,90,61,0.25), 0 20px 60px -20px rgba(31,67,41,0.35);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1180px;
  --nav-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6,p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Base ---------- */
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(45,90,61,0.28); color: #fff; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(45, 90, 61, 0.16), transparent 65%),
    radial-gradient(700px 500px at 95% 8%, rgba(184, 98, 27, 0.08), transparent 65%),
    radial-gradient(900px 700px at 80% 100%, rgba(45, 90, 61, 0.12), transparent 65%),
    linear-gradient(180deg, #f5ecd6 0%, #f2ead6 40%, #ede4cb 100%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(30,40,30,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,40,30,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 40%, transparent 100%);
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 72px 0; position: relative; }
@media (max-width: 720px) { section { padding: 56px 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(45,90,61,0.14), rgba(45,90,61,0.04));
  border: 1px solid var(--border);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.section-title {
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 16px 0 14px;
}
.section-lead {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 62ch;
}
.section-head { margin-bottom: 48px; }

.grad {
  color: var(--brand-2);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(242, 234, 214, 0.78);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 84px; height: 28px;
  display: block;
  flex: 0 0 auto;
}
.brand-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-4px);
  transition: max-width .35s ease, opacity .25s ease, transform .3s ease, margin .3s ease;
  margin-left: 0;
}
.brand:hover .brand-text,
.brand:focus-visible .brand-text {
  max-width: 240px;
  opacity: 1;
  transform: none;
  margin-left: 4px;
}
.footer-brand .brand-mark { width: 90px; height: 30px; }
.footer-brand .brand-text {
  max-width: 240px;
  opacity: 1;
  margin-left: 4px;
  transform: none;
  font-size: 16px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 14px;
  transition: color .15s ease, background .15s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(30,40,30,0.045); }
.nav-links a.active { color: var(--text); background: rgba(45,90,61,0.12); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  margin-left: 6px;
  border-radius: 10px;
  background: linear-gradient(180deg, #3a7550 0%, #1f4329 100%);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  box-shadow: 0 8px 20px -10px rgba(31,67,41,0.7), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(31,67,41,0.9); }
.nav-cta svg { width: 14px; height: 14px; flex: 0 0 auto; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--text); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    padding: 16px;
    background: rgba(242, 234, 214, 0.97);
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav.open .nav-links a { padding: 12px 14px; }
  .nav.open .nav-cta { margin-left: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, #3a7550 0%, #1f4329 100%);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(31,67,41,0.9), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px -12px rgba(31,67,41,1), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-ghost {
  background: rgba(30,40,30,0.04);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(30,40,30,0.08); border-color: var(--border-strong); }

/* ---------- Hero ---------- */
.hero {
  padding-top: 56px;
  padding-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 44px;
  align-items: center;
}
@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; gap: 56px; } }

.hero h1 {
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 18px 0 20px;
}
.hero-sub {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 56ch;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 22px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-meta-item {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.hero-meta-item svg { width: 14px; height: 14px; stroke: var(--brand); flex: 0 0 auto; }

/* ---------- Compute fabric (hero visual) ---------- */
.fabric {
  position: relative;
  width: 100%;
  aspect-ratio: 1.15 / 1;
  max-width: 560px;
  justify-self: end;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgba(45,90,61,0.10), transparent 70%),
    linear-gradient(180deg, rgba(242,234,214,0.6), rgba(230,220,192,0.85));
  border: 1px solid var(--border);
}
@media (max-width: 1024px) {
  .fabric { justify-self: center; max-width: 540px; }
}

/* Lattice SVG — lines + moving packets between nodes */
.lattice {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.lattice .edge {
  stroke: rgba(45, 90, 61, 0.30);
  stroke-width: 1;
  fill: none;
}
.lattice .edge.cyan { stroke: rgba(184, 98, 27, 0.30); }
.lattice .packet {
  filter: drop-shadow(0 0 6px currentColor);
}

/* Hub — faint central point */
.hub {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: rgba(45, 90, 61, 0.65);
  box-shadow: 0 0 18px rgba(45, 90, 61, 0.45);
  z-index: 1;
  animation: hubPulse 4s ease-in-out infinite;
}
@keyframes hubPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.9;  transform: scale(1.2); }
}

.node {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  width: 164px;
  background: linear-gradient(180deg, rgba(255,253,245,0.94), rgba(236,226,200,0.92));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  box-shadow: var(--shadow-1), 0 10px 30px -14px rgba(40,50,35,0.25);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  z-index: 3;
}
.node:hover {
  transform: translateY(-3px);
  border-color: rgba(45,90,61,0.7);
  box-shadow: var(--shadow-1), 0 16px 40px -14px rgba(31,67,41,0.35);
}
.js .node { opacity: 0; transform: scale(0.94); transition: opacity .6s ease, transform .6s ease, border-color .4s ease, box-shadow .4s ease; }
.js .node.on { opacity: 1; transform: none; }
.js .node.active { border-color: rgba(45,90,61,0.8); box-shadow: var(--shadow-1), 0 0 0 1px rgba(45,90,61,0.5), 0 10px 40px -10px rgba(45,90,61,0.45); }
.js .node.active .node-dot { animation: nodePulse 1.4s ease-in-out; }
@keyframes nodePulse {
  0%   { transform: scale(1);   filter: none; }
  40%  { transform: scale(1.6); filter: brightness(1.6); }
  100% { transform: scale(1);   filter: none; }
}
.node-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.node-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.node-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--nv-green);
  box-shadow: 0 0 8px var(--nv-green);
  flex: 0 0 auto;
}
.node-dot.cyan { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.node-dot.purple { background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.node-dot.amber { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.node-spec {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.node-bar {
  height: 4px; border-radius: 4px;
  background: rgba(30,40,30,0.08);
  overflow: hidden;
  position: relative;
}
.node-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  animation: util 5s ease-in-out infinite;
  border-radius: 4px;
}
.node-foot {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.node.n1 { top: 6%;    left: 5%;   }
.node.n2 { top: 6%;    right: 5%;  }
.node.n3 { top: 50%;   left: 50%;  transform: translate(-50%, -50%); }
.node.n4 { bottom: 6%; left: 5%;   }
.node.n5 { bottom: 6%; right: 5%;  }

/* Keep n3 centered during the boot-in reveal */
.js .node.n3    { transform: translate(-50%, -50%) scale(0.94); }
.js .node.n3.on { transform: translate(-50%, -50%); }
.js .node.n3:hover,
.js .node.n3.on:hover { transform: translate(-50%, calc(-50% - 3px)); }

@media (max-width: 640px) {
  .fabric { max-width: 420px; aspect-ratio: 1/0.9; }
  .node { width: 138px; padding: 10px 12px; }
}

@keyframes util {
  0%,100% { width: 62%; }
  50%     { width: 84%; }
}

/* ---------- Trust strip ---------- */
.trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(45,90,61,0.05), transparent);
}
.trust-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 28px 0;
}
@media (max-width: 820px) { .trust-inner { grid-template-columns: 1fr; } }
.trust-item {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 14px;
}
.trust-item svg { width: 20px; height: 20px; stroke: var(--brand); flex: 0 0 auto; }
.trust-item b { color: var(--text); font-weight: 600; display: block; }
.trust-item small { color: var(--text-muted); font-size: 12px; display: block; }

/* ---------- Services cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: block;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,253,245,0.7), rgba(245,237,216,0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(45,90,61,0.14), transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }

a.card::after {
  content: "→";
  position: absolute;
  top: 28px; right: 28px;
  color: var(--brand);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  font-family: var(--font-mono);
}
a.card:hover::after { opacity: 1; transform: translateX(2px); }

.card-icon {
  --ic: var(--brand);
  --ic-soft: 45, 90, 61;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(var(--ic-soft), 0.18), rgba(var(--ic-soft), 0.04));
  border: 1px solid rgba(var(--ic-soft), 0.35);
  margin-bottom: 20px;
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--ic); }

/* Color cycle for service cards */
.services-grid > :nth-child(6n+1) .card-icon { --ic: var(--brand);        --ic-soft: 45, 90, 61; }
.services-grid > :nth-child(6n+2) .card-icon { --ic: var(--accent);       --ic-soft: 184, 98, 27; }
.services-grid > :nth-child(6n+3) .card-icon { --ic: var(--accent-pink);  --ic-soft: 168, 92, 106; }
.services-grid > :nth-child(6n+4) .card-icon { --ic: var(--accent-amber); --ic-soft: 196, 143, 26; }
.services-grid > :nth-child(6n+5) .card-icon { --ic: var(--accent-2);     --ic-soft: 90, 122, 61; }
.services-grid > :nth-child(6n+6) .card-icon { --ic: var(--accent-blue);  --ic-soft: 90, 122, 154; }
.card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text);
}
.card p { font-size: 15px; color: var(--text-dim); }

/* ---------- Feature ---------- */
.feature {
  position: relative;
  padding: 40px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(45,90,61,0.08), rgba(230,220,192,0.5));
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px -30px rgba(40,50,35,0.25);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
}
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; padding: 28px; } }

.feature h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 14px 0 12px;
}
.feature p { color: var(--text-dim); font-size: 16px; }

.feature-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat {
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255,253,245,0.7);
  border: 1px solid var(--border);
}
.stat-n {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-2);
  line-height: 1.1;
}
.stat-l {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- About / Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 820px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,253,245,0.7), rgba(245,237,216,0.5));
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 22px;
  align-items: start;
  transition: border-color .2s ease, transform .2s ease;
}
.team-card:hover { border-color: var(--border-strong); }
@media (max-width: 520px) { .team-card { grid-template-columns: 1fr; text-align: left; } }

.team-photo {
  width: 112px; height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(45,90,61,0.10);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }

.team-name {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: 2px;
}
.team-role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.team-bio { color: var(--text-dim); font-size: 15px; }
.team-links {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 14px;
}
.team-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color .15s ease, border-color .15s ease;
}
.team-links a:hover { color: var(--text); border-color: var(--border-strong); }
.team-links svg { width: 13px; height: 13px; }

/* ---------- About / Bio / diff ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.bio p { color: var(--text-dim); margin-bottom: 16px; font-size: 16px; }
.bio strong { color: var(--text); font-weight: 600; }

.diff-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.diff-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,253,245,0.55);
  color: var(--text-dim);
  font-size: 15px;
}
.diff-list svg { width: 18px; height: 18px; stroke: var(--accent); flex: 0 0 auto; margin-top: 2px; }
.diff-list b { color: var(--text); font-weight: 600; }

/* ---------- Tech stack ---------- */
.stack {
  padding: 32px;
  background: linear-gradient(180deg, rgba(255,253,245,0.55), rgba(255,253,245,0));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.stack-group { margin-bottom: 24px; }
.stack-group:last-child { margin-bottom: 0; }
.stack-group h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(45,90,61,0.10);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.chip:hover { background: rgba(45,90,61,0.20); border-color: var(--border-strong); transform: translateY(-1px); }

/* ---------- Book ---------- */
.book-card {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(230,220,192,0.5);
  box-shadow: 0 20px 60px -30px rgba(40,50,35,0.25);
}
.book-card iframe {
  width: 100%;
  height: 680px;
  border: 0;
  border-radius: calc(var(--radius-lg) - 6px);
  background: #fff;
  display: block;
}
.book-alt {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 14px;
}
.book-alt a { color: var(--brand); }
.book-alt a:hover { color: var(--brand-3); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,253,245,0.55);
}
.contact-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}
.contact-card address {
  font-style: normal;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
}
.contact-card a { color: var(--brand); }
.contact-card a:hover { color: var(--brand-3); }

.fed-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}
.fed-dl dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  align-self: center;
}
.fed-dl dd { margin: 0; color: var(--text); }

/* ---------- Inner page hero ---------- */
.page-hero {
  padding: 88px 0 56px;
}
.page-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 16px 0 14px;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  padding: 48px 0 40px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(45,90,61,0.07));
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 860px) { .footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 12px;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  color: var(--text-dim);
  font-size: 14px;
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  max-width: var(--container);
  margin: 40px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ---------- Blog ---------- */
.blog-empty {
  padding: 56px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  background: radial-gradient(500px 200px at 50% 0%, rgba(45,90,61,0.12), transparent 70%);
  text-align: center;
  color: var(--text-dim);
}
.blog-empty h3 {
  font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 8px;
}
.blog-empty p { max-width: 48ch; margin: 0 auto; }

/* ---------- Reveal on scroll (JS-only) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .node { opacity: 1; transform: none; transition: none; }
  .node-bar-fill, .hub, .node.active .node-dot { animation: none !important; }
  .lattice .packet { display: none; }
  html { scroll-behavior: auto; }
}
