/* =========================================================
   BifferProxy marketing site — shared stylesheet
   Builds on top of biffer-tokens.css (Biffer design system).
   ========================================================= */

/* ---------- Motion defaults ---------- */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sumi);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

/* Ambient mesh gradient behind everything — barely there */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 1200px 700px at 65% -10%, rgba(201, 162, 39, 0.065), transparent 60%),
    radial-gradient(ellipse 900px 600px at -5% 30%, rgba(74, 141, 181, 0.05), transparent 65%),
    radial-gradient(ellipse 700px 500px at 110% 70%, rgba(74, 141, 181, 0.04), transparent 70%);
}

/* Faint technical grid on hero + key sections */
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(138, 168, 192, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 168, 192, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 40%, transparent 85%);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background-color 250ms var(--ease-out), border-color 250ms var(--ease-out), backdrop-filter 250ms;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(13, 27, 42, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: rgba(42, 64, 96, 0.6);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--ink);
}
.brand-word {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 48;
}
.brand-word .proxy {
  color: var(--ink-muted);
  font-weight: 400;
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-muted);
}
.nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms var(--ease-out);
  position: relative;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a.active {
  color: var(--ink);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ---------- Layout ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
section {
  padding: 140px 0;
  position: relative;
}
section.hero-sec {
  padding: 160px 0 120px;
}
@media (max-width: 820px) {
  section { padding: 80px 0; }
  section.hero-sec { padding: 110px 0 64px; }
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-faint);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kin);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
  animation: livePulse 2.2s var(--ease-in-out) infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.05); }
}

.mega {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 6.5vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}
.mega .accent {
  color: var(--kin);
  font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 600;
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
  margin: 0 0 24px;
  text-wrap: balance;
}
.section-title .accent {
  color: var(--kin);
  font-style: italic;
}
.section-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 58ch;
  margin: 0;
}

/* ---------- Glass panel ---------- */
.glass {
  background: rgba(27, 42, 74, 0.45);
  border: 1px solid rgba(138, 168, 192, 0.12);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-radius: var(--radius-md);
}

/* ---------- Buttons ---------- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 100ms var(--ease-out);
  white-space: nowrap;
}
.btn-pill:active { transform: translateY(1px); }
.btn-pill.primary {
  background: var(--kin);
  color: var(--sumi);
  font-weight: 600;
}
.btn-pill.primary:hover { background: var(--kin-hover); }
.btn-pill.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--surface-border);
}
.btn-pill.secondary:hover {
  background: rgba(74, 141, 181, 0.08);
  border-color: var(--tsuru);
}
.btn-pill.ghost {
  background: transparent;
  color: var(--ink-muted);
}
.btn-pill.ghost:hover { color: var(--ink); }
.btn-pill .arrow {
  display: inline-block;
  transition: transform 200ms var(--ease-out);
}
.btn-pill:hover .arrow { transform: translateX(3px); }

.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
}

/* ---------- Trust tags ---------- */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}
.trust-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  padding: 5px 10px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: rgba(30, 48, 80, 0.4);
  letter-spacing: 0.02em;
}
.trust-tag .dim {
  color: var(--ink-faint);
  margin-left: 6px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 1;
  transform: none;
  transition-property: opacity, transform;
  transition-duration: 500ms;
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal .reveal:not(.in) {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.in {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------- Footer ---------- */
footer.site-foot {
  padding: 96px 0 48px;
  border-top: 1px solid var(--surface-border);
  background: linear-gradient(180deg, transparent, rgba(21, 34, 54, 0.5));
  margin-top: 80px;
  position: relative;
  z-index: 1;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 80px;
}
@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.foot-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
  font-weight: 500;
}
.foot-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot-col a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 150ms var(--ease-out);
}
.foot-col a:hover { color: var(--ink); }
.foot-col p {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 34ch;
  margin: 16px 0 0;
}
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--surface-border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.foot-bottom .commit::before {
  content: "■ ";
  color: var(--success);
}
.lang-switch {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--surface-raised);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
}
.lang-switch button {
  background: transparent;
  border: 0;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  cursor: pointer;
  border-radius: 6px;
}
.lang-switch button.on {
  background: var(--ai);
  color: var(--ink);
}

/* ---------- Animation annotation chips (wireframe overlay) ---------- */
.motion-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: rgba(13, 27, 42, 0.9);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--kin);
  letter-spacing: 0.04em;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}
.motion-pin::before {
  content: "◆";
  font-size: 8px;
  opacity: 0.9;
}
/* Hidden by default — Tweaks panel reveals them. */
.motion-pin { display: none; }
html.motion-pins-on .motion-pin { display: inline-flex; }

/* ---------- Utility ---------- */
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.tnum { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: var(--stack, 16px); }

/* Spotlight glow on cards — cursor-tracking */
.spotlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.spotlight::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    circle 220px at var(--mx, 50%) var(--my, 50%),
    rgba(201, 162, 39, 0.14),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
  pointer-events: none;
  z-index: 0;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }
