/* ===========================
   RESET & BASE STYLES
   =========================== */

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

:root {
  /* Colors */
  --deep-black: #000000;
  --coral-accent: #FF6B6B;
  --white: #FFFFFF;
  --gray-light: rgba(255, 255, 255, 0.1);

  /* Spacing */
  --header-height: 80px;

  /* Animations */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  cursor: default;
  background: var(--deep-black);
  color: var(--white);
}

/* ===========================
   BACKGROUND LAYERS
   =========================== */

.background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--deep-black);
}

.background-state-1 {
  opacity: 1;
}

.background-state-2 {
  opacity: 1;
}

.background-layer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===========================
   BLOB CURSOR (DISABLED)
   =========================== */

#blobCursor {
  display: none;
  /* Disabled */
}

/* ===========================
   CONTENT WRAPPER
   =========================== */

.content-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===========================
   HEADER
   =========================== */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4rem;
  /* Removed vertical padding as height is fixed */
  height: var(--header-height);
  position: relative;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  transition: transform 0.3s var(--ease-smooth);
}

.logo:hover {
  transform: scale(1.05);
}

.logo-img {
  height: 32px;
  /* Slightly smaller for more breathability */
  width: auto;
  object-fit: contain;
}

.logo-text {
  color: var(--white);
}

.logo-accent {
  color: var(--coral-accent);
}

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

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
}

.nav-link:hover {
  transform: translateY(-2px);
}

.nav-cta {
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  padding: 0.6rem 1.5rem;
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
  min-height: calc(100vh - var(--header-height));
  /* Ensure it still feels like a splash page */
  display: flex;
  align-items: center;
  padding: 0 4rem;
  position: relative;
}

.hero-content {
  max-width: 700px;
  margin-left: 10%;
}

.hero-title {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-brand {
  display: block;
  font-size: 48px;
  color: var(--coral-accent);
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.hero-tagline {
  display: block;
  color: var(--white);
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--white);
  opacity: 0.8;
  margin-bottom: 2.5rem;
}

.hero-features {
  list-style: none;
  margin-bottom: 3rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 16px;
  color: var(--white);
}

.check-icon {
  width: 20px;
  height: 20px;
  color: var(--coral-accent);
  flex-shrink: 0;
}

/* ===========================
   CTAs
   =========================== */

.hero-ctas {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.cta-primary,
.cta-secondary {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s var(--ease-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-primary {
  background: var(--white);
  color: var(--deep-black);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.cta-secondary {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  transform: translateY(-2px);
}

.github-icon,
.chrome-icon {
  width: 20px;
  height: 20px;
}

/* ===========================
   WAITLIST MODAL
   =========================== */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  background: var(--deep-black);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s var(--ease-smooth);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 32px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s var(--ease-smooth);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  opacity: 1;
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.modal-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.form-input {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  outline: none;
  transition: all 0.3s var(--ease-smooth);
  font-family: inherit;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
  border-color: var(--coral-accent);
  background: rgba(255, 255, 255, 0.1);
}

.modal-submit {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  background: var(--white);
  color: var(--deep-black);
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.waitlist-message {
  font-size: 14px;
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
  min-height: 24px;
  transition: all 0.3s var(--ease-smooth);
}

.waitlist-message.success {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.waitlist-message.error {
  color: var(--coral-accent);
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* ===========================
   SCROLL HINT
   =========================== */

.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  color: var(--white);
  opacity: 0.6;
  animation: bounce 2s infinite;
  transition: opacity 0.3s var(--ease-smooth);
}

.scroll-hint.hidden {
  opacity: 0;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* ===========================
   FEATURES SECTION
   =========================== */

.features-section {
  position: relative;
  z-index: 1;
  padding: 8rem 4rem;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 107, 107, 0.03) 50%, transparent 100%);
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.features-title {
  font-size: 56px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--white);
}

.features-subtitle {
  font-size: 20px;
  text-align: center;
  color: var(--white);
  opacity: 0.7;
  margin-bottom: 5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   FLOW DIAGRAM
   =========================== */

.flow-diagram {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 700px;
  margin: 0 auto 6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* SVG Canvas for Connections */
.flow-connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Input Nodes */
.input-nodes {
  display: flex;
  justify-content: center;
  gap: 3rem;
  width: 100%;
  z-index: 1;
}

/* Central Node */
.central-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: rgba(255, 107, 107, 0.1);
  border: 2px solid var(--coral-accent);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  animation: centralPulse 3s ease-in-out infinite;
}

.node-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.3) 0%, transparent 70%);
  border-radius: 30px;
  animation: glowPulse 2s ease-in-out infinite;
  filter: blur(20px);
}

.node-content {
  position: relative;
  z-index: 1;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.central-logo {
  height: 40px;
  width: auto;
}

.central-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  opacity: 0.7;
  white-space: nowrap;
}

@keyframes centralPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 50px rgba(255, 107, 107, 0.5);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

/* Output Nodes */
.output-nodes {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  z-index: 1;
  position: absolute;
  bottom: 0;
}

/* Flow Nodes */
.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s var(--ease-smooth);
  cursor: pointer;
}

.input-node,
.output-node {
  width: 110px;
  animation: nodeFloat 3s ease-in-out infinite;
}

.input-node:nth-child(1) { animation-delay: 0s; }
.input-node:nth-child(2) { animation-delay: 0.3s; }
.input-node:nth-child(3) { animation-delay: 0.6s; }
.input-node:nth-child(4) { animation-delay: 0.9s; }

.output-node:nth-child(1) { animation-delay: 0.2s; }
.output-node:nth-child(2) { animation-delay: 0.5s; }
.output-node:nth-child(3) { animation-delay: 0.8s; }
.output-node:nth-child(4) { animation-delay: 1.1s; }

@keyframes nodeFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.flow-node:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--coral-accent);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
}

.node-icon {
  width: 40px;
  height: 40px;
  color: var(--coral-accent);
}

.node-icon svg {
  width: 100%;
  height: 100%;
}

.node-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  text-align: center;
}

