/* Funk Concrete & Demolition — "Chalk Line" system.
   Tokens and rules are documented in ../brand/design-system.md.

   The page sits on a live WebGL concrete slab (js/slab.js). Content panels are
   translucent so the slab reads through them, the way forms sit on a pour.
   Everything here must survive the slab failing to start. */

:root {
  --slab: #0B0C0D;
  --form: #141618;
  --form-edge: #22262A;
  --chalk: #0B4FD6;
  --chalk-deep: #00318C;
  --chalk-bright: #3D7BFF;
  --concrete: #D5D3CC;
  --steel: #8A8B8C;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 48px);
  --sect-pad: clamp(76px, 9vw, 132px);
  --snap: cubic-bezier(.16, 1.2, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* `clip`, not `hidden` — `hidden` on the root breaks ScrollTrigger pinning. */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--slab);
  color: var(--concrete);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ---------- The slab ---------- */

#slab {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* Fallback when WebGL is unavailable or motion is reduced: a static pour. */
.no-slab body::after,
html.no-slab body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(11, 79, 214, .10), transparent 60%),
    radial-gradient(90% 70% at 90% 20%, rgba(213, 211, 204, .05), transparent 55%),
    var(--slab);
}

/* Fine aggregate over everything. Cheap, and it ties canvas and DOM together. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}
html.no-slab body::before { opacity: .07; }

.bar, main, .foot, .skip { position: relative; z-index: 2; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

::selection { background: var(--chalk); color: #fff; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--chalk);
  color: #fff;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 13px;
  z-index: 60;
}
.skip:focus { left: 0; }

/* Word masks for the headline reveal. Inert until JS wraps the words. */
.msk-line { display: block; }
.msk { display: inline-block; overflow: hidden; vertical-align: bottom; }
.msk__i { display: inline-block; will-change: transform; }

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--steel);
}

.link {
  color: var(--concrete);
  text-decoration: none;
  border-bottom: 1px solid rgba(11, 79, 214, .8);
  padding-bottom: 1px;
  transition: color .18s ease, border-color .18s ease;
}
.link:hover { color: var(--chalk-bright); border-bottom-color: var(--chalk-bright); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  padding: 12px 20px;
  cursor: pointer;
  will-change: transform;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }

.btn--chalk { background: var(--chalk); color: #fff; }
.btn--chalk:hover { background: var(--chalk-deep); }

.btn--ghost {
  background: rgba(11, 12, 13, .5);
  color: var(--concrete);
  border-color: var(--form-edge);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--chalk); color: #fff; }

.btn__label { display: none; }
.btn__num { font-family: var(--mono); font-size: .88rem; font-weight: 500; }

/* ---------- Top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 40px);
  padding: 12px var(--pad);
  background: rgba(11, 12, 13, .72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--form-edge);
}

.bar__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 0 auto; }
.bar__mark { width: 44px; height: 44px; }

.bar__name {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.28rem;
  line-height: .9;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.bar__name-thin {
  font-family: var(--mono);
  font-weight: 400;
  font-size: .58rem;
  letter-spacing: .14em;
  color: var(--steel);
  margin-top: 4px;
}

.bar__nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bar__nav a {
  text-decoration: none;
  color: var(--steel);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.bar__nav a:hover { color: var(--concrete); border-bottom-color: var(--chalk); }

.bar__cta { flex: 0 0 auto; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 118px) var(--pad) clamp(56px, 8vw, 100px);
}

.hero__h1 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3rem, 7.2vw, 5.4rem);
  line-height: .9;
  letter-spacing: -.012em;
  text-transform: uppercase;
  text-shadow: 0 2px 40px rgba(11, 12, 13, .8);
}

.hero__lead {
  margin: 0 0 32px;
  max-width: 56ch;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: #C3C1BB;
}

.hero__acts { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__note {
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--steel);
}

.hero__mark { position: relative; justify-self: center; }
.hero__mark img {
  width: min(340px, 100%);
  opacity: .96;
  filter: drop-shadow(0 0 70px rgba(11, 79, 214, .32));
}

/* ---------- Spec strip ---------- */

.spec { position: relative; padding: 0; }

.spec__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  list-style: none;
  border-top: 1px solid var(--form-edge);
  border-bottom: 1px solid var(--form-edge);
}

.spec__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 22px 26px 0;
  border-right: 1px solid var(--form-edge);
}
.spec__item:last-child { border-right: 0; }

.spec__k {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--chalk-bright);
}
.spec__v {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.05;
  text-transform: uppercase;
}

/* ---------- Sections ---------- */

.sect { position: relative; padding: var(--sect-pad) 0; }

.sect__h2 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: .95;
  letter-spacing: -.005em;
  text-transform: uppercase;
  max-width: 20ch;
}

.sect__lead {
  margin: 0 0 clamp(36px, 5vw, 56px);
  max-width: 62ch;
  color: #B9B7B1;
  font-size: 1.06rem;
}

/* ---------- Service panels ---------- */

.panels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--form-edge);
  border: 1px solid var(--form-edge);
}

.panel {
  position: relative;
  grid-column: span 2;
  background: rgba(17, 19, 21, .74);
  backdrop-filter: blur(8px);
  padding: 32px 28px 36px;
  transition: background .25s ease;
}
.panel--wide { grid-column: span 3; }

