/* ==========================================================================
   SOIL.BIZ DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #0a0604;
  --bg-dark-rgb: 10, 6, 4;
  --bg-mid: #160e0a;
  --bg-surface: #eff3ed;
  
  --accent-green: #81c784;
  --accent-green-bright: #4caf50;
  --accent-green-rgb: 129, 199, 132;
  --accent-gold: #ffd54f;
  --accent-soil: #6d4c41;

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
  
  /* Glassmorphism Styles */
  --glass-bg: rgba(18, 12, 10, 0.55);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-glow: rgba(129, 199, 132, 0.1);

  /* Fonts */
  --font-headings: 'Playfair Display', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base HTML Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide default cursor on devices that support hover */
@media (hover: hover) and (pointer: fine) {
  body, a, button, input {
    cursor: none !important;
  }
}

/* ==========================================================================
   1. CUSTOM CURSOR
   ========================================================================== */
#custom-cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10000;
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

#custom-cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10001;
  transition: transform 0.1s ease;
}

/* Hover States for Cursor */
.cursor-hover #custom-cursor {
  width: 56px;
  height: 56px;
  background-color: rgba(129, 199, 132, 0.1);
  border-color: var(--accent-green);
}

.cursor-hover #custom-cursor-dot {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: #ffffff;
}

/* ==========================================================================
   2. CANVAS & OVERLAYS
   ========================================================================== */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

.vignette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(18, 12, 10, 0) 35%, rgba(10, 6, 4, 0.8) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Custom Styled Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-soil);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green);
}

/* ==========================================================================
   3. HUD LAYOUTS (HEADERS, GAUGE & METRICS)
   ========================================================================== */

/* Header */
.hud-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

.hud-header * {
  pointer-events: auto;
}

.logo-link {
  display: block;
  height: 40px;
  width: 180px;
  text-decoration: none;
}

.logo-svg {
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let parent anchor handle it */
}

.hud-nav {
  display: flex;
  gap: 30px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 10px 30px;
  border-radius: 30px;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: var(--transition-smooth);
  position: relative;
  padding: 5px 0;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-green);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-item.active, .nav-item:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(129, 199, 132, 0.4);
}

.nav-item.active::after {
  width: 16px;
}

/* Sidebar Gauge */
.hud-sidebar {
  position: fixed;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  z-index: 100;
  pointer-events: none;
}

.hud-sidebar * {
  pointer-events: auto;
}

.depth-gauge {
  position: relative;
  height: 250px;
  width: 80px;
  display: flex;
  align-items: center;
}

.depth-bar {
  position: absolute;
  left: 10px;
  height: 100%;
  width: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
}

.depth-fill {
  height: 0%;
  width: 100%;
  background: linear-gradient(to bottom, var(--accent-green), var(--accent-soil));
  box-shadow: 0 0 8px var(--accent-green);
  transition: height 0.1s ease-out;
}

.depth-markers {
  position: relative;
  height: 100%;
  width: 100%;
  margin-left: 20px;
}

.marker {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.marker.active {
  color: var(--text-primary);
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.marker::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: var(--transition-smooth);
}

.marker.active::before {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  transform: translateY(-50%) scale(1.3);
}

.status-hud {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 12px 18px;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(16px);
  width: 150px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-right: -35px; /* Offset alignment slightly for visual balance */
}

.status-label {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.status-value {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-green);
  letter-spacing: 1px;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 5px rgba(129,199,132,0.3); opacity: 0.8; }
  50% { text-shadow: 0 0 15px rgba(129,199,132,0.7); opacity: 1; }
}

/* Bottom Metrics overlay */
.hud-bottom-left {
  position: fixed;
  bottom: 40px;
  left: 50px;
  z-index: 100;
  display: flex;
  gap: 40px;
  background: rgba(10, 6, 4, 0.4);
  border-radius: 8px;
  padding: 10px 20px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.hud-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-value {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* ==========================================================================
   4. SCROLL LAYOUT & SECTIONS
   ========================================================================== */
#scroll-wrapper {
  position: relative;
  width: 100%;
  z-index: 10;
  pointer-events: none; /* Make content click-through for canvas interaction */
}

.scroll-section {
  width: 100%;
  min-height: 100vh;
  padding: 120px 8%;
  display: flex;
  align-items: center;
  position: relative;
}

.section-content {
  max-width: 550px;
  pointer-events: auto; /* Enable hover/clicks on content blocks */
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 40px 50px;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.45);
  position: relative;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.section-content:hover {
  border-color: rgba(129, 199, 132, 0.28);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.5), 0 0 35px rgba(129, 199, 132, 0.08);
}

