@charset "UTF-8";
/* Flat Field Works, mockup. The Works layer.
   Load it after site.css, with works.js after site.js. It changes no size,
   space or font that site.css sets. Section numbers carry on from site.css.

   10 Works look   [data-look="works"] on <html>
   11 Drawn parts  how the look redraws buttons, links, headings, rules, lists
   12 Drawings     .dwg and its line classes, .dwg-defs
   13 Works parts  .figure .sheet .views .view .titleblock .plates .plate
                   .marks .steps .notes .addr
   14 Drawing on   what works.js animates

   WHAT MAKES WORKS LOOK LIKE WORKS
   - Dark only. A near-black ground with a faint grid. Never blue.
   - Two kinds of line. The object is orange (--hot). Everything used to
     set it out is grey (--cx) and carries on past the corner it meets.
   - That holds for the page too: a button is an orange outline whose
     edges run on in grey, a headline sits in a box whose lines leave the
     page, a list item is marked with an orange cross.
   - Nothing is filled and nothing has a rounded corner.
   - Lines draw themselves on when they come into view. */

@property --o { syntax: "<length>"; inherits: true; initial-value: 10px; }

/* ---------- 10 Works look ---------- */
[data-look="works"] {
  color-scheme: dark;
  --bg: #0e0e0f;
  --bg-raise: #161617;
  --fg: #f3f2ef;
  --mid: #bcbbb6;
  --mute: #86857f;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .2);
  --hot: #ff7424;                           /* the object, and anything you can press */
  --cx: rgba(255, 255, 255, .2);            /* construction lines */
  --dim: #8d8c86;                           /* dimensions, centre lines */
  --grid: rgba(255, 255, 255, .028);
  --focus: var(--hot);
  --gel: var(--hot);
  --band: repeating-linear-gradient(90deg, var(--hot) 0 48px, transparent 48px 54px, var(--hot) 54px 62px, transparent 62px 68px);
}
[data-look="works"] body {
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
}
[data-look="works"] .band { background: var(--band) top / auto 1px repeat-x; transform-origin: left; }   /* a centre line */
[data-look="works"].scrolled .nav { background: rgba(14, 14, 15, .82); }
[data-look="works"] .chip { background: none; border-radius: 0; box-shadow: inset 0 0 0 1px var(--line-strong); }
[data-look="works"] :focus-visible { border-radius: 0; }
[data-look="works"] ::selection { background: var(--hot); color: var(--bg); }

/* The Works wordmark is one piece of artwork (brand/identity/logo/flatfield-works-wordmark.svg):
   the Flat Field lockup, the dividing line and "Works", so it is an image, never retyped.
   --h is its height: 22px nav, 17px phone nav, 18px footer. */
.brand { --h: 22px; }
footer .brand { --h: 18px; }
.brand .wordmark { display: block; width: auto; height: var(--h); border-radius: 0; }

/* ---------- 11 Drawn parts ----------
   Flat Field parts, redrawn. Same markup, same sizes. */

