/* Bee Innovations — shared styles */
/* Palette: Candy Lab — electric blue, hot pink, lime, sun orange on white. Pink is reserved for the primary action. */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600..800&family=Karla:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600;700&family=Caveat:wght@600;700&family=Fraunces:ital,wght@1,500&display=swap');

:root {
  --bg: #ffffff;
  --bg-alt: #fbfbfd;
  --bg-card: #ffffff;
  --text: #14142b;
  --text-muted: #4b4f5c;
  --border: #eef0f5;
  --accent: #3b82f6;
  --accent-dark: #2563c7;
  --primary: #ec4899;
  --primary-dark: #d63c86;
  --lime: #a3e635;
  --lime-dark: #4d7a0a;
  --orange: #fb923c;
  --orange-dark: #c2590f;
  --radius: 10px;
  --font-head: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Karla', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-accent: 'Caveat', cursive;
  --font-serif-italic: 'Fraunces', serif;
  --container-w: 1280px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.button:active { transform: scale(0.97); }

.button-solid {
  background: var(--primary);
  color: #ffffff;
}

.button-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover { transform: translateY(-2px); }
  .button:hover:active { transform: translateY(-2px) scale(0.97); }
  .button-solid:hover { background: var(--primary-dark); }
  .button-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Header / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  background: linear-gradient(155deg, var(--accent), var(--accent-dark));
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */

.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  text-align: center;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  z-index: 0;
}

.hero::before { top: -120px; left: -120px; background: var(--accent); opacity: 0.1; animation: float-blob 9s var(--ease-in-out) infinite; }
.hero::after { bottom: -160px; right: -100px; background: var(--lime); opacity: 0.16; animation: float-blob 11s var(--ease-in-out) infinite reverse; }

@keyframes float-blob {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(16px, -14px) rotate(6deg); }
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.8rem);
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.u-lime {
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 5px;
  text-underline-offset: 4px;
}

/* Bold "blocked" hero headline: a heavy uppercase dark line, a heavy
   uppercase accent-color line, closing in a smaller italic serif word.
   Used on both the homepage and Why Bee Innovations heroes. */
h1.hero-headline {
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.01em;
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  max-width: none;
  margin: 0 0 0.5em;
}

.hero-headline .line { display: block; }
.hero-headline .line-dark { color: var(--text); }
.hero-headline .line-accent { color: var(--accent); }

.hero-headline .accent-italic {
  font-family: var(--font-serif-italic);
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.52em;
  color: var(--orange-dark);
  margin-left: 0.14em;
}

.hero-spark {
  display: inline-block;
  color: var(--primary);
  margin-right: 0.55em;
}

.hero p.lead {
  max-width: 720px;
  margin: 0 auto 1rem;
  font-size: 1.15rem;
}

.hero .button-group { justify-content: center; }

/* Two-column variant: copy on the left, the Maker's Desk illustration on
   the right. Scoped to this modifier (not the base .hero) so 404.html's
   plain centered hero is untouched. */
.hero.hero-split .container {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: center;
  text-align: left;
}

.hero.hero-split p.lead { margin: 0 0 1rem; }
.hero.hero-split .button-group { justify-content: flex-start; }

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art svg,
.hero-art video {
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: var(--radius);
}

@media (max-width: 860px) {
  .hero.hero-split .container { grid-template-columns: 1fr; text-align: center; }
  .hero.hero-split p.lead { margin-left: auto; margin-right: auto; }
  .hero.hero-split .button-group { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art svg,
  .hero-art video { max-width: 340px; }
}

.page-hero {
  padding: 4.5rem 0 3rem;
  text-align: left;
}

/* Used on pages where the section right after the hero needs to sit closer
   underneath it instead of stacking two large paddings into dead space. */
.page-hero-tight { padding-bottom: 1.25rem; }

.page-hero p.lead {
  max-width: 700px;
  font-size: 1.05rem;
  margin: 0;
}

/* Sections */

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 680px;
  margin: 0 0 2.5rem;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* "We are the zero" layout: the case-for-the-metaphor text beside a small
   graphic of it, instead of a paragraph that just links out. */
.zero-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.zero-layout .section-head { max-width: none; margin-bottom: 0; }

@media (max-width: 860px) {
  .zero-layout { grid-template-columns: 1fr; }
}

.zero-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
}

