/* ==========================================================================
   Løype Labs — Premium Refined Minimalist Stylesheet
   ========================================================================== */

:root {
  --bg-color: #0a0a0f;
  --color-primary: #5ABFA8;
  --color-text-main: rgba(255, 255, 255, 0.9);
  --color-text-muted: rgba(255, 255, 255, 0.35);
  --color-text-soft: rgba(255, 255, 255, 0.2);
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: #ffffff;
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  background-color: var(--bg-color);
}

/* Desktop custom cursor rules */
@media (min-width: 768px) {
  *, *::before, *::after {
    cursor: none !important;
  }
}

/* Canvas Background */
#canvas-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Interactive SVG Background Grid & Circles */
#svg-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
}

/* Custom Spotlight Cursor */
.custom-cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 184, 154, 0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  transition: background 0.3s ease;
  display: none;
}

.custom-cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: background 0.3s ease;
  display: none;
}

@media (min-width: 768px) {
  .custom-cursor-glow, .custom-cursor-dot {
    display: block;
  }
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px 32px;
}

@media (min-width: 768px) {
  .navbar {
    padding: 24px 64px;
  }
  .navbar.scrolled {
    padding: 16px 64px;
  }
}

.logo {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.contact-link {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  z-index: 5;
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 0 32px;
  max-width: 1000px;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 0 64px;
  }
}

/* Mobile adjustments (center text) */
@media (max-width: 767px) {
  .hero-content {
    text-align: center;
    margin: 0 auto;
  }
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 32px;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
}

.hero-title-accent {
  color: rgba(255, 255, 255, 0.3);
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 480px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .hero-subtitle {
    margin: 0 auto;
  }
}

/* LABS Interactive Letter Nodes */
.labs-letters-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}

@media (min-width: 768px) {
  .labs-letters-container {
    display: block;
  }
}

.lab-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  z-index: 20;
}

.lab-letter {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 6.5vw, 6rem);
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.07);
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.lab-coords {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.15);
  margin-top: -2px;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.lab-word {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--letter-color);
  margin-top: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  white-space: nowrap;
}

.lab-desc {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--letter-color);
  opacity: 0;
  transform: translateY(12px);
  margin-top: 6px;
  max-width: 140px;
  line-height: 1.5;
  filter: blur(2px);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

/* Hover & Active Proximity states */
.lab-node.active .lab-letter {
  transform: scale(1.13);
  animation: pulseActive 2s infinite ease-in-out;
}

.lab-node.active .lab-coords {
  opacity: 0.7;
  transform: translateY(0);
}

.lab-node.active .lab-word {
  opacity: 1;
  transform: translateY(0);
}

.lab-node.active .lab-desc {
  opacity: 0.85;
  transform: translateY(0);
  filter: blur(0);
}

/* Fallback for hover if JS is lagging or mouse is fast */
.lab-node:hover .lab-letter {
  transform: scale(1.13);
}

.lab-node:hover .lab-coords {
  opacity: 0.7;
  transform: translateY(0);
}

.lab-node:hover .lab-word {
  opacity: 1;
  transform: translateY(0);
}

.lab-node:hover .lab-desc {
  opacity: 0.85;
  transform: translateY(0);
  filter: blur(0);
}

@keyframes pulseActive {
  0%, 100% {
    transform: scale(1.13);
  }
  50% {
    transform: scale(1.17);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.3;
  transition: opacity 0.5s ease;
  z-index: 10;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.4);
  animation: pulse 2s infinite ease-in-out;
}

.scroll-text {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

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

/* Section Common Layout */
.section {
  position: relative;
  z-index: 10;
  padding: 80px 32px;
  width: 100%;
}

@media (min-width: 768px) {
  .section {
    padding: 128px 64px;
  }
}

.section-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
}

