/*
 * Nye Metalworks site styles.
 * Colors, type and patterns come from the Nye Built design system:
 * spruce leads, rust is the accent (buttons, bands), gold is trim only
 * (never text on cream), cream is the ground, shop black for text and rules.
 */

/* ---- fonts (self-hosted, latin subset) ---- */
@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 900; font-style: normal; font-display: swap;
  src: url("/fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Yellowtail"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/fonts/yellowtail-latin-400-normal.woff2") format("woff2"); }

/* ---- tokens ---- */
:root {
  --spruce: #3F6673;
  --spruce-deep: #2F4E59;
  --rust: #A9472A;
  --rust-deep: #8A3820;
  --gold: #C9973E;
  --cream: #EFE6D2;
  --paper: #F6F0E2;
  --sand: #E4D8BE;
  --line: #D9CFB8;
  --black: #1E1B18;
  --muted: #5E574F;
  --error: #9E2A1C;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Yellowtail", cursive;

  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px; --space-5: 40px; --space-6: 64px;
  --radius-sm: 4px; --radius-md: 6px;
  --max: 1160px;
}

*, *::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(--cream); color: var(--black);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
}
h1, h2, h3 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  letter-spacing: .04em; line-height: 1.02; margin: 0 0 .6rem; text-wrap: balance;
}
h2 { font-size: 2rem; }
h3 { font-size: 1.45rem; color: var(--spruce); }
p { margin: 0 0 1rem; }
a { color: var(--rust); text-underline-offset: 2px; }
a:hover { color: var(--rust-deep); }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
[id] { scroll-margin-top: 96px; }

.skip {
  position: absolute; left: var(--space-3); top: -60px; z-index: 50;
  background: var(--black); color: var(--cream); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
}
.skip:focus { top: var(--space-2); color: var(--cream); }

.inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--space-3); }

/* ---- wordmark (placeholder until the Metalworks logo arrives) ---- */
.wordmark { display: inline-flex; align-items: center; gap: .1em; text-decoration: none; line-height: 1; }
.wm-nye { font-family: var(--script); font-size: 2.3rem; color: var(--spruce); padding-right: .15em; transform: translateY(-.06em); }
.wm-band {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: .1em;
  font-size: 1.3rem; background: var(--rust); color: var(--cream);
  padding: .3em .55em .26em; border-top: 2px solid var(--black); border-bottom: 2px solid var(--black);
}
.wordmark-sm .wm-nye { font-size: 1.9rem; color: var(--cream); }
.wordmark-sm .wm-band { font-size: 1.05rem; }

/* ---- header ---- */
header.top {
  background: var(--cream); border-bottom: 4px solid var(--black);
  position: sticky; top: 0; z-index: 20;
}
header.top .inner { display: flex; align-items: center; gap: var(--space-3); padding-top: .6rem; padding-bottom: .6rem; }
.top-nav { margin-left: auto; }
.nav-link {
  display: inline-block; padding: .5rem .65rem; color: var(--black); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .08em;
  border-radius: var(--radius-sm);
}
.nav-link:hover { background: var(--sand); color: var(--black); }
@media (max-width: 480px) {
  .nav-label { display: none; }
  .wm-nye { font-size: 1.9rem; }
  .wm-band { font-size: 1.05rem; }
}

/* ---- hero ---- */
.hero { background: var(--spruce); color: var(--cream); padding: var(--space-5) 0 var(--space-5); }
.hero-grid { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 900px) {
  .hero { padding: var(--space-6) 0; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-areas: "copy form" "drawing form"; row-gap: var(--space-3); }
  .hero-copy { grid-area: copy; }
  .hero-grid .signup { grid-area: form; }
  .hero-grid .part-drawing { grid-area: drawing; margin-top: 0; }
}
.eyebrow {
  display: inline-block; font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; font-size: 1rem; margin-bottom: var(--space-3);
  border-bottom: 2px solid var(--gold); padding-bottom: 2px;
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: .95; letter-spacing: .02em; max-width: 17ch; }
.lede { font-size: 1.15rem; max-width: 46ch; }

.nowrap { white-space: nowrap; }
.part-drawing { display: block; width: 100%; max-width: 460px; height: auto; margin-top: var(--space-3); }
.part-drawing .part { fill: rgba(239, 230, 210, .08); stroke: var(--cream); stroke-width: 2.5; stroke-linejoin: round; }
.part-drawing .dim { stroke: var(--gold); stroke-width: 1.2; fill: none; }
.part-drawing text { fill: var(--cream); stroke: none; font-family: var(--sans); font-size: 14px; letter-spacing: .04em; }
.part-drawing .laser { fill: var(--gold); }

