/* Toolage Works — site styles. Brand tokens first, then layout, then components. */
:root {
  --navy: #1F2D3A;
  --slate: #3E5C76;
  --cyan: #4EB9C9;
  --cyan-ink: #1D7F8E;       /* cyan dark enough for text on light backgrounds (AA) */
  --cyan-wash: #E6F5F7;
  --coral: #E8604C;
  --bg: #F7FAFB;
  --paper: #FFFFFF;
  --ink: var(--navy);
  --muted: #55636F;
  --line: #D9E4EA;
  --radius: 18px;
  --display: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1820;
    --paper: #16222D;
    --ink: #E8EEF2;
    --muted: #A3B1BC;
    --line: #2A3A48;
    --cyan-ink: #6FCAD7;
    --cyan-wash: #13303A;
    color-scheme: dark;
  }
}

*, *::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(--bg);
  color: var(--ink);
  font: 18px/1.6 var(--body);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, .brand, .btn, nav, .eyebrow, label, footer { font-family: var(--display); }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 800; }
p { margin: 0 0 1em; }
.eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-bottom: .8em; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--cyan); } }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.works { color: var(--cyan-ink); font-weight: 900; letter-spacing: .04em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand b { font-size: 1.45rem; font-weight: 900; letter-spacing: -.03em; }
.brand span { font-weight: 300; font-size: 1.05rem; color: var(--muted); }
nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: .95rem; font-weight: 500; }
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { color: var(--cyan-ink); }
@media (max-width: 640px) { nav li:not(.nav-cta) { display: none; } }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 800; font-size: 1rem; text-decoration: none; border: 2px solid var(--navy); cursor: pointer; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--slate); border-color: var(--slate); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--cyan-wash); color: var(--ink); }
@media (prefers-color-scheme: dark) {
  .btn { border-color: var(--cyan); }
  .btn-primary { background: var(--cyan); color: var(--navy); }
  .btn-primary:hover { background: #7ACFDB; border-color: #7ACFDB; color: var(--navy); }
}
.nav-cta .btn { padding: 8px 16px; font-size: .9rem; }

/* Sections */
section { padding: clamp(56px, 9vw, 104px) 0; }
section + section { border-top: 1px solid var(--line); }

.hero { position: relative; overflow: hidden; }
.hero::before { /* the brand grid, faint */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 80% 20%, #000 0%, transparent 65%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero-art { width: 100%; max-width: 340px; justify-self: end; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { justify-self: start; max-width: 160px; order: -1; } }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 32px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--muted); font-size: 1rem; margin: 0; }
.card .tag { display: inline-block; font-family: var(--display); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-ink); background: var(--cyan-wash); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }

.apps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); margin-top: 32px; }
@media (max-width: 480px) { .apps { grid-template-columns: 1fr; } }
.app { display: flex; gap: 20px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.app img { width: 96px; height: 96px; flex: none; }
.app h3 { font-size: 1.6rem; font-weight: 900; letter-spacing: -.03em; margin: 0; }
.app h3 .lt { font-weight: 300; color: var(--slate); }
.app p { color: var(--muted); font-size: 1rem; margin: 6px 0; }
.app .by { font-family: var(--display); font-size: .85rem; color: var(--muted); }
.app .by b { color: var(--ink); font-weight: 900; }
.status { font-family: var(--display); font-size: .75rem; font-weight: 800; color: var(--coral); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 480px) { .app { flex-direction: column; align-items: flex-start; } }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 32px; }
.steps li { counter-increment: step; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; font-size: 1rem; color: var(--muted); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cyan); color: var(--navy); font: 900 1rem var(--display); margin-bottom: 12px; }
.steps strong { display: block; color: var(--ink); font-family: var(--display); margin-bottom: 4px; }

/* Contact form */
.contact .wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
@media (max-width: 820px) { .contact .wrap { grid-template-columns: 1fr; } }
form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; }
input, select, textarea { font: 1rem var(--display); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: 100%; }
textarea { min-height: 140px; resize: vertical; }
.hp { display: none; } /* honeypot for bots */
.form-note { font-size: .9rem; color: var(--muted); min-height: 1.4em; margin: 0; }
.form-note.ok { color: var(--cyan-ink); font-weight: 600; }
.form-note.err { color: var(--coral); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--muted); }

/* Simple content pages (privacy, 404) */
.page { padding: 64px 0 96px; }
.page .wrap { max-width: 760px; }
.page h2 { font-size: 1.4rem; margin-top: 1.6em; }
@media (prefers-color-scheme: dark) { .app h3 .lt { color: var(--muted); } }
