/* TFO Labs LLC, corporate site. Plain CSS, no build step. */

:root {
  --bg: #0b0b0c;
  --bg-2: #111113;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #f4f2ee;
  --ink-2: #c9c5bd;
  --ink-3: #8b877f;
  --accent: #3b6cf5;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max: 1080px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 4px;
}

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

html {
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

/* ---------- Wordmark ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.wordmark .mark {
  width: 22px;
  height: 22px;
  flex: none;
  display: block;
}

.wordmark .mark .m-a { fill: var(--ink); }
.wordmark .mark .m-b { fill: var(--accent); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 18px;
  height: 2px;
  background: var(--ink);
}
.nav-burger span { top: 18px; }
.nav-burger span::before { left: 0; top: -6px; }
.nav-burger span::after { left: 0; top: 6px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 0;
}

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

/* ---------- Section scaffolding ---------- */

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

.section-head {
  margin-bottom: 40px;
}

.section h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section-head .lede {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 18px;
  max-width: 64ch;
}

.prose {
  max-width: 64ch;
}

.prose p {
  margin: 0 0 1em;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.6;
}

.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
}

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

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 88px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 24px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 22ch;
}

.hero .sub {
  color: var(--ink-2);
  font-size: 19px;
  max-width: 56ch;
  margin: 0;
}

/* ---------- Services ---------- */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}

.card {
  background: var(--bg);
  padding: 32px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.card:hover { background: var(--bg-2); }

.card-wide { grid-column: 1 / -1; }
.card-wide p { max-width: 72ch; }

.card .icon {
  width: 32px;
  height: 32px;
  color: var(--ink-2);
}

.card .icon svg { width: 100%; height: 100%; display: block; }

.card h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  background: var(--bg);
}

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

.footer small {
  color: var(--ink-3);
  font-size: 13.5px;
  order: 3;
  width: 100%;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--ink-2);
}

.footer-links a:hover { color: var(--ink); }

/* ---------- Document pages ---------- */

.doc {
  padding: 72px 0 96px;
}

.doc .wrap { max-width: 760px; }

.doc header { margin-bottom: 40px; }

.doc h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.doc .meta {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.doc h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
  font-weight: 700;
}

.doc p { color: var(--ink-2); margin: 0 0 1em; }
.doc p a { color: var(--ink); border-bottom: 1px solid var(--accent); }
.doc p a:hover { color: var(--accent); }

.facts {
  margin: 0;
  border: 1px solid var(--line);
  display: grid;
}

.facts > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-top: 1px solid var(--line);
}

.facts > div:first-child { border-top: 0; }

.facts dt {
  padding: 18px 20px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-2);
  border-right: 1px solid var(--line);
}

.facts dd {
  margin: 0;
  padding: 18px 20px;
  color: var(--ink);
  font-size: 16px;
}

.facts dd a { border-bottom: 1px solid var(--accent); }
.facts dd a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; }
  .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .facts > div { grid-template-columns: 1fr; }
  .facts dt { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .facts dd { padding: 14px 16px; }

  .nav-burger { display: block; }
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
  }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a {
    display: block;
    padding: 16px var(--gutter);
    font-size: 16px;
  }
  .nav-toggle:checked ~ .nav-links { max-height: 400px; border-bottom-color: var(--line); }
  .nav-toggle:not(:checked) ~ .nav-links { border-bottom-color: transparent; }
  .nav-toggle:checked ~ .nav-burger span { background: transparent; }
  .nav-toggle:checked ~ .nav-burger span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span::after { top: 0; transform: rotate(-45deg); }
  .nav-toggle:focus-visible ~ .nav-burger { outline: 2px solid var(--accent); outline-offset: 2px; }
}