.zero-graphic video {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: var(--radius);
}

@media (max-width: 860px) {
  .zero-graphic video { max-width: 320px; }
}

/* Card grid */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid transparent;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 2px rgba(20, 20, 43, 0.04);
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  opacity: 0;
  animation: card-in 420ms var(--ease-out) both;
}

.card-grid .card:nth-child(1) { animation-delay: 0ms; }
.card-grid .card:nth-child(2) { animation-delay: 60ms; }
.card-grid .card:nth-child(3) { animation-delay: 120ms; }
.card-grid .card:nth-child(4) { animation-delay: 180ms; }
.card-grid .card:nth-child(n+5) { animation-delay: 220ms; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card h3 { margin-bottom: 0.5em; }

.card p { margin-bottom: 1.2em; }

.card a.card-link {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Track color modifiers — one color per skill track, kept consistent everywhere it appears */

.card.accent-blue { --track-color: var(--accent); }
.card.accent-pink { --track-color: var(--primary); }
.card.accent-lime { --track-color: var(--lime); }
.card.accent-orange { --track-color: var(--orange); }

.card[class*="accent-"] {
  border-top-color: var(--track-color);
}

.card[class*="accent-"] .hex-badge {
  background: var(--track-color);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 24px -16px rgba(20, 20, 43, 0.25);
  }

  .card[class*="accent-"]:hover {
    border-color: var(--border);
    border-top-color: var(--track-color);
  }
}

.hex-badge {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.hex-badge svg { width: 26px; height: 26px; }

/* Callout / placeholder box */

.callout {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  background: var(--bg-alt);
}

.callout p:last-child { margin-bottom: 0; }

.callout a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.35);
  text-underline-offset: 2px;
  transition: text-decoration-color 160ms var(--ease-out);
}

.callout a:hover,
.callout a:focus-visible {
  text-decoration-color: currentColor;
}

/* CTA band */

.cta-band {
  text-align: center;
  padding: 4rem 0;
  background: var(--text);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-band h2 { margin-bottom: 0.5em; color: #ffffff; }

.cta-band p.lead {
  max-width: 560px;
  margin: 0 auto 0.5rem;
  color: rgba(255, 255, 255, 0.72);
}

.cta-band .eyebrow { color: var(--lime); }

.cta-band .button-group { justify-content: center; }

/* Prose (long-form pages like Brand Philosophy) */

.prose { max-width: 720px; }

/* Pairs the prose column with a sticky illustration/stat aside on wide
   screens, so a long-form page doesn't leave the right half of the screen
   empty. Falls back to a single column on narrow viewports. */
.prose-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 1fr;
  gap: 3rem;
  align-items: start;
}

.prose-layout .prose { max-width: none; }

.prose-aside {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 960px) {
  .prose-layout { grid-template-columns: 1fr; }
  .prose-aside { position: static; }
}

.bridge-motif {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 2rem 1.5rem;
  text-align: center;
}

.bridge-motif svg { width: 100%; max-width: 220px; height: auto; }

.bridge-motif p {
  margin: 1.1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pull-stat {
  border-radius: var(--radius);
  background: var(--text);
  color: #ffffff;
  padding: 2rem 1.75rem;
}

.pull-stat .pull-stat-number {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--lime);
  margin-bottom: 0.5rem;
}

.pull-stat p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: 1.5rem;
}

.prose h2:first-of-type { margin-top: 0; }

.prose p { font-size: 1.02rem; }

.prose p a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.35);
  text-underline-offset: 2px;
}

.prose p a:hover,
.prose p a:focus-visible {
  text-decoration-color: currentColor;
}

/* Prose headings + key-phrase highlights */

/* Not scoped to .prose — used on regular section h2s too, so headings pick
   up brand color instead of defaulting to flat near-black everywhere. */
.h-blue { color: var(--accent-dark); }
.h-pink { color: var(--primary-dark); }
.h-lime { color: var(--lime-dark); }
.h-orange { color: var(--orange-dark); }

/* Key phrases render in the heading font, not just bold+color, so
   emphasized words read as a deliberate typographic shift. */