/* Glowing card subtle effect */
.section-content::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  box-shadow: inset 0 0 20px var(--glass-glow);
  pointer-events: none;
  opacity: 0.3;
}

.section-content.right-aligned {
  margin-left: auto;
}

.section-content.center-aligned {
  margin: 0 auto;
  text-align: center;
  max-width: 650px;
}

/* Typography elements */
.subtitle {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.main-heading {
  font-family: var(--font-headings);
  font-size: 64px;
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: 25px;
}

.main-heading span {
  font-style: italic;
  font-weight: 700;
  color: var(--accent-green);
}

.section-heading {
  font-family: var(--font-headings);
  font-size: 52px;
  line-height: 1.15;
  font-weight: 400;
  margin-bottom: 25px;
}

.section-heading span {
  font-style: italic;
  font-weight: 700;
  color: var(--accent-green);
}

.body-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* UI Elements & Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  border-radius: 30px;
  transition: var(--transition-spring);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 10px;
  letter-spacing: 1.5px;
}

.btn-primary {
  background: var(--accent-green);
  color: #0c0705;
  border: 1px solid var(--accent-green);
  box-shadow: 0 4px 15px rgba(129, 199, 132, 0.3);
}

.btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 8px 25px rgba(255,255,255,0.4);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
  transform: translateY(-3px);
}

/* Stagger CTA Group */
.cta-group {
  display: flex;
  align-items: center;
  gap: 30px;
}

.scroll-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.mouse-icon {
  width: 18px;
  height: 28px;
  border: 2px solid var(--text-muted);
  border-radius: 10px;
  position: relative;
}

.mouse-icon .wheel {
  width: 4px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 2px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.8s infinite ease-in-out;
}

@keyframes scrollWheel {
  0% { top: 5px; opacity: 1; }
  50% { top: 12px; opacity: 0.3; }
  100% { top: 5px; opacity: 1; }
}

/* Grid & Layout Units inside Section 2 */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.feature-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
}

.feature-card h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-green);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Stats in Section 3 */
.stats-container {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  gap: 15px;
}

.stat-box {
  flex: 1;
  text-align: center;
  padding: 15px 5px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
}

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-sans);
  color: #ffffff;
  margin-bottom: 5px;
}

.stat-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* Contact form in CTA */
.cta-box {
  max-width: 680px;
  margin: 40px auto 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: left;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.cta-box:hover {
  border-color: rgba(129, 199, 132, 0.25);
}

.soil-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.form-row {
  display: flex;
  gap: 20px;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.form-group label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  transition: color 0.3s ease;
}

.form-group:focus-within label {
  color: var(--accent-green);
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 20px;
  border-radius: 30px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(129, 199, 132, 0.15);
}

.form-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 20px;
  border-radius: 30px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: var(--transition-smooth);
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 20px) center;
}

.form-select:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(129, 199, 132, 0.15);
}

.form-select option {
  background-color: #120f0d;
  color: #ffffff;
}

.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  border-radius: 18px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: var(--transition-smooth);
  resize: vertical;
}

.form-textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(129, 199, 132, 0.15);
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-submit {
  min-width: 165px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.form-feedback {
  padding: 14px 20px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  transition: all 0.3s ease;
  margin-top: 15px;
}

.form-feedback.success {
  background: rgba(129, 199, 132, 0.1);
  border: 1px solid rgba(129, 199, 132, 0.2);
  color: #a5d6a7;
}

.form-feedback.error {
  background: rgba(239, 83, 80, 0.1);
  border: 1px solid rgba(239, 83, 80, 0.2);
  color: #ef9a9a;
}

.hidden {
  display: none !important;
}

/* Site Footer */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
  pointer-events: auto;
}

/* ==========================================================================
   5. RESPONSIVENESS
   ========================================================================= */
@media (max-width: 992px) {
  .hud-header {
    padding: 20px 30px;
  }
  .hud-nav {
    display: none; /* Hide navigation links, fallback to gauge clicks */
  }
  .hud-sidebar {
    right: 25px;
  }
  .status-hud {
    display: none;
  }
  .hud-bottom-left {
    left: 20px;
    bottom: 20px;
    gap: 20px;
  }
  .scroll-section {
    padding: 120px 25px;
  }
  .section-content {
    max-width: 100%;
    padding: 30px;
  }
  .main-heading {
    font-size: 42px;
  }
  .section-heading {
    font-size: 38px;
  }
}

@media (max-width: 576px) {
  .cta-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .stats-container {
    flex-direction: column;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .soil-form {
    flex-direction: column;
  }
  .hud-bottom-left {
    display: none; /* Hide metric widget on mobile to keep space clean */
  }
}
