/* Talon Global — site components */

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 248, 246, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: var(--rule) solid var(--stone);
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
}
.site-header__brand img { height: 28px; width: auto; }
.site-nav {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--graphite);
  letter-spacing: -0.005em;
  position: relative;
  padding: 4px 0;
  transition: color 120ms ease;
}
.site-nav a:hover, .site-nav a.is-current { color: var(--ink); }
.site-nav a.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  border-bottom: 1px solid var(--ink);
}
.site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 120ms ease, color 120ms ease;
}
.site-header__cta:hover { background: var(--ink); color: var(--paper); }
.site-nav-toggle {
  display: none;
  background: transparent;
  border: var(--rule-bold) solid var(--ink);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1;
}
.site-nav-toggle:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header__cta { display: none; }
  .site-nav-toggle { display: inline-flex; align-items: center; gap: 6px; }

  /* When body has nav-open class, the nav transforms into a slide-out panel */
  body.nav-open .site-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 85vw);
    background: var(--paper);
    border-left: var(--rule-bold) solid var(--ink);
    z-index: 100;
    padding: 72px var(--space-6) var(--space-6);
    gap: 0;
    overflow-y: auto;
  }
  body.nav-open .site-nav a {
    font-size: 18px;
    padding: var(--space-4) 0;
    border-bottom: var(--rule) solid var(--stone);
    color: var(--ink);
    font-weight: 500;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(10, 10, 10, 0.08);
    display: block;
    width: 100%;
  }
  body.nav-open .site-nav a.is-current { font-weight: 700; }
  body.nav-open .site-nav a.is-current::after { display: none; }
  body.nav-open .site-header__cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--space-6);
    padding: 14px 18px;
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
    align-self: stretch;
    position: fixed;
    left: auto;
    right: var(--space-6);
    bottom: var(--space-6);
    width: calc(min(320px, 85vw) - (var(--space-6) * 2));
    z-index: 101;
  }
  body.nav-open .site-nav-toggle {
    position: fixed;
    top: 16px;
    right: var(--space-6);
    z-index: 102;
    background: var(--ink);
    color: var(--paper);
  }

  /* Backdrop */
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.45);
    z-index: 99;
  }
  body.nav-open { overflow: hidden; }

  /* CRITICAL: two fixes on .site-header when nav is open.
     1. Suppress backdrop-filter — it creates a new containing block for
        position:fixed descendants, otherwise constraining the panel, toggle,
        and CTA to the header strip instead of the viewport.
     2. Raise z-index above the backdrop (99). The header creates its own
        stacking context (position:sticky + z-index 50), and the nav lives
        INSIDE that context. Without this, the backdrop at z-index 99 captures
        all clicks because 99 > 50, even though the nav LOOKS on top visually. */
  body.nav-open .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 200;
  }
}

/* ===== Footer ===== */
.site-footer {
  margin-top: var(--space-16);
  border-top: var(--rule) solid var(--stone);
  padding: var(--space-8) 0 var(--space-6);
  color: var(--graphite);
}
.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}
.site-footer h4 {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
}
.site-footer ul li { margin-bottom: 10px; font-size: 14px; }
.site-footer ul a:hover { color: var(--ink); }
.site-footer__brand img { height: 56px; width: auto; }
.site-footer__brand p { margin-top: 14px; max-width: 280px; font-size: 13px; line-height: 1.55; }
.site-footer__legal {
  max-width: var(--container);
  margin: var(--space-8) auto 0;
  padding: var(--space-5) var(--space-8) 0;
  border-top: var(--rule) solid var(--stone);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--graphite);
  flex-wrap: wrap;
  gap: var(--space-3);
}
@media (max-width: 860px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* ===== Page hero (inner pages) ===== */
.page-hero {
  padding: var(--space-12) 0 var(--space-10);
  border-bottom: var(--rule) solid var(--stone);
}
.page-hero__eyebrow {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--graphite);
  margin-bottom: var(--space-5);
}
.page-hero h1 {
  font-size: var(--t-h1);
  line-height: 1.02;
  letter-spacing: var(--tr-tight);
  font-weight: 700;
  max-width: 18ch;
}
.page-hero .lede {
  margin-top: var(--space-5);
  font-size: var(--t-lede);
  line-height: 1.45;
  color: var(--graphite);
  max-width: 56ch;
}

