/* RBW Labs — company site.
 *
 * Design intent: a lab notebook, not a startup landing page. Ink on
 * off-white, one accent color, monospace labels. The products carry
 * their own personalities; the parent company stays quiet.
 *
 * No web fonts or scripts today: system fonts and one stylesheet keep
 * the page fast and simple.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  --bg: #f6f5f1;
  --bg-2: #eceae3;
  --surface: #fffefb;
  --line: #d9d6cc;

  --ink: #15181d;
  --text: #2a2e35;
  --text-2: #565c66;   /* 6.3:1 on --bg */

  --accent: #b93a0e;   /* 5.6:1 on --bg — AA for body text */
  --on-ink: #f6f5f1;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  --wrap: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111316;
    --bg-2: #181b20;
    --surface: #1b1f25;
    --line: #2c313a;

    --ink: #f1efe9;
    --text: #d9d7d0;
    --text-2: #a0a5ae;

    --accent: #fb923c;
    --on-ink: #111316;
  }
}

/* ------------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--on-ink);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

.label {
  font: 500 0.78rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

.muted { color: var(--text-2); font-size: 0.95rem; }

/* ---------------------------------------------------------------- header */

.site {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 2rem; height: 2rem; flex: none; }
.brand__bubbles { fill: var(--accent); }
.brand__name {
  font: 600 1.05rem/1 var(--mono);
  letter-spacing: 0.02em;
}

.nav { display: flex; gap: clamp(0.9rem, 3vw, 1.75rem); }
.nav a {
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text-2);
}
.nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(4rem, 11vw, 8rem) 0 clamp(3.5rem, 9vw, 6.5rem); }

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  max-width: 17ch;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 40rem;
  margin: 1.75rem 0 0;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2.25rem 0 0; }

.btn {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 550;
  font-size: 0.98rem;
  text-decoration: none;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------ principles */

.band {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
  padding: clamp(3rem, 7vw, 4.5rem) 0;
}

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}
.principles h2 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.principles p { margin: 0; color: var(--text-2); font-size: 1rem; }

/* -------------------------------------------------------------- sections */

.section { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.section--rule { border-top: 1px solid var(--line); }

.section__title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

/* -------------------------------------------------------------- projects */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
}

.project {
  display: flex;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.project--next { background: transparent; border-style: dashed; }

.project__icon {
  width: 4rem;
  height: 4rem;
  flex: none;
  border-radius: 14px;
}
.project__icon--empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  color: var(--text-2);
}
.project__icon--empty svg { width: 2.5rem; height: 2.5rem; }

.project__body { min-width: 0; }
.project__meta {
  font: 500 0.75rem/1.5 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 0.5rem;
}
.tag {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
}
.project h3 { font-size: 1.45rem; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.project p { color: var(--text-2); font-size: 1rem; }
.project__body > p:last-child { margin-bottom: 0; }
.project__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; font-size: 0.95rem; }
.project__links a:first-child { color: var(--ink); font-weight: 600; }
.project__links a:first-child:hover { color: var(--accent); }

/* --------------------------------------------------------------- contact */

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.contact h3 {
  font: 500 0.78rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 1rem;
}
.contact p { margin-bottom: 0.5rem; }
.contact .muted { margin-top: 1rem; max-width: 26rem; }
.big {
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--text-2);
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ------------------------------------------------- prose pages (privacy) */

.prose { padding: clamp(3rem, 8vw, 5rem) 0 clamp(3.5rem, 9vw, 6rem); }
.prose .wrap { max-width: 46rem; }
.prose h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.prose h2 { font-size: 1.25rem; margin: 2.25rem 0 0.6rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }

.notfound { text-align: left; }
.notfound .code {
  font: 600 clamp(4rem, 16vw, 8rem)/1 var(--mono);
  color: var(--accent);
  margin: 0 0 1rem;
}

@media (max-width: 30rem) {
  .brand__name { font-size: 0.98rem; }
  .nav a { font-size: 0.9rem; }
  .project { flex-direction: column; }
}