/* Premium Scroll Reveal styling (blur-in + slide) */
.fade-in-el {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(3px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Manifesto Section */
.manifesto-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  max-w: 800px;
  margin: 0 auto;
}

.manifesto-title {
  font-family: var(--font-mono);
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.highlight-green {
  color: var(--color-primary);
  text-shadow: 0 0 15px rgba(90, 191, 168, 0.25);
  transition: text-shadow 0.4s ease;
}

.dim-red {
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.manifesto-section:hover .dim-red {
  color: rgba(232, 115, 90, 0.35);
  text-shadow: 0 0 10px rgba(232, 115, 90, 0.1);
}

.manifesto-text {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  font-weight: 300;
  line-height: 1.6;
}

/* About Section */
.about-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  max-w: 800px;
  margin: 0 auto;
}

.about-section .section-tag {
  margin-bottom: 48px;
}

.about-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-paragraph {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
  line-height: 1.5;
}

/* Products Section Sticky Scrolling Layout */
.products-section {
  max-w: 1200px;
  margin: 0 auto;
}

.products-container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

@media (min-width: 768px) {
  .products-container {
    flex-direction: row;
    align-items: flex-start;
    gap: 64px;
  }
}

.products-sidebar {
  width: 100%;
}

@media (min-width: 768px) {
  .products-sidebar {
    width: 25%;
    position: sticky;
    top: 140px;
    align-self: flex-start;
  }
}

.products-sidebar-sticky {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Vertical Scroll Timeline Tracker */
.products-timeline {
  position: relative;
  width: 2px;
  height: 280px;
  background: rgba(255, 255, 255, 0.05);
  margin-left: 4px;
  display: none;
}

@media (min-width: 768px) {
  .products-timeline {
    display: block;
  }
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-primary);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--color-primary);
  transition: top 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, box-shadow 0.4s ease;
}

.products-list-scroll {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 768px) {
  .products-list-scroll {
    width: 75%;
    gap: 120px; /* Generous gap for breathing room while scrolling */
    padding-bottom: 240px;
  }
}

/* Product Cards Styling */
.product-card {
  position: relative;
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@media (min-width: 768px) {
  .product-card {
    padding: 48px;
    opacity: 0.25; /* Dimmed state by default on desktop, JS will focus */
    transform: scale(0.97);
  }

  .product-card.active {
    opacity: 1;
    transform: scale(1.0);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 28px var(--card-glow);
  }
}

.product-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-card-tag {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--card-color, rgba(255, 255, 255, 0.3));
  transition: color 0.4s ease;
}

.product-card-name {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

.product-card-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
  line-height: 1.7;
  transition: color 0.4s ease;
}

.product-card.active .product-card-desc {
  color: rgba(255, 255, 255, 0.65);
}

.highlight-lead {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

.product-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.product-badge {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  text-transform: uppercase;
  font-weight: 300;
  transition: all 0.4s ease;
}

.product-card.active .product-badge {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
}

.product-row-dev {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 32px;
}

.product-row-dev-text {
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.2);
}

/* Contact Section */
.contact-section {
  max-w: 600px;
  margin: 0 auto;
}

.contact-section .section-tag {
  margin-bottom: 40px;
  text-align: center;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  position: relative;
  width: 100%;
}

#contact-form input,
#contact-form textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 12px 16px;
  width: 100%;
  outline: none;
  border-radius: 0;
  transition: border-color 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

#contact-form button {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.4s ease;
  align-self: flex-start;
}

@media (min-width: 768px) {
  #contact-form button {
    cursor: none; /* Custom desktop cursor */
  }
}

#contact-form button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.8);
}

#contact-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-feedback {
  font-size: 0.875rem;
  margin-top: 12px;
  font-weight: 300;
  line-height: 1.5;
}

.form-feedback.success {
  color: var(--color-primary);
}

.form-feedback.error {
  color: #E8735A;
}

/* Talk Section (CTA) */
.talk-section {
  position: relative;
  text-align: center;
  overflow: hidden;
  padding: 160px 32px;
}

.talk-glow-bg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 384px;
  height: 384px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 184, 154, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.8s ease-out;
}

.talk-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 32px;
}

.talk-title {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.talk-email-btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.5s ease;
}

.talk-email-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.8);
}

/* Footer styling */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

@media (min-width: 768px) {
  .footer {
    flex-direction: row;
    padding: 32px 64px;
  }
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.15);
}

.footer-copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.15);
}
