/* ═══════════════════════════════════════════════════════════
   SYMPHONY — Subpage Stylesheet
   Dark terminal aesthetic. Mac window mockups.
   Design tokens from Symphony app (symphony.css).
═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Symphony App Tokens */
  --sym-bg-base:    #0f0f13;  /* Deepest background */
  --sym-bg-surface: #14141a;  /* Pane surface */
  --sym-bg-raised:  #1a1a1f;  /* Headers / Toolbar */
  --sym-border:     #2a2a33;  /* Borders */
  
  --sym-text:       #e0e0e8;  /* Primary text */
  --sym-text-dim:   #7a7a8a;  /* Secondary text */
  --sym-text-muted: #48484f;  /* Muted text */

  --sym-amber:      #FFC800;  /* Active/Focus/Glow */
  --sym-amber-glow: rgba(255, 200, 0, 0.12);
  --sym-amber-dim:  rgba(255, 200, 0, 0.5);
  
  --sym-red:        #ef4444;  /* Unread / Error */
  --sym-green:      #34C759;  /* Success / Explore */
  --sym-blue:       #5E9EFF;  /* Info */
  
  /* Page Layout */
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", "Monaco", "Courier New", monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  
  --section-pad: clamp(80px, 10vw, 140px);
  --container:   1200px;
  
  /* Animation */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  background: var(--sym-bg-base);
}

body {
  font-family: var(--font-sans);
  background: transparent; /* Allow ambient layer to show through */
  color: var(--sym-text-dim);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Glows */
.ambient-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: var(--sym-bg-base); /* Base dark color lives here now */
  overflow: hidden;
}

/* Base Grain/Noise Texture */
.ambient-layer::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0.15; /* Increased grain visibility */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Parallax Wrappers */
.parallax-wrap {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  /* Will be transformed by JS */
}

/* Light 1: Top Left Wash */
.ambient-light-1 {
  position: absolute;
  top: -30%;
  left: -20%;
  width: 140vw;
  height: 140vh;
  background: radial-gradient(
    circle at 50% 50%, 
    rgba(255, 120, 80, 0.4) 0%, 
    rgba(255, 60, 40, 0.25) 40%, 
    transparent 80%
  );
  filter: blur(120px);
  transform: rotate(-15deg);
  opacity: 1;
  mix-blend-mode: screen;
  animation: drift1 20s ease-in-out infinite alternate;
}

@keyframes drift1 {
  0% { transform: translate(0, 0) rotate(-15deg); }
  100% { transform: translate(40px, 40px) rotate(-10deg); }
}

/* Light 2: Bottom Right Orb (Dynamic) */
.ambient-light-2 {
  position: absolute;
  bottom: 5%;
  right: 5%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(
    circle,
    rgba(255, 180, 100, 0.25) 0%,
    rgba(255, 80, 40, 0.15) 50%,
    transparent 80%
  );
  border-radius: 50%;
  filter: blur(140px);
  mix-blend-mode: screen;
  animation: pulse2 15s ease-in-out infinite alternate;
}

@keyframes pulse2 {
  0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
  100% { transform: scale(1.1) translate(-30px, -30px); opacity: 1; }
}

/* Light 3: Diagonal Streak */
.ambient-light-3 {
  position: absolute;
  top: 40%;
  right: -30%;
  width: 160vw;
  height: 50vh;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 200, 150, 0.12) 40%,
    rgba(255, 100, 80, 0.2) 60%,
    transparent 100%
  );
  transform: rotate(-35deg);
  filter: blur(80px);
  opacity: 0.8;
  mix-blend-mode: screen;
  animation: drift3 25s ease-in-out infinite alternate;
}

@keyframes drift3 {
  0% { transform: translate(0, 0) rotate(-35deg); }
  100% { transform: translate(-50px, 20px) rotate(-38deg); }
}


/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3 {
  font-weight: 600;
  color: var(--sym-text);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 24px;
}

p {
  max-width: 60ch;
  margin-bottom: 1.5em;
  line-height: 1.7;
}

.text-highlight { color: var(--sym-text); }
.text-amber { color: var(--sym-amber); }

/* ── Layout Utilities ────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px);
}

.section {
  padding: var(--section-pad) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03); /* Subtle border */
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Navigation ──────────────────────────────────────────── */
.sym-header {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  padding: 0 clamp(20px, 5vw, 40px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none; /* Let clicks pass through empty space */
}

.sym-header > * {
  pointer-events: auto; /* Re-enable clicks on children */
}

/* Back Pill (Logo area) */
.back-pill {
  position: static; /* Reset fixed positioning since it's in flex container */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 15, 19, 0.6);
  border: 1px solid var(--sym-border);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--sym-text-dim);
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s var(--ease);
}
.back-pill:hover {
  background: rgba(255,255,255,0.08);
  color: var(--sym-text);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}
