/* =====================================================================
   Concrete Inspection Specialist — V2 "FIELD DOSSIER" override layer
   Loads AFTER tokens.css / base.css / components.css / forms.css.
   Uses cascade + minimal specificity bumps. Pure CSS, no new variables.
   ===================================================================== */

/* ─────────────────────────────────────────────────────────────────────
   SECTION 1 · OVERRIDES — restyle v1 components to dossier language
   ───────────────────────────────────────────────────────────────────── */

/* --- 1a · Site header ----------------------------------------------- */
.site-header {
  background: rgba(243, 242, 238, 0.92); /* --paper at ~92% */
  backdrop-filter: saturate(130%) blur(12px);
  border-bottom: var(--hairline);
  box-shadow: none;
}
.site-header.is-stuck {
  box-shadow: none; /* kill v1 lift shadow */
  border-bottom-color: var(--steel-300); /* stays visible via --hairline */
}

/* --- 1b · Brand wordmark -------------------------------------------- */
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- 1c · Nav links — mono, uppercase, underline reveal -------------- */
.nav__link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel-600);
  font-weight: 400;
  /* remove pill bg: */
  background: none !important;
  border-radius: 0;
  padding: 0.55rem 0.7rem;
  /* underline reveal via background-image */
  background-image: linear-gradient(var(--steel-300), var(--steel-300)) !important;
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: color var(--t-fast) var(--ease), background-size var(--t-fast) var(--ease);
}
.nav__link:hover {
  color: var(--ink);
  background-size: 100% 1px !important;
}
.nav__link--active {
  color: var(--accent-700);
  background-image: linear-gradient(var(--accent-700), var(--accent-700)) !important;
  background-size: 100% 1px !important;
}

/* mobile nav — dossier full-sheet */
@media (max-width: 880px) {
  .nav__list {
    background: var(--paper);
    border-bottom: var(--hairline);
    box-shadow: none;
    padding: 0;
  }
  .nav__link {
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-transform: none;
    letter-spacing: -0.01em;
    font-weight: 500;
    padding: 1rem clamp(1.1rem, 4vw, 2.5rem);
    background-image: none !important;
    background-size: 0 0 !important;
    border-bottom: var(--hairline);
    color: var(--ink);
  }
  .nav__link:hover { color: var(--accent-700); }
  .nav__link--active {
    color: var(--accent-700);
    background-size: 0 0 !important;
    background: none !important;
  }
}

/* --- 1d · Buttons ----------------------------------------------------- */
.btn {
  border-radius: var(--r);
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.95rem 1.5rem;
}
/* remove vertical lift */
.btn:hover { transform: none; }
.btn:active { transform: none; }
/* arrow nudge */
.btn svg { transition: transform var(--t-fast) var(--ease); }
.btn:hover svg { transform: translateX(4px); }
/* keep variants */
.btn--primary { box-shadow: 0 8px 20px -10px rgba(11, 108, 176, 0.65); }
.btn--primary:hover { transform: none; }
.btn--ghost { border-color: var(--steel-300); }
.btn--ghost:hover { transform: none; box-shadow: none; }
.btn--on-dark:hover { transform: none; }
.btn--ghost-on-dark:hover { transform: none; }

/* --- 1e · Cards ------------------------------------------------------- */
.card {
  background: var(--white);
  border: var(--hairline);
  border-radius: var(--r-lg);
}
/* no hover lift — border darken + arrow nudge only */
.card--link:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--steel-500);
}
.card--link:hover .card__more svg { transform: translateX(4px); }
.card__more svg { transition: transform var(--t-fast) var(--ease); }
/* icon: square, hairline, transparent bg */
.card__icon {
  border-radius: var(--r);
  background: transparent;
  border: var(--hairline);
  color: var(--accent-700);
}

/* --- 1f · Section head (.s-head) ------------------------------------- */
.s-head {
  border-top: var(--hairline);
  padding-top: 1.1rem;
}
.s-head__title { font-size: var(--fs-h2); }

/* --- 1g · Eyebrow ----------------------------------------------------- */
.eyebrow { color: var(--steel-600); }
.section--dark .eyebrow { color: var(--accent-bright); }
.eyebrow::before { width: 18px; height: 1px; }