/* Labels: mono, led by an orange cross. */
[data-look="works"] .eyebrow { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
[data-look="works"] .eyebrow::before,
.marks > li::before,
[data-look="works"] .prose ul > li::before {
  content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 10px;
  background: linear-gradient(var(--hot), var(--hot)) center / 100% 1px no-repeat, linear-gradient(var(--hot), var(--hot)) center / 1px 100% no-repeat;
}

/* Buttons: an orange outline. Its four edges carry on in grey, and
   further when you point at it. */
[data-look="works"] .btn { --o: 10px; position: relative; background: transparent; color: var(--hot); border-radius: 0; box-shadow: inset 0 0 0 1px var(--hot); transition: --o .35s var(--ease), background .2s, color .2s; }
[data-look="works"] .btn::before, [data-look="works"] .btn::after { content: ""; position: absolute; pointer-events: none; }
[data-look="works"] .btn::before { inset: 0 calc(-1 * var(--o)); background: linear-gradient(90deg, var(--cx) 0 var(--o), transparent 0 calc(100% - var(--o)), var(--cx) 0) top / 100% 1px no-repeat, linear-gradient(90deg, var(--cx) 0 var(--o), transparent 0 calc(100% - var(--o)), var(--cx) 0) bottom / 100% 1px no-repeat; }
[data-look="works"] .btn::after { inset: calc(-1 * var(--o)) 0; background: linear-gradient(var(--cx) 0 var(--o), transparent 0 calc(100% - var(--o)), var(--cx) 0) left / 1px 100% no-repeat, linear-gradient(var(--cx) 0 var(--o), transparent 0 calc(100% - var(--o)), var(--cx) 0) right / 1px 100% no-repeat; }
[data-look="works"] .btn:hover { --o: 22px; background: var(--hot); color: var(--bg); transform: none; }
[data-look="works"] .btn.sm { --o: 6px; }
[data-look="works"] .btn.sm:hover { --o: 12px; }
[data-look="works"] .btn.quiet { color: var(--fg); background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
[data-look="works"] .btn.quiet:hover { background: var(--fg); color: var(--bg); }

/* Links: an orange line under the words that draws itself again on hover. */
[data-look="works"] :is(.link, .addr, .prose a, .links a, .rows .body p a, .small a) {
  text-decoration: none;
  background: linear-gradient(var(--hot), var(--hot)) left bottom / 100% 1px no-repeat;
  padding-bottom: .16em;
}
[data-look="works"] .link::after { color: var(--hot); }
@media (prefers-reduced-motion: no-preference) {
  [data-look="works"] :is(.link, .addr, .prose a, .links a, .rows .body p a, .small a):hover { animation: w-under .5s var(--ease); }
}
@keyframes w-under { from { background-size: 0 1px; } to { background-size: 100% 1px; } }
[data-look="works"] footer nav a { transition: color .15s; }
[data-look="works"] footer nav a:hover { color: var(--hot); }

/* Headlines: the page's one headline sits in a box. The top and bottom
   of the box leave the page; the sides overshoot. */
[data-look="works"] :is(.hero h1, .head h1, .close h2) { position: relative; width: fit-content; padding: .06em .1em .1em; }
[data-look="works"] :is(.hero h1, .close h2) { margin-inline: auto; }
[data-look="works"] .head h1 { margin-left: -.1em; }
[data-look="works"] :is(.hero h1, .head h1, .close h2)::before,
[data-look="works"] :is(.hero h1, .head h1, .close h2)::after { content: ""; position: absolute; pointer-events: none; transition: transform 1.3s var(--ease) .25s; }
[data-look="works"] :is(.hero h1, .head h1, .close h2)::before { inset: 0 -100vw; border-block: 1px solid var(--cx); }
[data-look="works"] :is(.hero h1, .head h1, .close h2)::after { inset: -.42em 0; border-inline: 1px solid var(--cx); }
.js[data-look="works"] :is(.hero h1, .head h1, .close h2)[data-reveal]:not(.in)::before { transform: scaleX(0); }
.js[data-look="works"] :is(.hero h1, .head h1, .close h2)[data-reveal]:not(.in)::after { transform: scaleY(0); }
[data-look="works"] .close::before { display: none; }       /* no glow: Works has no light */

/* Rules: a ruled section or row is a line that draws from the left. */
[data-look="works"] .s.ruled { border-top-color: transparent; }
[data-look="works"] .rows { border-top-color: transparent; position: relative; }
[data-look="works"] .rows > .row { border-bottom-color: transparent; position: relative; }
[data-look="works"] .s.ruled::before,
[data-look="works"] .rows::before,
[data-look="works"] .rows > .row::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--cx); transform-origin: left; transition: transform 1.2s var(--ease); pointer-events: none; }
[data-look="works"] .s.ruled::before { top: -1px; }
[data-look="works"] .rows::before { top: -1px; left: -14px; }
[data-look="works"] .rows > .row::after { bottom: -1px; left: -14px; }

/* Prose lists take the cross too. */
[data-look="works"] .prose ul { list-style: none; padding-left: 0; }
[data-look="works"] .prose ul > li { position: relative; padding-left: 24px; }
[data-look="works"] .prose ul > li::before { position: absolute; left: 0; top: .5em; margin: 0; }

/* ---------- 12 Drawings ----------
   A drawing is an inline <svg class="dwg"> with a viewBox and no width,
   height, colour or stroke of its own. Every line takes one class below.
   Line weights stay the same on screen at any size. Construction lines
   may leave the viewBox; nothing clips them. */