/* Connection Lines Animation */
.connection-line {
  stroke: url(#connectionGradient);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s ease-out forwards;
  filter: url(#glow);
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

.connection-particle {
  fill: var(--coral-accent);
  opacity: 0;
  animation: particleFlow 3s ease-in-out infinite;
}

@keyframes particleFlow {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===========================
   FEATURES GRID
   =========================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  transition: all 0.3s var(--ease-smooth);
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--coral-accent);
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(255, 107, 107, 0.1);
}

.feature-icon {
  width: 50px;
  height: 50px;
  color: var(--coral-accent);
  margin-bottom: 1.5rem;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--white);
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--white);
  opacity: 0.7;
}

/* ===========================
   FOOTER
   =========================== */

.footer {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
}

.footer-nav {
  display: none;
  /* Hidden on desktop */
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  width: 24px;
  height: 24px;
  color: var(--white);
  opacity: 0.6;
  transition: all 0.3s var(--ease-smooth);
}

.social-link:hover {
  opacity: 1;
  transform: scale(1.1);
}

.social-link svg {
  width: 100%;
  height: 100%;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1200px) {
  .hero-title {
    font-size: 60px;
  }

  .hero-brand {
    font-size: 42px;
  }

  .hero-content {
    margin-left: 5%;
  }
}

/* ===========================
   RESPONSIVE - FEATURES
   =========================== */

@media (max-width: 1024px) {
  .features-section {
    padding: 6rem 3rem;
  }

  .features-title {
    font-size: 48px;
  }

  .flow-diagram {
    height: 600px;
  }

  .input-nodes,
  .output-nodes {
    gap: 2rem;
  }

  .flow-node {
    width: 90px;
    padding: 1rem;
  }

  .central-node {
    width: 160px;
    height: 160px;
  }

  .node-content {
    font-size: 24px;
  }

  .central-logo {
    height: 32px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 1rem 1.5rem;
    height: auto;
  }

  .logo-img {
    height: 32px;
  }

  .nav {
    display: none;
    /* Hide header nav on mobile */
  }

  .hero {
    padding: 2rem 1.5rem;
    align-items: flex-start;
    padding-top: 4rem;
  }

  .hero-content {
    margin-left: 0;
    max-width: 100%;
  }

  .hero-title {
    font-size: 40px;
    margin-bottom: 1rem;
  }

  .hero-brand {
    font-size: 32px;
    margin-bottom: 0.3rem;
  }

  .hero-subtitle {
    font-size: 15px;
    margin-bottom: 2rem;
  }

  .hero-features {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 2rem;
  }

  .hero-feature {
    font-size: 14px;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    font-size: 15px;
  }

  .modal-content {
    padding: 2rem;
    width: 95%;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-subtitle {
    font-size: 14px;
  }

  .footer {
    position: relative;
    bottom: auto;
    right: auto;
    padding: 2rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  .footer-link {
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s var(--ease-smooth);
  }

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

  .social-links {
    gap: 1.5rem;
  }

  .scroll-hint {
    display: none;
  }

  /* Features Section - Mobile */
  .features-section {
    padding: 4rem 2rem;
  }

  .features-title {
    font-size: 36px;
  }

  .features-subtitle {
    font-size: 16px;
    margin-bottom: 3rem;
  }

  .flow-diagram {
    height: 550px;
    max-width: 100%;
  }

  .input-nodes {
    gap: 1rem;
  }

  .output-nodes {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .flow-node {
    width: 75px;
    padding: 0.8rem;
  }

  .node-icon {
    width: 30px;
    height: 30px;
  }

  .node-label {
    font-size: 11px;
  }

  .central-node {
    width: 140px;
    height: 140px;
  }

  .node-content {
    font-size: 20px;
  }

  .central-logo {
    height: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 1rem;
  }

  .logo-img {
    height: 28px;
  }

  .hero {
    padding: 1rem;
    padding-top: 2rem;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-brand {
    font-size: 26px;
  }

  .hero-subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .hero-subtitle br {
    display: none;
  }

  .hero-features {
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }

  .hero-feature {
    font-size: 13px;
    gap: 0.5rem;
  }

  .check-icon {
    width: 16px;
    height: 16px;
  }

  .cta-primary,
  .cta-secondary {
    padding: 0.8rem 1.2rem;
    font-size: 14px;
  }

  .footer {
    padding: 2rem 1rem 1rem;
  }

  .footer-link {
    font-size: 14px;
  }

  .social-links {
    gap: 1.2rem;
  }

  .social-link {
    width: 20px;
    height: 20px;
  }

  .features-section {
    padding: 4rem 1.5rem;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 2rem;
    text-align: left;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 2rem;
  }
}

/* ===========================
   PARALLAX ELEMENTS
   =========================== */

.parallax-element {
  will-change: transform;
  transition: transform 0.3s var(--ease-smooth);
}

/* ===========================
   CUSTOM SCROLLBAR
   =========================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--deep-black);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--coral-accent);
}