/* A distinct hand-lettered voice for emphasis — not just bold-and-colored,
   a genuinely different typeface from both body (Karla) and headings
   (Bricolage Grotesque), so key words read as a deliberate accent. */
.kw {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 1.2em;
  line-height: 1;
}
.kw-blue { color: var(--accent-dark); }
.kw-pink { color: var(--primary-dark); }
.kw-lime { color: var(--lime-dark); }
.kw-orange { color: var(--orange-dark); }

.kw-mono {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9em;
  padding: 0.08em 0.4em;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--text);
}

.kw-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15em 0.6em;
  border-radius: 6px;
  margin-right: 0.4em;
}

.kw-tag-blue { color: var(--accent-dark); background: rgba(59, 130, 246, 0.12); }
.kw-tag-pink { color: var(--primary-dark); background: rgba(236, 72, 153, 0.12); }
.kw-tag-lime { color: var(--lime-dark); background: rgba(163, 230, 53, 0.25); }
.kw-tag-orange { color: var(--orange-dark); background: rgba(251, 146, 60, 0.15); }

.prose blockquote.tagline-quote {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.2;
  color: var(--text);
  border-left: 4px solid var(--primary);
  padding-left: 1.1rem;
  margin: 2.2em 0 0;
}

.prose-jump {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 2.5rem;
}

.prose-jump a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5em 1em;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.prose-jump a:hover,
.prose-jump a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* Contact layout */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  align-items: start;
}

/* Simple form */

.form-grid {
  display: grid;
  gap: 1.1rem;
  max-width: 560px;
}

.form-field label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.4em;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-field textarea { resize: vertical; min-height: 120px; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-grid .tagline {
  margin-top: 0.6em;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text-muted);
}

.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1em;
}

.footer-col a {
  display: block;
  padding: 0.3em 0;
  color: var(--text);
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Mission / trust strips */

.mission-strip {
  text-align: center;
  padding: 3.5rem 0;
}

.mission-strip p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.2rem;
  color: var(--text);
}

.trust-strip {
  text-align: center;
  padding: 3rem 0;
}

.trust-strip .eyebrow { margin-bottom: 0.75rem; }

.trust-strip p.trust-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Flow row (Explore -> Build -> Create) */

.flow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.flow-row .flow-step { color: var(--accent-dark); }

.flow-row .flow-arrow { color: var(--text-muted); font-weight: 400; }

/* Check list */

ul.check-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

ul.check-list li {
  position: relative;
  padding-left: 1.7em;
  margin-bottom: 0.6em;
  color: var(--text-muted);
}

ul.check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Checkbox row (contact form) */

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 0.2em;
}

.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text);
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.tbd {
  color: var(--text-muted);
  font-style: italic;
}

/* Project build guide */

.project-banner {
  background: var(--bg-alt);
  line-height: 0;
}

.project-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.color-key {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.build-step {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.build-step:last-of-type { border-bottom: none; }

.build-step.reverse { flex-direction: row-reverse; }

.build-step-text,
.build-step-image {
  flex: 1 1 0;
  min-width: 0;
}

.build-step-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.build-step-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.build-step-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
}

.build-step-title h2 {
  margin: 0;
  font-size: 1.3rem;
}

.build-step-text p {
  margin: 0;
  color: var(--text-muted);
}

.build-closing {
  background: var(--bg-alt);
  border-radius: var(--radius);
  text-align: center;
  padding: 3rem 1.5rem;
  margin: 3rem 0 4rem;
}

.build-closing img {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.build-closing h2 { margin: 0 0 1rem; }

.build-closing p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .build-step,
  .build-step.reverse {
    flex-direction: column;
  }

  .build-step-image { order: -1; width: 100%; }
}

/* Focus states (keyboard accessibility) */

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

.card a.card-link {
  transition: color 0.15s ease;
}

.card a.card-link:hover,
.card a.card-link:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

/* Loading fade-in */

body {
  animation: page-fade-in 0.35s ease both;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  html { scroll-behavior: auto; }
  .card, .hero::before, .hero::after { animation: none; opacity: 1; }
  .search-modal { transition: none; transform: none !important; }
}

/* Scroll progress bar */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  z-index: 100;
  transition: width 0.1s ease-out;
}

/* Floating action buttons */

