/* Landing Page - Site-specific styles
 * Base styles from @panzerotti/design-system (index.css)
 *
 * This file uses custom --b-* variables for backwards compatibility.
 * New components should use --pico-* and --pz-* variables from design-system.
 */

/* --- Base Styles & Theme Variables --- */
:root {
  /* Use design system font */
  --b-font-main: var(--pico-font-family);
  --b-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --text-xs: 0.75rem; /* 12px - captions, small labels */
  --text-sm: 0.875rem; /* 14px - nav links, small text */
  --text-base: 1rem; /* 16px - body text baseline */
  --text-lg: 1.125rem; /* 18px - your new base! */
  --text-xl: 1.25rem; /* 20px - subheadlines */
  --text-2xl: 1.5rem; /* 24px - card headings */
  --text-3xl: 1.875rem; /* 30px - larger headings */
  --transition-base: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Light Theme (default) */
[data-theme="light"] {
  --b-txt: oklch(5% 0 0);
  --b-txt-muted: oklch(40% 0.01 260);
  --b-bg-1: oklch(100% 0 0);
  --b-bg-2: oklch(97% 0.008 260);
  --b-line: oklch(92% 0.01 260);
  --b-btn-bg: oklch(5% 0 0);
  --b-btn-txt: oklch(100% 0 0);
  --b-accent: var(--pz-orange, oklch(65% 0.18 40)); /* Brand orange */
  --b-danger: oklch(55% 0.18 25);
  --b-success: oklch(55% 0.18 140);
  --b-danger-bg: oklch(58.32% 0.16 14.54 / 0.1);
}

/* Dark Theme */
[data-theme="dark"] {
  /*--b-txt: oklch(95% 0 0);
    --b-txt-muted: oklch(65% 0.01 260);*/
  --b-txt: oklch(95% 0.002 260);
  --b-txt-muted: oklch(90% 0.01 260);
  --b-bg-1: oklch(15% 0.01 260);
  --b-bg-2: oklch(20% 0.015 260);
  --b-line: oklch(30% 0.01 260);
  --b-btn-bg: oklch(95% 0 0);
  --b-btn-txt: oklch(10% 0 0);
  --b-accent: oklch(70% 0.2 45); /* Brighter Orange for dark mode */
  --b-danger: oklch(65% 0.2 25);
  --b-success: oklch(65% 0.2 140);
  --b-danger-bg: oklch(65% 0.2 25 / 0.15);
}

html {
  font-size: clamp(1rem, 1.05vw, 1.125rem);
  scroll-behavior: smooth;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* --- Global Resets & Typography --- */
body {
  font-family: var(--b-font-main);
  background-color: var(--b-bg-1);
  color: var(--b-txt);
  line-height: 1.6;
  max-width: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle grid background */
  background-image: linear-gradient(to right, var(--b-line) 1px, transparent 1px), linear-gradient(to bottom, var(--b-line) 1px, transparent 1px);
  background-size: 40px 40px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

h1,
h2,
h3 {
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: 1536px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.section-header {
  text-align: center;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--b-txt-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* --- Header --- */
.main-header {
  padding: 0.75rem 0;
  background-color: var(--b-bg-1);
  transition: var(--transition-base);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-weight: 700;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--b-txt);
  transition: var(--transition-base);
}

.nav-links {
  display: none;
}

/* Mobile menu open state */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--b-bg-1);
  padding: 1.5rem 2rem;
  gap: 1rem;
  border-bottom: 1px solid var(--b-line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-links.open a {
  text-decoration: none;
  color: var(--b-txt);
  font-size: 1rem;
  padding: 0.5rem 0;
  transition: var(--transition-base);
}

.nav-links.open a:hover {
  color: var(--b-accent);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
  }
  .nav-links.open {
    position: static;
    flex-direction: row;
    padding: 0;
    border-bottom: none;
    box-shadow: none;
  }
  .nav-links a {
    text-decoration: none;
    color: var(--b-txt);
    font-size: 1.1rem;
    transition: var(--transition-base);
  }
  .nav-links a:hover {
    color: var(--b-accent);
  }
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 2px solid var(--b-line);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--b-txt);
  font-size: 1.25rem;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.theme-toggle:hover {
  border-color: var(--b-accent);
  color: var(--b-accent);
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .theme-toggle {
    margin-left: 0;
  }
}

/* --- Hero Section --- */
.hero {
  padding-top: 0.5rem;
  padding-bottom: 4rem;
  text-align: center;
  background-color: var(--b-bg-1);
  transition: var(--transition-base);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero {
    text-align: left;
  }
  .hero-grid {
    /* 3-column layout: text | visual | stats */
    grid-template-columns: 0.9fr 1.5fr 0.6fr;
    gap: 2.5rem;
    align-items: center;
  }
}

.hero-content {
  margin-left: auto;
  margin-right: auto;
  max-width: 700px;
}

@media (min-width: 1024px) {
  .hero-content {
    margin: 0;
    max-width: none;
    padding-right: 1.5rem;
  }
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--b-txt);
  margin-bottom: 1.5rem;
  transition: var(--transition-base);
}

.hero h1 .highlight {
  color: var(--b-accent);
  transition: var(--transition-base);
}

.hero .subheadline {
  font-size: var(--text-xl);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--b-txt-muted);
  transition: var(--transition-base);
}

@media (min-width: 1024px) {
  .hero .subheadline {
    margin: 0 0 2.5rem 0;
  }
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .hero-actions {
    justify-content: flex-start;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: var(--transition-base);
  cursor: pointer;
  width: 100%;
  max-width: 240px;
}

@media (min-width: 768px) {
  .btn {
    width: auto;
  }
}

.btn-primary {
  background-color: var(--pz-orange);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--pz-orange-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--b-txt);
  border-color: var(--b-btn-bg);
}

.btn-secondary:hover {
  background-color: var(--b-btn-bg);
  color: var(--b-btn-txt);
  transform: translateY(-2px);
}

/* NEW ghost button style */
.btn-ghost {
  color: var(--b-txt);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-base);
}
.btn-ghost:hover {
  color: var(--b-accent);
}
.btn-ghost span {
  margin-left: 0.5rem;
  transition: var(--transition-base);
  display: inline-block;
}
.btn-ghost:hover span {
  transform: translateX(4px);
}

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

