/* ══════════════════════════════════════════════════════════════════
   LOADBARE · GLASS LAYER — v1 (2026-07-03)
   Glassmorphism treatment for the DARK surfaces of the editorial
   system. The paper artifacts (quote ticket, rate sheet, invoice)
   stay matte on purpose: paper vs glass is the page's contrast.
   Loads AFTER home.css. Bump the ?v= token on every edit.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --glass-bg: rgba(24, 19, 13, 0.44);
  --glass-bg-strong: rgba(24, 19, 13, 0.62);
  --glass-edge: rgba(244, 236, 220, 0.10);
  --glass-edge-hi: rgba(255, 168, 80, 0.34);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.65);
  --glass-blur: 16px;
}
@media (max-width: 768px) {
  :root { --glass-blur: 10px; }
}

/* ── nav: solid ink becomes floating glass once the page scrolls ── */
.js .site-nav.is-scrolled .nav-bar,
.js .site-nav.is-menu-open .nav-bar,
.site-nav:has(.nav-menu[open]) .nav-bar {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border-bottom: 1px solid var(--glass-edge);
  box-shadow: var(--glass-inner), 0 12px 40px -18px rgba(0, 0, 0, 0.6);
}

/* ── glass cards: field-report entries + FAQ rows ──
   Scoped to the content cards only. Bare `.spec-row` is a home.css
   foundation class also carried by the mobile nav-menu rows — restyling
   it wholesale doubled the nav rows' borders and broke the
   .nav-menu__fine padding alignment. Nav rows keep their ink styling. ── */
.spec-row.fr-entry,
.spec-row.faq-item {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-panel);
  box-shadow: var(--glass-inner), var(--glass-shadow);
  padding-left: clamp(14px, 2.2vw, 22px);
  padding-right: clamp(14px, 2.2vw, 22px);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.spec-row.fr-entry + .spec-row.fr-entry,
.spec-row.faq-item + .spec-row.faq-item { margin-top: 12px; }
.spec-row.fr-entry:hover,
.spec-row.fr-entry:focus-within,
.spec-row.faq-item:hover,
.spec-row.faq-item:focus-within {
  border-color: var(--glass-edge-hi);
  box-shadow: var(--glass-inner), 0 30px 70px -26px rgba(0, 0, 0, 0.72),
              0 0 0 1px rgba(255, 140, 58, 0.08);
}

/* ── founder feature card ── */
.fr-feature {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 140, 58, 0.07), rgba(24, 19, 13, 0.5) 42%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid rgba(255, 140, 58, 0.22);
  border-radius: var(--r-panel);
  box-shadow: var(--glass-inner), var(--glass-shadow);
  padding: clamp(18px, 2.6vw, 28px);
}
/* Cursor sheen rides a pseudo-element (motion.js drives --mx/--my) so the
   card's own gradient background never blinks off while hovered. */
.fr-feature::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 168, 80, 0.055), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
@media (pointer: fine) {
  .fr-feature:hover::after { opacity: 1; }
}

/* ── incoming-text bubble in the hero reads as frosted glass ── */
.hero-call {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-edge);
  border-radius: 6px 6px 6px 2px;   /* chat-bubble tail corner */
  box-shadow: var(--glass-inner), var(--glass-shadow);
  padding: 14px 18px;
}

/* ── framed media: the job photo + the in-app chrome get a glass ring ── */
.how-photo,
.fq-app {
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-panel);
  box-shadow: var(--glass-inner), var(--glass-shadow);
  overflow: hidden;
}

/* ── honest strip under the field reports ── */
.fr-strip {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-panel);
  box-shadow: var(--glass-inner);
  padding: 12px 18px;
}

/* ── primary buttons: light sweep on hover (fine pointers only) ── */
@media (pointer: fine) {
  .btn--primary, a.btn.btn--primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }
  .btn--primary::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-130%);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }
  .btn--primary:hover::after { transform: translateX(130%); }
}

/* ── no backdrop-filter support: fall back to a more opaque panel ── */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .spec-row.fr-entry, .spec-row.faq-item, .fr-feature, .hero-call, .fr-strip { background: rgba(20, 16, 11, 0.92); }
  .js .site-nav.is-scrolled .nav-bar { background: rgba(14, 11, 8, 0.96); }
}

/* ── scroll progress hairline (element injected by motion.js) ── */
.lb-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  z-index: 11000;
  background: linear-gradient(90deg, var(--copper), var(--copper-hi));
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   LANDING PRELOADER (index only — markup lives at the top of <body>)
   Never traps the page: hidden without JS, force-removed by motion.js
   failsafe, and skipped after the first view each session.
   ══════════════════════════════════════════════════════════════════ */
html.lb-loading { overflow: hidden; }
#lb-loader {
  /* Hidden until motion.js actually starts the intro (html.lb-loading).
     The loader must never be the page's first paint: with display:flex from
     the stylesheet it rendered as a dead black screen before the deferred
     motion layer ran, and pushed LCP behind the animation. `.is-done` keeps
     it displayed through the exit wipe after lb-loading is removed. */
  display: none;
  position: fixed;
  inset: 0;
  z-index: 12000;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 140, 58, 0.07), transparent 55%),
    #0a0905;
}
html.lb-loading #lb-loader,
#lb-loader.is-done { display: flex; }
#lb-loader.is-done {
  opacity: 1;
  clip-path: inset(0 0 100% 0);   /* hard upward wipe — matches the headline squeegees */
  transition: clip-path 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.lb-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.lb-loader__logo {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  opacity: 0;                 /* motion.js animates in; failsafe below */
  box-shadow: 0 0 0 1px rgba(255, 140, 58, 0.18), 0 16px 48px -20px rgba(0, 0, 0, 0.7);
  animation: lbLoaderShow 0.01s 1.2s forwards; /* CSS failsafe reveal */
}
.lb-loader__word {
  font-family: Calibri, Carlito, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: #f4ecdc;
  opacity: 0;
  animation: lbLoaderShow 0.01s 1.2s forwards;
}
.lb-loader__bar {
  width: 148px;
  height: 2px;
  background: rgba(244, 236, 220, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.lb-loader__bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff8c3a, #ffa850);
  transform: translateX(-101%);
}
@keyframes lbLoaderShow { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  #lb-loader { display: none !important; }
  .spec-row, .btn--primary::after, .fr-feature::after { transition: none; }
}
