/* =====================================================================
   Rainier IT — Marketing site
   Supabase-style design system, single shared stylesheet.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-canvas, var(--bg-page));
  color: var(--text-body);
  font-size: 16px; line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--accent-link); text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

:root {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-display: 'Inter', system-ui, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --space-32: 128px;
  --radius-card: 16px; --radius-pill: 9999px; --radius-input: 8px; --radius-btn: 12px;
  --container: 1280px;
}

/* ============ SUPABASE — light ============ */
[data-theme="light"] {
  --bg-page: #fafafa; --bg-canvas: #fafafa;
  --bg-card: #ffffff; --bg-elevated: #ffffff; --bg-subtle: #f4f4f4;
  --shell: #ffffff; --shell-glass: transparent; --shell-text: #1f1f1f;
  --hero-bg: #fafafa; --hero-text: #1f1f1f;
  --border: #e4e4e4; --border-strong: #d4d4d4; --border-subtle: #f1f1f1;
  --text-heading: #1f1f1f; --text-body: #383838; --text-muted: #737373;
  --accent: #3ecf8e; --accent-hover: #2eb878; --accent-on: #052b14;
  --accent-link: #00a565; --accent-link-soft: rgba(62,207,142,.10);
  --accent-soft: rgba(62,207,142,.14);
  --shadow-card: 0 0 0 1px var(--border);
  --shadow-pop: 0 8px 24px rgba(62,207,142,.12);
}
/* ============ SUPABASE — dark ============ */
[data-theme="dark"] {
  --bg-page: #0f0f0f; --bg-canvas: #0f0f0f;
  --bg-card: #1c1c1c; --bg-elevated: #242424; --bg-subtle: #1a1a1a;
  --shell: #0f0f0f; --shell-glass: transparent; --shell-text: #fafafa;
  --hero-bg: #0f0f0f; --hero-text: #fafafa;
  --border: #2e2e2e; --border-strong: #393939; --border-subtle: #242424;
  --text-heading: #fafafa; --text-body: #d4d4d4; --text-muted: #898989;
  --accent: #3ecf8e; --accent-hover: #4adfa0; --accent-on: #052b14;
  --accent-link: #3ecf8e; --accent-link-soft: rgba(62,207,142,.10);
  --accent-soft: rgba(62,207,142,.14);
  --shadow-card: 0 0 0 1px var(--border);
  --shadow-pop: 0 8px 24px rgba(0,0,0,.4);
}

/* Supabase signature: faint grid background */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: .5;
}

/* =====================================================================
   TOP NAV
   ===================================================================== */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  padding: var(--space-5) var(--space-6);
  background: color-mix(in srgb, var(--shell) 78%, transparent);
  color: var(--shell-text);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-nav { background: var(--shell); }
}
.site-nav-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; gap: var(--space-8);
}
.brand {
  display: flex; align-items: center; gap: var(--space-3);
  font-weight: 700; font-size: 18px; letter-spacing: -.01em;
  color: var(--shell-text);
}
.brand-logo { height: 36px; width: auto; display: block; flex-shrink: 0; }
/* Stacked brand: mountain over "Rainier IT" wordmark. Pair with .brand-stacked on
   the anchor and drop the adjacent <span>Rainier IT</span> to avoid duplication. */
.brand-logo-stacked { height: 42px; width: auto; }
@media (max-width: 600px) { .brand-logo-stacked { height: 42px !important; } }
[data-theme="light"] .brand-logo-stacked { content: url('/images/rainier-it-logo-stacked-light.png'); }
.site-nav nav { display: flex; gap: var(--space-2); flex: 1; }
.site-nav nav a {
  padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--shell-text); opacity: .82;
  font-size: 14px; font-weight: 500; transition: all .18s;
}
.site-nav nav a:hover { opacity: 1; background: var(--bg-subtle); }
.site-nav nav a.active { opacity: 1; background: var(--bg-subtle); font-weight: 600; }
.site-nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.site-nav-actions .portal-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--bg-subtle); color: var(--shell-text);
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border);
}
.site-nav-actions .portal-link:hover { border-color: var(--accent); color: var(--accent-link); }
.site-nav-actions .lock-icon { width: 14px; height: 14px; }

