/* Google Fonts — must be first */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
  /* Primary */
  --color-primary: #0D145F;
  --color-primary-hover: #15219D;
  --color-onyx: #131416;
  /* Accent */
  --color-accent: #FABC20;
  --color-accent-hover: #e5aa10;
  /* Secondary */
  --color-secondary: #9C90E6;
  --color-secondary-hover: #8578d4;
  --color-papaya: #FFEFD5;
  /* Surfaces */
  --color-surface: #fff;
  --color-surface-muted: #F3F4FA;
  --color-border: #e5e5e5;
  --color-border-light: #eee;
  /* Text (Onyx gradient scale) */
  --color-text: #3B3E44;
  --color-text-strong: #131416;
  --color-text-muted: #848A94;
  --color-text-faint: #ADB1B8;
  /* Fonts */
  --font-heading: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background: var(--color-surface);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 150ms;
}

a:hover {
  text-decoration: underline;
}

/* Focus-visible for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

::selection {
  background: var(--color-primary);
  color: #fff;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text-strong);
  line-height: 1.2;
  font-weight: 400;
  word-spacing: 0.05em;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

p {
  color: var(--color-text);
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.stage-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25em 0.8em;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   3. Layout
   ========================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ==========================================================================
   4. Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand,
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-text-strong);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-logo-img {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
  position: relative;
  top: -1px;
}

.nav-brand:hover,
.nav-logo:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 150ms;
}

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

.nav-links a.active {
  border-bottom: 2px solid var(--color-primary);
  color: var(--color-primary);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  margin: 5px 0;
  transition: transform 200ms, opacity 200ms;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   5. Hero
   ========================================================================== */

.hero {
  padding: 5rem 0 3rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero .subtitle,
.hero-subtitle {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: #666;
}

.hero-tagline {
  font-size: 0.9rem;
  color: #999;
  margin-top: 0.75rem;
  font-style: italic;
}

/* ==========================================================================
   6. Cards
   ========================================================================== */

/* Modal form layout */
.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.slider-val {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 1.125rem;
  min-width: 2rem;
  text-align: center;
  color: #111;
}
@media (max-width: 480px) {
  .modal-row { grid-template-columns: 1fr; }
}

.btn-small {
  font-size: 0.8125rem;
  padding: 0.4rem 1rem;
  min-height: 36px;
}

.btn-large {
  font-size: 1rem;
  padding: 1rem 2.5rem;
  min-height: 54px;
  letter-spacing: 0.01em;
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   7. Stage Badges — colored pills
   ========================================================================== */

.stage-badge[data-stage="concept"],
.stage-badge--concept,
.stage-concept {
  background: #e8e8e8;
  color: #666;
}

.stage-badge[data-stage="prototype"],
.stage-badge--prototype,
.stage-prototype,
.stage-badge[data-stage="in progress"],
.stage-in-progress {
  background: #FFEFD5;
  color: #8a6d00;
}

.stage-badge[data-stage="alpha"],
.stage-badge--alpha,
.stage-alpha,
.stage-badge[data-stage="in review"],
.stage-in-review,
.stage-badge[data-stage="getting feedback"],
.stage-getting-feedback {
  background: #ECEAFA;
  color: #0D145F;
}

.stage-badge[data-stage="beta"],
.stage-badge--beta,
.stage-beta {
  background: #d4f8e8;
  color: #1a7a4c;
}

.stage-badge[data-stage="live"],
.stage-badge--live,
.stage-live {
  background: #1a1a1a;
  color: #fff;
}

/* ==========================================================================
   8. Buttons
   ========================================================================== */

.btn-primary,
.btn-secondary,
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 150ms, color 150ms, border-color 150ms, transform 150ms;
  text-decoration: none;
  min-height: 44px;
  padding: 0.6rem 1.4rem;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-onyx);
  border-color: var(--color-accent);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(250,188,32,0.3);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

.btn-pill {
  font-size: 0.75rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  min-height: auto;
  background: #f0f0f0;
  color: var(--color-text);
  border-color: #ddd;
}

.btn-pill:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  text-decoration: none;
}

/* ==========================================================================
   9. Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: border-color 150ms;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #bbb;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
}

input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
  margin-bottom: 0.4rem;
}

label abbr {
  text-decoration: underline dotted #aaa;
  text-underline-offset: 3px;
  cursor: help;
  color: #444;
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e8e8e8;
  border-radius: 4px;
  outline: none;
  border: none;
  padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ==========================================================================
   10. Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  transform: translateY(12px) scale(0.98);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #999;
  font-size: 1.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

/* ==========================================================================
   11. Toast
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-strong);
  min-width: 260px;
  max-width: 400px;
  transform: translateX(120%);
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 16px 40px rgba(0,0,0,0.12);
}

.toast.show {
  transform: translateX(0);
}

.toast--success {
  border-left: 4px solid #2e7d32;
  color: #333;
}

.toast--error {
  border-left: 4px solid #d32f2f;
  color: #333;
}

/* ==========================================================================
   12. Review Form
   ========================================================================== */

