/* TCB Nexus — site styles */

:root {
  --paper: #F3F5F7;
  --surface: #FFFFFF;
  --ink: #16202E;
  --muted: #586273;
  --line: #D5DBE2;
  --accent: #0F6B5E;
  --accent-soft: #DCEDE9;
  --on-accent: #FFFFFF;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.375rem;
  --step-4: clamp(2.5rem, 6vw, 4.25rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F151E;
    --surface: #161E2A;
    --ink: #E8EDF3;
    --muted: #9AA5B5;
    --line: #2A3442;
    --accent: #4FC2AE;
    --accent-soft: #163A35;
    --on-accent: #0F151E;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 1.75rem; height: 1.75rem; }

.nav {
  display: flex;
  gap: clamp(0.9rem, 3vw, 1.75rem);
  font-size: var(--step--1);
  font-weight: 500;
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Hero */

.hero {
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(3rem, 8vw, 5.5rem);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 1.5rem;
  max-width: 13ch;
}

.hero p {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
  margin: 0 0 2rem;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
}
.button:hover { filter: brightness(1.08); }

.nexus { width: 100%; height: auto; color: var(--ink); }
.nexus .link {
  stroke: var(--line);
  stroke-width: 2;
  fill: none;
}
.nexus .node {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 2;
}
.nexus .core { fill: var(--accent); }
.nexus .core-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.35;
}

@media (prefers-reduced-motion: no-preference) {
  .nexus .link {
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    animation: draw 1.1s ease-out forwards;
  }
  .nexus .link:nth-of-type(2) { animation-delay: 0.08s; }
  .nexus .link:nth-of-type(3) { animation-delay: 0.16s; }
  .nexus .link:nth-of-type(4) { animation-delay: 0.24s; }
  .nexus .link:nth-of-type(5) { animation-delay: 0.32s; }
  .nexus .link:nth-of-type(6) { animation-delay: 0.40s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* Sections */

.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--line);
}

.section-grid {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.section h2 {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
}

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }

.principles {
  margin: 2.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.principles div {
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}
.principles dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  margin-bottom: 0.4rem;
}
.principles dd {
  margin: 0;
  color: var(--muted);
}

.empty {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  max-width: 62ch;
}
.empty p { margin: 0; }
.empty p + p { margin-top: 0.75rem; color: var(--muted); }

.app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 62ch;
}
.app-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.app-list a { font-weight: 600; }

.contact-lines {
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.contact-lines dt {
  color: var(--muted);
  font-size: var(--step--1);
}
.contact-lines dd {
  margin: 0.15rem 0 0;
  font-size: var(--step-1);
}

/* Legal / document pages */

.doc {
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(3rem, 8vw, 5rem);
}
.doc .prose { max-width: 68ch; }
.doc h1 {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}
.doc .updated {
  color: var(--muted);
  font-size: var(--step--1);
  margin: 0 0 2.5rem;
}
.doc h2 {
  font-family: var(--font-display);
  font-size: var(--step-1);
  margin: 2.25rem 0 0.6rem;
}
.doc h3 {
  font-size: var(--step-0);
  font-weight: 600;
  margin: 1.5rem 0 0.35rem;
}
.doc ul { padding-left: 1.25rem; margin: 0 0 1.1rem; }
.doc li { margin-bottom: 0.4rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* Responsive */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .nexus { max-width: 22rem; }
  .section-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .nav { gap: 0.8rem; }
  .brand span { font-size: 1.1rem; }
}
