/* NEC Workbench website */

@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #f4f7f9;
  --grid: #dfe7ee;
  --grid-major: #cbd7e1;
  --ink: #15263a;
  --ink-soft: #4a5c70;
  --wire: #2463a8;
  --feed: #c8322b;
  --white: #ffffff;
  --ramp: linear-gradient(90deg, #2f3fd0 0%, #1fb5b0 30%, #9bd12e 55%, #f2c230 75%, #d8352a 100%);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Atkinson", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Consolas, monospace;
  --measure: 68ch;
  --wide: 1240px;
}

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

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

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

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

a { color: var(--wire); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--feed); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--white); padding: .5rem 1rem; z-index: 10; }

/* Header: the current-magnitude ramp is the site's one bit of colour */
.site-head { background: var(--white); border-bottom: 1px solid var(--grid-major); position: relative; }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: var(--ramp); }
.site-head .inner { max-width: var(--wide); margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.55rem; letter-spacing: .01em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .55rem; }
.brand svg { flex: none; }
.site-nav { margin-left: auto; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .98rem; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--wire); text-decoration: underline; }

/* Graph paper, as in the geometry view */
.paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}

/* Hero */
.hero { padding: 4.5rem 1.25rem 3.5rem; }
.hero .inner { max-width: var(--wide); margin: 0 auto; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.005em;
  margin: 0 0 1.25rem;
  max-width: 19ch;
}
.hero .lede { font-size: 1.25rem; max-width: 52ch; margin: 0 0 2rem; color: var(--ink); }
.actions { display: flex; gap: .85rem; flex-wrap: wrap; align-items: center; margin-bottom: .9rem; }
.button {
  display: inline-block;
  padding: .72rem 1.25rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--white);
}
.button:hover { background: var(--ink); color: var(--white); }
.button.primary { background: var(--ink); color: var(--white); }
.button.primary:hover { background: var(--wire); border-color: var(--wire); }
.hero .note { font-size: .95rem; color: var(--ink-soft); margin: 0; }

.shot { margin: 3rem 0 0; }
.shot img { border: 1px solid var(--grid-major); border-radius: 6px; box-shadow: 0 18px 40px -24px rgba(21, 38, 58, .45); background: var(--white); }

/* The Yagi's numbers, labelled like a measurement on a drawing */
.reading { display: flex; flex-wrap: wrap; gap: .4rem 2.2rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: .95rem; color: var(--ink-soft); }
.reading li { display: flex; gap: .5rem; align-items: baseline; }
.reading b { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.reading .what { color: var(--ink); font-weight: 700; }

/* Sections */
.band { padding: 4.5rem 1.25rem; background: var(--white); border-top: 1px solid var(--grid-major); }
.band .inner { max-width: var(--wide); margin: 0 auto; }
.band.paper { background-color: var(--paper); }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.05; margin: 0 0 1rem; }
h3 { font-family: var(--display); font-weight: 600; font-size: 1.65rem; line-height: 1.1; margin: 0 0 .6rem; }
.band > .inner > p.intro { max-width: var(--measure); font-size: 1.15rem; margin: 0 0 3rem; }

.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; margin: 0 0 4rem; }
.feature:last-child { margin-bottom: 0; }
.feature:nth-of-type(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature:nth-of-type(even) figure { order: 2; }
.feature figure { margin: 0; }
.feature figure img { width: 100%; border: 1px solid var(--grid-major); border-radius: 6px; background: var(--white); }
.feature figure img.native { width: auto; margin-left: auto; margin-right: auto; }
.feature p { margin: 0 0 .8rem; max-width: 46ch; }

/* Download */
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; margin: 0 0 2.5rem; }
.download { border-left: 4px solid var(--wire); padding: .2rem 0 .2rem 1.3rem; }
.download p { margin: 0 0 .7rem; max-width: 48ch; }
.download .button { margin-top: .4rem; }
.fine { font-size: .95rem; color: var(--ink-soft); max-width: var(--measure); }
.fine p { margin: 0 0 .6rem; }

