/* ============================================================
   BLERDINOMICS LLC — shared design system
   Loaded by every page. Page-specific styles live in
   assets/css/{page}.css. Brand tokens are defined once, here.
   Aesthetic: spec-sheet / build-log. Sharp corners on cards,
   buttons, and inputs; pill radius reserved for badges + chips.
   ============================================================ */

/* ===== RESET & TOKENS ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple-950: #1e0038;
  --purple-900: #2e0057;
  --purple-800: #4a0082;
  --purple-700: #6d28d9;
  --purple-500: #8b5cf6;
  --purple-200: #ddd6fe;
  --purple-100: #ede9fe;
  --gold-500:   #d97706;
  --gold-400:   #f59e0b;
  --gold-100:   #fef3c7;
  --red-500:    #ef4444;
  --red-100:    #fee2e2;
  --yellow-500: #eab308;
  --yellow-100: #fef9c3;
  --green-500:  #22c55e;
  --green-100:  #dcfce7;
  --black:      #0a0a0a;
  --gray-900:   #111827;
  --gray-700:   #374151;
  --gray-500:   #6b7280;
  --gray-300:   #d1d5db;
  --gray-100:   #f3f4f6;
  --white:      #ffffff;

  /* type scale (fluid) */
  --fs-h1:    clamp(2.4rem, 5.5vw, 3.8rem);
  --fs-h2:    clamp(1.75rem, 4vw, 2.4rem);
  --fs-h3:    clamp(1.15rem, 2.5vw, 1.4rem);
  --fs-body:  clamp(0.95rem, 1.1vw, 1.02rem);
  --fs-small: 0.875rem;

  --shadow-card: 0 2px 12px rgba(30,0,56,0.06);
  --shadow-card-hover: 0 10px 28px rgba(30,0,56,0.14);
  --shadow-pop: 0 4px 32px rgba(0,0,0,0.07);
  --measure: 65ch;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  font-size: var(--fs-body);
}

img, svg { max-width: 100%; }

/* keyboard focus: visible everywhere, on light and dark surfaces */
:focus-visible { outline: 3px solid var(--purple-700); outline-offset: 2px; }
.on-dark :focus-visible,
nav .nav-cta:focus-visible,
footer :focus-visible { outline-color: var(--gold-400); }

::selection { background: var(--purple-200); }

/* skip link for keyboard users */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold-400); color: var(--purple-950);
  font-weight: 700; padding: 12px 20px; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ===== UTILITY ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 10px;
}
.section-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  color: var(--purple-900);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--gray-700);
  max-width: var(--measure);
  line-height: 1.75;
  margin: 0 auto;
  text-align: left;
}

/* ===== NAV (identical markup on every page) ===== */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-img { width: 62px; height: 72px; flex-shrink: 0; object-fit: contain; }
.nav-brand-text { display: flex; flex-direction: column; }
.nav-brand-name {
  font-size: 1.15rem; font-weight: 800; color: var(--purple-800);
  letter-spacing: -0.02em; line-height: 1.1;
}
.nav-brand-tag {
  font-size: 0.65rem; font-weight: 600; color: var(--gold-500);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: 0.875rem; font-weight: 600;
  color: var(--gray-700); padding: 12px; white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--purple-800); background: var(--purple-100); }
