/* Millwork IO website. Direction A ("model space", dark, AI-first).
   Tokens first; every color, size and space in the pages comes from here.
   Rules: never green or gold (the logo marks are the only brand-colored element);
   one restrained accent (blue); text contrast at least 4.5:1 on its ground. */

:root {
  /* Grounds */
  --bg: #0b0b0b;          /* page */
  --bg-panel: #111111;    /* bordered panels and cards */
  --bg-tile: #0f0f0f;     /* small tiles in a grid */
  --bg-raised: #161616;   /* transcript strip, code-like rows */
  --bg-media: #000000;    /* video and drawing frames */

  /* Lines */
  --line-faint: #262626;  /* header and footer rules */
  --line: #333333;        /* panel borders, grid gaps */
  --line-strong: #474747; /* column rules, ghost buttons, figure frames */

  /* Text */
  --text: #e6e6e6;        /* headings, strong */
  --text-body: #c4c4c4;   /* lead and section intro */
  --text-muted: #b0b0b0;  /* card body, nav */
  --text-faint: #9a9a9a;  /* captions, footer, small notes */

  /* The one accent */
  --accent: #3b73a8;      /* filled buttons (white text on it) */
  --accent-hover: #2f6496; /* darker on hover keeps white text above 4.5:1 */
  --accent-text: #8fb2d4; /* links, eyebrows, labels */
  --accent-text-hover: #b9d0e6;
  --accent-icon: #769dc2; /* play icon and similar strokes */

  /* Placeholder blocks */
  --placeholder-line: #5a5a5a;

  /* Type */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --fs-body: 17px;
  --lh-body: 1.55;
  --fs-small: 15px;
  --fs-caption: 13px;
  --fs-lead: 20px;
  --fs-h1: clamp(42px, 6vw, 84px);
  --fs-h1-page: clamp(36px, 4.6vw, 60px);
  --fs-h2: 36px;
  --fs-h3: 20px;
  --fs-price: 64px;

  /* Space */
  --container: 1200px;
  --gutter: 32px;
  --section-gap: 104px;
  --radius: 3px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

img { max-width: 100%; height: auto; display: block; }

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

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

h1, h2, h3, p, ul, ol, figure { margin: 0; }

code, .mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 10;
}
.skip-link:focus { top: 12px; color: #ffffff; }

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

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line-faint); }

.site-header .container {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
}
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: var(--fs-small);
}
.site-nav a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 12px 0;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent-text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  padding: 15px 26px;
  line-height: 1.3;
}
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-hover); color: #ffffff; }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 14px 22px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); }
.btn-small { padding: 12px 20px; font-size: var(--fs-small); }
/* Before launch: the trial button says so and leads nowhere */
.btn-soon, .btn-soon:hover { background: transparent; color: var(--text); border: 1px solid var(--line-strong); cursor: default; }
[hidden] { display: none !important; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Sections ---------- */

.section { padding-top: var(--section-gap); }
.section > .container { display: flex; flex-direction: column; gap: 36px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.hero .container {
  padding-top: 88px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 1.03;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 17ch;
  text-wrap: balance;
}
.page-hero h1 { font-size: var(--fs-h1-page); line-height: 1.06; max-width: 22ch; }
.lead { max-width: 64ch; font-size: var(--fs-lead); color: var(--text-body); }

h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; }

.intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px 64px;
}
.intro p, .intro-text { color: var(--text-body); }
.stack { display: flex; flex-direction: column; gap: 14px; max-width: 64ch; }
.stack p { color: var(--text-body); }

.more-link { font-size: var(--fs-small); }

/* Cards joined by 1px lines (the "AI and the drafter" row). Each cell draws its own right and
   bottom rule, so a short last row leaves no grey block. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card p { color: var(--text-muted); }

/* Columns with a top rule (the "Start from whatever you have" row, the steps) */
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px 40px;
}
.columns.wide { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line-strong);
  padding-top: 20px;
}
.column p { color: var(--text-muted); }
.step-number { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--accent-text); }

