/* ============================================================
   PENDANT — Shared stylesheet
   Tokens, chrome, and patterns used across every page.
   Page-specific styles remain inline in each .html file.
   ============================================================ */

:root {
  --bg:           #0A0C10;
  --bg-2:         #0F1218;
  --bg-3:         #141820;
  --text:         #D6D8DC;
  --text-dim:     #5A606A;
  --text-mid:     #9A9EA6; /* AAA contrast on var(--bg) */
  --accent:       #7B9EB8;
  --accent-light: #A8C4D8;
  --accent-dim:   #3A5468;
  --rule:         #1C2028;
  --rule-mid:     #262C36;
  --white:        #E8EAEE;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* Subtle film-grain noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 999;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 48px; }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 68px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,12,16,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo img {
  height: 30px;
  width: auto;
  display: block;
}

.nav-links { display: flex; gap: 40px; list-style: none; }

.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent-light); }

/* ============================================================
   SECTION LABEL — eyebrow with trailing rule
   ============================================================ */
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.section-label::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent-dim);
}

/* ============================================================
   PAGE HEADER — used by how-we-work and contact
   ============================================================ */
#page-header {
  padding-top: 68px;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

.page-header-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(123,158,184,0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(123,158,184,0.028) 1px, transparent 1px);
  background-size: 72px 72px;
}

.page-header-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(123,158,184,0.06) 0%, transparent 55%);
}

.page-header-inner {
  position: relative;
  z-index: 2;
  padding: 80px 48px 80px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.page-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.15s forwards;
}

.page-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent-dim);
}

.page-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.97;
  color: var(--white);
  max-width: 780px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.page-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-mid);
  max-width: 540px;
  line-height: 1.75;
  margin-top: 32px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.45s forwards;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--accent);
  color: #0A0C10;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 17px 36px;
  transition: background 0.25s, gap 0.25s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover { background: var(--accent-light); gap: 20px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule-mid);
  color: var(--text-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 17px 28px;
  transition: border-color 0.2s, color 0.2s;
  background: transparent;
}

.btn-ghost:hover { border-color: var(--accent-dim); color: var(--accent-light); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--rule);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo img {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.3;
  display: block;
}

.footer-links { display: flex; gap: 32px; list-style: none; }

.footer-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* ============================================================
   ANIMATION HELPERS
   ============================================================ */
.animate-ready {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-ready.visible { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

/* Skip link — visually hidden until focused */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* Focus rings — visible only for keyboard users (:focus-visible) */
a:focus,
button:focus,
input:focus,
textarea:focus { outline: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Reduced motion — respect WCAG 2.3.3 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* Show animated elements immediately, no transform */
  .hero-eyebrow,
  .hero-headline,
  .hero-sub,
  .hero-cta-row,
  .hero-scroll,
  .page-eyebrow,
  .page-headline,
  .page-sub,
  .pillar,
  .problem-item,
  .diff-card,
  .outcome-note,
  .proof-case,
  .phil-principle,
  .model-step,
  .scope-col,
  .signal-item,
  .timing-right,
  .direct-item,
  .fit-col,
  .contact-right,
  .who-right,
  .animate-ready {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  /* Disable button gap-shift on hover */
  .btn-primary:hover { gap: 14px; }
}

/* ============================================================
   SHARED RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  nav { padding: 0 24px; height: 60px; }
  .nav-logo img { height: 26px; }
  .nav-links { gap: 24px; }
  .nav-links a { font-size: 10px; letter-spacing: 0.12em; }

  .page-header-inner { padding: 60px 24px 56px; }
  .page-headline { font-size: clamp(40px, 11vw, 64px); line-height: 0.98; }
  .page-sub { font-size: 16px; margin-top: 24px; }
  .page-eyebrow { margin-bottom: 22px; }

  #page-header { min-height: 44vh; }

  .section-label { font-size: 9px; margin-bottom: 24px; }
  .section-label::after { width: 28px; }

  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 20px 24px; }

  .btn-primary, .btn-ghost { padding: 15px 26px; font-size: 10px; }
}

@media (max-width: 480px) {
  nav { padding: 0 20px; }
  .container { padding: 0 20px; }
  .page-header-inner { padding: 48px 20px 44px; }
}
