/* Grit Built Partners — a construction document set, finished like a flagship product page.
   Palette is lifted from the logo: true black, concrete, bone, safety amber. */
:root {
  --black: #000000;
  --panel: #0e0e0d;
  --concrete: #b9b6b0;
  --concrete-dim: #85827c;
  --bone: #efece6;
  --amber: #e89a1c;
  --amber-hi: #f4ae3f;
  --line: rgba(239, 236, 230, 0.09);
  --line-strong: rgba(239, 236, 230, 0.16);
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--black);
  color: var(--bone);
  font: 400 1.0625rem/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, .statement { text-wrap: balance; }

/* overview lead: the firm in one sentence, one line on desktop */
.sheet-lead {
  max-width: var(--max); margin: 0 auto clamp(56px, 7vw, 96px);
  container-type: inline-size;
}
.sheet-lead p {
  margin: 0;
  font: 500 1.5rem/1.3 var(--body);
  letter-spacing: -0.015em;
  color: var(--bone);
}
@container (min-width: 880px) {
  .sheet-lead p { font-size: min(1.75rem, 1.97cqi); white-space: nowrap; }
}
.grit, .grit-beam {
  background: linear-gradient(90deg, #f7c948 0%, #f0a526 50%, #e8871c 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.grit { font-weight: 700; }
.closer .grit, .web .grit-beam { font-weight: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--amber); color: var(--black); }

h2 {
  font: 800 clamp(2.5rem, 5vw, 4rem)/0.95 var(--display);
  letter-spacing: 0.005em;
  margin: 0;
  color: var(--bone);
}

/* ---------- blueprint sheet under everything ---------- */
.blueprint {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(239, 236, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 236, 230, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(239, 236, 230, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 236, 230, 0.02) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 95% 80% at 50% 30%, #000 25%, transparent 88%);
  mask-image: radial-gradient(ellipse 95% 80% at 50% 30%, #000 25%, transparent 88%);
}
main, .footer { position: relative; z-index: 1; }

/* torch: a light that follows the cursor and lights up the drafting grid beneath it.
   Two layers: a brighter copy of the grid masked to a circle, plus a soft amber glow. */
.torch {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 400ms ease;
  --tx: 50vw; --ty: 40vh;
}
.torch.on { opacity: 1; }
.torch::before, .torch::after { content: ""; position: absolute; inset: 0; }
.torch::before {
  background-image:
    linear-gradient(rgba(244, 174, 63, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 174, 63, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(244, 174, 63, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 174, 63, 0.05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(circle 220px at var(--tx) var(--ty), #000 0%, rgba(0,0,0,.55) 45%, transparent 100%);
  mask-image: radial-gradient(circle 220px at var(--tx) var(--ty), #000 0%, rgba(0,0,0,.55) 45%, transparent 100%);
}
.torch::after {
  background: radial-gradient(circle 420px at var(--tx) var(--ty), rgba(232, 154, 28, 0.05), rgba(232, 154, 28, 0.018) 40%, transparent 70%);
  mix-blend-mode: screen;
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) { .torch { display: none; } }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 10px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: padding 260ms ease, background-color 260ms ease, border-color 260ms ease;
}
.nav.scrolled {
  padding-top: 4px; padding-bottom: 4px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  border-bottom-color: var(--line);
}
.nav-brand { display: block; line-height: 0; }
.nav-brand img { width: 88px; height: 88px; transition: width 260ms ease, height 260ms ease; }
.nav.scrolled .nav-brand img { width: 56px; height: 56px; }
.nav nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); font-size: 0.94rem; }
.nav nav a { text-decoration: none; color: var(--concrete); transition: color 150ms ease; }
.nav nav a:hover { color: var(--bone); }
.nav nav .nav-cta {
  color: var(--black); background: var(--amber); font-weight: 600;
  padding: 9px 18px; border-radius: 999px; transition: background-color 150ms ease;
}
.nav nav .nav-cta:hover { color: var(--black); background: var(--amber-hi); }
@media (max-width: 560px) {
  .nav-brand img { width: 64px; height: 64px; }
  .nav.scrolled .nav-brand img { width: 48px; height: 48px; }
  .nav nav a:not(.nav-cta) { display: none; }
}

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--body);
  padding: 17px 30px; min-height: 54px;
  background: var(--amber); color: var(--black);
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 10px 32px rgba(232, 154, 28, 0.24);
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.button:hover { background: var(--amber-hi); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 12px 40px rgba(232, 154, 28, 0.34); }
.button:active { transform: scale(0.98); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button-ghost {
  background: rgba(239, 236, 230, 0.04); color: var(--bone);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
}
.button-ghost:hover { background: rgba(239, 236, 230, 0.09); box-shadow: 0 0 0 1px rgba(239, 236, 230, 0.28) inset; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  margin-top: -108px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 140px var(--gutter) 88px;
  background: radial-gradient(ellipse 55% 42% at 50% 40%, rgba(232, 154, 28, 0.10), transparent 70%);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero > * { position: relative; z-index: 1; }
.hero-frame {
  position: relative;
  width: min(540px, 82vw); aspect-ratio: 1;
  display: grid; place-items: center;
}
.drafting { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.drafting .d {
  fill: none; stroke: rgba(232, 154, 28, 0.55); stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: draw 1600ms cubic-bezier(.6, .1, .2, 1) forwards;
}
.drafting .faint { stroke: rgba(239, 236, 230, 0.25); }
.drafting .d2 { animation-delay: 250ms; }
.drafting .d3 { animation-delay: 400ms; }
.drafting .d4 { animation-delay: 550ms; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-logo { width: 92%; animation: rise 900ms 200ms var(--ease) both; }
.hero-line {
  max-width: 30ch; margin: 1rem auto 2.25rem;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.45; color: var(--concrete);
  text-wrap: balance;
  animation: rise 900ms 350ms var(--ease) both;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  animation: rise 900ms 480ms var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- disciplines: three structural bays ---------- */
.disciplines {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.6);
}
.disciplines ul {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: var(--max);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.disciplines li {
  position: relative;
  padding: clamp(22px, 3.2vw, 36px) var(--gutter);
  font: 700 clamp(1.25rem, 2.4vw, 1.9rem)/1.05 var(--display);
  letter-spacing: 0.01em;
  color: var(--bone);
  text-align: center;
}
.disciplines li + li { border-left: 1px solid var(--line); }
/* column markers where the bay lines meet the flange */
.disciplines li + li::before, .disciplines li + li::after {
  content: ""; position: absolute; left: -4px; width: 7px; height: 7px; background: var(--amber);
}
.disciplines li + li::before { top: -4px; }
.disciplines li + li::after { bottom: -4px; }
@media (max-width: 720px) {
  .disciplines ul { grid-template-columns: 1fr; }
  .disciplines li + li { border-left: 0; border-top: 1px solid var(--line); }
  .disciplines li + li::before, .disciplines li + li::after { display: none; }
}

/* ---------- content sheets ---------- */
.sheet { padding: clamp(96px, 13vw, 176px) var(--gutter); }
.sheet-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(220px, 4fr) 8fr;
  gap: clamp(32px, 6vw, 96px);
}
.sheet-head { position: relative; padding-top: 22px; border-top: 2px solid var(--amber); align-self: start; }
.sheet-body { padding-top: 22px; border-top: 1px solid var(--line); }
@media (min-width: 901px) { .sheet-head { position: sticky; top: 104px; } }
@media (max-width: 900px) {
  .sheet-grid { grid-template-columns: 1fr; gap: 28px; }
  .sheet-body { border-top: 0; padding-top: 0; }
}
.statement {
  margin: 0 0 2.25rem;
  font: 500 clamp(1.6rem, 3vw, 2.35rem)/1.22 var(--body);
  letter-spacing: -0.015em;
  color: var(--bone);
  max-width: 24em;
}
.prose { max-width: 64ch; }
.prose p { margin: 0 0 1.25rem; color: var(--concrete); }
.prose p:last-child { margin-bottom: 0; }
.intro { margin: 0 0 1.5rem; color: var(--concrete); max-width: 56ch; }

/* the four pillars as a structural grid: hairline bays with amber column markers */
.bays {
  list-style: none; margin: 0 0 3rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}
.bays li {
  position: relative;
  min-height: 150px;
  display: flex; align-items: flex-end;
  padding: 28px 26px 24px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  font: 700 clamp(1.55rem, 2.6vw, 2.15rem)/1.05 var(--display);
  color: var(--bone);
  background: linear-gradient(180deg, rgba(239, 236, 230, 0.025), transparent 60%);
  transition: background-color 200ms ease;
}
.bays li::before {
  content: ""; position: absolute; top: -4px; left: -4px; width: 7px; height: 7px; background: var(--amber);
}
.bays li:hover { background-color: rgba(232, 154, 28, 0.05); }
@media (max-width: 560px) {
  .bays { grid-template-columns: 1fr; }
  .bays li { min-height: 104px; }
}

/* ---------- the I-beam ---------- */
.ibeam { position: relative; background: var(--black); overflow: hidden; }
.flange {
  height: 22px;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.55) 0 3px, transparent 3.5px) 0 50% / 64px 22px repeat-x,
    linear-gradient(180deg, var(--amber-hi), var(--amber) 55%, #b9760d);
}
.web {
  margin: 0;
  padding: clamp(24px, 4vw, 48px) var(--gutter);
  font: 900 clamp(4rem, 17vw, 15rem)/0.82 var(--display);
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #f4f1ea 0%, #b9b6b0 48%, #8d8a84 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---------- closer ---------- */
.closer {
  padding: clamp(96px, 12vw, 160px) var(--gutter);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.closer p {
  margin: 0 auto;
  max-width: 28ch;
  font: 800 clamp(2.1rem, 5.2vw, 4.25rem)/1.02 var(--display);
  color: var(--bone);
  text-wrap: balance;
}
.closer p + p { margin-top: 0.4em; color: var(--amber); }

/* ---------- contact ---------- */
.contact { padding: clamp(88px, 11vw, 150px) var(--gutter); }
.panel {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 5fr 7fr;
  gap: clamp(36px, 6vw, 88px);
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(232, 154, 28, 0.08), transparent 60%),
    rgba(14, 14, 13, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}
@media (max-width: 900px) { .panel { grid-template-columns: 1fr; border-radius: 22px; } }
.panel-intro h2 { margin-bottom: 1.25rem; }
.contact-lede {
  margin: 0 0 2rem;
  max-width: 26em;
  font-size: clamp(1.15rem, 1.8vw, 1.3rem); line-height: 1.5;
  color: var(--concrete);
}
.contact-email {
  display: inline-block;
  font-weight: 600; color: var(--amber);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(232, 154, 28, 0.45);
  overflow-wrap: anywhere;
  transition: border-color 150ms ease, color 150ms ease;
}
.contact-email:hover { color: var(--amber-hi); border-bottom-color: var(--amber-hi); }

.form { display: grid; gap: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--bone); }
.opt { font-weight: 400; color: var(--concrete-dim); margin-left: 4px; }
.field input, .field textarea {
  width: 100%;
  font: 400 1rem/1.5 var(--body);
  color: var(--bone);
  background: rgba(239, 236, 230, 0.035);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 54px;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6f6c67; }
.field input:hover, .field textarea:hover { border-color: rgba(239, 236, 230, 0.26); }
.field input:focus, .field textarea:focus {
  outline: none;
  background: rgba(239, 236, 230, 0.06);
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(232, 154, 28, 0.18);
}
.field [aria-invalid="true"] { border-color: #e2574c; box-shadow: 0 0 0 4px rgba(226, 87, 76, 0.15); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.form-status { margin: 0; font-weight: 500; font-size: 0.95rem; }
.form-status.ok { color: var(--amber); }
.form-status.err { color: #ff8a80; }
@media (max-width: 640px) { .form-foot .button { width: 100%; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.footer {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  max-width: var(--max); margin: 0 auto;
  padding: 36px var(--gutter) 48px;
  color: var(--concrete-dim); font-size: 0.92rem;
}
.footer img { width: 64px; height: 64px; }
.footer p { margin: 0; }
.footer-built { justify-self: center; color: var(--concrete); display: inline-flex; align-items: center; gap: 6px; }
.heart { width: 16px; height: 16px; display: inline-block; }
@media (max-width: 560px) {
  .footer { grid-template-columns: 1fr; justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .drafting .d { stroke-dashoffset: 0; }
}