.back-pill svg {
  width: 14px; height: 14px;
  opacity: 0.6;
  transition: transform 0.2s;
}
.back-pill:hover svg {
  opacity: 1;
  transform: translateX(-2px);
}

/* Nav Links Center */
.nav-links {
  display: flex;
  gap: 6px;
  background: rgba(15, 15, 19, 0.6);
  border: 1px solid var(--sym-border);
  padding: 4px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-link {
  color: var(--sym-text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--sym-text);
  background: rgba(255,255,255,0.05);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.btn-nav-cta {
  background: var(--sym-text);
  color: var(--sym-bg-base);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px; /* Slightly squared for tech feel */
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-nav-cta:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,255,255,0.15);
}

/* Mobile Nav Adjustments */
@media (max-width: 768px) {
  .nav-links { display: none; } /* Hide center links on mobile */
}

/* ── CTA Button (General) ────────────────────────────────── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--sym-text);
  color: var(--sym-bg-base);
  font-family: var(--font-mono); /* Keep buttons mono for tech feel */
  font-weight: 600;
  padding: 16px 32px;
  font-size: 14px;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-cta:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 25px rgba(255,255,255,0.2);
}
.btn-cta--outline {
  background: transparent;
  color: var(--sym-text);
  border: 1px solid var(--sym-border);
}
.btn-cta--outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--sym-text);
  color: var(--sym-text);
  box-shadow: none;
}

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  padding-top: clamp(140px, 20vh, 200px);
  padding-bottom: 80px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  background: var(--sym-bg-raised);
  border: 1px solid var(--sym-border);
  margin-bottom: 32px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}
.hero-logo svg { width: 20px; height: 20px; fill: var(--sym-red); }

.hero-title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
  color: var(--sym-amber);
  margin-bottom: 20px;
  font-weight: 600;
  opacity: 0.9;
}