.review-section {
  border-left: 3px solid var(--color-primary);
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.review-section h3 {
  margin-bottom: 0.75rem;
}

.slider-group {
  margin-bottom: 1.25rem;
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.slider-value {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* ==========================================================================
   13. Results / Scores
   ========================================================================== */

.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.score-item:last-child {
  border-bottom: none;
}

.score-label {
  font-size: 0.875rem;
  color: #777;
}

.score-value {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.125rem;
}

/* Score colors based on value */
.score-value--low {
  color: #d32f2f;
}

.score-value--mid {
  color: #f57c00;
}

.score-value--high {
  color: #2e7d32;
}

.result-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 1.5rem;
}

.result-card h3 {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   14. Tabs
   ========================================================================== */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: #888;
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 150ms, border-color 150ms;
  min-height: 44px;
}

.tab:hover {
  color: #333;
}

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==========================================================================
   15. Footer
   ========================================================================== */

.footer {
  border-top: 1px solid #e5e5e5;
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
}

.footer p {
  font-size: 0.8125rem;
  color: #999;
  margin: 0;
}

.footer a {
  color: #777;
}

.footer a:hover {
  color: #0077cc;
}

/* ==========================================================================
   16. Detail Pages
   ========================================================================== */

.detail-header {
  padding-top: 3rem;
  margin-bottom: 2rem;
}

.detail-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.detail-header .stage-badge {
  display: inline-block;
  margin-bottom: 1rem;
}

.detail-description {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 700px;
}

.open-full-btn {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.85rem;
  border-radius: 8px;
  transition: background 150ms;
}

.open-full-btn:hover {
  background: var(--color-primary-hover);
  text-decoration: none;
}

.inline-review {
  margin-top: 3rem;
  border: 1px solid #e5e5e5;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
}

.inline-review h3 {
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.inline-review .slider-container {
  display: grid;
  grid-template-columns: 1fr 3rem;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.inline-review .score-display {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 1.125rem;
  text-align: right;
  color: #111;
}

.form-embed-fallback {
  padding: 3rem 2rem;
  text-align: center;
  color: #888;
}

.form-embed-fallback a {
  display: inline-block;
  margin-top: 1rem;
}

.detail-tab-panel .form-frame {
  width: 100%;
  height: 600px;
  border: none;
}

.detail-tab-panel .form-link {
  text-align: center;
  padding: 0.5rem;
}

.detail-tab-panel .form-link a {
  font-size: 0.8rem;
  color: var(--color-primary);
}

/* Detail page tabs (override shared tabs for bordered panel look) */
.detail-tabs {
  border-bottom: 2px solid #e5e5e5;
  margin-bottom: 0;
}

.detail-tab-panel {
  display: none;
  border: 1px solid #e5e5e5;
  border-top: none;
  padding: 0;
  min-height: 500px;
  background: #fff;
  border-radius: 0 0 12px 12px;
}

.detail-tab-panel.active {
  display: block;
}

.detail-tab-panel iframe {
  width: 100%;
  height: 600px;
  border: none;
}

@media (max-width: 768px) {
  .detail-tab-panel iframe {
    height: 400px;
  }
}

/* ==========================================================================
   17. Page Header
   ========================================================================== */

.page-header {
  padding: 3rem 0 2rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.review-header {
  padding: 3rem 0 1rem;
}

.review-header h1 {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   17. Form Groups
   ========================================================================== */

.form-group {
  margin-bottom: 1rem;
}

/* ==========================================================================
   18. Utilities
   ========================================================================== */

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: #999;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Responsive — Tablet (768px)
   ========================================================================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

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

  /* Nav → hamburger */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform 250ms ease;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1.25rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Modal */
  .modal {
    padding: 1.5rem;
    border-radius: 8px;
  }

  /* Toast */
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }

  /* 44px slider thumb on mobile (bug fix from 20px) */
  input[type="range"]::-webkit-slider-thumb {
    width: 44px;
    height: 44px;
  }

  input[type="range"]::-moz-range-thumb {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   Responsive — Small phone (480px)
   ========================================================================== */

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: 1.625rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .prototype-card {
    padding: 1.25rem;
  }

  /* Ensure 44px minimum tap targets on all interactive elements */
  .btn-primary,
  .btn-secondary,
  .btn-pill,
  .tab {
    min-height: 44px;
    min-width: 44px;
  }

  .btn-pill {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .tabs {
    gap: 0;
  }

  .tab {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }
}

/* ==========================================================================
   19. Index Page — Page Sections
   ========================================================================== */

.page-section {
  padding: 4rem 0;
  scroll-margin-top: 60px;
}

.about-video {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border-light);
}

.about-video h2 {
  margin-bottom: 1.5rem;
}

.page-section--muted {
  background: var(--color-surface-muted); /* Mist #F3F4FA */
}

/* Hero overrides for index */
.hero {
  padding: 4.5rem 0 5rem;
  text-align: left;
  background: linear-gradient(180deg, var(--color-surface-muted) 0%, var(--color-surface) 80%);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw + 0.5rem, 4.25rem);
  letter-spacing: -0.025em;
  word-spacing: 0.04em;
  line-height: 1.08;
  margin-bottom: 1.75rem;
  max-width: 720px;
  color: var(--color-text-strong);
}

.hero-lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  letter-spacing: 0.005em;
}

.hero-video {
  max-width: 680px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.08),
    0 24px 48px rgba(13,20,95,0.10);
}

.hero-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Section Headers */
.sh {
  margin-bottom: 3rem;
}

.sh-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.sh h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
  color: var(--color-text-strong);
  margin-bottom: 0.6rem;
}

.sh p {
  color: var(--color-text-muted);
  max-width: 480px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ==========================================================================
   20. Prototype Cards (horizontal layout)
   ========================================================================== */

.proto-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.proto-card {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.35rem 1.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  transition: border-color 200ms ease, box-shadow 300ms ease, transform 300ms ease;
}

.proto-card:hover {
  border-color: var(--color-secondary);
  box-shadow: 0 4px 12px rgba(156,144,230,0.12), 0 12px 32px rgba(0,0,0,0.06);
  transform: translateY(-3px);
}

.proto-thumb {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--color-surface-muted);
}

.proto-emoji {
  width: 110px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  background: var(--color-surface-muted);
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
}

.proto-info {
  min-width: 0;
}

.proto-name {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-strong);
  margin-bottom: 0.15rem;
}

