/* Premium Hero Animation Styles */
.hero-visual-complex {
  perspective: 1200px;
}

.ai-writer-anim {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 50px rgba(234, 88, 12, 0.15));
}

.floating-node {
  animation: float-node 6s ease-in-out infinite;
}

@keyframes float-node {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -15px); }
}

.pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; filter: blur(20px); }
  50% { opacity: 0.8; filter: blur(35px); }
}

.data-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: dash 5s linear infinite;
}

@keyframes dash {
  to { stroke-dashoffset: 0; }
}

.typing-rect {
  transform-origin: left;
  animation: typing-grow 2s ease-in-out infinite;
}

@keyframes typing-grow {
  0% { transform: scaleX(0); opacity: 0; }
  20% { opacity: 1; }
  80% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

.glass-panel-3d {
  transform: rotateX(10deg) rotateY(-20deg);
  transition: transform 0.5s ease;
}

.hero-visual-complex:hover .glass-panel-3d {
  transform: rotateX(5deg) rotateY(-10deg);
}

/* High-End 3D Wireframe Brain Styles */
.brain-3d-scene {
  transform-origin: center;
  animation: brain-rotate-3d 30s linear infinite;
}

@keyframes brain-rotate-3d {
  0% { transform: rotateY(0deg) rotateX(10deg); }
  100% { transform: rotateY(360deg) rotateX(10deg); }
}

.neural-node {
  animation: synapse-glow 2s ease-in-out infinite;
}

@keyframes synapse-glow {
  0%, 100% { opacity: 0.3; r: 1.5; }
  50% { opacity: 1; r: 3; filter: blur(2px); }
}

.nerve-line {
  stroke-dasharray: 4, 12;
  animation: nerve-pulse 3s linear infinite;
}

@keyframes nerve-pulse {
  from { stroke-dashoffset: 16; }
  to { stroke-dashoffset: 0; }
}

.brain-shell {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 0.5;
  opacity: 0.4;
}

.brain-lobe-accent {
  stroke: #60a5fa;
  stroke-width: 1.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
}

.brain-core-singularity {
  animation: core-breathe 4s ease-in-out infinite;
}

@keyframes core-breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Section 02 Background Design */
#introduction {
  background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

#introduction .bg-deco {
  background: 
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(234, 88, 12, 0.03) 0%, transparent 40%);
  opacity: 1;
}

/* Subtle Grid Pattern for Section 02 */
#introduction::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
}

/* Floating Decorative Elements */
.bg-blob {
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--brand-primary);
  filter: blur(100px);
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

