/* Ember Workbench. The look follows the tool landing pages (dark hero band, Inter,
   gradient words, pill chips). The page has no framework CSS and no links to the rest of
   joegaudet.com, so it can move to its own domain as one folder. */

/* Light is the default; dark follows the OS unless the toggle pinned data-theme. */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #c2410c;
  --accent-soft: rgb(234 88 12 / 0.1);
  --harnessed: #7c3aed;
  --real-enums: #0d9488;
  --millwork: #4d7c0f;
  --ember-formwright: #4f46e5;
  --ember-joinery: #b45309;
  --ember-lattice: #a21caf;
  --meridian: #be123c;
  --switchyard: #2563eb;
  --ember-marquetry: #0f766e;
  --jig: #0369a1;
  --benchdog: #15803d;
  --skillsaw: #475569;
  --space-gutter: clamp(1rem, 4vw, 2rem);
  --space-section: clamp(4rem, 9vw, 6.5rem);
  --radius: 14px;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b0b14;
    --surface: #12121f;
    --ink: #f1f5f9;
    --muted: #a3aec2;
    --line: #262637;
    --accent: #fb923c;
    --accent-soft: rgb(251 146 60 / 0.12);
    --harnessed: #a78bfa;
    --real-enums: #2dd4bf;
    --millwork: #a3e635;
    --ember-formwright: #a5b4fc;
    --ember-joinery: #fbbf24;
    --ember-lattice: #e879f9;
    --meridian: #fb7185;
    --switchyard: #60a5fa;
    --ember-marquetry: #14b8a6;
    --jig: #38bdf8;
    --benchdog: #4ade80;
    --skillsaw: #94a3b8;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0b0b14;
  --surface: #12121f;
  --ink: #f1f5f9;
  --muted: #a3aec2;
  --line: #262637;
  --accent: #fb923c;
  --accent-soft: rgb(251 146 60 / 0.12);
  --harnessed: #a78bfa;
  --real-enums: #2dd4bf;
  --millwork: #a3e635;
  --ember-formwright: #a5b4fc;
  --ember-joinery: #fbbf24;
  --ember-lattice: #e879f9;
  --meridian: #fb7185;
  --switchyard: #60a5fa;
  --ember-marquetry: #14b8a6;
  --jig: #38bdf8;
  --benchdog: #4ade80;
  --skillsaw: #94a3b8;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

img,
svg {
  max-width: 100%;
}

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

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

.container {
  max-width: calc(1200px + 2 * var(--space-gutter));
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

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

.brand-link {
  display: flex;
  flex-shrink: 0;
  white-space: nowrap;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink) !important;
  font-weight: 700;
}

@media (max-width: 575px) {
  .wide-only {
    display: none;
  }
}

@media (max-width: 767px) {
  .wider-only {
    display: none;
  }
}

@media (max-width: 359px) {
  .roomy-only {
    display: none;
  }
}

@media (max-width: 380px) {
  .site-nav ul {
    gap: 0.6rem;
  }

  .site-nav a {
    font-size: 0.95rem;
  }
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--ink);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.theme-toggle .moon,
[data-theme-active='dark'] .theme-toggle .sun {
  display: none;
}

[data-theme-active='dark'] .theme-toggle .moon {
  display: block;
}

/* Hero band: dark in both schemes, like the tool pages. */
.hero-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0b0b14;
  color: #f8fafc;
}

.hero-band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 75%);
}

.hero-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(40rem 28rem at 78% 45%, rgb(234 88 12 / 0.3), transparent 70%);
}

.hero {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
  padding-block: var(--space-section);
}

.hero > *,
.hero-copy > * {
  min-width: 0;
}

@media (min-width: 992px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
  }
}

.hero .eyebrow {
  color: #fdba74;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(90deg, #fb923c, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 36rem;
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: #cbd5e1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ea580c;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #c2410c;
}