.nav-cta { background: var(--purple-800) !important; color: var(--white) !important; padding: 12px 20px !important; }
.nav-cta:hover { background: var(--purple-700) !important; color: var(--white) !important; }
.nav-tel { white-space: nowrap; }
.nav-tel svg { vertical-align: -2px; margin-right: 4px; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 10px; min-width: 44px; min-height: 44px; z-index: 200;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--purple-800);
  margin: 5px 0; border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* with the phone link in the nav, full links wrap awkwardly below
   ~980px, so the hamburger takes over earlier than the old 768px */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: fixed; top: 68px; left: 0; right: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    padding: 16px 24px 24px; box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-bottom: 1px solid var(--gray-100); gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 16px; font-size: 1rem; }
  .nav-inner { height: 68px; }
  .nav-logo-img { width: 48px; height: 56px; }
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-outline, .btn-book, .btn-request {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 14px 28px; min-height: 48px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
/* dark text on gold: AA/AAA contrast (white-on-gold fails) */
.btn-primary { background: var(--gold-400); color: var(--purple-950); position: relative; }
.btn-primary:hover { background: #fbbf24; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,0.4); }
.btn-outline {
  background: transparent; color: var(--white); font-weight: 600;
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.06); }
.btn-book {
  background: var(--white); border: 2px solid var(--purple-800); color: var(--purple-800);
  font-size: 0.9rem; padding: 12px 22px;
}
.btn-book:hover {
  background: var(--purple-800); color: var(--white);
  transform: translateY(-1px); box-shadow: 0 4px 16px rgba(74,0,130,0.25);
}
.btn-request {
  background: var(--purple-800); border: 2px solid var(--purple-800); color: var(--white);
  font-size: 0.9rem; padding: 12px 22px;
}
.btn-request:hover {
  background: var(--purple-700); border-color: var(--purple-700);
  transform: translateY(-1px); box-shadow: 0 4px 16px rgba(74,0,130,0.25);
}
.btn-book svg, .btn-request svg { width: 16px; height: 16px; flex-shrink: 0; }
/* pressed states, not just hover */
.btn-primary:active, .btn-outline:active, .btn-book:active, .btn-request:active,
.form-submit:active, .nav-cta:active {
  transform: translateY(1px) scale(0.99); box-shadow: none;
}

/* gold accent glow on the primary CTA (hero) */
.btn-glow { box-shadow: 0 0 0 0 rgba(245,158,11,0.55); }
@media (prefers-reduced-motion: no-preference) {
  .btn-glow { animation: ctaGlow 2.6s ease-out 0.8s 2; }
  @keyframes ctaGlow {
    0%   { box-shadow: 0 0 0 0 rgba(245,158,11,0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(245,158,11,0); }
    100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
  }
}

/* ===== CARD SYSTEM (one style, reused everywhere) ===== */
.card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 0;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--purple-200); }
@media (prefers-reduced-motion: reduce) {
  .card-hover:hover { transform: none; }
}

/* ===== SECTION DIVIDER (spec-sheet badge system) ===== */
.section-divider { display: flex; align-items: center; gap: 16px; margin-bottom: 56px; }
.section-divider-line { flex: 1; height: 1px; background: var(--gray-300); }
.section-divider-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--purple-900); color: var(--white);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.section-divider-badge svg { width: 14px; height: 14px; }