/* Theme toggle on the marketing site */
.theme-toggle-mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-subtle); color: var(--text-body);
  border: 1px solid var(--border);
  transition: all .18s;
}
.theme-toggle-mini:hover { border-color: var(--accent); }
.theme-toggle-mini svg { width: 14px; height: 14px; }

/* =====================================================================
   HOME HERO
   ===================================================================== */
.hero {
  background: var(--hero-bg); color: var(--hero-text);
  padding: var(--space-24) var(--space-6) var(--space-20);
  position: relative; overflow: hidden;
  z-index: 2;
}
.hero-inner {
  max-width: var(--container); margin: 0 auto;
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-16); align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--bg-subtle); border: 1px solid var(--border);
  color: var(--text-body);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  margin-bottom: var(--space-6);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(62,207,142,.20);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.5vw, 72px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.05;
  margin-bottom: var(--space-6);
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent) 0%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: 19px; line-height: 1.55; opacity: .92;
  margin-bottom: var(--space-8); max-width: 56ch;
}
.hero-ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Subpage hero — slimmer */
.subpage-hero {
  background: var(--hero-bg); color: var(--hero-text);
  padding: var(--space-20) var(--space-6) var(--space-16);
  position: relative; overflow: hidden;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
.subpage-hero-inner {
  max-width: var(--container); margin: 0 auto;
  text-align: center;
}
.subpage-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.05;
  margin-bottom: var(--space-5);
  max-width: 18ch; margin-left: auto; margin-right: auto;
}
.subpage-hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent) 0%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subpage-hero p {
  font-size: 18px; line-height: 1.55; opacity: .92;
  max-width: 56ch; margin: 0 auto;
}
.subpage-hero .hero-eyebrow { margin-bottom: var(--space-5); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; font-size: 15px; font-weight: 600;
  border-radius: var(--radius-pill); transition: all .2s ease; white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: var(--accent-on);
  box-shadow: 0 12px 32px rgba(62,207,142,.30);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(62,207,142,.40); }
.btn-secondary {
  background: var(--bg-card); color: var(--text-body); border: 1px solid var(--border);
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.btn svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }

/* =====================================================================
   HERO VISUAL CARD (status preview on home)
   ===================================================================== */
.hero-visual { position: relative; perspective: 1000px; }
.hero-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: var(--space-5);
  box-shadow: var(--shadow-pop);
  transform: rotate(2deg); transition: transform .4s ease;
  color: var(--text-body);
}
.hero-card:hover { transform: rotate(0deg) scale(1.02); }
.hero-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.hero-card-title { font-size: 14px; font-weight: 600; color: var(--text-heading); }
.hero-card-pill { font-size: 11px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hero-card-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--border-subtle); font-size: 13px; }
.hero-card-row:last-child { border-bottom: none; }
.hero-card-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.hero-card-row span { flex: 1; color: var(--text-body); }
.hero-card-row .ms { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* =====================================================================
   TRUST STRIP
   ===================================================================== */
.trust-strip {
  background: var(--bg-page);
  padding: var(--space-10) var(--space-6);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 2;
}
.trust-strip-inner {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr;
  gap: var(--space-12); align-items: center;
}
.trust-strip .label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-muted);
}
.trust-stats { display: flex; gap: var(--space-12); flex-wrap: wrap; }
.trust-stat .num {
  font-size: 28px; font-weight: 700; color: var(--text-heading);
  letter-spacing: -.02em; line-height: 1;
}
.trust-stat .label-sm { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { padding: var(--space-24) var(--space-6); position: relative; z-index: 2; }
.section-inner { max-width: var(--container); margin: 0 auto; }
.section-head { max-width: 720px; margin: 0 auto var(--space-12); text-align: center; }
.section-eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent-link); margin-bottom: var(--space-3);
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px); font-weight: 700;
  letter-spacing: -.02em; color: var(--text-heading);
  margin-bottom: var(--space-4); line-height: 1.1;
}
.section-head p { font-size: 18px; color: var(--text-muted); }
.gradient-text {
  background: linear-gradient(120deg, var(--accent) 0%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; font-style: normal;
}

/* =====================================================================
   SERVICE CARDS
   ===================================================================== */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5);
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative; overflow: hidden;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-pop);
}
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: var(--space-5);
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 {
  font-size: 19px; font-weight: 700; color: var(--text-heading);
  margin-bottom: var(--space-3); letter-spacing: -.005em;
}
.service-card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-bottom: var(--space-4); }
.service-card { cursor: pointer; }
.learn {
  font-size: 13px; font-weight: 600; color: var(--accent-link);
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap .2s;
}
.learn:hover { gap: 8px; }
.service-card .learn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1;
}
.service-card:hover .learn { gap: 8px; }