/* ---- signup card ---- */
.signup {
  background: var(--paper); color: var(--black); border: 2px solid var(--black); border-radius: var(--radius-md);
  padding: var(--space-4); position: relative; padding-top: calc(var(--space-4) + 10px);
}
.signup::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: var(--rust); border-bottom: 2px solid var(--black); border-radius: 4px 4px 0 0;
}
.signup h2 { font-size: 1.75rem; color: var(--spruce); }
.field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }
.field label { font-weight: 600; }
.optional { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type="email"], input[type="text"], textarea {
  font: inherit; color: var(--black); background: #fff; border: 2px solid var(--black);
  border-radius: var(--radius-sm); padding: .6rem .7rem; width: 100%;
}
textarea { resize: vertical; min-height: 5rem; }
input[aria-invalid="true"] { border-color: var(--error); }
.form-error {
  background: #F6DCD3; color: var(--error); border-left: 4px solid var(--error);
  padding: var(--space-2) var(--space-3); font-weight: 600;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: .9rem; color: var(--muted); margin: var(--space-3) 0 0; }
.signup-done p { margin: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: .65rem 1.4rem; border: 2px solid var(--black); border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--display); font-weight: 900; font-size: 1.2rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .1em; text-decoration: none;
  background: var(--paper); color: var(--black);
}
.btn:hover { background: var(--sand); color: var(--black); }
.btn-primary { background: var(--rust); color: var(--cream); }
.btn-primary:hover { background: var(--rust-deep); color: var(--cream); }
.signup .btn { width: 100%; }

/* ---- band under the hero (the BUILT band) ---- */
.band { height: 18px; background: var(--rust); border-top: 4px solid var(--black); }

/* ---- sections ---- */
.wrap { max-width: var(--max); margin: 0 auto; padding: var(--space-5) var(--space-3) 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 1.5rem; flex-wrap: wrap;
  padding-top: var(--space-3); border-top: 2px solid var(--black); margin-bottom: var(--space-4);
}
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }

.card { background: var(--paper); border: 2px solid var(--black); border-radius: var(--radius-md); padding: var(--space-4); }
.card p:last-child { margin-bottom: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps .card { position: relative; padding-top: calc(var(--space-4) + 10px); }
.steps .card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: var(--rust); border-bottom: 2px solid var(--black); border-radius: 4px 4px 0 0;
}
.step-num {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-bottom: var(--space-2);
  background: var(--spruce); color: var(--cream); border-radius: 50%;
  font-family: var(--display); font-weight: 900; font-size: 1.3rem;
}

.two-col { display: grid; gap: var(--space-5); }
@media (min-width: 860px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.materials { margin: 0; }
.mat-row { display: grid; grid-template-columns: 9.5rem 1fr; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.mat-row dt { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 1.05rem; padding-top: .2rem; }
.mat-row dd { margin: 0; }
@media (max-width: 420px) { .mat-row { grid-template-columns: 1fr; gap: var(--space-1); } }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips li { background: var(--paper); border: 1.5px solid var(--black); border-radius: var(--radius-sm); padding: .1rem .55rem; font-weight: 600; }
.note { color: var(--muted); margin-top: var(--space-3); }

.uses { margin: 0; padding: 0; list-style: none; columns: 2 14rem; column-gap: var(--space-4); }
.uses li { break-inside: avoid; padding: .45rem 0 .45rem 1.1rem; border-bottom: 1px solid var(--line); position: relative; }
.uses li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .5rem; height: .5rem; background: var(--rust); }

.cta { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; border-left: 10px solid var(--rust); }
.cta > div { flex: 1 1 28rem; }
.aside { margin: var(--space-3) 0 0; color: var(--muted); }

.not-found { padding-bottom: var(--space-6); }

/* ---- footer ---- */
.foot { background: var(--black); color: var(--cream); margin-top: var(--space-6); border-top: 6px solid var(--gold); }
.foot .inner { display: grid; gap: var(--space-4); padding-top: var(--space-5); padding-bottom: var(--space-5); }
@media (min-width: 760px) { .foot .inner { grid-template-columns: 1fr auto; align-items: start; } }
.foot a { color: var(--cream); }
.foot a:hover { color: var(--sand); }
.foot-brand p { margin: var(--space-3) 0 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.foot-legal { grid-column: 1 / -1; margin: 0; font-size: .9rem; color: #B9AF9F; }
