/* ============================================================
   Iron Oak Web, style.css
   Paper plans first; blackened steel for the method section.
   Blueprint annotation motif, asymmetric editorial grid.
   All motion: transform + opacity only.
   ============================================================ */

:root {
  --ink:        #141414;
  --ink-soft:   #1d1c1a;
  --paper:      #faf8f5;
  --accent:     #c96f2e;
  --accent-deep:#9c541e;   /* accent for small text on light bg (AA) */

  --font-head: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --ease-out:  cubic-bezier(.22, 1, .36, 1);
  --ease-inout:cubic-bezier(.65, 0, .35, 1);

  --container: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

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

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection { background: var(--accent); color: var(--ink); }

/* scrollbar: quiet, never a feature */
html { scrollbar-color: rgba(20, 20, 20, .3) transparent; }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(20, 20, 20, .26);
  border: 4px solid var(--paper);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(20, 20, 20, .45); }

/* ---------- theme surfaces ---------- */
[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: rgba(250, 248, 245, .68);
  --line: rgba(250, 248, 245, .12);
  --accent-text: var(--accent);
  background: var(--bg);
  color: var(--fg);
}

[data-theme="light"] {
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: rgba(20, 20, 20, .68);
  --line: rgba(20, 20, 20, .14);
  --accent-text: var(--accent-deep);
  background: var(--bg);
  color: var(--fg);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

/* ---------- typography ---------- */
h1, h2, h3 { font-weight: 400; }

h1, h2 {
  font-family: var(--font-head);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  text-wrap: balance;
}

h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
}

/* section labels styled like drawing part numbers: 01 / SCOPE OF WORKS */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-text);
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--accent);
  flex: none;
}

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 120;
  pointer-events: none;
}

.progress-bar {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- nav (solid paper, no glass) ---------- */
.site-nav {
  position: fixed;
  inset: 3px 0 auto 0;
  z-index: 100;
}

.site-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(20, 20, 20, .12);
  background: rgba(250, 248, 245, .97);
  opacity: 0;
  transition: opacity .45s var(--ease-out);
  pointer-events: none;
}

.site-nav.scrolled::after { opacity: 1; }

.nav-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin-inline: auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: padding .45s var(--ease-out);
}

.site-nav.scrolled .nav-inner { padding-block: 12px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-head);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--ink);
  white-space: nowrap;
  transition: color .3s var(--ease-out);
}

.brand:hover, .brand:focus-visible { color: var(--accent-deep); }

.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }

.brand em {
  font-style: normal;
  color: var(--accent-deep);
  margin-left: .35em;
}

/* ---------- buttons (squared off, workwear not SaaS) ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 30px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .02em;
  overflow: hidden;
  border-radius: 0;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  transition: transform .35s var(--ease-out), border-color .35s var(--ease-out);
  will-change: transform;
}

.btn span {
  position: relative;
  z-index: 1;
  transition: color .35s var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: -1px -8%;
  transform: translateX(-108%) skewX(-12deg);
  transition: transform .45s var(--ease-out);
}

.btn:hover::before,
.btn:focus-visible::before { transform: translateX(0) skewX(-12deg); }

.btn-solid { background: var(--accent); color: var(--ink); }
.btn-solid::before { background: var(--ink); }
.btn-solid:hover span,
.btn-solid:focus-visible span { color: var(--paper); }

.btn-ghost {
  min-height: 44px;
  padding: 0 22px;
  font-size: .9375rem;
  color: var(--ink);
  border: 1px solid rgba(20, 20, 20, .35);
  background: transparent;
}

.btn-ghost::before { background: var(--accent); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--accent); }
.btn-ghost:hover span, .btn-ghost:focus-visible span { color: var(--ink); }

/* ---------- grain overlay ---------- */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-block: 140px 90px;
}

.hero-lines {
  position: absolute;
  inset: -12% 0;
  z-index: 0;
  will-change: transform;
}

.hero-lines svg { width: 100%; height: 100%; }

.hero-inner { position: relative; z-index: 3; }

.hero-title {
  font-size: clamp(2.6rem, 11vw, 8rem);
  line-height: .98;
  letter-spacing: -.03em;
  margin-block: 24px 0;
  max-width: 11ch;
}

