/* Self-hosted fonts (SIL Open Font License, see assets/fonts). */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-tight-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-tight-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-tight-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-tight-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #f3f0ea;
  --paper-2: #e9e5dc;
  --ink: #141414;
  --ink-2: #55524c;
  --line: #d4cfc4;
  --red: #c8301c;        /* brand red; passes WCAG AA for small text on paper and under white text */
  --red-ink: #a82614;
  --red-on-dark: #f0604c; /* the same red, lifted for legibility on the dark section */
  --dark: #151515;
  --dark-2: #232323;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 80px; } /* anchor targets clear the sticky header */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 20;
  padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: 4px; text-decoration: none;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.section-dark :focus-visible, .contact :focus-visible { outline-color: #fff; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Lockup matches redhutcnc.com: lowercase wordmark, mark sat on the baseline, ascenders level with the roof. */
.brand { display: flex; align-items: baseline; gap: 0.16em; text-decoration: none; font: 700 28px/1 var(--sans); letter-spacing: -0.045em; }
.brand-mark { width: 1.06em; height: auto; aspect-ratio: 1952 / 1400; fill: var(--ink); flex: none; }
.brand:hover .brand-mark { fill: var(--red); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; }
.nav a:not(.nav-cta):hover { color: var(--red); }
.nav-cta { padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.nav-cta:hover { background: var(--red); }

/* Type */
.eyebrow {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 20px;
}
h1 {
  font-size: clamp(48px, 9.5vw, 148px);
  line-height: 0.92; letter-spacing: -0.045em; font-weight: 600;
  max-width: 12ch;
}
h1 em { font-style: normal; color: var(--red); }
h2 { font-size: clamp(32px, 4.6vw, 64px); line-height: 1; letter-spacing: -0.035em; font-weight: 600; max-width: 18ch; }
h3 { font-size: 22px; letter-spacing: -0.02em; font-weight: 600; margin-bottom: 10px; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 46ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; padding: 14px 22px; border-radius: 999px; text-decoration: none; font-weight: 500; transition: background .2s, color .2s, border-color .2s; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-ink); }
.btn-ghost { border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Hero */
.hero { padding-top: clamp(56px, 10vw, 120px); padding-bottom: 40px; }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-top: 40px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.drawing { margin-top: clamp(48px, 7vw, 88px); border: 1px solid var(--line); border-radius: 4px; background: var(--paper-2); color: var(--ink); overflow: hidden; }
.drawing svg { display: block; width: 100%; height: auto; }
.drawing .labels { font: 500 13px var(--mono); letter-spacing: 0.04em; }
/* The mark is outlined like a CAD sketch, then fills red. Without JS it just shows filled;
   assets/site.js adds .armed (blank start state) and then .play once the drawing scrolls into view. */
.mark-draw {
  fill: var(--red);
  stroke: var(--ink); stroke-width: 7.5; stroke-opacity: 0; /* mark units; ~1.5px at the 0.2 drawing scale */
  stroke-dasharray: 1;
}
.drawing.armed .mark-draw { fill-opacity: 0; stroke-opacity: 1; stroke-dashoffset: 1; }
.drawing.armed.play .mark-draw { animation: draw 2s .2s ease-in-out forwards, fill .7s 2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill { to { fill-opacity: 1; stroke-opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .drawing.armed .mark-draw { animation: none; stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; }
}

/* Sections */
.section { padding-top: clamp(80px, 11vw, 140px); padding-bottom: clamp(80px, 11vw, 140px); }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.card { padding: 28px 28px 8px 0; }
.card + .card { padding-left: 28px; border-left: 1px solid var(--line); }
.card-num { display: inline-block; font: 500 13px var(--mono); color: var(--red); margin-bottom: 48px; }
.card p { color: var(--ink-2); }

.about-grid { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(32px, 5vw, 72px); border-top: 1px solid var(--ink); padding-top: 32px; }
.stat-n { display: block; font-size: clamp(120px, 17vw, 240px); line-height: 0.8; font-weight: 600; letter-spacing: -0.06em; color: var(--red); }
.stat-l { display: block; margin-top: 20px; font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
/* Founder pull quote: oversized red opening mark, closing mark inline at the end. */
.quote { margin: 0; position: relative; padding-top: clamp(56px, 6vw, 80px); }
.quote blockquote { margin: 0; }
.quote blockquote::before {
  content: "\201C"; position: absolute; top: 0; left: -0.06em;
  font: 400 clamp(130px, 14vw, 200px)/0.8 Georgia, "Times New Roman", serif; color: var(--red);
}
.quote p { font-size: clamp(21px, 2vw, 27px); line-height: 1.4; letter-spacing: -0.015em; max-width: 34ch; }
.quote p + p { margin-top: 0.8em; }
.quote p:last-child::after { content: "\201D"; color: var(--red); margin-left: 0.05em; font-family: Georgia, "Times New Roman", serif; }
.quote figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 32px; padding-left: 20px; border-left: 2px solid var(--red); }
.quote-name { font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.quote-role { font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

.consult { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.consult-head h2 { margin-bottom: 24px; }
.consult-head .lede { margin-bottom: 32px; }
.consult-list { list-style: none; padding: 0; border-top: 1px solid var(--ink); }
.consult-list li { display: grid; grid-template-columns: 56px 1fr; padding: 24px 0; border-bottom: 1px solid var(--line); }
.consult-list .step-n { margin: 4px 0 0; }
.consult-list h3 { margin-bottom: 6px; }
.consult-list p { color: var(--ink-2); }
.consult-foot { margin-top: 40px; font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

.sister { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.sister-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px 48px; flex-wrap: wrap; padding-top: 48px; padding-bottom: 48px; }
.sister .eyebrow { margin-bottom: 12px; }
.sister h3 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 8px; }
.sister p:not(.eyebrow) { color: var(--ink-2); max-width: 52ch; }

.section-dark { background: var(--dark); color: var(--paper); }
.section-dark .eyebrow { color: #9a968e; }
.section-dark .step-n { color: var(--red-on-dark); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.steps li { background: var(--dark-2); padding: 28px 24px 32px; }
.step-n { display: block; font: 500 13px var(--mono); color: var(--red); margin-bottom: 64px; }
.steps p { color: #b4b0a8; font-size: 16px; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.tags li { font: 400 13px var(--mono); padding: 8px 14px; border: 1px solid #3a3a3a; border-radius: 999px; color: #cfcbc3; }

/* Work */
.section-sub { margin-top: 20px; }
/* Editorial grid: 6 columns, fixed row height, photos cropped to fill. */
.gallery {
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(150px, 20vw, 260px); grid-auto-flow: dense;
  gap: clamp(8px, 1.2vw, 16px);
}
.shot { position: relative; margin: 0; overflow: hidden; border-radius: 3px; background: var(--paper-2); }
.shot.w2 { grid-column: span 2; }
.shot.w3 { grid-column: span 3; }
.shot.w4 { grid-column: span 4; }
.shot.h2 { grid-row: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.shot:hover img { transform: scale(1.03); }
.shot figcaption {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  padding: 7px 10px; background: var(--paper); border-radius: 2px;
  font: 400 12px/1.3 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2);
}
.shot figcaption b { font-weight: 500; color: var(--ink); margin-right: 6px; }
.shot figcaption b::after { content: "—"; color: var(--red); margin-left: 6px; }
.more-work { margin-top: 40px; }

/* Work page */
.nav a[aria-current="page"] { color: var(--red); }
.page-head { padding-top: clamp(56px, 9vw, 112px); padding-bottom: clamp(40px, 5vw, 64px); }
.page-title { font-size: clamp(44px, 7.5vw, 112px); max-width: 14ch; margin-bottom: 32px; }
.work-page { padding-bottom: clamp(80px, 11vw, 140px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0; margin-bottom: 32px; border-top: 1px solid var(--ink); }
.filters button {
  font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.masonry { columns: 3; column-gap: clamp(12px, 1.6vw, 24px); }
.tile { break-inside: avoid; margin: 0 0 clamp(20px, 2.4vw, 32px); }
.tile[hidden] { display: none; }
.tile img { display: block; width: 100%; height: auto; border-radius: 3px; background: var(--paper-2); }
.tile[data-cats~="drawings"] img { border: 1px solid var(--line); } /* frame drawing sheets against the paper */
.tile figcaption { padding-top: 10px; font: 400 12px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.tile figcaption b { font-weight: 500; color: var(--ink); margin-right: 6px; }
.tile figcaption b::after { content: "—"; color: var(--red); margin-left: 6px; }

.not-found { padding-top: clamp(80px, 14vw, 180px); padding-bottom: clamp(80px, 14vw, 180px); }
.not-found .lede { margin-bottom: 32px; }

/* Contact */
.contact { background: var(--red); color: #fff; padding: clamp(80px, 12vw, 160px) 0; }
.contact .eyebrow, .contact .lede { color: #fff; }
.contact h2 { max-width: 14ch; margin-bottom: 24px; }
.contact-mark { display: block; width: clamp(64px, 8vw, 96px); height: auto; aspect-ratio: 1952 / 1400; fill: #fff; margin-bottom: 40px; }
.contact-email {
  display: inline-block; margin-top: 40px;
  font-size: clamp(28px, 5vw, 64px); font-weight: 600; letter-spacing: -0.035em;
  text-decoration: none; border-bottom: 3px solid #fff; padding-bottom: 4px;
  overflow-wrap: anywhere;
}
.contact-email span { display: inline-block; transition: transform .2s; }
.contact-email:hover span { transform: translateX(8px); }

/* Footer */
.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; font: 400 13px var(--mono); color: var(--ink-2); }
.site-footer a { text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .card, .card + .card { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .card-num { margin-bottom: 20px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .consult { grid-template-columns: 1fr; }
  .masonry { columns: 2; }
}
@media (max-width: 640px) {
  .nav { gap: 18px; }
  .nav a:not(.nav-cta):not(.nav-keep) { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step-n { margin-bottom: 24px; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .masonry { columns: 1; }
  .shot.w2, .shot.w3, .shot.w4 { grid-column: auto; }
  .shot.h2 { grid-row: span 2; }
  .shot.w4.h2 { grid-row: span 1; } /* the landscape lead image stays landscape */
  .drawing .labels { font-size: 18px; }
  .drawing .caption { display: none; }
}
