/* ============================================================
   BASE — Variables, Reset, Typography, Body, Accessibility
   Apply Max · A Prosk AI Product
   ============================================================ */

/* ─── LIVE APPLY FEED (bottom-left) ─────────────────────── */
.laf {
  position: fixed; bottom: 28px; left: 28px; z-index: 8400;
  display: flex; align-items: center; gap: .7rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: .75rem 1.1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  font-family: 'Instrument Sans', sans-serif;
  transform: translateY(12px) scale(0.96);
  opacity: 0; pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
  max-width: 240px;
}
.laf.laf-show { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.laf-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.5);
  animation: pulse-ring 1.6s infinite;
}
.laf-content { display: flex; flex-direction: column; gap: .05rem; }
.laf-top  { font-size: .64rem; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }
.laf-name { font-size: .84rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.laf-role { font-size: .72rem; color: var(--ink-soft); }

/* ─── ACTIVE VIEWERS ─────────────────────────────────────── */
.active-viewers {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--ink-soft); margin-top: 1rem;
}
.av-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); flex-shrink: 0;
  animation: pulse-ring 2s infinite;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.5);
}

/* ─── SKIP NAV ───────────────────────────────────────────── */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--blue);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-nav:focus { top: 0; }

/* ─── FOCUS STYLES ───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

/* ─── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --ink:          #09090B;
  --ink-mid:      #27272A;
  --ink-soft:     #52525B;
  --ink-mute:     #A1A1AA;
  --paper:        #FAFAFA;
  --white:        #FFFFFF;

  --blue:         #2563EB;
  --blue-vivid:   #1D4ED8;
  --blue-light:   #EFF6FF;
  --blue-mid:     #BFDBFE;
  --blue-glow:    rgba(37,99,235,0.15);

  --cyan:         #0EA5E9;
  --emerald:      #10B981;
  --amber:        #F59E0B;
  --red:          #EF4444;

  --violet:       #7C3AED;
  --violet-light: #F5F3FF;
  --violet-mid:   #DDD6FE;
  --violet-glow:  rgba(124,58,237,0.2);

  --border:        #E4E4E7;
  --border-strong: #D4D4D8;
  --radius:        14px;
  --radius-sm:     8px;

  --shadow-xs:   0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 8px 24px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-blue: 0 8px 32px rgba(37,99,235,0.25);
  --shadow-violet: 0 8px 32px rgba(124,58,237,0.25);
}

/* ─── BODY ───────────────────────────────────────────────── */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── iOS SCROLL FIX ─────────────────────────────────────── */
/* Prevents "stuck scroll" on iPhone — overflow-x:hidden on body
   can create a broken scroll container in iOS Safari             */
@media (max-width: 768px) {
  html {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  body {
    overflow-x: unset;
    position: relative;
  }
}

/* ─── CURSOR SPOTLIGHT ───────────────────────────────────── */
:root { --cx: -9999px; --cy: -9999px; }
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(
    800px circle at var(--cx) var(--cy),
    rgba(37,99,235,0.055), transparent 50%
  );
}

/* ─── NOISE TEXTURE OVERLAY ──────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─── SHARED SECTION STRUCTURE ───────────────────────────── */
.section { padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 6vw, 6rem); position: relative; }
.container { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: .7rem;
}
.eyebrow::before { content: ''; display: block; width: 16px; height: 2px; background: var(--blue); }

.section-h {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.04em; color: var(--ink);
  margin-bottom: .9rem;
}
.section-sub { font-size: 1rem; color: var(--ink-soft); line-height: 1.75; max-width: 560px; }