.hero-svg {
  width: 100%;
  height: auto;
}

/* Hero Flow Visualization */
.hero-flow {
  border-radius: 12px;
  border: 1px solid var(--b-line);
  background: var(--b-bg-1);
}

.hero-flow .flow-nodes .node {
  cursor: pointer;
}

.hero-flow .flow-nodes .node rect {
  transition: transform 0.2s ease;
  transform-origin: center;
  transform-box: fill-box;
}

.hero-flow .flow-nodes .node:hover rect {
  transform: scale(1.05);
}

.hero-flow .flow-nodes .node-key rect {
  stroke-width: 2.5;
}

.hero-flow .particles circle {
  will-change: cx, cy, opacity;
}

.hero-flow .particle-user {
  filter: drop-shadow(0 0 3px var(--b-success, #22c55e));
}

.hero-flow .particle-bot {
  filter: drop-shadow(0 0 2px var(--pz-orange, #FC5800));
}

.hero-flow .blocked-flash {
  pointer-events: none;
}

@media (min-width: 1024px) {
  .hero-visual {
    min-height: auto;
  }

  .hero-svg {
    width: 100%;
    max-width: none;
  }
}

/* --- Hero Stats Panel --- */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--b-line);
  text-align: center;
}

.hero-stats .stat-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.hero-stats .stat-card {
  flex: 1;
  max-width: 200px;
}

@media (min-width: 1024px) {
  .hero-stats {
    padding-top: 0;
    padding-left: 1.5rem;
    border-top: none;
    text-align: left;
  }

  .hero-stats .stat-cards {
    flex-direction: column;
    gap: 0;
  }

  .hero-stats .stat-card {
    max-width: none;
  }
}

.stats-intro {
  font-size: var(--text-sm);
  color: var(--b-txt-muted);
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
}

.stat-card {
  padding: 1rem 0;
}

@media (min-width: 1024px) {
  .stat-card {
    border-top: 1px solid var(--b-line);
  }
}

.stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--b-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
  margin-bottom: 0.25rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--b-txt);
}