/* =====================================================================
   PROCESS SECTION
   ===================================================================== */
.process-section { background: var(--bg-subtle); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.process-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  text-align: left;
  position: relative;
}
.process-step .num {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600; color: var(--accent);
  margin-bottom: var(--space-3);
}
.process-step h3 { font-size: 18px; font-weight: 700; color: var(--text-heading); margin-bottom: var(--space-2); letter-spacing: -.005em; }
.process-step p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }

/* =====================================================================
   VALUE CARDS (used on services + about)
   ===================================================================== */
.value-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5);
}
.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  transition: all .25s ease;
}
.value-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.value-card .ico {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  margin-bottom: var(--space-4);
}
.value-card .ico svg { width: 22px; height: 22px; }
.value-card h4 {
  font-size: 17px; font-weight: 700; color: var(--text-heading);
  margin-bottom: var(--space-2); letter-spacing: -.005em;
}
.value-card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }

/* =====================================================================
   STATS BAND (about)
   ===================================================================== */
.stats-band {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  max-width: var(--container); margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.stats-band .stat .num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px); font-weight: 800;
  letter-spacing: -.02em; color: var(--text-heading); line-height: 1;
}
.stats-band .stat .label {
  font-size: 13px; color: var(--text-muted); margin-top: var(--space-2);
  font-weight: 500;
}

/* =====================================================================
   PROSE GRID + FOUNDER (about)
   ===================================================================== */
