/* ==========================================================================
   Tiny Robot Lab — Public Landing Page Styles
   Clean, framework-free semantic CSS matching the lab's dark visual identity.
   ========================================================================== */

:root {
  --bg-canvas: #070d18;
  --bg-card: #0f172a;
  --bg-card-hover: #142036;
  --bg-card-subtle: #0b1322;
  --bg-code: #050912;
  --border-subtle: #1e293b;
  --border-focus: #38bdf8;
  --border-accent: rgba(56, 189, 248, 0.25);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-indigo: #818cf8;
  --accent-amber: #fbbf24;
  --accent-emerald: #34d399;
  --accent-coral: #f87171;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --container-max: 1120px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(56, 189, 248, 0.15);
}

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

html {
  font-size: 16px;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Accessibility & Reduced Motion */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

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

/* Skip link for screen readers & keyboard users */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--accent-cyan);
  color: #040810;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  z-index: 999;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Typography Helpers */
h1, h2, h3, h4 {
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Header & Nav */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 13, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-link:hover {
  text-decoration: none;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
  display: block;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-item {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
}
.nav-item:hover {
  color: var(--text-main);
  text-decoration: none;
}
.nav-item.active,
.nav-item[aria-current="page"] {
  color: var(--accent-cyan);
  font-weight: 600;
}
.nav-item.active::after,
.nav-item[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: var(--radius-pill);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.nav-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
  text-decoration: none;
  border-color: var(--accent-cyan);
}

/* Badges */
.badge-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.badge-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 48px;
}

.hero-content h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.hero-phrase {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

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

.avatar-frame {
  position: relative;
  border-radius: 28px;
  padding: 12px;
  background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.15), transparent 70%);
}

.hero-avatar-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--border-accent);
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.7), 0 0 32px rgba(56, 189, 248, 0.2);
  display: block;
}

/* Dedicated Page Headers */
.page-header {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 48px;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.page-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.7;
}

/* Exploration Cards (Landing Page) */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.explore-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: all 0.2s ease;
}
.explore-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}
.explore-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text-main);
}
.explore-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}
.explore-card .card-action {
  margin-top: auto;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.explore-card:hover .card-action {
  color: #7dd3fc;
}

/* Callout & Summary boxes */
.summary-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
}

/* Common Section Styles */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 40px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-weight: 600;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin-bottom: 12px;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 720px;
}

/* Grid Cards (What We Are Learning) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--accent-cyan);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Workflow / How It Works */
.flow-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.flow-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.flow-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.flow-block-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.flow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.flow-arrow {
  color: var(--text-faint);
  font-size: 1.125rem;
  display: flex;
  align-items: center;
}

.flow-explainer {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  line-height: 1.6;
}

/* Current Lab Facts Grid */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.fact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.fact-metric {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.fact-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.fact-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Caveats Box (Honest Engineering) */
.caveat-box {
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.caveat-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 12px;
}

.caveat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.caveat-list li {
  font-size: 0.9375rem;
  color: #d1d5db;
  position: relative;
  padding-left: 20px;
}
.caveat-list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--accent-amber);
  font-weight: 700;
}

/* Architecture Section */
.architecture-frame {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 24px;
}

.architecture-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.arch-caption {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* Philosophy Section */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.philosophy-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.philosophy-step {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 1.0625rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.philosophy-step:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.philosophy-step-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.philosophy-story {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.philosophy-story h3 {
  font-size: 1.25rem;
  color: var(--text-main);
}

.philosophy-story p {
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* What's Next / Roadmap Preview */
.next-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-subtle) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.next-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.next-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.next-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.next-item {
  background: rgba(7, 13, 24, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.next-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.next-item-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #040812;
  padding: 48px 0 36px;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  max-width: 380px;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-logo-img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.footer-brand-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 4px;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-link:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(30, 41, 59, 0.6);
  margin-top: 36px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-visual {
    order: -1;
  }
  .avatar-frame {
    max-width: 240px;
    margin: 0 auto;
  }
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
  .nav-item-desktop {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
  .flow-step {
    width: 100%;
  }
  .flow-arrow {
    display: none;
  }
  .footer-inner {
    flex-direction: column;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

