:root {
  --bg: #0D1B2A;
  --bg-subtle: #132238;
  --bg-card: #162640;
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #fafafa;
  --text-muted: rgba(250, 250, 250, 0.5);
  --text-body: rgba(250, 250, 250, 0.7);
  --accent: #D4AF37;
  --accent-dim: rgba(212, 175, 55, 0.15);
  --accent-glow: rgba(212, 175, 55, 0.3);
}

html.light {
  --bg: #F8F9FA;
  --bg-subtle: #EDEEF0;
  --bg-card: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --text: #0D1B2A;
  --text-muted: rgba(13, 27, 42, 0.45);
  --text-body: rgba(13, 27, 42, 0.65);
  --accent: #B8972E;
  --accent-dim: rgba(184, 151, 46, 0.1);
  --accent-glow: rgba(184, 151, 46, 0.15);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  color-scheme: dark;
}

html::-webkit-scrollbar { display: none; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.nav-logo img {
  height: 28px;
  width: auto;
}

.nav-logo span {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.theme-toggle svg { width: 16px; height: 16px; }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.25rem;
}

.hamburger svg { width: 22px; height: 22px; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-body);
  transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--text); }

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-body);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

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

.btn-primary:hover {
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border);
}

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

.btn svg { width: 16px; height: 16px; }

/* --- SECTIONS --- */
.section {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 560px;
  line-height: 1.7;
}

/* --- GRID --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

/* --- CARDS --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: border-color 0.35s ease, transform 0.35s ease;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.card-icon svg { width: 20px; height: 20px; }

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* --- PRODUCT CARDS --- */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2.5rem;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-dim);
  transform: translateY(-4px);
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.product-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.status-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-live {
  background: rgba(212, 175, 55, 0.15);
  color: #D4AF37;
}

.status-beta {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.status-soon {
  background: rgba(250, 250, 250, 0.08);
  color: var(--text-muted);
}

html.light .status-soon {
  background: rgba(0, 0, 0, 0.06);
}

.product-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-card .tagline {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.product-card .card-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: gap 0.2s ease;
}

.product-card:hover .card-link { gap: 0.625rem; }
.product-card .card-link svg { width: 14px; height: 14px; }

/* --- PHILOSOPHY --- */
.philosophy-item {
  text-align: center;
  padding: 2rem 1.5rem;
}

.philosophy-item .number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 0.75rem;
  font-family: 'Inter', monospace;
}

.philosophy-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.philosophy-item p {
  font-size: 0.875rem;
  color: var(--text-body);
}

/* --- SHIPPING FLOW (SCROLL-DRIVEN HORIZONTAL) --- */
.ship-scroll-area {
  height: 300vh;
  position: relative;
}

.ship-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}

.ship-flow {
  margin-top: 2.5rem;
  max-width: 680px;
}

.sf-row {
  display: flex;
  align-items: center;
}

.sf-node {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  flex: 1;
  min-width: 0;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
}

.sf-node.active {
  opacity: 1;
  transform: scale(1);
  border-color: var(--accent-dim);
}

.sf-node.pending.active {
  opacity: 0.55;
  border-color: var(--border);
}

.sf-node h4 {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.sf-node > div > p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.125rem 0 0;
  line-height: 1.4;
}

.sf-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
}

.sf-check.shipped {
  background: var(--accent-dim);
  color: var(--accent);
}

.sf-check.pending {
  border: 2px solid var(--border);
  color: var(--text-muted);
}

.sf-line {
  width: 48px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.sf-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: calc(var(--fill, 0) * 100%);
  background: var(--accent);
}

.sf-line::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(var(--fill, 0) * 100%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translate(-50%, -50%);
  opacity: 0;
}

.sf-line.filling::before {
  opacity: 1;
}

.sf-vert {
  width: 2px;
  height: 36px;
  background: var(--border);
  margin-left: 2rem;
  position: relative;
  overflow: visible;
}

.sf-vert::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--fill, 0) * 100%);
  background: var(--accent);
}

.sf-vert::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--fill, 0) * 100%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translate(-50%, -50%);
  opacity: 0;
}