.prose-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center;
  max-width: var(--container); margin: 0 auto;
}
.prose-grid h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.15; color: var(--text-heading);
  margin-bottom: var(--space-5);
}
.prose-grid p { font-size: 17px; line-height: 1.65; color: var(--text-body); margin-bottom: var(--space-4); }
.prose-grid p:last-child { margin-bottom: 0; }
.prose-image {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop);
  aspect-ratio: 4/3;
  display: grid; place-items: center;
  color: var(--text-muted);
  position: relative; overflow: hidden;
}
.prose-image .ico {
  width: 80px; height: 80px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.prose-image .ico svg { width: 40px; height: 40px; }

.founder-card {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-8);
  align-items: center;
  max-width: 880px; margin: 0 auto;
  padding: var(--space-8);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.founder-card .photo {
  width: 200px; height: 200px; border-radius: 50%;
  background: linear-gradient(135deg, #3ecf8e 0%, #38bdf8 100%);
  color: #052b14; font-size: 64px; font-weight: 700;
  display: grid; place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.founder-card .photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.founder-card .role {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent-link); margin-bottom: var(--space-2);
}
.founder-card h3 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; letter-spacing: -.015em;
  color: var(--text-heading); margin-bottom: var(--space-3);
}
.founder-card p { font-size: 15px; line-height: 1.6; color: var(--text-body); margin-bottom: var(--space-3); }
.founder-card .founder-meta { display: flex; gap: var(--space-5); margin-top: var(--space-4); flex-wrap: wrap; }
.founder-card .founder-meta a { font-size: 13px; color: var(--accent-link); font-weight: 600; }

/* =====================================================================
   PRICING (pricing.html)
   ===================================================================== */
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5);
  max-width: var(--container); margin: 0 auto;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-8) var(--space-6);
  box-shadow: var(--shadow-card);
  position: relative;
  transition: all .3s ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
  border-color: var(--border-strong);
}
.pricing-card.featured {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-pop);
}
.pricing-card.featured::before {
  content: "Most popular";
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-on);
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px; border-radius: var(--radius-pill);
}
.pricing-card .tier-name {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent-link);
  margin-bottom: var(--space-3);
}
.pricing-card .tier-price {
  font-family: var(--font-display);
  font-size: 48px; font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-heading);
  line-height: 1;
}
.pricing-card .tier-per { font-size: 14px; color: var(--text-muted); margin-top: var(--space-2); }
.pricing-card .tier-desc { font-size: 14px; color: var(--text-muted); margin: var(--space-5) 0; line-height: 1.55; }
.pricing-card ul.tier-features { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-6); padding: 0; list-style: none; }
.pricing-card ul.tier-features li {
  position: relative; padding-left: 28px;
  font-size: 14px; color: var(--text-body); line-height: 1.45;
}
.pricing-card ul.tier-features li::before {
  content: ""; position: absolute; left: 0; top: 2px;
  width: 18px; height: 18px;
  border-radius: 50%; background-color: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2300a565' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='13 4 6 11 3 8'/%3E%3C/svg%3E");
  background-position: center; background-repeat: no-repeat;
  background-size: 12px;
}
.pricing-card .btn { width: 100%; }
.pricing-card .btn-secondary { border-color: var(--accent); }
.pricing-card .btn-secondary:hover { border-color: var(--accent-hover); }

/* FAQ list (pricing) */
.faq-list { display: grid; gap: var(--space-3); max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-5) var(--space-6);
}
.faq-item h4 {
  font-size: 16px; font-weight: 700; color: var(--text-heading);
  margin-bottom: var(--space-2); letter-spacing: -.005em;
}
.faq-item p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* =====================================================================
   CONTACT FORM (contact.html)
   ===================================================================== */
.contact-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-12);
  max-width: var(--container); margin: 0 auto;
}
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  display: grid; gap: var(--space-4);
}
.field { display: grid; gap: var(--space-2); }
.field label { font-size: 13px; font-weight: 600; color: var(--text-heading); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-body); font-size: 14px; font-family: inherit;
  transition: all .18s ease; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Browser autofill (Chrome/Safari/Edge) forces white bg + black text, ignoring
   background-color. The huge inset box-shadow paints over it with our theme
   color, and -webkit-text-fill-color overrides the forced text color. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active,
.field textarea:-webkit-autofill,
.field textarea:-webkit-autofill:hover,
.field textarea:-webkit-autofill:focus,
.field select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-subtle) inset !important;
  -webkit-text-fill-color: var(--text-body) !important;
  caret-color: var(--text-body) !important;
  transition: background-color 9999s ease-in-out 0s;
}
.field input:-webkit-autofill:focus,
.field textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-card) inset, 0 0 0 3px var(--accent-soft) !important;
}
.field textarea { min-height: 140px; resize: vertical; }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

.contact-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
}
.contact-info h4 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent-link); margin-bottom: var(--space-3);
}
.contact-info .ci-row {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-4);
  align-items: start;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.contact-info .ci-row:last-child { border-bottom: none; }
.contact-info .ci-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.contact-info .ci-icon svg { width: 18px; height: 18px; }
.contact-info .ci-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-info .ci-value { font-size: 15px; color: var(--text-body); font-weight: 500; margin-top: 2px; }
.contact-info .ci-value a { color: var(--accent-link); }