.hero-title .nb { white-space: nowrap; }

.hero-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .09em;
  margin-bottom: -.09em;
}

.hero-title .w > span {
  display: inline-block;
  will-change: transform;
}

/* hand-kerning: pull the W stem to the optical margin,
   and set the accent word a touch tighter than the rest */
.hero-title .w:first-child > span { margin-left: -.055em; }
.hero-title .accent > span {
  color: var(--accent);
  letter-spacing: -.045em;
  margin-right: -.045em;
}

/* dimension line under the headline, drawn like a plan markup */
.dim {
  position: relative;
  width: min(520px, 86%);
  height: 10px;
  margin-top: 24px;
  border-bottom: 1px solid rgba(20, 20, 20, .3);
}

.dim::before,
.dim::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 1px;
  height: 11px;
  background: rgba(20, 20, 20, .45);
}

.dim::after { left: auto; right: 0; }

.dim-label {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding-inline: 14px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(20, 20, 20, .6);
}

.hero-sub {
  margin-top: 32px;
  max-width: 44ch;
  font-size: clamp(1.0625rem, 2.2vw, 1.3rem);
  color: var(--muted);
}

.hero-cta {
  margin-top: 48px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.hero-mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: .9375rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}

.hero-mail:hover { color: var(--accent); border-color: var(--accent); }

/* drawing title block, bottom-right corner */
.titleblock {
  position: absolute;
  right: var(--gutter);
  bottom: 34px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto auto;
  border: 1px solid rgba(20, 20, 20, .22);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(20, 20, 20, .6);
}

.titleblock .tb-k,
.titleblock .tb-v { padding: 6px 12px; border-top: 1px solid rgba(20, 20, 20, .22); }

.titleblock .tb-k { border-right: 1px solid rgba(20, 20, 20, .22); color: rgba(20, 20, 20, .42); }

.titleblock .tb-k:first-child,
.titleblock .tb-k:first-child + .tb-v { border-top: 0; }

/* hero load animation */
.js .hero-title .w > span {
  transform: translateY(115%);
  transition: transform .9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms + 100ms);
}

.js .hero-fade {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms + 100ms);
}

.js.loaded .hero-title .w > span { transform: translateY(0); }
.js.loaded .hero-fade { opacity: 1; transform: translateY(0); }

/* scroll hint */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  width: 1px;
  height: 56px;
  margin-left: -.5px;
  overflow: hidden;
  background: rgba(20, 20, 20, .16);
}

.scroll-hint span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(-100%);
  animation: hint 2.2s var(--ease-inout) infinite;
}

@keyframes hint {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ============================================================
   SECTIONS: shared
   ============================================================ */
/* deliberate uneven rhythm: air, dense steel, then the most air */
.scope   { padding-block: clamp(128px, 16vh, 200px); }
.process { padding-block: clamp(112px, 14vh, 176px); }
.why     { padding-block: clamp(144px, 18vh, 232px); }

.sec-head { margin-bottom: clamp(56px, 8vw, 96px); }
.sec-head h2 { margin-top: 22px; max-width: 18ch; }

/* scroll reveals: stagger delay is set inline by main.js and
   cleared after the reveal so hover transitions stay instant */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px) scale(.985);
  transition:
    opacity .85s var(--ease-out),
    transform .85s var(--ease-out);
  will-change: transform, opacity;
}

.js [data-reveal].in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ============================================================
   01 / SCOPE OF WORKS: spec-sheet rows, not cards
   ============================================================ */
.scope { border-top: 1px solid var(--line); }

.works { border-bottom: 1px solid var(--line); }

.work {
  display: grid;
  grid-template-columns: 96px 1.15fr .85fr;
  gap: 18px clamp(24px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
  transition:
    opacity .85s var(--ease-out),
    transform .85s var(--ease-out);
}

.work-ref {
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--muted);
  padding-top: .55em;
  transition: color .35s var(--ease-out);
}

.work h3 {
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: -.01em;
  transition: transform .4s var(--ease-out);
}

.work > p:last-child {
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 38ch;
  padding-top: .3em;
}

.work:hover .work-ref { color: var(--accent-deep); }
.work:hover h3 { transform: translateX(8px); }

/* ============================================================
   02 / METHOD STATEMENT: blueprint grid + hazard seam
   ============================================================ */