.proto-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.proto-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.proto-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.proto-reviewed {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2e7d32;
}

/* ==========================================================================
   21. Manifesto / Principles
   ========================================================================== */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.principle {
  padding: 0;
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.35;
}

.principle h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-strong);
}

.principle p {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.8;
}

/* Sprint Note */
.sprint-bar {
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.sprint-bar-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  white-space: nowrap;
}

.sprint-bar-text {
  font-size: 0.875rem;
  color: var(--color-text);
  margin: 0;
}

/* ==========================================================================
   22. Changelog / Lab Notes
   ========================================================================== */

.log-entry {
  padding-left: 1.5rem;
  border-left: 2px solid var(--color-border);
}

.log-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-faint);
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.log-title {
  font-size: 1.1rem;
  color: var(--color-text-strong);
  margin-bottom: 1.25rem;
}

.log-group h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin: 1.25rem 0 0.5rem;
}

.log-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.log-group li {
  font-size: 0.875rem;
  color: var(--color-text);
  padding: 0.25rem 0 0.25rem 1rem;
  position: relative;
}

.log-group li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 4px;
  height: 4px;
  background: #ccc;
  border-radius: 50%;
}

/* ==========================================================================
   23. Connect Section
   ========================================================================== */

.connect-section {
  background: var(--color-primary);
  color: var(--color-surface);
  padding: 4.5rem 0;
  scroll-margin-top: 60px;
  text-align: center;
}

.connect-section .sh {
  text-align: center;
}

.connect-section .sh h2 {
  color: var(--color-surface);
  margin-bottom: 0.75rem;
}

.connect-section .sh p {
  color: rgba(255,255,255,0.65);
  max-width: 420px;
  margin: 0 auto;
}

.connect-section .btn-primary {
  margin-top: 0.5rem;
}

.connect-section .btn-primary {
  background: var(--color-accent);
  color: var(--color-onyx);
  border-color: var(--color-accent);
}

.connect-section .btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.connect-box {
  padding: 2rem;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
}

.connect-box--narrow {
  max-width: 480px;
}

.connect-box h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--color-text-strong);
}

.connect-cta {
  font-size: 0.875rem;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   24. Prototype Tab Bar
   ========================================================================== */

.tab-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 200ms ease;
  letter-spacing: 0.02em;
}

.tab-btn:hover {
  border-color: #ccc;
  color: var(--color-text);
}

.tab-btn.active[data-stage="Getting Feedback"] {
  background: #ECEAFA;
  color: #0D145F;
  border-color: #DCD8F6;
}