/* =====================================================================
   TESTIMONIAL
   ===================================================================== */
.testimonial { max-width: 880px; margin: 0 auto; text-align: center; padding: var(--space-12) var(--space-6); }
.testimonial-quote {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600; line-height: 1.3;
  letter-spacing: -.015em;
  color: var(--text-heading);
  margin-bottom: var(--space-8);
}
.testimonial-quote::before { content: "\201C"; font-size: 1.4em; line-height: 0; vertical-align: -0.2em; color: var(--accent); margin-right: 4px; }
.testimonial-quote::after  { content: "\201D"; font-size: 1.4em; line-height: 0; vertical-align: -0.2em; color: var(--accent); margin-left: 4px; }
.testimonial-author { display: inline-flex; align-items: center; gap: var(--space-3); }
.author-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #3ecf8e 0%, #38bdf8 100%);
  color: #052b14; font-weight: 700; font-size: 16px;
  display: grid; place-items: center;
}
.author-info { text-align: left; }
.author-info .name { font-weight: 600; color: var(--text-heading); }
.author-info .role { font-size: 13px; color: var(--text-muted); }

/* =====================================================================
   CTA BANNER
   ===================================================================== */
.cta-banner {
  background: var(--shell);
  color: var(--shell-text);
  padding: var(--space-16) var(--space-6);
  text-align: center;
  position: relative; overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-banner-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.1; margin-bottom: var(--space-5);
  color: var(--text-heading);
}
.cta-banner p { font-size: 18px; color: var(--text-muted); margin-bottom: var(--space-8); }
.cta-banner .btn-primary { font-size: 16px; padding: 16px 32px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  background: var(--bg-page); color: var(--text-body);
  border-top: 1px solid var(--border);
  padding: var(--space-16) var(--space-6) var(--space-8);
  position: relative; z-index: 2;
}
.footer-inner { max-width: var(--container); margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-10);
  margin-bottom: var(--space-12);
}
.site-footer .brand-logo { height: 32px; }
.footer-col h4 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-heading); margin-bottom: var(--space-4);
}
.footer-col ul li { margin-bottom: var(--space-2); }
.footer-col ul a { font-size: 14px; color: var(--text-muted); }
.footer-col ul a:hover { color: var(--accent-link); }
.footer-about p { font-size: 14px; color: var(--text-muted); margin-top: var(--space-3); max-width: 38ch; }
.footer-social { display: flex; gap: 10px; margin-top: var(--space-4); }
.footer-social a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.footer-social a:hover { color: var(--accent-link); border-color: var(--accent); background: var(--accent-soft); }
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-6);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-3);
  font-size: 13px; color: var(--text-muted);
}
.footer-legal { display: flex; gap: var(--space-5); }
.footer-legal a { color: var(--text-muted); }

/* =====================================================================
   AI CHAT DOCK
   ===================================================================== */
.chat-dock {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent); color: var(--accent-on);
  display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(62,207,142,.30), 0 4px 12px rgba(0,0,0,.10);
  cursor: pointer; transition: all .25s ease; z-index: 50;
}
.chat-dock:hover { transform: translateY(-2px); }
.chat-dock svg { width: 26px; height: 26px; }
.chat-dock .badge {
  position: absolute; top: -2px; right: -2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--bg-page);
  font-size: 10px; font-weight: 700; color: var(--text-heading);
  display: grid; place-items: center;
}

/* Chat nudge — toast bubble that appears 10s after page load, suppressed
   once the user opens the chat or dismisses the bubble. */