.stat-unit {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--b-txt);
}

.stat-desc {
  font-size: var(--text-xs);
  color: var(--b-txt-muted);
  line-height: 1.4;
}

/* --- Problem Section --- */
.problem-section {
  padding-top: 5rem;
  padding-bottom: 6rem;
  background-color: var(--b-bg-2);
  border-top: 1px solid var(--b-line);
  border-bottom: 1px solid var(--b-line);
  transition: var(--transition-base);
}

.blind-spot-list {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0;
  margin: 0 auto 3rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .blind-spot-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blind-spot-list li {
  list-style: none;
  list-style-type: none;
  background-color: var(--b-bg-1);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--b-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.blind-spot-list .icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--b-danger-bg);
  color: var(--b-danger);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.blind-spot-list h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.blind-spot-list p {
  margin: 0;
  font-size: 1rem;
  color: var(--b-txt-muted);
  transition: color 0.3s ease;
}

.consequence-text {
  text-align: center;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 12px;
  background-color: var(--b-bg-1);
  border: 1px solid var(--b-line);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

/* --- Solution Section --- */
.solution-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  background-color: var(--b-bg-1);
  transition: background-color 0.3s ease;
}

.solution-content {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .solution-content {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: 5rem;
  }
}

.solution-list {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0;
  margin: 2rem 0 0 0;
  display: grid;
  gap: 1.5rem;
}

.solution-list li {
  list-style: none;
  list-style-type: none;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.solution-list .icon {
  font-size: 1.25rem;
  color: var(--b-success);
  margin-top: 0.2em;
  transition: color 0.3s ease;
}

.solution-list h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
}

.solution-list p {
  margin: 0;
  color: var(--b-txt-muted);
  transition: color 0.3s ease;
}

.solution-visual img {
  max-width: 100%;
  height: auto;
  border: none;
  outline: none;
  display: block;
  margin: 0 auto 1rem auto;
}

.solution-visual .caption {
  font-size: 1rem;
  color: var(--b-txt-muted);
  margin: 0;
  line-height: 1.5;
  text-align: center;
}

/* --- Capabilities Section --- */
.capabilities-section {
  padding-top: 5rem;
  padding-bottom: 6rem;
  background-color: var(--b-bg-2);
  border-top: 1px solid var(--b-line);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.capabilities-grid {
  display: grid;
  gap: 2rem;
  list-style: none !important;
  list-style-type: none !important;
  padding: 0;
  margin: 0;
}

.capabilities-grid li {
  list-style: none;
  list-style-type: none;
}

@media (min-width: 1024px) {
  .capabilities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.capability-card {
  background: var(--b-bg-1);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--b-line);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.capability-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.capability-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
}

.capability-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--b-txt-muted);
  margin: 0 0 1rem 0;
}

.capability-card p {
  margin: 0;
  color: var(--b-txt-muted);
  transition: color 0.3s ease;
}

/* --- Closing CTA Section --- */
.closing-cta-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  margin: 0;
  text-align: center;
  background-color: #1a1a1a;
  background-image: none;
  color: #f5f5f5;
}

.closing-cta-section h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: #fff;
}

.closing-cta-section p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: rgba(255, 255, 255, 0.75);
}

.closing-cta-section .btn-primary {
  background-color: var(--pz-orange);
  color: #fff;
}

.closing-cta-section .btn-primary:hover {
  background-color: var(--pz-orange-hover);
  transform: translateY(-2px);
}

.closing-cta-section .btn-secondary {
  background-color: transparent;
  color: #f5f5f5;
  border-color: #f5f5f5;
}

.closing-cta-section .btn-secondary:hover {
  background-color: #f5f5f5;
  color: #1a1a1a;
}

.closing-cta-section .hero-actions {
  justify-content: center;
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--b-txt);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

footer {
  background-color: var(--b-bg-1);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--b-line);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

footer a {
  color: var(--b-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  opacity: 0.8;
}