.sf-vert.filling::before {
  opacity: 1;
}

/* --- STATS BAR --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.375rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- HERO PROOF LINE --- */
.hero-proof {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.01em;
}

.hero-proof strong {
  color: var(--text);
}

/* --- PRODUCT DETAIL EXTRAS --- */
.product-problem-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.ps-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.ps-block .ps-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.ps-block p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 0;
}

.product-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

.product-status-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-body);
}

.product-status-item .check {
  color: var(--accent);
  font-size: 0.9rem;
}

.product-principle {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-body);
  font-style: italic;
  line-height: 1.6;
}

/* --- CURRENTLY BUILDING --- */
.building-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.building-card img { height: 36px; width: auto; }

.building-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.building-card .building-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.building-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* --- ECOSYSTEM NARRATIVE --- */
.eco-narrative {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

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

/* --- BUILT BY PBE --- */
.built-by {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 3.5rem;
  text-align: center;
  margin-top: 3rem;
}

.built-by p {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.8;
}

.built-by .pbe-name {
  font-weight: 700;
  color: var(--text);
}

/* --- CTA SECTION --- */
.cta-section {
  text-align: center;
  padding: 6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.05rem;
  color: var(--text-body);
  margin-bottom: 2rem;
}

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-left img { height: 20px; width: auto; }

.footer-left span {
  font-size: 0.8125rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-separator {
  color: var(--border);
  user-select: none;
}

.footer-link {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-link:hover { color: var(--text); }

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- ABOUT PAGE --- */
.process-step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.step-content h3 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.9rem;
  color: var(--text-body);
}

/* --- CONTACT PAGE --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

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

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-info-card .ci-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-card .ci-icon svg { width: 18px; height: 18px; }
.contact-info-card h4 { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.125rem; }
.contact-info-card p { font-size: 0.85rem; color: var(--text-body); }

/* --- ANIMATIONS --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.2, 1, 0.3, 1), transform 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --- HERO ECOSYSTEM CANVAS --- */
.hero { position: relative; }

.hero-ecosystem-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-ecosystem-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero > *:not(.hero-ecosystem-wrap) { position: relative; z-index: 1; }

/* --- NAV SLIDING UNDERLINE --- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

/* --- CTA ARROW EXTEND --- */
.btn-primary svg {
  transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

/* --- STATUS BADGE BREATHING DOT --- */
.status-badge.status-live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.375rem;
  vertical-align: middle;
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.status-badge.status-soon::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  margin-right: 0.375rem;
  vertical-align: middle;
  animation: breathe-slow 4s ease-in-out infinite;
}

@keyframes breathe-slow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.2; }
}

/* --- PRODUCT CARD ASSEMBLY DIRECTIONS --- */
.product-card[data-enter="left"] {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1), transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.product-card[data-enter="right"] {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1), transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.product-card[data-enter="bottom"] {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1), transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.product-card[data-enter="fade"] {
  opacity: 0;
  transition: opacity 1s ease 0.3s;
}

.product-card[data-enter="left"].assembled,
.product-card[data-enter="right"].assembled,
.product-card[data-enter="bottom"].assembled {
  opacity: 1;
  transform: translate(0, 0);
}

.product-card[data-enter="fade"].assembled {
  opacity: 1;
}

.product-card[data-enter].assembled { transition-delay: var(--enter-delay, 0s); }


/* --- GLOWING PROCESS LINE --- */
.process-glow-line {
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  overflow: hidden;
}

.process-glow-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: -20%;
  width: 100%;
  height: 30%;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.5s;
}

.process-glow-line.animating::after {
  opacity: 1;
  animation: glow-travel 4s ease-in-out infinite;
}

@keyframes glow-travel {
  0% { top: -30%; }
  100% { top: 100%; }
}

/* --- PHILOSOPHY HOVER --- */
.philosophy-item {
  transition: background-color 0.4s ease;
  position: relative;
  border-radius: 1rem;
}