/* ===== CTA banner (pre-footer) ===== */
.cta-banner {
  border-top: var(--rule-bold) solid var(--ink);
  border-bottom: var(--rule) solid var(--stone);
  padding: var(--space-12) 0;
  margin-top: var(--space-16);
}
.cta-banner__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-8);
  align-items: end;
}
.cta-banner h2 {
  font-size: var(--t-h1);
  line-height: 1.02;
  letter-spacing: var(--tr-tight);
  font-weight: 700;
  max-width: 14ch;
}
.cta-banner__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}
@media (max-width: 860px) {
  .cta-banner__inner { grid-template-columns: 1fr; }
}

/* ===== Section header ===== */
.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-8);
  padding: var(--space-10) 0 var(--space-8);
  border-top: var(--rule) solid var(--stone);
}
.section-head__num {
  font-size: 13px;
  font-weight: 500;
  color: var(--graphite);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  padding-top: 8px;
}
.section-head__title h2 {
  font-size: var(--t-h2);
  letter-spacing: -0.015em;
  line-height: 1.05;
  font-weight: 700;
  max-width: 22ch;
}
.section-head__title p {
  margin-top: var(--space-4);
  font-size: var(--t-lede);
  color: var(--graphite);
  max-width: 56ch;
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ===== Service tiles ===== */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule) solid var(--stone);
  border-left: var(--rule) solid var(--stone);
}
.svc-tile {
  border-right: var(--rule) solid var(--stone);
  border-bottom: var(--rule) solid var(--stone);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 220px;
  position: relative;
  transition: background 160ms ease;
}
.svc-tile:hover { background: rgba(10,10,10,0.025); }
.svc-tile__num {
  font-size: 13px;
  color: var(--graphite);
  letter-spacing: var(--tr-wider);
  font-weight: 500;
}
.svc-tile__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.15;
}
.svc-tile__line {
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.5;
  margin-top: auto;
  max-width: 32ch;
}
.svc-tile .arrow-corner {
  position: absolute;
  bottom: var(--space-5); right: var(--space-5);
  font-size: 14px; color: var(--ink);
  opacity: 0; transition: opacity 160ms ease, transform 160ms ease;
}
.svc-tile:hover .arrow-corner { opacity: 1; transform: translateX(2px); }
@media (max-width: 980px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: 1fr; } }

/* ===== Proof tiles ===== */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule) solid var(--stone);
}
.proof-tile {
  padding: var(--space-8) var(--space-6) var(--space-6);
  border-right: var(--rule) solid var(--stone);
  border-bottom: var(--rule) solid var(--stone);
}
.proof-tile:nth-child(3n) { border-right: 0; }
.proof-tile__num {
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.proof-tile__num small {
  font-size: 0.42em;
  font-weight: 500;
  vertical-align: top;
  margin-left: 2px;
  letter-spacing: -0.01em;
  color: var(--graphite);
}
.proof-tile__cap {
  margin-top: var(--space-4);
  font-size: 14px;
  line-height: 1.5;
  color: var(--graphite);
  max-width: 28ch;
  border-top: var(--rule) solid var(--stone);
  padding-top: var(--space-3);
}
@media (max-width: 980px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-tile:nth-child(3n) { border-right: var(--rule) solid var(--stone); }
  .proof-tile:nth-child(2n) { border-right: 0; }
}
@media (max-width: 560px) {
  .proof-grid { grid-template-columns: 1fr; }
  .proof-tile, .proof-tile:nth-child(3n) { border-right: 0; }
}

/* ===== Form ===== */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: var(--space-5);
}
.form-row label {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--graphite);
}
.form-row input, .form-row textarea {
  font: inherit;
  font-size: 16px;
  padding: 12px 0;
  border: 0;
  border-bottom: var(--rule-bold) solid var(--stone);
  background: transparent;
  color: var(--ink);
  outline: none;
  transition: border-color 120ms ease;
}
.form-row input:focus, .form-row textarea:focus {
  border-bottom-color: var(--ink);
}
.form-row textarea { resize: vertical; min-height: 96px; }

/* ===== Tweaks panel positioning ===== */
.tweaks-panel-fixed {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
}