.button.ghost {
  background: transparent;
  border-color: rgb(255 255 255 / 0.25);
  color: #f8fafc;
}

.button.ghost:hover {
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.5);
}

/* The rack: the logos hung on the wall over the bench. */
.rack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 20px;
  background: rgb(255 255 255 / 0.03);
  list-style: none;
}

.rack li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(0.68rem, 2.6vw, 0.8rem);
  color: #cbd5e1;
  text-align: center;
  white-space: nowrap;
}

.rack a {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.rack img {
  width: clamp(3rem, 8vw, 4.5rem);
  height: auto;
  aspect-ratio: 1;
  transition: transform 0.2s ease;
}

.rack a:hover img {
  transform: translateY(-3px) rotate(-3deg);
}

/* Twelve logos make full rows: two columns on a phone, six from 576px. */
@media (min-width: 576px) {
  .rack {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* The mark takes a full row under the logos. */
.rack .bench-mark {
  grid-column: 1 / -1;
  justify-content: center;
  color: #fdba74;
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* Sections */
main > section {
  padding-block: var(--space-section);
}

main > section + section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* Pitch: three principles. */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.principles h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.principles p {
  margin: 0;
  color: var(--muted);
}

/* How they fit */
.fit-figure {
  margin: 0;
  overflow-x: auto;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fit-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

/* A tall diagram for phones, a wide one from 640px up. */
.fit-wide {
  display: none !important;
}

@media (min-width: 640px) {
  .fit-wide {
    display: block !important;
  }

  .fit-narrow {
    display: none !important;
  }
}

.fit-narrow .job {
  font-size: 12px;
}

.fit-figure figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.fit .layer rect {
  fill: color-mix(in srgb, var(--tint) 10%, var(--surface));
  stroke: color-mix(in srgb, var(--tint) 55%, transparent);
  stroke-width: 1.5;
}

.fit .layer.planned rect {
  stroke-dasharray: 6 5;
}

.fit .job {
  fill: var(--muted);
  font: 600 13px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fit .name {
  fill: var(--tint);
  font: 800 22px var(--font);
}

.fit .note {
  fill: var(--muted);
  font: 500 14px var(--font);
}

.fit .base rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.fit .base text {
  fill: var(--ink);
  font: 600 15px var(--font);
}

.fit .base .note {
  fill: var(--muted);
  font: 500 13px var(--font);
}

/* Tool cards, grouped by job */
/* Groups sit in one grid; the two-tool group is two columns wide, and the three-tool group is a full row.
   Each group takes two rows of that grid (its head, then its cards) through subgrid, so the heads
   of one row share a height, and the cards of one row start on one line with one height. */
.groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 3rem 1.5rem;
}

.group {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  row-gap: 0;
}

/* With three groups in a row, each row of cards has the height of the tallest one. Narrower, a
   group can stack its cards, so each row keeps its own height there. */
@media (min-width: 1120px) {
  .groups {
    grid-auto-rows: auto 1fr;
  }
}

@media (min-width: 760px) {
  .group[data-group='forms'] {
    grid-column: 1 / -1;
  }

  .group[data-group='data'] {
    grid-column: span 2;
  }
}

.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-bottom: 1.25rem;
}

.group-head h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.group-head p {
  margin: 0;
  color: var(--muted);
}

.group-head {
  flex-direction: column;
  flex-wrap: nowrap;
}

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

.card {
  --tint: var(--accent);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--tint);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--tint) 60%, transparent);
}

.card .hero-link {
  display: block;
  aspect-ratio: 1200 / 630;
  background: #0b0b14;
}

.card .hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.4rem 1.4rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card h4 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card h4 a {
  color: var(--ink);
  text-decoration: none;
}

.card h4 a:hover {
  color: var(--tint);
}

.card-title img {
  width: 1.75rem;
  height: 1.75rem;
}

.tag-anywhere,
.status,
.preview {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag-anywhere {
  border: 1px solid var(--line);
  color: var(--muted);
}

/* The tool tint passes AA on the card in both themes. */
.preview {
  border: 1px solid var(--tint);
  color: var(--tint);
}

.status {
  background: var(--accent-soft);
  color: var(--accent);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: auto 0 0;
  padding: 0.5rem 0 0;
  list-style: none;
}

.card-links a {
  color: var(--tint);
  font-weight: 600;
  text-decoration: none;
}

.card-links a:hover {
  text-decoration: underline;
}

.card-note {
  margin-top: auto !important;
  padding-top: 0.5rem;
  font-size: 0.9rem;
}

/* Install */
.terminal {
  position: relative;
  max-width: 52rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: var(--radius);
  background: #0d1117;
}

.terminal pre {
  margin: 0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  color: #e2e8f0;
  font-size: clamp(0.78rem, 0.7rem + 0.3vw, 0.9rem);
  line-height: 1.75;
}

.terminal .c {
  color: #8b98a9;
}

.terminal .copy {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 8px;
  background: #161b22;
  color: #e2e8f0;
  font: 600 0.8rem var(--font);
  cursor: pointer;
}

.terminal .copy:hover {
  border-color: rgb(255 255 255 / 0.4);
}

.install-note {
  max-width: 52rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* About */
.about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  max-width: 44rem;
}

.about img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
}

.about h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
}

