/* ── Northfoundry design tokens ─────────────────────────────── */
:root {
  --iron: #22262A;        /* deep cast iron — primary text */
  --fog: #E9EDEF;         /* cool northern fog — background */
  --fog-deep: #DDE3E6;    /* shaded fog — alt surfaces */
  --steel: #66757F;       /* steel blue — secondary text */
  --ember: #D9531E;       /* molten ember — the one accent */
  --line: rgba(34, 38, 42, 0.16);

  --font-display: "Archivo Black", "Archivo", sans-serif;
  --font-body: "Archivo", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --measure: 34rem;
  --pad-x: clamp(1.25rem, 5vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--iron);
  background: var(--fog);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400; /* Archivo Black is a single heavy weight */
  line-height: 1.05;
  letter-spacing: -0.01em;
}

a { color: inherit; }

/* ── Maker's mark ───────────────────────────────────────────── */
.mark {
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
}
.mark-plate {
  fill: none;
  stroke: var(--iron);
  stroke-width: 3;
  stroke-linejoin: miter;
}
.mark-n {
  fill: none;
  stroke: var(--ember);
  stroke-width: 3.5;
  stroke-linecap: square;
}

/* ── Top bar ────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.topnav a { text-decoration: none; color: var(--steel); }
.topnav a:hover { color: var(--iron); }
.topnav .nav-cta {
  color: var(--ember);
  border: 1px solid var(--ember);
  padding: 0.45rem 0.9rem;
}
.topnav .nav-cta:hover {
  background: var(--ember);
  color: var(--fog);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: clamp(4rem, 12vh, 8rem) var(--pad-x) clamp(3rem, 8vh, 6rem);
  max-width: 72rem;
  margin-inline: auto;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
  margin-bottom: 1.2rem;
}
.eyebrow::before {
  content: "// ";
  color: var(--ember);
}
.hero h1 {
  font-size: clamp(3.2rem, 10vw, 7.5rem);
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.hero h1 .line { display: block; }
.hero h1 .line-ember { color: var(--ember); }
.lede {
  max-width: var(--measure);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--steel);
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--iron);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-solid {
  background: var(--iron);
  color: var(--fog);
}
.btn-solid:hover { background: var(--ember); border-color: var(--ember); }
.btn-ghost:hover { background: var(--iron); color: var(--fog); }

.hero-plate {
  margin-top: clamp(3rem, 8vh, 5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--steel);
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

/* ── Sections ───────────────────────────────────────────────── */
.section-head { margin-bottom: 2.8rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  text-transform: uppercase;
}

.foundry {
  background: var(--iron);
  color: var(--fog);
  padding: clamp(4rem, 10vh, 7rem) var(--pad-x);
}
.foundry .eyebrow { color: var(--fog-deep); }
.foundry .section-head { max-width: 72rem; margin-inline: auto; margin-bottom: 2.8rem; }
.stages {
  max-width: 72rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: rgba(233, 237, 239, 0.18);
  border: 1px solid rgba(233, 237, 239, 0.18);
}
.stage {
  background: var(--iron);
  padding: 1.8rem 1.6rem 2rem;
}
.stage-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ember);
  margin-bottom: 1.4rem;
}
.stage h3 {
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.stage p { color: #B9C2C8; font-size: 0.98rem; }

/* ── Castings / spec plates ─────────────────────────────────── */
.castings {
  max-width: 72rem;
  margin-inline: auto;
  padding: clamp(4rem, 10vh, 7rem) var(--pad-x);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.4rem;
}
.castings .section-head { grid-column: 1 / -1; margin-bottom: 0.6rem; }

.plate {
  position: relative;
  border: 1px solid var(--iron);
  background: var(--fog);
  padding: 1.6rem 1.6rem 1.8rem;
}
/* riveted corners */
.plate::before, .plate::after {
  content: "";
  position: absolute;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--iron);
  opacity: 0.5;
}
.plate::before { top: 0.55rem; left: 0.55rem; }
.plate::after { top: 0.55rem; right: 0.55rem; }

.plate-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}
.plate-no { color: var(--steel); }
.plate-status { color: var(--steel); }
.plate-status-hot { color: var(--ember); display: inline-flex; align-items: center; gap: 0.45rem; }
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ember);
  animation: glow 1.8s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.plate h3 {
  font-size: 1.7rem;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.plate p { color: var(--steel); font-size: 0.98rem; max-width: var(--measure); }

.plate-specs {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  font-size: 0.9rem;
}
.plate-specs dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--steel);
  margin-bottom: 0.2rem;
}
.plate-specs dd { font-weight: 600; }

.plate-empty {
  border-style: dashed;
  background: transparent;
}
.plate-empty::before, .plate-empty::after { opacity: 0.2; }

/* ── Contact ────────────────────────────────────────────────── */
.contact {
  background: var(--fog-deep);
  padding: clamp(4rem, 10vh, 7rem) var(--pad-x);
}
.contact-inner { max-width: 72rem; margin-inline: auto; }
.contact h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.contact p { max-width: var(--measure); color: var(--steel); margin-bottom: 1.8rem; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--iron);
  color: var(--steel);
  padding: 2rem var(--pad-x);
}
.footer-inner {
  max-width: 72rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.mark-footer .mark-plate { stroke: var(--steel); }

/* ── Motion ─────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot { animation: none; }
}

/* ── Focus ──────────────────────────────────────────────────── */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

/* ── Small screens ──────────────────────────────────────────── */
@media (max-width: 40rem) {
  .topnav { gap: 1rem; font-size: 0.72rem; }
  .plate-specs { gap: 1.2rem; }
}