.chat-nudge {
  position: fixed; bottom: 100px; right: 24px;
  max-width: 260px;
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 12px 12px 16px;
  background: var(--bg-card); color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.08);
  cursor: pointer;
  font-size: 14px; line-height: 1.4;
  z-index: 49;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.chat-nudge.show {
  opacity: 1; visibility: visible; transform: translateY(0);
  animation: chat-nudge-bob 2.4s ease-in-out 1.2s 2;
}
.chat-nudge p { margin: 0; flex: 1; }
.chat-nudge-close {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: transparent; color: var(--text-muted);
  border: 0; border-radius: 6px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.chat-nudge-close:hover { background: var(--bg-page); color: var(--text-heading); }
@keyframes chat-nudge-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Chat panel (opens when dock is clicked) */
.chat-panel {
  position: fixed; bottom: 100px; right: 24px;
  width: min(380px, calc(100vw - 48px));
  max-height: min(560px, calc(100vh - 140px));
  display: none; flex-direction: column;
  background: var(--bg-card); color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-pop), 0 20px 60px rgba(0,0,0,.18);
  z-index: 51;
  overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-panel-head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: var(--space-3);
}
.chat-panel-head .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #3ecf8e 0%, #38bdf8 100%);
  color: #052b14; display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  overflow: hidden;
  flex-shrink: 0;
}
.chat-panel-head .avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.chat-msg.bot.typing { display: inline-flex; gap: 4px; align-items: center; }
.chat-msg.bot.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: chatTypingDot 1s infinite; }
.chat-msg.bot.typing span:nth-child(2) { animation-delay: .15s; }
.chat-msg.bot.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatTypingDot { 0%,80%,100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-msg.bot a { color: var(--accent-link); font-weight: 600; }
.chat-msg.bot strong { color: var(--text-heading); }
.chat-msg.bot ul { margin: 6px 0 0; padding-left: 18px; }
.chat-call-btn {
  align-self: flex-start; margin-top: 4px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--radius-pill);
  background: var(--accent); color: #052b14;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.chat-call-btn:hover { filter: brightness(1.05); }
.chat-panel-head .meta { flex: 1; }
.chat-panel-head .meta .name { font-size: 14px; font-weight: 600; color: var(--text-heading); }
.chat-panel-head .meta .status { font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.chat-panel-head .meta .status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(62,207,142,.25);
}
.chat-panel-head .close-btn {
  background: var(--bg-subtle); border: 1px solid var(--border);
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-muted);
}
.chat-panel-head .close-btn svg { width: 14px; height: 14px; }
.chat-msgs {
  flex: 1; overflow-y: auto;
  padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3);
}
.chat-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px; line-height: 1.5;
}
.chat-msg.user { align-self: flex-end; background: var(--accent-link-soft); color: var(--text-body); border-bottom-right-radius: 4px; }
.chat-msg.bot  { align-self: flex-start; background: var(--bg-subtle); color: var(--text-body); border: 1px solid var(--border-subtle); border-bottom-left-radius: 4px; }
.chat-input-row {
  display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}
.chat-input {
  flex: 1; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-body); font-size: 13px; outline: none;
}
.chat-input:focus { border-color: var(--accent); }
.chat-send {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--accent-on);
  display: grid; place-items: center; flex-shrink: 0;
}
.chat-send svg { width: 16px; height: 16px; }

/* =====================================================================
   SERVICE DETAIL PAGES — breadcrumb + feature list + tool tags
   ===================================================================== */
.service-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted); margin-bottom: var(--space-5);
}
.service-breadcrumb a { color: var(--accent-link); }
.service-breadcrumb span { opacity: .5; }

.feature-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-card);
  overflow: hidden; background: var(--bg-card);
}
.feature-item {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
}
.feature-item:nth-child(even) { border-right: none; }
.feature-item:nth-last-child(-n+2) { border-bottom: none; }
.feature-item:nth-last-child(1):nth-child(odd) { border-right: none; grid-column: span 2; }
.feature-check {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); display: grid; place-items: center; flex-shrink: 0; margin-top: 2px;
}
.feature-check svg { width: 12px; height: 12px; color: var(--accent); }
.feature-item h5 { font-size: 14px; font-weight: 600; color: var(--text-heading); margin-bottom: 3px; }
.feature-item p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.tool-grid {
  display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4);
}
.tool-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-body);
}