.about p {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .about {
    grid-template-columns: 1fr;
  }
}

/* Footer: the shared Workbench footer (workbench-footer.css) takes the accent of the page. */
.wb-footer {
  --wb-accent: var(--accent);
  --wb-max: 1200px;
}

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

  .card,
  .rack img {
    transition: none;
  }

  .card:hover,
  .rack a:hover img {
    transform: none;
  }
}

/* The bar is dark in both themes, so it is one piece with the hero. It is the bar of the
   skillsaw site: the same colour, line, height and type on each Workbench site. */
body .site-nav {
  background: #0b0b14;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: none;
  color-scheme: dark;
}

body .site-nav > .container {
  min-height: 56px;
  padding-block: 0;
}

body .site-nav ul,
body .site-nav li {
  margin-block: 0;
  padding-block: 0;
}

body .site-nav a,
body .site-nav a:visited {
  color: #cbd5e1 !important;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

body .site-nav a:hover,
body .site-nav .brand a,
body .site-nav a.brand,
body .site-nav .brand-link,
body .site-nav .brand-link strong {
  color: #f8fafc !important;
}

body .site-nav a.brand,
body .site-nav .brand a,
body .site-nav .brand-link {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

body .site-nav button,
body .site-nav [role='button'] {
  color: #f8fafc;
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.12);
}

body .site-nav :focus-visible {
  outline-color: #f8fafc;
}

@media (max-width: 575px) {
  body .site-nav a,
  body .site-nav a:visited {
    font-size: 14px;
  }
}


/* A wood grain under the hero, the same on each Workbench site. It is drawn by an SVG filter:
   long, thin noise, cut into bands. */
.hero-band > .wood {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'1600'%20height%3D'900'%20viewBox%3D'0%200%201600%20900'%20preserveAspectRatio%3D'none'%3E%3Cfilter%20id%3D'g'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.0006%200.009'%20numOctaves%3D'2'%20seed%3D'11'%2F%3E%3CfeColorMatrix%20type%3D'matrix'%20values%3D'0%200%200%200%201%20%200%200%200%200%200.83%20%200%200%200%200%200.64%20%201%200%200%200%200'%2F%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D'table'%20tableValues%3D'0%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200%200%200.35%201%200.35%200%200'%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Crect%20width%3D'1600'%20height%3D'900'%20filter%3D'url(%23g)'%20opacity%3D'1'%2F%3E%3C%2Fsvg%3E") center / cover no-repeat;
  opacity: 0.12;
}