/* --- 1h · Page hero (interior pages) --------------------------------- */
.page-hero {
  border-bottom: var(--hairline-dark);
  padding-block: clamp(4rem, 8vw, 6.5rem);
}
.page-hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4vw, 4.6rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 0.95;
}
/* layout row for title + right meta */
.page-hero__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}
.page-hero__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-400);
  display: grid;
  gap: 0.35rem;
  text-align: right;
  flex-shrink: 0;
}
@media (max-width: 860px) { .page-hero__meta { display: none; } }

/* --- 1i · Comparison table ------------------------------------------- */
.compare thead th {
  background: transparent;
  border-top: var(--hairline);
  border-bottom: var(--hairline);
  font-family: var(--font-mono);
}
.compare thead th:first-child { border-top-left-radius: 0; }
.compare thead th:last-child  { border-top-right-radius: 0; }
.compare-wrap {
  border: var(--hairline);
  border-radius: var(--r-lg);
}

/* --- 1j · Callout ----------------------------------------------------- */
.callout {
  border-radius: var(--r-lg);
  border: var(--hairline);
}

/* --- 1k · Aside-card, form-card, step -------------------------------- */
.aside-card, .form-card {
  border: var(--hairline);
  border-radius: var(--r-lg);
}
.step {
  border: var(--hairline);
  border-radius: var(--r-lg);
}

/* --- 1l · Footer ------------------------------------------------------- */
.site-footer__grid { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.foot-col h4 { border-bottom: 1px solid rgba(255, 255, 255, 0.12); padding-bottom: 0.6rem; }
.site-footer a { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.03em; }

/* --- 1m · Trust strip (legacy) --------------------------------------- */
/* flatten to hairline grid, no boxy borders */
.trust {
  gap: 0;
  background: none;
  border: var(--hairline);
  border-radius: var(--r-lg);
}
.trust__item {
  background: var(--white);
  border-left: var(--hairline);
}
.trust__item:first-child { border-left: none; }

/* --- 1n · CTA band title ---------------------------------------------- */
.cta-band__title {
  font-size: clamp(2.2rem, 1.4rem + 3.5vw, 4rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* --- 1o · Hero title — field dossier treatment ----------------------- */
.hero__title {
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.92;
  font-weight: 600;
}
.hero__title .line { display: block; }
/* mono annotation items */
.hero__note {
  font-family: var(--font-mono);
  color: var(--steel-500);
}
.spec { font-family: var(--font-mono); color: var(--steel-500); }


/* ─────────────────────────────────────────────────────────────────────
   SECTION 2 · NEW COMPONENTS
   ───────────────────────────────────────────────────────────────────── */

/* --- 2a · .frame-tick — sheet card with corner ticks ----------------- */
.frame-tick {
  position: relative;
}
/* top-left tick */
.frame-tick::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--steel-500);
  border-left: 2px solid var(--steel-500);
  pointer-events: none;
  z-index: 1;
}
/* bottom-right tick */
.frame-tick::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid var(--steel-500);
  border-right: 2px solid var(--steel-500);
  pointer-events: none;
  z-index: 1;
}

/* --- 2b · .stat-band — hairline-ruled stats row ---------------------- */
.stat-band {
  border-top: var(--hairline);
  border-bottom: var(--hairline);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.stat-band__item {
  padding: 1.5rem 1.25rem;
  border-left: var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.stat-band__item:first-child { border-left: none; }
.stat-band__k {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.stat-band__l {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--steel-600);
  line-height: 1.35;
}
@media (max-width: 900px) {
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .stat-band__item:nth-child(odd) { border-left: none; }
  .stat-band__item:nth-child(even) { border-left: var(--hairline); }
}
@media (max-width: 480px) {
  .stat-band { grid-template-columns: 1fr; }
  .stat-band__item { border-left: none !important; border-top: var(--hairline); }
  .stat-band__item:first-child { border-top: none; }
}

/* --- 2c · .marquee — hairline-bordered scrolling ticker -------------- */
.marquee {
  overflow: hidden;
  border-top: var(--hairline-dark);
  border-bottom: var(--hairline-dark);
}
.marquee--light {
  border-top: var(--hairline);
  border-bottom: var(--hairline);
}
.marquee__track {
  display: inline-flex;
  gap: 3rem;
  white-space: nowrap;
  padding: 0.8rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-400);
  animation: cis-marquee 32s linear infinite;
  will-change: transform;
}
@keyframes cis-marquee {
  to { transform: translateX(-50%); }
}

/* --- 2d · .badge-rotate — spinning circular badge -------------------- */
.badge-rotate {
  width: 130px;
  aspect-ratio: 1;
  position: absolute;
}
.badge-rotate--hero {
  right: -20px;
  bottom: 48px;
}
@media (max-width: 720px) { .badge-rotate { display: none; } }
.badge-rotate__svg {
  animation: cis-spin 26s linear infinite;
  width: 100%;
  height: 100%;
}
@keyframes cis-spin {
  to { transform: rotate(360deg); }
}

/* --- 2e · .step-rail — vertical rail with giant numerals ------------- */
.step-rail {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.step-rail__nums {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rail-num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 6vw, 7rem);
  line-height: 1;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--steel-400);
  display: block;
  user-select: none;
}
/* inline num hidden by default (desktop) */
.rail-num--inline { display: none; }

