/* Tolbit LLC — company site. Plain CSS, no build step. */
:root {
  /* Raw palette */
  --ink-light: #10131a;
  --ink-dark: #eceef3;
  --paper-light: #f6f5f1;
  --paper-dark: #0d0f14;
  --card-light: #ffffff;
  --card-dark: #161922;
  --muted-light: #545b6a;
  --muted-dark: #a3aaba;
  --line-light: #e2e0d9;
  --line-dark: #262a35;
  --accent-light: #3550f0;
  --accent-dark: #8ea0ff;
  --accent-ink-light: #ffffff;
  --accent-ink-dark: #0d0f14;

  /* Tokens: light is the site default; the theme button switches to dark (see theme.js) */
  --ink: var(--ink-light);
  --paper: var(--paper-light);
  --card: var(--card-light);
  --muted: var(--muted-light);
  --line: var(--line-light);
  --accent: var(--accent-light);
  --accent-ink: var(--accent-ink-light);

  color-scheme: light dark;
  accent-color: var(--accent);

  --radius: 14px;
  --wrap: 72rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* The <meta name="color-scheme"> drives the theme: it says "light" in the HTML and
   theme.js (or the small script in <head>) sets it to "dark". The base stays
   "light dark" so the meta, not this file, decides. */
:root:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
  --ink: var(--ink-dark);
  --paper: var(--paper-dark);
  --card: var(--card-dark);
  --muted: var(--muted-dark);
  --line: var(--line-dark);
  --accent: var(--accent-dark);
  --accent-ink: var(--accent-ink-dark);
}

/* Theme button: shows the theme you'd switch TO (moon in light, sun in dark) */
.header-end { display: flex; align-items: center; gap: 1.25rem; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
  cursor: pointer; padding: 0;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.theme-toggle .to-dark { display: contents; }
.theme-toggle .to-light { display: none; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .to-dark { display: none; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .to-light { display: contents; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* 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.5rem; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-name { font-weight: 750; font-size: 1.35rem; letter-spacing: -.02em; }
.site-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: .97rem; }
.site-nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero .wrap { display: grid; gap: 3rem; align-items: center; grid-template-columns: 1.25fr 1fr; }
.eyebrow {
  display: inline-block; margin: 0 0 1.1rem;
  font-size: .82rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 5.6vw, 4.1rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 780;
  text-wrap: balance;
}
h1 .accent { color: var(--accent); }
.lede { margin: 0 0 2rem; max-width: 36rem; color: var(--muted); font-size: 1.18rem; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.3rem; border-radius: 10px; font-weight: 650; text-decoration: none; font-size: 1rem;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--muted); }

/* Decorative "bits" grid */
.bits {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: .55rem;
  aspect-ratio: 1; max-width: 22rem; justify-self: end; width: 100%;
}
.bits span { border-radius: 7px; background: var(--line); }
.bits span.on { background: var(--accent); }
.bits span.half { background: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* Sections */
section { padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--line); }
h2 { margin: 0 0 .6rem; font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -.025em; line-height: 1.15; }
.section-lede { margin: 0 0 2.25rem; color: var(--muted); max-width: 40rem; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; display: flex; flex-direction: column; gap: .9rem;
}
.card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -.015em; }
.card p { margin: 0; color: var(--muted); }
.tag {
  align-self: flex-start; font-size: .78rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: .3rem .6rem; border-radius: 999px;
}
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.chips li {
  font-size: .85rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem;
}
.card .more { margin-top: auto; font-weight: 650; text-decoration: none; }
.card .more:hover { text-decoration: underline; }
.card.soon { border-style: dashed; background: transparent; }

.facts { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin: 0; }
.facts div { border-left: 3px solid var(--accent); padding-left: 1rem; }
.facts dt { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.facts dd { margin: .25rem 0 0; font-weight: 600; }

.contact-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.contact-grid .card a { font-weight: 650; word-break: break-word; }
address { font-style: normal; color: var(--muted); line-height: 1.7; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); }

/* Simple text pages (privacy, 404) */
.page { padding: clamp(3rem, 7vw, 5rem) 0; }
.page .wrap { max-width: 46rem; }
.page h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.page h2 { font-size: 1.3rem; margin-top: 2.25rem; }
.page p, .page li { color: var(--muted); }
.page .updated { font-size: .92rem; }

@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .bits { justify-self: start; max-width: 15rem; }
}
@media (max-width: 30rem) {
  .site-nav ul { gap: 1.1rem; }
  .bits { display: none; }
  /* Phones: logo + theme button on the first line, menu links below */
  .site-header .wrap { display: grid; grid-template-columns: 1fr auto; row-gap: .4rem; padding-block: .8rem; }
  .header-end { display: contents; }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; }
}