/* Bordered panel (redlines, pricing) */
.panel {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px 64px;
}
.panel-head { display: flex; flex-direction: column; gap: 16px; }
.panel-head p { color: var(--text-body); }

.plain-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-muted);
}
.plain-list strong { color: var(--text); font-weight: 600; }

/* Small tiles (the workspace grid) */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.tile {
  background: var(--bg-tile);
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tile-title { font-weight: 600; }
.tile-text { color: var(--text-faint); font-size: var(--fs-small); }

/* Notes in three columns under the sheets */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 48px;
  color: var(--text-muted);
  font-size: 16px;
}
.notes strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 4px; }

/* ---------- Media ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}
.sheet { display: flex; flex-direction: column; gap: 10px; }
.sheet .frame { background: var(--bg-media); padding: 8px; border: 1px solid var(--line-strong); }
.sheet img { width: 100%; }
figcaption, .caption {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  color: var(--text-faint);
}

.video-frame {
  border: 1px solid var(--line);
  background: var(--bg-media);
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}
.transcript {
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--bg-raised);
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.transcript .who { color: var(--accent-text); }
.transcript .said { color: var(--text); }

/* A clearly marked placeholder: something real (a recording, a screenshot, a number) is still to come */
.placeholder {
  border: 1px dashed var(--placeholder-line);
  background: var(--bg-media);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  min-height: 220px;
}
.placeholder.ratio { aspect-ratio: 16 / 9; min-height: 0; }
.placeholder-label,
.video-frame .placeholder-label {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  max-width: 56ch;
}

.inline-code { font-family: var(--font-mono); color: var(--text); }

/* ---------- Pricing ---------- */

.price-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price {
  font-size: var(--fs-price);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.price-unit { color: var(--text-muted); }
.panel.center { align-items: center; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px 64px; }
.included { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--text-body); }

/* Questions and answers */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 80ch; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  list-style-position: outside;
}
.faq details p { color: var(--text-muted); padding-bottom: 18px; }

/* ---------- Legal pages ---------- */

.legal { max-width: 76ch; display: flex; flex-direction: column; gap: 16px; color: var(--text-body); }
.legal h2 { font-size: 24px; margin-top: 28px; }
.legal ul { padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.legal strong { color: var(--text); }
.legal code { font-family: var(--font-mono); font-size: 15px; color: var(--text); }
.legal .table-wrap { overflow-x: auto; }
.legal table { border-collapse: collapse; font-size: 15px; min-width: 640px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--bg-raised); color: var(--text); }
.blank {
  background: transparent;
  color: var(--text);
  border: 1px dashed var(--placeholder-line);
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.draft-note {
  border: 1px dashed var(--placeholder-line);
  background: var(--bg-panel);
  padding: 16px 20px;
  color: var(--text-muted);
  font-size: var(--fs-small);
}

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

.site-footer .container {
  padding-top: 88px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 14px;
  color: var(--text-faint);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  border-top: 1px solid var(--line-faint);
  padding-top: 28px;
}
.footer-row.pages { border-top: 0; padding-top: 0; }
.footer-row a { color: var(--text-muted); padding: 10px 0; }
.footer-row a:hover { color: var(--text); }
.footer-org { color: var(--text-body); }
.footer-mail { margin-left: auto; }
.footer-legal-note { max-width: 90ch; }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  :root { --gutter: 20px; --section-gap: 72px; --fs-h2: 30px; --fs-price: 52px; }
  .site-header .container { gap: 12px 16px; }
  .header-cta { margin-left: auto; }
  .site-nav { order: 3; margin-left: 0; width: 100%; }
  .site-nav ul { gap: 0 20px; }
  .site-nav a { padding: 8px 0; }
  .hero .container { padding-top: 48px; }
  .lead { font-size: 18px; }
  .panel { padding: 28px 22px; }
  .card { padding: 24px; }
  .figures { grid-template-columns: 1fr; }
  .footer-mail { margin-left: 0; }
}

@media (max-width: 400px) {
  .intro, .panel { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