.step-rail__items { display: grid; }
.step-rail__item {
  padding: 2rem 0;
  border-top: var(--hairline);
  position: relative;
}
.step-rail__item:last-child { border-bottom: var(--hairline); }
.step-rail__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.6rem;
  border: var(--hairline);
  border-radius: var(--r-pill);
  color: var(--steel-600);
}
.step-rail__tag--free {
  color: var(--ok);
  border-color: #bfe3d6;
  background: var(--ok-050);
}
.step-rail__tag--fee {
  color: var(--accent-700);
  border-color: var(--accent-100);
  background: var(--accent-050);
}
.step-rail__tag--final {
  color: var(--steel-700);
  border-color: var(--border);
  background: var(--steel-100);
}
.step-rail__item h3 {
  font-size: 1.45rem;
  margin: 0.9rem 0 0.5rem;
}
.step-rail__item p { color: var(--steel-600); }

@media (max-width: 880px) {
  .step-rail { grid-template-columns: 1fr; }
  .step-rail__nums { display: none; }
  .rail-num--inline { display: block; font-size: 2.8rem; -webkit-text-stroke: 1.5px var(--steel-400); }
}

/* --- 2f · .duotone — greyscale+accent-wash figure -------------------- */
.duotone {
  position: relative;
  background: var(--accent-700);
  border: var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.duotone img {
  filter: grayscale(1) contrast(1.08) brightness(0.95);
  mix-blend-mode: luminosity;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.plate {
  position: absolute;
  left: 0; bottom: 0; right: 0;
  background: rgba(14, 17, 22, 0.85);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* --- 2g · .titleblock — engineering drawing title block -------------- */
.titleblock {
  border: var(--hairline-dark);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 2.5rem;
}
.titleblock__cell {
  padding: 0.8rem 1rem;
  border-left: var(--hairline-dark);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.titleblock__cell:first-child { border-left: none; }
.titleblock__cell dt {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-500);
}
.titleblock__cell dd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel-300);
  margin: 0;
}
@media (max-width: 900px) {
  .titleblock { grid-template-columns: repeat(3, 1fr); }
  .titleblock__cell:nth-child(3n+1) { border-left: none; }
  .titleblock__cell:nth-child(n+4) { border-top: var(--hairline-dark); }
}
@media (max-width: 520px) {
  .titleblock { grid-template-columns: repeat(2, 1fr); }
  .titleblock__cell:nth-child(3n+1) { border-left: var(--hairline-dark); } /* reset */
  .titleblock__cell:nth-child(2n+1) { border-left: none; }
  .titleblock__cell:nth-child(n+3) { border-top: var(--hairline-dark); }
}

/* --- 2h · .stamp — rotated dashed-border mono chip ------------------- */
.stamp {
  display: inline-block;
  transform: rotate(-5deg);
  border: 1.5px dashed currentColor;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-700);
}
.stamp--ok  { color: var(--ok); }
.stamp--red { color: var(--danger); }

/* --- 2i · .wm-num — section watermark numeral ------------------------ */
.wm-num {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 4rem + 8vw, 11rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--steel-200);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  aria-hidden: true; /* set in HTML; CSS reminder */
}
@media (max-width: 720px) { .wm-num { display: none; } }

/* sections using wm-num need z layering */
.has-wm { position: relative; overflow: hidden; }
.has-wm > .wrap { position: relative; z-index: 1; }