.fab-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.fab {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: var(--font-head);
  box-shadow: 0 10px 24px -10px rgba(20, 20, 43, 0.4);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.fab:hover { transform: translateY(-2px); }

.fab-contact {
  height: 48px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  gap: 0.5em;
}

.fab-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.fab-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Search */

.search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 1rem;
  flex: none;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.search-trigger svg { width: 17px; height: 17px; }

.search-trigger:active { transform: scale(0.94); }

@media (hover: hover) and (pointer: fine) {
  .search-trigger:hover {
    border-color: var(--text);
    color: var(--text);
  }
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 43, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms;
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms var(--ease-out), visibility 0s linear 0s;
}

.search-modal {
  background: #ffffff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  box-shadow: 0 30px 60px -20px rgba(20, 20, 43, 0.5);
  overflow: hidden;
  transform: scale(0.96) translateY(-4px);
  transition: transform 220ms var(--ease-out);
}

.search-overlay.is-open .search-modal {
  transform: scale(1) translateY(0);
}

.search-modal input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
}

.search-modal input:focus { outline: none; }

.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-results a {
  display: block;
  padding: 0.75rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
}

.search-results a:hover,
.search-results a:focus-visible {
  background: var(--bg-alt);
}

.search-results a .result-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
}

.search-results a .result-section {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-empty {
  padding: 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* FAQ accordion */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  flex: none;
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.15s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  margin: 0.9rem 0 0;
}

/* Confirmation state (contact form) */

.form-confirm {
  display: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 2rem 1.75rem;
  text-align: center;
}

.form-confirm.visible { display: block; }

.form-confirm .hex-badge {
  margin: 0 auto 1.25rem;
}

/* Launch gate — first-visit-only dark "galaxy" splash shown before the 3D
   intro on the homepage. Hidden by default; an inline script in index.html
   reveals it (before first paint) only if the visitor hasn't launched yet. */

.launch-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 22%, rgba(59, 130, 246, 0.28), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(236, 72, 153, 0.24), transparent 45%),
    radial-gradient(ellipse at 50% 50%, #1b1b3a 0%, #0a0a18 68%, #050508 100%);
}

.launch-gate[hidden] { display: none; }

.launch-gate::before {
  content: '';
  position: absolute;
  inset: -10%;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 30% 70%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 50% 30%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 70% 82%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 85% 15%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 92% 55%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 15% 88%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 60% 8%, rgba(255, 255, 255, 0.6), transparent);
  background-size: 220px 220px;
  animation: launch-twinkle 6s ease-in-out infinite;
}

@keyframes launch-twinkle {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.launch-gate-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}

.launch-gate-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1.1rem;
}

.launch-gate-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.6vw, 2.9rem);
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 2.2rem;
}

.launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1em 2.4em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: linear-gradient(120deg, var(--lime), var(--accent) 75%);
  animation: launch-pulse 2.4s ease-in-out infinite;
  transition: transform 160ms var(--ease-out);
}

.launch-btn:hover { transform: translateY(-2px) scale(1.02); }
.launch-btn:active { transform: scale(0.97); }

@keyframes launch-pulse {
  0% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.35); }
  70% { box-shadow: 0 0 0 18px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .launch-gate::before { animation: none; }
  .launch-btn { animation: none; }
}

/* Print */

@media print {
  .site-header,
  .site-footer,
  .fab-stack,
  .scroll-progress,
  .search-overlay,
  .launch-gate,
  .cta-band .button-group,
  .hero .button-group,
  .page-hero + .section .button-group {
    display: none !important;
  }

  body { animation: none; background: #fff; color: #000; }

  a { color: #000; text-decoration: underline; }

  .card, .callout, .color-key { border: 1px solid #999; box-shadow: none; }

  .cta-band { background: #fff; border: 1px solid #999; }

  .cta-band h2, .cta-band p.lead { color: #000; }
}

/* Responsive */

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  .site-nav.open { max-height: 420px; }

  .site-nav a {
    padding: 1em 24px;
    border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent;
  }

  .site-nav a.active,
  .site-nav a:hover {
    border-left-color: var(--accent);
    border-bottom-color: var(--border);
  }

  .footer-grid { grid-template-columns: 1fr; }
}