.process {
  overflow: hidden;
  background-image:
    repeating-linear-gradient(0deg,  rgba(250, 248, 245, .03) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(250, 248, 245, .03) 0 1px, transparent 1px 72px);
}

/* the one hazard stripe on the whole site: the weld seam */
.process::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, transparent 14px 28px);
  opacity: .9;
}

.process .container { position: relative; z-index: 3; }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 40px);
}

/* the drawn line */
.track {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .9s var(--ease-out) .1s;
}

/* measurement ticks hanging off the track */
.ticks {
  position: absolute;
  top: 35px;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 28px);
  opacity: 0;
  transition: opacity .6s var(--ease-out) .75s;
}

.js .steps.in-view .track,
html:not(.js) .track { transform: scaleX(1); }

.js .steps.in-view .ticks,
html:not(.js) .ticks { opacity: 1; }

.step { position: relative; }

.step-num {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  background: var(--bg);
  padding-right: 18px;
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(3.2rem, 7vw, 4.6rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 24px;
}

.step-unit {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .9375rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.step h3 { margin-bottom: 10px; text-transform: uppercase; letter-spacing: .04em; }
.step > p:last-child { color: var(--muted); font-size: 1rem; max-width: 30ch; }

/* ============================================================
   03 / WHY ONLY TRADES
   ============================================================ */
.why .eyebrow { margin-bottom: 32px; }

.statement {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.45rem, 3.6vw, 2.35rem);
  line-height: 1.4;
  letter-spacing: -.01em;
  max-width: 26em;
  text-wrap: pretty;
}

.work > p, .step > p, .hero-sub { text-wrap: pretty; }

/* the one italic word, set in the annotation face */
.statement .mono-it {
  font-family: var(--font-mono);
  font-style: italic;
  font-weight: 500;
  font-size: .92em;
}

/* offset hand-drawn underline, stroke draws on reveal */
.u-hand {
  position: relative;
  white-space: nowrap;
}

.u-hand svg {
  position: absolute;
  left: -2%;
  bottom: -.24em;
  width: 105%;
  height: .34em;
  transform: rotate(-1.2deg);
  overflow: visible;
}

.u-hand path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset .9s var(--ease-out) .35s;
}

.statement.in-view .u-hand path,
html:not(.js) .u-hand path { stroke-dashoffset: 0; }

.trades {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px clamp(24px, 3vw, 40px);
  margin-top: clamp(48px, 6vw, 64px);
}

.trades li {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.t-ref {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--accent-deep);
}

.closer {
  margin-top: clamp(64px, 8vw, 96px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.closer p {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  text-transform: uppercase;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid rgba(250, 248, 245, .1);
  padding-block: 56px;
  font-size: .9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 34px;
  color: rgba(250, 248, 245, .62);
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--paper);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
}

.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

.footer-human {
  flex-basis: 100%;
  font-weight: 500;
  color: var(--paper);
}

.footer-legal {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .titleblock { display: none; }

  .work {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .work-ref { padding-top: 0; }
  .work > p:last-child { padding-top: 0; }

  .steps { grid-template-columns: 1fr; gap: 44px; max-width: 560px; }

  .track {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 1px;
    height: auto;
    transform: scaleY(0);
    transform-origin: 50% 0;
  }

  .ticks { display: none; }

  .js .steps.in-view .track,
  html:not(.js) .track { transform: scaleY(1); }

  .step { padding-left: 28px; }

  .step-num { padding-right: 0; margin-bottom: 18px; }

  .step::before {
    content: "";
    position: absolute;
    left: -4.5px;
    top: 26px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
  }

  .trades { grid-template-columns: repeat(2, 1fr); }

  .closer { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .hero { padding-top: 110px; }
  .hero-cta .btn { width: 100%; }
  .scroll-hint { display: none; }
  .btn { min-height: 52px; }
  .brand { font-size: .95rem; gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .btn-ghost { padding: 0 16px; font-size: .875rem; min-height: 44px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }

  .js .hero-title .w > span,
  .js .hero-fade,
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .track { transform: none !important; }
  .ticks { opacity: 1 !important; }
  .u-hand path { stroke-dashoffset: 0 !important; }
  .scroll-hint { display: none; }
}