.stat-callout {
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--radius-card); padding: var(--space-6);
  text-align: center;
}
.stat-callout .big-num {
  font-size: 48px; font-weight: 800; color: var(--accent);
  letter-spacing: -.03em; line-height: 1;
}
.stat-callout p { font-size: 14px; color: var(--text-muted); margin-top: var(--space-2); }

.split-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start;
}
.split-section .prose h3 {
  font-size: clamp(22px, 3vw, 32px); font-weight: 700;
  color: var(--text-heading); letter-spacing: -.02em; margin-bottom: var(--space-4);
}
.split-section .prose p {
  font-size: 16px; color: var(--text-muted); line-height: 1.65; margin-bottom: var(--space-4);
}

/* =====================================================================
   BROWSER MOCKUP PORTFOLIO CARDS (Web Design page)
   ===================================================================== */
.portfolio-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6);
}
.browser-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: block; text-decoration: none; color: var(--text-body);
}
.browser-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-pop); border-color: var(--accent);
}
.browser-chrome {
  background: var(--bg-subtle); border-bottom: 1px solid var(--border);
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
}
.chrome-dots { display: flex; gap: 5px; }
.chrome-dots span { width: 10px; height: 10px; border-radius: 50%; }
.chrome-dots span:nth-child(1) { background: #ff5f57; }
.chrome-dots span:nth-child(2) { background: #febc2e; }
.chrome-dots span:nth-child(3) { background: #28c840; }
.chrome-url {
  flex: 1; background: var(--bg-page); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.browser-viewport {
  position: relative; width: 100%; overflow: hidden;
  background: var(--bg-subtle);
}
.browser-viewport iframe {
  width: 1280px; height: 800px; border: none;
  transform-origin: 0 0; pointer-events: none; display: block;
}
.browser-card-cta {
  background: var(--accent-soft); border-top: 1px solid var(--accent);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: var(--space-10);
  min-height: 280px;
}
.browser-card-cta h4 {
  font-size: 20px; font-weight: 700; color: var(--text-heading); margin-bottom: var(--space-3);
}
.browser-card-cta p { font-size: 14px; color: var(--text-muted); margin-bottom: var(--space-5); max-width: 28ch; }
.browser-card-info { padding: 14px 18px; border-top: 1px solid var(--border); }
.browser-card-info h4 { font-size: 14px; font-weight: 600; color: var(--text-heading); }
.browser-card-info p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* =====================================================================
   LEGAL PROSE (privacy / terms)
   ===================================================================== */
.legal-prose {
  max-width: 720px; margin: 0 auto;
}
.legal-prose h2 {
  font-size: 22px; font-weight: 700; color: var(--text-heading);
  margin: var(--space-10) 0 var(--space-3);
}
.legal-prose h3 { font-size: 16px; font-weight: 600; color: var(--text-heading); margin: var(--space-5) 0 var(--space-2); }
.legal-prose p { font-size: 15px; color: var(--text-body); line-height: 1.7; margin-bottom: var(--space-4); }
.legal-prose ul { padding-left: var(--space-5); margin-bottom: var(--space-4); }
.legal-prose li { font-size: 15px; color: var(--text-body); line-height: 1.7; margin-bottom: var(--space-2); }
.legal-meta { font-size: 13px; color: var(--text-muted); margin-bottom: var(--space-8); }

/* =====================================================================
   SITEMAP PAGE
   ===================================================================== */
.sitemap-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8);
}
.sitemap-col h3 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: var(--space-4); }
.sitemap-col ul { display: flex; flex-direction: column; gap: var(--space-2); }
.sitemap-col a { font-size: 15px; color: var(--accent-link); }
.sitemap-col a:hover { text-decoration: underline; }

/* =====================================================================
   GET HELP PAGE
   ===================================================================== */
.help-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5);
}
.help-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: var(--space-6);
  transition: border-color .2s, transform .2s;
}
.help-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.help-card .ico { margin-bottom: var(--space-4); }
.help-card .ico svg { width: 28px; height: 28px; color: var(--accent); }
.help-card h3 { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: var(--space-2); }
.help-card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-bottom: var(--space-4); }
.help-card a.cta { font-size: 14px; font-weight: 600; color: var(--accent-link); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 960px) {
  .site-nav nav { display: none; }
  .site-nav-actions { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav-inner { gap: var(--space-3); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .trust-strip-inner { grid-template-columns: 1fr; gap: var(--space-5); }
  .trust-stats { gap: var(--space-6); }
  .section { padding: var(--space-16) var(--space-5); }
  .hero { padding: var(--space-16) var(--space-5); }
  .pricing-grid { grid-template-columns: 1fr; }
  .prose-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .stats-band { grid-template-columns: 1fr 1fr; }
  .founder-card { grid-template-columns: 1fr; text-align: center; }
  .founder-card .photo { margin: 0 auto; }
  .founder-card .founder-meta { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .field-row-2 { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .sitemap-grid { grid-template-columns: 1fr 1fr; }
  .help-grid { grid-template-columns: 1fr 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-item { border-right: none; }
  .split-section { grid-template-columns: 1fr; gap: var(--space-8); }
}
@media (max-width: 600px) {
  .process-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: 1fr 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-item { border-right: none !important; }
  .feature-item:nth-last-child(-n+1) { border-bottom: none; }
  .split-section { grid-template-columns: 1fr; gap: var(--space-8); }
  /* Mobile: stack mountain logo + "Rainier IT" wordmark below, centered */
  .brand {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1;
  }
  .brand span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--shell-text);
    margin-top: 1px;
  }
  .brand-logo { height: 28px; }
  .site-nav { padding: var(--space-3) var(--space-4); }
}

/* ===== Mobile nav: hamburger + off-canvas drawer (Option A) ===== */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--shell-text);
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle svg { width: 20px; height: 20px; }

.nav-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.nav-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(86vw, 320px);
  background: var(--shell);
  color: var(--shell-text);
  border-left: 1px solid var(--border);
  z-index: 100;
  transform: translateX(100%);
  transition: transform .24s ease;
  padding: var(--space-5);
  overflow-y: auto;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.25);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}