.dwg { display: block; width: 100%; height: auto; overflow: visible; }
.dwg * { vector-effect: non-scaling-stroke; }
.dwg .cx   { fill: none; stroke: var(--cx); stroke-width: 1; }                                                        /* construction: grey, runs on */
.dwg .mask { fill: var(--bg); stroke: none; }   /* hides what is behind a part that moves */
.dwg .ctx  { fill: none; stroke: var(--fg); stroke-opacity: .38; stroke-width: .7; stroke-linejoin: round; stroke-linecap: round; }  /* context: what the part fits, grey */
.dwg .ln   { fill: none; stroke: var(--hot); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }      /* the object */
.dwg .thin { fill: none; stroke: var(--hot); stroke-width: .8; stroke-opacity: .7; stroke-linejoin: round; }          /* surface detail */
.dwg .f1, .dwg .f2, .dwg .f3 { stroke: var(--hot); stroke-width: 1.25; stroke-linejoin: round; }                      /* faces of a solid */
.dwg .f1 { fill: var(--bg); }                                               /* top */
.dwg .f2 { fill: color-mix(in srgb, var(--hot) 5%, var(--bg)); }            /* left */
.dwg .f3 { fill: color-mix(in srgb, var(--hot) 10%, var(--bg)); }           /* right */
.dwg .hole { fill: var(--bg); stroke: var(--hot); stroke-width: .8; }
.dwg .hid  { fill: none; stroke: var(--hot); stroke-opacity: .5; stroke-width: .8; stroke-dasharray: 4 3; }           /* hidden edge */
.dwg .ctr  { fill: none; stroke: var(--dim); stroke-width: .8; stroke-dasharray: 10 3 2 3; }                          /* centre line */
.dwg .cut  { fill: none; stroke: var(--fg); stroke-width: 1.6; }                                                      /* section arrows */
.dwg .dm   { fill: none; stroke: var(--dim); stroke-width: .8; }                                                      /* dimension and leader */
.dwg .ah   { fill: var(--dim); stroke: none; }                                                                        /* arrowhead */
.dwg .dt   { fill: var(--mid); font: 500 10px var(--mono); text-anchor: middle; }                                     /* figure */
.dwg .dt.s { text-anchor: start; }
.dwg .dt.k { fill: var(--mute); }
.dwg .hatch { fill: url(#hatch); stroke: var(--hot); stroke-width: 1.4; stroke-linejoin: round; }                     /* cut face */
/* The hatch pattern. One block per page, first thing inside <main>. */
.dwg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.dwg-defs line { stroke: var(--hot); stroke-opacity: .6; stroke-width: .7; }

/* ---------- 13 Works parts ---------- */

/* Figure: one large drawing with no frame, under a hero. Its
   construction lines run off the page and behind the words above. */
.figure { position: relative; z-index: 0; max-width: 940px; margin: clamp(8px, 2vw, 32px) auto 0; pointer-events: none; }
.figure figcaption { margin-top: 4px; }
.hero .wrap > :not(.figure) { position: relative; z-index: 1; }
.hero:has(.figure) { padding-bottom: clamp(40px, 6vw, 80px); }
.figure figcaption, .view figcaption, .plate figcaption { font: 500 .6875rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }

/* Sheet: two to four views and a title block. No box: four lines that
   cross at the corners and carry on. */
.sheet { position: relative; margin-top: clamp(56px, 8vw, 104px); text-align: left; }
.sheet::before, .sheet::after { content: ""; position: absolute; pointer-events: none; transition: transform 1.4s var(--ease); }
.sheet::before { inset: 0 -100vw; border-block: 1px solid var(--cx); }
.sheet::after { inset: -28px 0; border-inline: 1px solid var(--cx); }
.stack + .sheet, .stack + .plates, .stack + .steps { margin-top: clamp(40px, 6vw, 72px); }
.rows .body > .sheet { margin-top: 0; }
.views { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 28px 16px; padding: clamp(24px, 4vw, 48px) clamp(12px, 3vw, 40px); }
.view { min-width: 0; }
.view figcaption { margin-top: 10px; text-align: center; }

/* Title block: who, what, which sheet. Cells wrap; rows always fill. */
.titleblock { display: flex; flex-wrap: wrap; gap: 1px; margin: 0; background: var(--cx); border-top: 1px solid var(--cx); }
.sheet .titleblock { max-width: 760px; margin-left: auto; border-left: 1px solid var(--cx); }
.titleblock > div { flex: 1 1 88px; min-width: 0; background: var(--bg); padding: 9px 12px 10px; }
.titleblock > .wide { flex: 2 1 200px; }
.titleblock dt { font: 500 .625rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.titleblock dd { margin-top: 3px; font: 500 .8125rem/1.3 var(--mono); color: var(--fg); overflow-wrap: anywhere; }
.titleblock .wide dd { font: 600 1rem/1.25 var(--sans); letter-spacing: -.01em; }
.titleblock > div:nth-child(2) dd { color: var(--hot); }       /* the drawing number */
@media (max-width: 700px) { .sheet .titleblock { max-width: none; border-left: 0; } }

/* Plates: three drawings across, each with a heading and a short list
   or a line. No boxes. The Works version of .cols. */
.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px clamp(24px, 4vw, 56px); }
.plate { margin-bottom: 22px; }
.plate figcaption { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.plate figcaption::before { content: ""; order: 1; flex: 1; height: 1px; background: var(--cx); }
.plate figcaption span:first-child { color: var(--hot); }
.plate figcaption span:last-child { order: 2; }
.plates h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.plates p { color: var(--mid); font-size: 1rem; }
.plates .marks { margin-top: 12px; }
@media (max-width: 860px) { .plates { grid-template-columns: 1fr; } .plate .dwg { max-width: 380px; margin-inline: auto; } }

/* Marks: a list. Each item hangs off an orange cross and sits on a
   grey line that starts a little before it. */
.marks { max-width: 34em; }
.marks > li { position: relative; padding: 9px 0 9px 24px; color: var(--mid); }
.marks > li::before { position: absolute; left: 0; top: calc(9px + .8em - 5px); margin: 0; }
.marks > li::after { content: ""; position: absolute; left: -14px; right: 0; bottom: 0; height: 1px; background: var(--line); transform-origin: left; transition: transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.marks > li:nth-child(2) { --i: 1; } .marks > li:nth-child(3) { --i: 2; } .marks > li:nth-child(4) { --i: 3; } .marks > li:nth-child(5) { --i: 4; } .marks > li:nth-child(6) { --i: 5; }
.marks b { color: var(--fg); font-weight: 600; }

/* Steps: three things in order, each under a line that starts with its number. */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(28px, 5vw, 72px); }
.steps > li { counter-increment: step; position: relative; padding-top: 18px; }
.steps > li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 12px; font: 500 .875rem/1 var(--mono); color: var(--hot); }
.steps > li::after { content: ""; position: absolute; left: -14px; right: 0; top: 0; height: 1px; background: var(--cx); transform-origin: left; transition: transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 120ms); }
.steps h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.steps p { color: var(--mid); font-size: 1rem; }
.steps + .addr, .steps + .actions { margin-top: 48px; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* Notes: the numbered notes in the corner of a drawing. */
.notes { counter-reset: note; max-width: 46em; font: 400 .8125rem/1.6 var(--mono); color: var(--mid); }
.notes > li { counter-increment: note; position: relative; padding-left: 2.4em; }
.notes > li + li { margin-top: 4px; }
.notes > li::before { content: counter(note) "."; position: absolute; left: 0; color: var(--hot); }
.eyebrow + .notes { margin-top: 10px; }

/* Addr: an email address, set large in mono so it can be read and copied. */
.addr { display: inline-block; font: 500 var(--t-h3)/1.2 var(--mono); letter-spacing: -.02em; overflow-wrap: anywhere; }
.addr + .small { margin-top: 18px; }

/* Sheet spacing on a plain page */
.plain > .sheet:first-child { margin-top: 28px; }
.sheet + .rows { margin-top: clamp(64px, 8vw, 104px); }

/* ---------- 14 Drawing on ----------
   works.js adds .draw to <html> when motion is allowed, then .drawn to
   each of these as it comes into view. Without it everything is simply
   there. Inside a drawing the script times each line itself. */
.draw [data-look="works"] .band, .draw[data-look="works"] .band { animation: w-band 1.6s var(--ease) both; }
@keyframes w-band { from { transform: scaleX(0); } }
.draw .sheet:not(.drawn)::before { transform: scaleX(0); }
.draw .sheet:not(.drawn)::after { transform: scaleY(0); }
.draw[data-look="works"] .s.ruled:not(.drawn)::before,
.draw[data-look="works"] .rows:not(.drawn)::before,
.draw[data-look="works"] .rows > .row:not(.drawn)::after,
.draw .marks > li:not(.drawn)::after,
.draw .steps > li:not(.drawn)::after { transform: scaleX(0); }
.draw .titleblock { transition: opacity .8s var(--ease) .5s; }
.draw .sheet:not(.drawn) .titleblock { opacity: 0; }

/* Figures in the hero drawing stay readable on a phone. */
@media (max-width: 600px) {
  [data-look="works"] .figure .dt { font-size: 13px; }
  .figure .dwg .ctx { stroke-width: .5; }
  .figure .dwg path.ln { stroke-width: 1; }
  .figure .dwg path.thin { stroke-width: .5; }
}

/* No sideways page scroll, ever. Construction lines run off the page on purpose, so the page itself clips them. It has to be on html: on body alone the phone still scrolls. */
html { overflow-x: hidden; overflow-x: clip; }

/* 14 Routes (Version 11): the catalogue filter, a plate that links, a lone drawing on a part page */
.filter { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-bottom: clamp(32px, 5vw, 56px); }
.filter button { font: 500 .8125rem/1.3 var(--mono); letter-spacing: .02em; color: var(--mute); background: none; border: 0; border-radius: 0; padding: 10px 0 8px; cursor: pointer; box-shadow: inset 0 -1px 0 var(--cx); transition: color .2s, box-shadow .2s; }
.filter button:hover { color: var(--fg); }
.filter button[aria-pressed="true"] { color: var(--fg); box-shadow: inset 0 -1px 0 var(--hot); }
.filter button:focus-visible { outline: 2px solid var(--hot); outline-offset: 4px; }
.plates > li { position: relative; }
.plates h3 a { color: inherit; text-decoration: none; box-shadow: inset 0 -1px 0 var(--hot); }
.plates h3 a::after { content: ""; position: absolute; inset: 0; }      /* the whole item is the link */
.plates h3 a:focus-visible { outline: 0; }
.plates h3 a:focus-visible::after { outline: 2px solid var(--hot); outline-offset: 6px; }
.plates + .actions { margin-top: 48px; }
.plate.solo { max-width: 560px; margin: 0 auto clamp(40px, 6vw, 72px); }
.steps + .actions { margin-top: 48px; }
.plain > .addr { margin-bottom: clamp(40px, 6vw, 64px); }
.rows .body p + .facts, .rows .body .marks + .small { margin-top: 18px; }
.close .small { margin-top: 22px; }


/* ---------- 15 Nav (Version 13) ----------
   The three sections sit in the bar; on a phone they take a second row under it,
   so every page is one tap away without a menu to open. The section you are in
   carries an orange line. */
.nav .items { display: flex; align-items: center; gap: 28px; }
[data-look="works"] .nav a.item { font: 500 .8125rem/1 var(--mono); letter-spacing: .02em; padding-block: 8px; }
[data-look="works"] .nav a.item[aria-current] { color: var(--fg); box-shadow: inset 0 -1px 0 var(--hot); }
[data-look="works"] .nav .btn[aria-current] { color: var(--fg); }
[data-look="works"] .eyebrow a { color: var(--fg); transition: color .15s; }
[data-look="works"] .eyebrow a:hover { color: var(--hot); }
@media (max-width: 860px) {
  .nav .wrap { flex-wrap: wrap; height: auto; row-gap: 0; }
  .nav .brand, .nav .btn { margin-block: 12px; }
  .nav .wrap { column-gap: 12px; }
  .nav .brand { --h: 17px; }
  .nav .btn.sm { padding-inline: 10px; font-size: .8125rem; }
  .nav .items { order: 3; width: 100%; gap: 24px; height: 40px; border-top: 1px solid var(--line); }
  [data-look="works"] .nav { background: rgba(14, 14, 15, .82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-color: var(--line); }
}