.hero-tagline {
  font-family: var(--font-sans);
  color: var(--sym-text);
  margin-bottom: 24px;
  background: linear-gradient(180deg, #fff 0%, #a5a5af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--sym-text-dim);
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Mac Window Mockup ───────────────────────────────────── */
.mockup-container {
  margin-top: 80px;
  perspective: 2000px;
  width: 100%;
}

.mockup-app {
  width: 100%;
  margin: 0 auto;
  background: var(--sym-bg-base);
  border: 1px solid var(--sym-border);
  border-radius: 12px;
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 50px 100px rgba(0,0,0,0.7); /* Deeper shadow */
  overflow: hidden;
  transform: rotateX(2deg);
  transition: transform 0.6s var(--ease);
  position: relative;
}
.mockup-app::after { /* Screen reflection */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.mockup-app:hover {
  transform: rotateX(0deg) scale(1.01);
}

/* Window Chrome */
.mockup-chrome {
  height: 42px;
  background: var(--sym-bg-base);
  border-bottom: 1px solid var(--sym-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
}

.mockup-traffic {
  display: flex;
  gap: 8px;
}
.mockup-traffic span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--sym-border);
}
.mockup-traffic span:nth-child(1) { background: #ff5f57; }
.mockup-traffic span:nth-child(2) { background: #febc2e; }
.mockup-traffic span:nth-child(3) { background: #28c840; }

.mockup-title {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--sym-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Workspace Bar */
.mockup-ws-bar {
  height: 40px;
  background: var(--sym-bg-raised);
  border-bottom: 1px solid var(--sym-border);
  display: flex;
  align-items: stretch;
  padding-left: 0;
  overflow-x: auto;
}
.mockup-ws-bar::-webkit-scrollbar { display: none; }

.mockup-tab {
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--sym-text-dim);
  border-right: 1px solid var(--sym-border);
  border-bottom: 2px solid transparent;
  background: transparent;
  white-space: nowrap;
}
.mockup-tab.active {
  background: var(--sym-bg-base);
  color: var(--sym-text);
  border-bottom-color: var(--sym-amber);
}

.mockup-tab-badge {
  background: var(--sym-red);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 0;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Kanban Board Area */
.mockup-board {
  height: 550px;
  background: var(--sym-bg-base);
  display: flex;
  padding: 16px;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
}
.mockup-board::-webkit-scrollbar { height: 6px; }
.mockup-board::-webkit-scrollbar-thumb { background: var(--sym-border); border-radius: 3px; }

/* Pane Column */
.mockup-pane {
  width: 380px;
  min-width: 300px;
  background: var(--sym-bg-base);
  border: 1px solid var(--sym-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.2s ease;
  scroll-snap-align: start;
}

.mockup-pane.active {
  border-color: var(--sym-amber);
  box-shadow: 0 0 0 1px var(--sym-amber-dim), 0 0 40px var(--sym-amber-glow); /* Stronger glow */
  z-index: 1;
}

/* Pane Header */
.mockup-pane-header {
  height: 40px;
  border-bottom: 1px solid var(--sym-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  justify-content: space-between;
  background: var(--sym-bg-raised);
}
.mockup-pane-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--sym-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mockup-pane-dots { color: var(--sym-text-muted); letter-spacing: 2px; cursor: pointer; }

/* Agent Mode Badge */
.mockup-badge {
  font-size: 10px;
  padding: 2px 6px;
  text-transform: uppercase;
  color: #000;
  font-weight: 700;
  font-family: var(--font-mono);
}
.mockup-badge.build { background: var(--sym-blue); }
.mockup-badge.plan { background: var(--sym-amber); }
.mockup-badge.explore { background: var(--sym-green); }

/* Pane Content (Chat) */
.mockup-pane-body {
  flex: 1;
  padding: 16px;
  font-family: var(--font-sans); /* Chat text is sans */
  font-size: 13px;
  color: var(--sym-text-dim);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  text-align: left; /* Ensure left alignment */
}

.msg-row { display: flex; flex-direction: column; gap: 6px; }
.msg-meta { font-size: 11px; color: var(--sym-text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.msg-bubble {
  color: var(--sym-text);
  line-height: 1.5;
}
.msg-bubble.ai { color: var(--sym-text-dim); }

.code-block {
  background: var(--sym-bg-surface);
  border: 1px solid var(--sym-border);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sym-blue);
  margin-top: 8px;
  white-space: pre;
  overflow: hidden;
  border-left: 2px solid var(--sym-border);
}

/* Pane Input */
.mockup-pane-input {
  height: 54px;
  border-top: 1px solid var(--sym-border);
  background: var(--sym-bg-base);
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--sym-text-muted);
  font-size: 13px;
  font-family: var(--font-sans);
}
.mockup-pane.active .mockup-pane-input {
  color: var(--sym-text);
}

/* ── Features Grid ───────────────────────────────────────── */
.feature-card {
  border: 1px solid var(--sym-border);
  background: rgba(26, 26, 31, 0.6); /* Transparent for background bleed */
  backdrop-filter: blur(10px);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s ease;
}
.feature-card:hover {
  border-color: var(--sym-text-dim);
  background: rgba(26, 26, 31, 0.9);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sym-bg-surface);
  border: 1px solid var(--sym-border);
  color: var(--sym-amber);
  font-size: 20px;
  margin-bottom: 8px;
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--sym-text);
}
.feature-desc {
  font-size: 15px;
  color: var(--sym-text-dim);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── How It Works (Interactive) ──────────────────────────── */
.how-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.how-step {
  padding-left: 20px;
  border-left: 2px solid var(--sym-border);
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.how-step:hover,
.how-step.active {
  border-left-color: var(--sym-amber);
  opacity: 1;
}

.how-step .feature-title {
  margin-bottom: 8px;
  font-size: 16px;
  transition: color 0.3s ease;
}

.how-step.active .feature-title {
  color: var(--sym-amber);
}

/* Mini Mockup Targets */
.step-target {
  transition: all 0.4s var(--ease);
  position: relative;
}

.step-target::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--sym-amber-glow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 10;
}

.step-target.active::after {
  opacity: 1;
}

/* Specific target adjustments */
.step-target[data-target="1"] { /* Tabs */
  border-bottom-color: transparent; 
}
.step-target[data-target="1"].active {
  border-bottom-color: var(--sym-amber);
}

.step-target[data-target="2"] { /* Header/Pane */
  border: 1px solid transparent;
}
.step-target[data-target="2"].active {
  border-color: var(--sym-amber);
}

.step-target[data-target="3"] { /* Body */
  background: transparent;
}
.step-target[data-target="3"].active {
  background: rgba(255, 200, 0, 0.03);
}

/* ── Roadmap Section ─────────────────────────────────────── */
.roadmap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.roadmap-item {
  display: flex;
  gap: 16px;
  font-size: 15px;
  align-items: flex-start;
  color: var(--sym-text-dim);
}
.roadmap-icon {
  color: var(--sym-green);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.roadmap-icon.pending { color: var(--sym-text-muted); }

/* ── Scroll Reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Mobile Adjustments ───────────────────────────────────── */
@media (max-width: 600px) {
  h1 { font-size: 36px; }
  .hero-sub { font-size: 16px; padding: 0 10px; }
  .mockup-app { border-radius: 8px; }
  .mockup-pane { width: 85vw; }
  .btn-cta { width: 100%; }
  .hero-actions { flex-direction: column; width: 100%; padding: 0 20px; }
  .feature-card { padding: 24px; }
}