.nav-drawer-header span { font-weight: 700; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; opacity: .7; }
.nav-drawer-close {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--shell-text);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-drawer-close:hover { border-color: var(--accent); }
.nav-drawer nav { display: flex; flex-direction: column; gap: 2px; }
.nav-drawer nav a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--shell-text);
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  transition: background .15s;
}
.nav-drawer nav a:hover,
.nav-drawer nav a.active {
  background: var(--bg-subtle);
  font-weight: 600;
}
.nav-drawer-actions {
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.nav-drawer-actions .drawer-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: filter .15s, transform .12s;
}
.nav-drawer-actions .drawer-cta:hover { filter: brightness(1.06); }
.nav-drawer-actions .drawer-cta:active { transform: translateY(1px); }
.nav-drawer-actions .drawer-cta svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-drawer-actions .portal-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  background: transparent;
  color: var(--shell-text);
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--border);
}
.nav-drawer-actions .portal-link:hover { border-color: var(--accent); color: var(--accent-link); }
.nav-drawer-actions .portal-link svg,
.nav-drawer-actions .portal-link .lock-icon { width: 14px; height: 14px; flex-shrink: 0; }
.nav-drawer-actions .theme-toggle-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--shell-text);
  cursor: pointer;
  font-size: 14px;
  width: 100%;
}
.nav-drawer-actions .theme-toggle-mini::after { content: 'Toggle theme'; }
.nav-drawer-actions .theme-toggle-mini svg { width: 16px; height: 16px; }
body.nav-open { overflow: hidden; }