.tab-btn.active[data-stage="In Progress"] {
  background: #FFEFD5;
  color: #8a6d00;
  border-color: #eedba0;
}

/* ==========================================================================
   25. Vote Buttons (review modal)
   ========================================================================== */

.vote-row {
  display: flex;
  gap: 0.75rem;
}

.vote-btn {
  font-size: 1.75rem;
  padding: 0.65rem 1.75rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-muted);
  cursor: pointer;
  transition: all 200ms ease;
  opacity: 0.6;
}

.vote-btn:hover {
  opacity: 0.9;
  border-color: var(--color-border);
  background: var(--color-surface);
}

.vote-btn.selected {
  opacity: 1;
  transform: scale(1.05);
}

.vote-btn.selected[data-vote="up"] {
  border-color: #2e7d32;
  background: #e8f5e9;
}

.vote-btn.selected[data-vote="down"] {
  border-color: #d32f2f;
  background: #ffebee;
}

/* ==========================================================================
   26. Lab Notes Page
   ========================================================================== */

.changelog-entry { margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--color-border-light); }
.changelog-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-text-faint); letter-spacing: 0.03em; margin-bottom: 0.5rem; }
.changelog-title { font-size: 1.4rem; border-left: 3px solid var(--color-primary); padding-left: 1rem; margin-bottom: 1.5rem; }
.changelog-body h3 { font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin: 2rem 0 0.75rem; font-weight: 600; }
.changelog-body ul { list-style: none; padding: 0; }
.changelog-body li { padding: 0.4rem 0; padding-left: 1.25rem; position: relative; color: var(--color-text); font-size: 0.95rem; }
.changelog-body li::before { content: ''; position: absolute; left: 0; top: 0.65rem; width: 4px; height: 4px; background: #ccc; border-radius: 50%; }
.process-note { border: 1px solid var(--color-border); border-radius: 12px; padding: 2rem; margin-top: 4rem; background: var(--color-surface-muted); }
.process-note h3 { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; color: var(--color-text-faint); }
.process-note p { color: var(--color-text); line-height: 1.8; }

/* ==========================================================================
   26b. Connect Page
   ========================================================================== */

.connect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.connect-card { border: 1px solid var(--color-border-light); border-radius: 12px; padding: 2rem; background: var(--color-surface-muted); }
.connect-card h2 { font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 1.5rem; color: var(--color-text-strong); }
.contact-list { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; flex-direction: column; gap: 0.25rem; }
.contact-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.contact-value { color: var(--color-primary); text-decoration: none; font-size: 1rem; }
.contact-value:hover { text-decoration: underline; }
.connect-cta-btn { margin-top: 1rem; }
@media (max-width: 768px) { .connect-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   27. Index Page Utilities
   ========================================================================== */

.modal-desc { margin-bottom: 1.5rem; }
.checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--color-text); cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--color-primary); cursor: pointer; }
.results-section { margin-top: 2rem; }
.text-sm { font-size: 0.8rem; }

/* ==========================================================================
   27. Site Footer (index)
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
  margin-top: 0;
}

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

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-strong);
}

.footer-sub {
  font-size: 0.7rem;
  color: var(--color-text-faint);
  margin-top: 0.15rem;
}

.footer-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-faint);
}

/* ==========================================================================
   28. Scroll Reveal Animations
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.48s; }

/* ==========================================================================
   29. Index Page Responsive Overrides
   ========================================================================== */

@media (max-width: 768px) {
  .hero { padding: 4rem 0 1.5rem; }
  .page-section { padding: 3rem 0; }
  .proto-card { grid-template-columns: 72px 1fr; gap: 1rem; }
  .proto-thumb, .proto-emoji { width: 72px; height: 56px; }
  .proto-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; }
  .principles { grid-template-columns: 1fr; gap: 1.5rem; }
  .sprint-bar { flex-direction: column; gap: 0.5rem; }
  .about-video { margin-top: 2rem; }
  .site-footer .container { flex-direction: column; text-align: center; gap: 0.75rem; }
  .connect-section { padding: 3rem 0; }
  .vote-btn { font-size: 1.75rem; padding: 0.6rem 1.25rem; }
}

@media (max-width: 480px) {
  .proto-card { grid-template-columns: 1fr; }
  .proto-thumb, .proto-emoji { width: 100%; max-width: 200px; height: 120px; margin: 0 auto; }
  .hero-video { border-radius: 8px; }
  .sh { margin-bottom: 2rem; }
  .modal { padding: 1.25rem; max-height: 95vh; }
  .modal h2 { font-size: 1.25rem; padding-right: 2rem; }
  .vote-btn { font-size: 1.5rem; padding: 0.5rem 1rem; }
  .tab-bar { flex-wrap: wrap; }
}
