/* ============================================
   Aheadly Marketing Site
   Dark theme, minimal, large typography
   Inspired by terminal-industries.com
   ============================================ */

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

:root {
  --bg-primary: #060b18;
  --bg-surface: #0c1225;
  --bg-card: #111a30;
  --bg-card-hover: #162040;

  --text-primary: #f0f2f8;
  --text-secondary: #8892a8;
  --text-muted: #505a70;

  --accent: #5C6BC0;
  --accent-bright: #7986CB;
  --accent-glow: rgba(92, 107, 192, 0.15);

  --teal: #26A69A;
  --teal-glow: rgba(38, 166, 154, 0.12);

  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --nav-height: 72px;
  --container-max: 1200px;
  --container-padding: 24px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile { display: inline; }
}


/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  z-index: 200;
  transition: width 0.1s linear;
  will-change: width;
}


/* --- Reveal Animations --- */

/* Base reveal (slide up) */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.39, 0.575, 0.565, 1),
              transform 1.2s cubic-bezier(0.39, 0.575, 0.565, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s cubic-bezier(0.39, 0.575, 0.565, 1),
              transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s cubic-bezier(0.39, 0.575, 0.565, 1),
              transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Blur-in reveal (for cards) */
.reveal-blur {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  filter: blur(8px);
  transition: opacity 0.6s cubic-bezier(0.39, 0.575, 0.565, 1),
              transform 1s cubic-bezier(0.19, 1, 0.22, 1),
              filter 0.8s cubic-bezier(0.39, 0.575, 0.565, 1);
}

.reveal-blur.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Scale-in reveal (for quote) */
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.39, 0.575, 0.565, 1),
              transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* --- Word-by-word text reveal --- */
[data-split-words] .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
  transition: opacity 0.5s cubic-bezier(0.39, 0.575, 0.565, 1),
              transform 0.7s cubic-bezier(0.19, 1, 0.22, 1),
              filter 0.6s cubic-bezier(0.39, 0.575, 0.565, 1);
  margin-right: 0.25em;
}

[data-split-words] .word.em {
  color: var(--accent-bright);
}

[data-split-words].words-visible .word {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}


/* --- Horizontal line grow (step dividers) --- */
.step-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--teal), transparent);
  transition: width 1.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.step {
  position: relative;
}

.reveal-left.visible .step-line,
.reveal-right.visible .step-line {
  width: 100%;
}


/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(6, 11, 24, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 50px;
  width: auto;
}

.footer-logo-img {
  height: 22px;
  width: auto;
}

.nav-links {
  display: none;
  gap: 36px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-bright);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: none;
  padding: 10px 24px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.nav-mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-mobile-toggle.active span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-mobile-toggle.active span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-mobile-toggle { display: none; }
}


/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(6, 11, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}

.mobile-menu-link:hover {
  color: var(--text-primary);
}

.mobile-menu-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 14px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

@media (min-width: 768px) {
  .mobile-menu { display: none; }
}


/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 80px var(--container-padding) 120px;
  position: relative;
  z-index: 2;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 28px;
}

.hero-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-title-accent {
  color: var(--accent-bright);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 44px;
}

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

.hero-gradient {
  position: absolute;
  top: 10%;
  right: -20%;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

/* --- Hero Particles (floating dots with parallax) --- */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-bright);
  opacity: 0.12;
  animation: float 8s ease-in-out infinite;
}

.particle:nth-child(1) { width: 4px; height: 4px; top: 20%; left: 15%; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; top: 40%; left: 70%; animation-delay: -2s; }
.particle:nth-child(3) { width: 3px; height: 3px; top: 60%; left: 40%; animation-delay: -4s; opacity: 0.08; }
.particle:nth-child(4) { width: 5px; height: 5px; top: 30%; left: 85%; animation-delay: -6s; }
.particle:nth-child(5) { width: 4px; height: 4px; top: 75%; left: 25%; animation-delay: -3s; opacity: 0.06; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-20px) translateX(10px); }
  50% { transform: translateY(-8px) translateX(-15px); }
  75% { transform: translateY(-25px) translateX(5px); }
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}


/* --- Proof Bar --- */
.proof-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--container-padding);
}

.proof-bar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 40px 0;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.proof-number {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--teal);
  min-width: 3ch;
  text-align: center;
}

.proof-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.proof-divider {
  width: 1px;
  height: 40px;
  background: var(--border-light);
  display: none;
}

@media (min-width: 640px) {
  .proof-bar-inner { gap: 64px; }
  .proof-divider { display: block; }
}


/* --- Problem --- */
.problem {
  padding: 120px 0;
}

.problem-content {
  max-width: 720px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
}

.problem-statement {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.problem-detail {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.75;
}


/* --- Features --- */
.features {
  padding: 80px 0 120px;
}

.section-header {
  margin-bottom: 64px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--accent-bright);
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}


/* --- How It Works --- */
.how-it-works {
  padding: 80px 0 120px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 32px;
  padding: 48px 0;
  align-items: flex-start;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-bright);
  flex-shrink: 0;
  padding-top: 4px;
}

.step-content {
  max-width: 600px;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* --- Automations --- */
.automation {
  padding: 80px 0 120px;
}

.automation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .automation-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .automation-grid { grid-template-columns: repeat(4, 1fr); }
}

.automation-card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.automation-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.automation-name {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.automation-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* --- Quote --- */
.quote-section {
  padding: 100px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.quote {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.quote p {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  position: relative;
}

.quote p::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 32px;
  border-radius: 2px;
}


/* --- CTA --- */
.cta-section {
  padding: 120px 0;
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.cta-title-accent {
  color: var(--accent-bright);
}

.cta-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.65;
}

.cta-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-input {
  flex: 1;
  min-width: 220px;
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.cta-input::placeholder {
  color: var(--text-muted);
}

.cta-input:focus {
  border-color: var(--accent);
}

.cta-note {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}


/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.footer-brand {
  margin-bottom: 32px;
}

.footer-brand .nav-logo {
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-legal {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

.footer-legal a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* --- Stagger children --- */
.features-grid .feature-card:nth-child(1) { transition-delay: 0s; }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.3s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.4s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.5s; }

.automation-grid .automation-card:nth-child(2) { transition-delay: 0.06s; }
.automation-grid .automation-card:nth-child(3) { transition-delay: 0.12s; }
.automation-grid .automation-card:nth-child(4) { transition-delay: 0.18s; }
.automation-grid .automation-card:nth-child(5) { transition-delay: 0.24s; }
.automation-grid .automation-card:nth-child(6) { transition-delay: 0.30s; }
.automation-grid .automation-card:nth-child(7) { transition-delay: 0.36s; }
.automation-grid .automation-card:nth-child(8) { transition-delay: 0.42s; }


/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}


/* --- Selection --- */
::selection {
  background: var(--accent);
  color: #fff;
}