/* ===== PAGE HERO (subpages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--purple-950) 0%, var(--purple-900) 60%, #3b0070 100%);
  padding: 64px 24px 56px; text-align: center; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(139,92,246,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-hero-content { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.page-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(217,119,6,0.15); border: 1px solid rgba(217,119,6,0.3);
  color: var(--gold-400); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 999px; margin-bottom: 20px;
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--white); letter-spacing: -0.02em; margin-bottom: 12px; }
.page-hero p { font-size: 1rem; color: rgba(255,255,255,0.72); line-height: 1.75; max-width: var(--measure); margin: 0 auto; }
.page-hero a { color: var(--gold-400); font-weight: 600; }
@media (max-width: 640px) { .page-hero { padding: 48px 20px 44px; } }

/* ===== SHARED FORM ELEMENTS (quote + requests) ===== */
.page-body { max-width: 780px; margin: 0 auto; padding: 48px 24px 80px; }
.form-card { padding: 44px 40px; box-shadow: var(--shadow-pop); }
.form-section-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple-700); margin: 32px 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--purple-100);
}
.form-section-title:first-of-type { margin-top: 0; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--gray-700);
  margin-bottom: 7px; letter-spacing: 0.02em;
}
.form-group label .req { color: var(--purple-700); margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; min-height: 44px;
  border: 1.5px solid var(--gray-300); border-radius: 0;
  font-size: 0.9rem; font-family: inherit; color: var(--gray-900); background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--purple-700); box-shadow: 0 0 0 3px rgba(109,40,217,0.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit {
  width: 100%; background: var(--purple-800); color: var(--white);
  font-size: 1rem; font-weight: 700; padding: 15px 24px; min-height: 52px;
  border: none; border-radius: 0; cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit;
}
.form-submit:hover { background: var(--purple-700); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(74,0,130,0.3); }
.form-note { text-align: center; font-size: 0.75rem; color: var(--gray-500); margin-top: 12px; }

/* "Prefer to talk first" booking card (quote + requests) */
.book-direct { margin-top: 32px; padding: 28px 32px; text-align: center; }
.book-direct-eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-500); margin-bottom: 10px;
}
.book-direct-title { font-size: 1rem; font-weight: 700; color: var(--purple-900); margin-bottom: 6px; }
.book-direct-sub { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 24px; line-height: 1.6; }
.book-direct-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.book-direct-btns a {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; min-height: 44px;
  border: 2px solid var(--purple-800); color: var(--purple-800);
  font-weight: 700; font-size: 0.83rem; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.book-direct-btns a:hover { background: var(--purple-800); color: var(--white); }

/* ===== FOOTER (identical markup on every page) ===== */
footer.site-footer {
  background: var(--purple-950);
  color: rgba(255,255,255,0.6);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p {
  font-size: 0.875rem; color: rgba(255,255,255,0.55);
  margin-top: 12px; line-height: 1.7; max-width: 280px;
}
.footer-col-title {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-400); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 0.875rem; color: rgba(255,255,255,0.62);
  text-decoration: none; margin-bottom: 10px; padding: 2px 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; gap: 12px; flex-wrap: wrap;
}
.footer-bottom span { color: rgba(255,255,255,0.45); }
.footer-bottom a { color: var(--gold-400); text-decoration: none; padding: 4px 0; }
.footer-bottom a:hover { color: var(--white); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.72rem; color: rgba(255,255,255,0.4);
}
.footer-status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); flex-shrink: 0;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ===== SCROLL REVEAL =====
   Applied only when JS is running (html.js) so no-JS visitors and
   crawlers always see content. Once-only fade+rise, 300ms. */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  html.js [data-reveal].revealed { opacity: 1; transform: none; }
}

/* ===== SAMPLE-CONTENT GATE =====
   Sections carrying placeholder content (testimonials, build log)
   ship with data-samples="off" — the samples stay hidden and a
   "coming soon" fallback shows instead. Flip to data-samples="preview"
   to see the layout with clearly-tagged sample entries. */
[data-samples="off"] .sample-item { display: none !important; }
[data-samples="preview"] .samples-fallback { display: none !important; }
.sample-tag {
  display: inline-block; background: var(--gold-100); color: #92400e;
  border: 1px solid var(--gold-400); font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; margin-bottom: 10px;
}
.samples-fallback {
  max-width: 640px; margin: 0 auto 48px; padding: 36px 28px; text-align: center;
}
.samples-fallback h3 { font-size: 1.05rem; font-weight: 800; color: var(--purple-900); margin-bottom: 8px; }
.samples-fallback p { font-size: 0.9rem; color: var(--gray-700); line-height: 1.7; }

/* ===== BEFORE / AFTER SLIDER (pure JS, draggable divider) ===== */
.ba-slider { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.ba-slider img, .ba-slider svg { display: block; width: 100%; height: auto; pointer-events: none; }
.ba-after { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 44px; margin-left: -22px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: ew-resize; padding: 0;
}
.ba-handle::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  margin-left: -1px; background: var(--gold-400);
}
.ba-handle-grip {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold-400); color: var(--purple-950);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.04em;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.ba-label {
  position: absolute; top: 10px; font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 9px; background: rgba(10,10,10,0.75); color: var(--white); z-index: 1;
}
.ba-label-before { left: 10px; }
.ba-label-after { right: 10px; color: var(--gold-400); }