.panel::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--chalk);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .38s var(--snap);
}
.panel:hover { background: rgba(22, 25, 28, .86); }
.panel:hover::after { transform: scaleX(1); }

.panel__h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  text-transform: uppercase;
}

.panel__p { margin: 0; color: #ABA9A4; font-size: .98rem; }

/* ---------- Process (pinned) ---------- */

#process { position: relative; border-top: 1px solid var(--form-edge); }

.process__stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(64px, 8vw, 96px) 0;
}

.process__wrap {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.process__intro .sect__lead { margin-bottom: 0; }

.steps { position: relative; margin: 0; padding: 0 0 0 28px; list-style: none; }

.steps__rail {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--form-edge);
}
.steps__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--chalk);
  transform-origin: top;
}

.step {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: clamp(12px, 2vw, 24px);
  padding: 16px 0;
}

.step__n {
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--chalk-bright);
  padding-top: 5px;
}

.step__h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1;
  text-transform: uppercase;
}

.step__p { margin: 0; max-width: 60ch; color: #ABA9A4; font-size: .97rem; line-height: 1.5; }

/* ---------- Demolition beat ---------- */

.demo { border-top: 1px solid var(--form-edge); }

.demo__h2 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: .9;
  letter-spacing: -.012em;
  text-transform: uppercase;
  text-shadow: 0 2px 40px rgba(11, 12, 13, .8);
}

.demo__h2 { max-width: 15ch; }
.demo .sect__lead { max-width: 58ch; }

/* ---------- Service area ---------- */

.area { border-top: 1px solid var(--form-edge); }

.area__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.area__hours {
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--concrete);
}
.area__hours-k {
  color: var(--steel);
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-right: 10px;
}

.area__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--form-edge);
  border: 1px solid var(--form-edge);
}

.area__item {
  background: rgba(17, 19, 21, .74);
  backdrop-filter: blur(8px);
  padding: 18px 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.1;
  text-transform: uppercase;
}

/* ---------- Quote ticket ---------- */

#quote { border-top: 1px solid var(--form-edge); }

.quote__wrap {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.quote__alt { margin: 0; font-family: var(--mono); font-size: .92rem; line-height: 2; }

.ticket {
  background: rgba(17, 19, 21, .82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--form-edge);
}

.ticket__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--form-edge);
  background: rgba(13, 15, 17, .8);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--steel);
}
.ticket__head span:first-child { color: var(--chalk-bright); }

.ticket__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 26px 22px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }

.field__l {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--steel);
}
.field__opt { color: #5F6163; letter-spacing: .1em; }

.field__i {
  width: 100%;
  background: rgba(9, 10, 12, .85);
  border: 1px solid var(--form-edge);
  border-radius: 0;
  color: var(--concrete);
  font-family: var(--body);
  font-size: 1rem;
  padding: 12px 14px;
  transition: border-color .18s ease;
}
.field__i:hover { border-color: #2E3338; }
.field__i:focus { border-color: var(--chalk); outline: none; box-shadow: inset 0 -2px 0 var(--chalk); }
.field__i--area { resize: vertical; min-height: 110px; }

.ticket__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 0 22px 26px;
}

.ticket__status {
  margin: 0;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--steel);
}
.ticket__status.is-ok { color: var(--chalk-bright); }
.ticket__status.is-bad { color: #E0763A; }

/* ---------- Footer ---------- */

.foot {
  padding: clamp(52px, 7vw, 84px) 0 28px;
  border-top: 1px solid var(--form-edge);
  background: rgba(9, 10, 11, .72);
  backdrop-filter: blur(8px);
}

.foot__wrap {
  display: grid;
  grid-template-columns: 120px repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}

.foot__mark { width: 96px; height: 96px; opacity: .9; }

.foot__name {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  text-transform: uppercase;
}

.foot__k {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--chalk-bright);
}

.foot__p { margin: 0 0 6px; color: #9C9A96; font-size: .94rem; }

.foot__legal {
  max-width: var(--wrap);
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding: 20px var(--pad) 0;
  border-top: 1px solid var(--form-edge);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #5F6163;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__mark { order: -1; justify-self: start; }
  .hero__mark img { width: min(240px, 55vw); }
  .process__wrap, .area__wrap, .quote__wrap { grid-template-columns: minmax(0, 1fr); }
  .process__stage { min-height: 0; }
  .foot__wrap { grid-template-columns: 96px repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .bar__nav { display: none; }
  .bar__cta { margin-left: auto; }
  .btn__label { display: inline; }
  .btn__num { display: none; }
  .spec__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec__item { padding: 20px 18px 20px 0; }
  .spec__item:nth-child(2n) { border-right: 0; }
  .spec__item:nth-child(n+3) { border-top: 1px solid var(--form-edge); padding-top: 20px; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .panel, .panel--wide { grid-column: span 1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .step__n { padding-top: 0; }
  .ticket__grid { grid-template-columns: minmax(0, 1fr); }
  .foot__wrap { grid-template-columns: minmax(0, 1fr); }
  .foot__mark { width: 72px; height: 72px; }
  .hero__acts .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .panel::after { transform: scaleX(1); opacity: .35; }
}