.blob-1 { top: -100px; left: -100px; }
.blob-2 { bottom: -100px; right: -100px; background: #3b82f6; }

/* Layout Adjustments */
.mission-container {
  gap: 64px; /* Balanced gap: not too far, not too close */
}

.mission-text-block {
  padding-right: 20px; /* Slight breathing room */
}

/* Thinking AI Agent Styles (Section 02) */
.ai-processing-visual {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.core-synthesis {
  position: relative;
  width: 160px;
  height: 160px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thinking-agent {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-brain-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: brain-breathe 3s ease-in-out infinite;
}

@keyframes brain-breathe {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.6; }
}

.thought-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(234, 88, 12, 0.4);
  border-radius: 50%;
  animation: thought-wave 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes thought-wave {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.neural-activity {
  stroke-dasharray: 2, 4;
  animation: neural-flow 1s linear infinite;
}

@keyframes neural-flow {
  from { stroke-dashoffset: 6; }
  to { stroke-dashoffset: 0; }
}

.agent-eye-processing {
  animation: eye-blink 4s steps(1) infinite;
}

@keyframes eye-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

/* Synthesis Path Particles */
.particle {
  fill: #ea580c;
  filter: drop-shadow(0 0 4px #ea580c);
}

.mobile-only-paths, .mobile-particles {
  display: none;
}

.desktop-only-paths, .desktop-particles {
  display: block;
}

/* Data Input Nodes Styling */
.data-input-node {
  position: absolute;
  width: 100px;
  z-index: 5;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Apply shadow to the whole node container to avoid clip-path issues */
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
}

/* Positioning input nodes around the core */
.node-1 { top: 10%; left: 15%; }
.node-2 { bottom: 10%; left: 15%; }
.node-3 { top: 30%; left: 2%; }
.node-4 { bottom: 30%; left: 2%; }

.node-icon-hex {
  width: 48px; /* Slightly larger for better visibility */
  height: 48px;
  background: white;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  transition: all 0.3s ease;
}

/* Internal refined border that won't be clipped */
.node-icon-hex::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(234, 88, 12, 0.05);
  border: 1.5px solid rgba(234, 88, 12, 0.2);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  transition: all 0.3s ease;
}

.data-input-node:hover {
  transform: translateY(-5px);
  filter: drop-shadow(0 8px 20px rgba(234, 88, 12, 0.2));
}

.data-input-node:hover .node-icon-hex {
  background: #ea580c;
}

.data-input-node:hover .node-icon-hex::before {
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
}

.node-icon-hex svg {
  width: 22px;
  height: 22px;
  stroke: #ea580c;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.data-input-node:hover .node-icon-hex svg {
  stroke: white;
}

.node-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-top: 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.data-input-node:hover .node-label {
  color: #ea580c;
}

/* Synthesis Path Particles */
.particle {
  fill: #ea580c;
  filter: drop-shadow(0 0 4px #ea580c);
}

/* Output Article Preview */
.output-article-preview {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%) rotateY(-15deg);
  width: 220px;
  height: 280px;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  z-index: 5;
}

.preview-line {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  margin-bottom: 12px;
  width: 100%;
  transform-origin: left;
  animation: line-appear 2s infinite;
}

@keyframes line-appear {
  0% { transform: scaleX(0); opacity: 0; }
  20% { transform: scaleX(1); opacity: 1; }
  80% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

.preview-title { height: 10px; background: #e2e8f0; width: 60%; margin-bottom: 20px; }

.synthesis-beam {
  stroke-dasharray: 10, 20;
  animation: beam-flow 1.5s linear infinite;
}

@keyframes beam-flow {
  from { stroke-dashoffset: 30; }
  to { stroke-dashoffset: 0; }
}

/* 03 Distribution Section Styles */
.distribution-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

.dist-content {
  flex: 1;
}

.section-tag {
  color: #ea580c;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.dist-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 24px;
  color: #0f172a;
}

.text-gradient {
  background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dist-description {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 40px;
  max-width: 500px;
}

.feature-feature-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.f-item {
  display: flex;
  gap: 20px;
}

.f-icon {
  width: 48px;
  height: 48px;
  background: #fff7ed;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ea580c;
  flex-shrink: 0;
}

.f-icon svg {
  width: 24px;
  height: 24px;
}

.f-text h4 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.f-text p {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
}

.coming-soon {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.75rem;
  border-radius: 4px;
  margin-bottom: 4px;
  font-weight: 600;
}

/* Visual Mockup Styles */
.dist-visual {
  flex: 1;
  position: relative;
}

.mockup-container {
  background: #f8fafc;
  border-radius: 24px;
  padding: 30px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.08);
  position: relative;
  z-index: 1;
}

.format-switcher {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  width: fit-content;
}

.switch-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #64748b;
  user-select: none;
}

/* CSS-only Switch Logic */
#tab-md:checked ~ .format-switcher .btn-md,
#tab-txt:checked ~ .format-switcher .btn-txt {
  background: white;
  color: #ea580c;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.content-md, .content-txt {
  display: none;
}

#tab-md:checked ~ .preview-window .content-md,
#tab-txt:checked ~ .preview-window .content-txt {
  display: block;
}

.preview-window {
  background: #1e293b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  min-height: 240px;
}

.preview-header {
  background: #334155;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}

.copy-action {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 600;
  animation: fade-in-out 3s infinite;
}

@keyframes fade-in-out {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.preview-body {
  padding: 24px;
}

.code-snippet {
  margin: 0;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.token-h1 { color: #fb923c; font-weight: bold; }
.token-h2 { color: #fdba74; font-weight: bold; }
.token-p { color: #cbd5e1; }
.token-li { color: #94a3b8; }

.text-preview {
  color: #cbd5e1;
  white-space: pre-line;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Responsive Mobile & Tablet Optimizations */

/* Tablet Specific (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-inner {
    display: grid !important;
    grid-template-columns: 1.2fr 0.8fr !important;
    gap: 32px !important;
    text-align: left !important;
    padding: 60px 24px !important;
    align-items: center;
  }

  .hero-copy {
    text-align: left !important;
  }

  .hero-copy h1 {
    font-size: 2.8rem !important;
  }

  .hero-copy p {
    margin-left: 0 !important;
    max-width: 100% !important;
  }

  .cta {
    justify-content: flex-start !important;
    margin-left: 0 !important;
  }

  .hero-visual-complex {
    height: 400px !important;
    margin-top: 0 !important;
  }

  .mission-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    text-align: left !important;
    align-items: center;
  }

  .mission-text-block {
    text-align: left !important;
    padding-right: 0 !important;
  }

  .ai-processing-visual {
    height: 450px !important;
    margin: 0 !important;
  }

  /* Keep desktop node positions for tablet but scale them */
  .data-input-node {
    transform: scale(0.9);
  }

  .desktop-only-paths, .desktop-particles {
    display: block !important;
  }
  .mobile-only-paths, .mobile-particles {
    display: none !important;
  }

  .distribution-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    gap: 40px !important;
  }

  .dist-content {
    flex: 1;
    text-align: left !important;
  }

  .dist-title {
    font-size: 2.2rem !important;
  }

  .dist-description {
    margin-left: 0 !important;
  }

  .feature-feature-list {
    margin-left: 0 !important;
  }

  .dist-visual {
    flex: 1;
    max-width: 100%;
  }

  .mockup-container {
    padding: 20px !important;
  }
}

/* Common Mobile adjustments (Up to 767px) */
@media (max-width: 767px) {
  .section {
    padding: 60px 0;
  }

  /* 01 Hero Section Mobile */
  .hero-inner {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding-top: 40px;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-visual-complex {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  /* 02 Introduction/AI Processing Mobile */
  .mission-container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .mission-text-block {
    padding-right: 0;
  }

  .ai-processing-visual {
    height: 600px;
    width: 100%;
    margin: 40px 0;
    transform: none; 
    display: block; /* Use block with absolute kids */
    position: relative;
    padding-top: 0;
  }

  /* SVG Logic Toggles */
  .desktop-only-paths, .desktop-particles {
    display: none;
  }
  .mobile-only-paths, .mobile-particles {
    display: block;
  }

  /* All 4 nodes at the top in a 2x2 grid */
  .data-input-node {
    width: 80px;
    position: absolute;
    transform: none;
    z-index: 5;
  }

  /* Coordinate alignment with SVG (viewBox 500x600) */
  /* Center is 250px. Using calc(50% +/- offset) ensures perfect alignment with SVG center */
  .node-1 { top: 10px; left: calc(50% - 150px); transform: translateX(-50%); } 
  .node-2 { top: 10px; left: calc(50% + 150px); transform: translateX(-50%); } 
  .node-3 { top: 110px; left: calc(50% - 150px); transform: translateX(-50%); } 
  .node-4 { top: 110px; left: calc(50% + 150px); transform: translateX(-50%); } 

  .node-label {
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .core-synthesis {
    position: absolute;
    top: 250px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    margin-top: 0;
  }

  .output-article-preview {
    position: absolute;
    top: 450px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 260px;
    margin: 0;
    z-index: 5;
  }
  
  .synthesis-beam-v {
    stroke-dasharray: 8, 16;
    animation: beam-flow-v 1s linear infinite;
  }

  @keyframes beam-flow-v {
    from { stroke-dashoffset: 24; }
    to { stroke-dashoffset: 0; }
  }

  /* 03 Distribution Section Mobile */
  .distribution-layout {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .dist-title {
    font-size: 2rem;
  }

  .dist-description {
    font-size: 1rem;
    margin: 0 auto 30px;
  }

  .feature-feature-list {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
    gap: 24px;
  }

  .mockup-container {
    padding: 20px;
  }

  .preview-window {
    min-height: 200px;
  }
}

@media (max-width: 576px) {
  .dist-title {
    font-size: 1.8rem;
  }

  .ai-processing-visual {
    height: 520px;
    margin: 20px 0 120px;
  }

  /* Keep the 2x2 grid tight on smaller screens */
  .node-1 { top: 0; left: calc(50% - 120px); transform: translateX(-50%); }
  .node-2 { top: 0; left: calc(50% + 120px); transform: translateX(-50%); }
  .node-3 { top: 90px; left: calc(50% - 120px); transform: translateX(-50%); }
  .node-4 { top: 90px; left: calc(50% + 120px); transform: translateX(-50%); }

  .core-synthesis {
    top: 220px;
    transform: translate(-50%, -50%) scale(0.8);
  }

  .output-article-preview {
    top: 380px;
    display: block; /* Ensure it's shown as requested */
  }
}