code, kbd { font-family: var(--mono); font-size: .9em; background: #e9eff4; border-radius: 3px; padding: .08em .35em; }

/* Docs list */
.doclist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.doclist a { font-family: var(--display); font-weight: 600; font-size: 1.5rem; text-decoration: none; }
.doclist a:hover { text-decoration: underline; }
.doclist p { margin: .3rem 0 0; color: var(--ink-soft); }

/* Footer */
.site-foot { background: var(--ink); color: #c9d5e1; padding: 2.5rem 1.25rem; font-size: .95rem; }
.site-foot .inner { max-width: var(--wide); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; }
.site-foot a { color: var(--white); }
.site-foot p { margin: 0 0 .4rem; max-width: 60ch; }

/* Documentation pages */
.doc { max-width: var(--wide); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 3rem; }
.doc-side { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow: auto; font-size: .93rem; padding-right: .5rem; }
.doc-side .docs-nav { list-style: none; margin: 0 0 1.5rem; padding: 0 0 1.2rem; border-bottom: 1px solid var(--grid-major); }
.doc-side .docs-nav li { margin: 0 0 .35rem; }
.doc-side .docs-nav a { font-weight: 700; text-decoration: none; color: var(--ink); }
.doc-side .docs-nav a[aria-current] { color: var(--wire); }
.doc-side .docs-nav a:hover { text-decoration: underline; }
.doc-side .toc-title { font-weight: 700; margin: 0 0 .5rem; }
.doc-side nav ul { list-style: none; margin: 0; padding: 0; }
.doc-side nav ul ul { padding-left: .9rem; margin: .25rem 0 .4rem; }
.doc-side nav li { margin: 0 0 .3rem; line-height: 1.35; }
.doc-side nav a { color: var(--ink-soft); text-decoration: none; }
.doc-side nav a:hover { color: var(--wire); text-decoration: underline; }

.prose { min-width: 0; background: var(--white); border: 1px solid var(--grid-major); border-radius: 6px; padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem); }
.prose > * { max-width: var(--measure); }
.prose h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 4.5vw, 3.4rem); line-height: 1; margin: 0 0 1.5rem; }
.prose h2 { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--grid); font-size: 2.1rem; }
.prose h3 { margin-top: 2rem; }
.prose h4 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 1rem; }
.prose li { margin: .2rem 0; }
.prose table { border-collapse: collapse; width: 100%; max-width: none; display: block; overflow-x: auto; font-size: .95rem; margin: 1.2rem 0; }
.prose th, .prose td { border: 1px solid var(--grid-major); padding: .45rem .7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--paper); }
.prose pre { max-width: none; background: #edf2f6; border: 1px solid var(--grid-major); border-radius: 4px; padding: 1rem 1.2rem; overflow-x: auto; line-height: 1.45; }
.prose pre code { background: none; padding: 0; font-size: .88rem; }
.prose blockquote { margin: 1.2rem 0; padding: .2rem 0 .2rem 1.1rem; border-left: 4px solid var(--grid-major); color: var(--ink-soft); }
.prose .version { color: var(--ink-soft); font-size: .95rem; margin: -1rem 0 2rem; }

/* Narrow screens */
@media (max-width: 900px) {
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature:nth-of-type(even) figure { order: 0; }
  .downloads, .doclist { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; gap: 1.5rem; }
  .doc-side { position: static; max-height: none; }
  .doc-side nav { display: none; }
  .hero { padding-top: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .site-head, .site-foot, .doc-side { display: none; }
  .doc { display: block; }
  .prose { border: 0; padding: 0; }
}

.band > .inner > p.intro:has(+ p.intro) { margin-bottom: 1rem; }

.opt-detail { margin-top: 3.5rem; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.opt-detail figure { order: 0; }

/* Goals statement: the one dark band on the page */
.band.statement { background: var(--ink); color: #dfe7ee; border-top: 0; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.band.statement h2 { color: var(--white); }
.band.statement p { max-width: var(--measure); font-size: 1.15rem; margin: 0 0 1rem; }
.band.statement p:last-child { margin-bottom: 0; }
.band.statement a { color: var(--white); }
.band.statement + .band { border-top: 0; }

/* What's coming */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.plan { border-top: 3px solid var(--grid-major); padding-top: 1rem; }
.plan:first-child { border-top-color: var(--wire); }
.plan ul { margin: 0; padding-left: 1.1rem; }
.plan li { margin: 0 0 .55rem; }
.plan .mac { margin: 1.4rem 0 0; padding: .9rem 1rem; background: var(--paper); border-left: 4px solid var(--feed); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; gap: 1.75rem; } }

/* Test-release banner under the header, on every page */
.test-banner { background: #f2c230; color: var(--ink); border-bottom: 1px solid #d9a915; font-size: .98rem; }
.site-head + .test-banner { margin-top: 3px; }
.test-banner .inner { max-width: var(--wide); margin: 0 auto; padding: .6rem 1.25rem; }
.test-banner a { color: var(--ink); text-decoration-thickness: 2px; }
.test-banner a:focus-visible { outline-color: var(--ink); }

/* Built on */
.credits { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.credits li { margin: 0 0 .9rem; padding-left: 1.1rem; border-left: 3px solid var(--grid-major); }
.credits li:first-child { border-left-color: var(--wire); }