/* --- 2j · .annot — mono annotation line with leading rule ------------ */
.annot {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--steel-600);
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.annot::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* --- 2k · Dark-context fixes ----------------------------------------- */
.section--dark .stat-band,
.section--dark .stat-band__item {
  border-color: rgba(255, 255, 255, 0.18);
}
.section--dark .stat-band__k { color: #fff; }
.section--dark .stat-band__l { color: var(--steel-400); }
.section--dark .annot { color: var(--steel-400); }
.section--dark .frame-tick::before,
.section--dark .frame-tick::after {
  border-color: var(--steel-500);
}
.section--dark .titleblock { border-color: rgba(255, 255, 255, 0.18); }
.section--dark .titleblock__cell { border-left-color: rgba(255, 255, 255, 0.18); }


/* ─────────────────────────────────────────────────────────────────────
   SECTION 2x · HERO V2 LAYOUT — full-width editorial headline
   ───────────────────────────────────────────────────────────────────── */

.hero__inner {
  display: block;
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 0;
}
.hero__head { max-width: 100%; }
.hero__eyebrow { margin-bottom: 1.6rem; color: var(--accent-bright); }
.hero .eyebrow { color: var(--accent-bright); }
.hero__title { max-width: 14ch; }
.hero__row {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin-top: clamp(2.25rem, 4.5vw, 3.5rem);
  padding-bottom: clamp(2.75rem, 5.5vw, 4.5rem);
}
.hero__lead { margin-top: 0; }
.hero__panel { position: relative; }
.badge-rotate--hero { position: absolute; right: -26px; top: -52px; }
@media (max-width: 920px) {
  .hero__row { grid-template-columns: 1fr; }
  .hero__panel { max-width: 460px; order: 2; }
}

/* ─────────────────────────────────────────────────────────────────────
   SECTION 2y · BREATHING ROOM — looser text blocks
   ───────────────────────────────────────────────────────────────────── */

.card { padding: clamp(1.7rem, 2.8vw, 2.5rem); }
.card__body { line-height: 1.62; }
.card__title { margin-bottom: 0.65rem; }
.aside-card { padding: clamp(1.75rem, 3vw, 2.4rem); }
.aside-card p { line-height: 1.62; }
.aside-card h3 { margin-top: 1.1rem; margin-bottom: 0.35rem; }
.callout { padding: 1.6rem 1.8rem; gap: 1.1rem; }
.callout p { line-height: 1.6; }
.callout h3 { margin-bottom: 0.45rem; }
.feature-list { gap: 1.05rem; margin-top: 1.75rem; }
.feature-list li { gap: 0.9rem; }
.feature-list span { line-height: 1.55; }
.step-rail__item { padding: 2.4rem 0; }
.step__body { line-height: 1.62; max-width: 58ch; }
.lead { line-height: 1.62; }
.mini-steps { gap: 1.25rem; margin-top: 1.25rem; }
.mini-step p { line-height: 1.55; }
.prose p { line-height: 1.7; }

/* ─────────────────────────────────────────────────────────────────────
   SECTION 2z · STEP-RAIL ALIGNMENT — numeral sits beside its own step
   ───────────────────────────────────────────────────────────────────── */

.step-rail { display: block; }
.step-rail__nums { display: none; }
.step-rail__item {
  display: grid;
  grid-template-columns: clamp(110px, 16vw, 200px) 1fr;
  column-gap: clamp(1.25rem, 4vw, 3.5rem);
  align-items: start;
}
.step-rail__item > * { grid-column: 2; }
.step-rail__item .rail-num--inline {
  display: block;
  grid-column: 1;
  grid-row: 1 / span 3;
  font-size: clamp(3.4rem, 2.6rem + 4vw, 6rem);
  line-height: 0.9;
  margin-top: 0.15rem;
}
@media (max-width: 640px) {
  .step-rail__item { grid-template-columns: 1fr; }
  .step-rail__item > * { grid-column: 1; }
  .step-rail__item .rail-num--inline { grid-row: auto; font-size: 2.6rem; margin-bottom: 0.6rem; }
}

/* ─────────────────────────────────────────────────────────────────────
   SECTION 3 · REDUCED MOTION
   ───────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .marquee__track,
  .badge-rotate__svg {
    animation: none !important;
  }
}