.philosophy-item::after {
  content: '';
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.philosophy-item:hover::after {
  width: 40px;
}

.philosophy-item:hover .number {
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

/* --- DIVIDER WITH DOT --- */
.divider {
  height: 1px;
  background: var(--border);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.divider-dot {
  position: absolute;
  top: -3.5px;
  left: -8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-dim);
  opacity: 0;
  transition: none;
}

.divider-dot.travel {
  opacity: 1;
  animation: dot-travel 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes dot-travel {
  0% { left: -8px; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* --- CURSOR SPOTLIGHT --- */
.cursor-spotlight {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  will-change: transform;
}

html.light .cursor-spotlight {
  opacity: 0.04;
}

/* --- BACKGROUND GRAIN --- */
.grain-overlay {
  position: fixed;
  top: -100px;
  left: -100px;
  right: -100px;
  bottom: -100px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  animation: grain-shift 8s steps(1) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-64px, 32px); }
  50% { transform: translate(32px, -64px); }
  75% { transform: translate(-32px, 64px); }
  100% { transform: translate(0, 0); }
}

html.light .grain-overlay { opacity: 0.025; }

/* --- BUILT BY PBE REVEAL --- */
.built-by {
  overflow: hidden;
}

.built-by .pbe-name {
  background: linear-gradient(90deg, var(--accent) 50%, var(--text) 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.built-by:hover .pbe-name {
  background-position: 0% 0;
}

/* --- FOOTER PULSE --- */
.footer-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.5rem;
  vertical-align: middle;
  animation: breathe 3s ease-in-out infinite;
}

/* --- PRODUCT HOVER PREVIEW --- */
.product-hover-preview {
  position: fixed;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.product-hover-preview.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.php-hero {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-subtle), var(--bg-card));
  min-height: 100px;
}

.php-hero img {
  max-height: 48px;
  width: auto;
}

.php-hero.has-screenshot {
  padding: 0;
  min-height: 0;
}

.php-hero.has-screenshot img {
  width: 100%;
  max-height: none;
  display: block;
}

.php-bar {
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.php-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* --- CURRENTLY BUILDING PROGRESS --- */
.building-progress {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
  position: relative;
}

.building-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: build-sweep 2.5s ease-in-out infinite;
}

@keyframes build-sweep {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* --- PRODUCT DETAIL (products page) --- */
.product-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  margin-bottom: 2rem;
}

.product-detail-header {
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.product-detail-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.product-detail-info img { height: 44px; width: auto; }

.product-detail-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.product-detail-info .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-detail-body {
  padding: 2.5rem;
}

.product-detail-body p {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.feature-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.product-screenshot {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .mobile-menu { display: flex; }

  .hero { min-height: auto; padding: 7rem 1.5rem 3rem; }
  .section { padding: 3.5rem 1.5rem; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .product-problem-solution { grid-template-columns: 1fr; }
  .building-card { flex-wrap: wrap; }
  .hero-ecosystem-wrap { display: none; }
  .cursor-spotlight { display: none; }

  .ship-scroll-area { height: auto; }
  .ship-sticky { position: relative; height: auto; padding: 3.5rem 0; }
  .sf-row { flex-direction: column; }
  .sf-line { width: 2px; height: 24px; }
  .sf-line::after { width: 100%; height: 100%; }
  .sf-line::before { display: none; }
  .sf-vert { margin-left: 50%; transform: translateX(-1px); height: 24px; }
  .sf-vert::after { width: 100%; height: 100%; }
  .sf-vert::before { display: none; }
  .sf-node { opacity: 1; transform: none; }
  .sf-node.pending { opacity: 0.55; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }

  .built-by { padding: 2.5rem 1.5rem; }
  .product-detail-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

/* --- SKIP LINK --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* --- FOCUS VISIBLE --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
}

/* --- TOUCH --- */
button, a, input, textarea, select {
  touch-action: manipulation;
}

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

  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .sf-node {
    opacity: 1;
    transform: none;
  }

  .sf-node.pending {
    opacity: 0.55;
  }

  .product-card[data-enter] {
    opacity: 1;
    transform: none;
  }
}
