/* Theme - Glassline Educational */
:root {
  /* Core Colors */
  --bg-dark: #F1F3F5; /* neutral */
  --bg-dark-alt: #FFFFFF; /* surface */
  --primary: #2C5EF5; /* tertiary action */
  --primary-glow: rgba(44, 94, 245, 0.2);
  --accent: #2C5EF5;
  --success: #10b981;

  /* Text */
  --text-main: #0F1419; /* primary */
  --text-muted: #4A5568; /* secondary */
  --text-dim: #718096;
  --bg-footer: #0F1419;
  --footer-text: #A0AEC0;

  /* Glassmorphism Configuration */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-blur: 16px;
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2C5EF5 0%, #1a47d4 100%);
  --gradient-text: linear-gradient(135deg, #0F1419 0%, #4A5568 100%);

  /* Spacing & Layout */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --container-width: 1200px;

  /* Text Gradients */
  --heading-gradient: linear-gradient(to right, #0F1419, #0F1419);
}

[data-theme="dark"] {
  --bg-dark: #0F1419;
  --bg-dark-alt: #131B24;
  --text-main: #FFFFFF;
  --text-muted: #CBD5E0;
  --text-dim: #718096;
  --glass-bg: rgba(15, 20, 25, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --primary: #4A7AF7;
  --accent: #4A7AF7;
  --bg-footer: #0A0E14;
  --footer-text: #718096;
  --heading-gradient: linear-gradient(to right, #FFFFFF, #CBD5E0);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Geist', 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.55;
  overflow-x: hidden;
  max-width: 100vw;
  background-image: none;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.75rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.muted {
  color: var(--text-dim) !important;
}

.tiny {
  font-size: 0.8rem;
}

/* Layout Utilities */
.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section.alt {
  background: var(--bg-dark-alt);
  /* fallback */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  color: var(--text-main);
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 0;
  transition: all 0.3s ease;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

.brand img {
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

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

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

.nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-list a:not(.btn):hover {
  color: var(--text-main);
}

.nav-list a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-list a:not(.btn):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg-dark-alt);
  box-shadow: 0 4px 15px var(--primary-glow);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

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

.btn-primary:hover::before {
  opacity: 1;
}

/* Hero Redesign */
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
  text-decoration: none !important;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(44, 94, 245, 0.05);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.875rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.trust-dot {
  opacity: 0.4;
}

/* Hero Mockup */
.hero-mockup-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-mockup {
  width: 100%;
  max-width: 580px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.18), 0 8px 20px rgba(44,94,245,0.12);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-mockup:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 40px 100px rgba(0,0,0,0.22), 0 12px 30px rgba(44,94,245,0.18);
}

.mockup-glow {
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(ellipse at center, rgba(44,94,245,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(30px);
}

/* Hero Section */
.hero {
  padding-top: 160px;
  padding-bottom: 100px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 4rem;
}

.hero-copy {
  position: relative;
  z-index: 10;
}

.hero-title {
  position: relative;
  z-index: 2;
  font-size: clamp(2.4rem, 4.5vw, 3.75rem);
  margin-bottom: 1.25rem;
}

/* Hero Art */
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Section Eyebrow */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.bg-n8n-dots {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 140%;
  background-image: radial-gradient(var(--text-dim) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.1;
  z-index: 0;
  mask-image: radial-gradient(circle, black 40%, transparent 70%);
}

.grid-capsule {
  position: absolute;
  top: 55%;
  right: -10%;
  transform: translateY(-50%);
  width: 235%;
  max-width: none;
  height: 130%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.grid-capsule::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

/* Graph Animation Imitation */
.grid-capsule .grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

/* Hero Card Overlay */
.hero-card {
  position: absolute;
  bottom: -30px;
  right: -20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  width: 280px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 20;
  transform: translateY(0);
  transition: transform 0.4s ease;
}

.hero-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.hero-card h3 {
  font-size: 1.1rem;
  color: var(--text-main);
}

.hero-card ul {
  padding-left: 1rem;
  margin-bottom: 0;
}

.hero-card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Feature Cards with Icons */
.cards-grid {
  grid-template-columns: repeat(3, 1fr);
}

.card-icon {
  width: 44px;
  height: 44px;
  background: rgba(44, 94, 245, 0.08);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--primary);
  transition: background 0.3s ease, transform 0.3s ease;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card:hover .card-icon {
  background: rgba(44, 94, 245, 0.15);
  transform: scale(1.08);
}

.card-num {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  opacity: 0.4;
  font-family: 'Geist Mono', monospace;
}

/* Stats / Social Proof */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  border-color: rgba(44, 94, 245, 0.3);
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stats-footnote {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0;
  margin-bottom: 0;
}

/* Services Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: var(--radius-md);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

[data-theme='light'] .card,
html:not([data-theme]) .card {
  background: #FFFFFF;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  color: var(--text-main);
  margin-bottom: 1rem;
}

/* Sectors Tags */
.sector-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
}

.sector-tags li {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.sector-tags li:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.15);
}

/* Process Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  list-style: none;
  counter-reset: steps;
}

.steps li {
  position: relative;
  background: var(--glass-bg);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: transform 0.3s ease;
}

.steps li:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.steps li h3 {
  margin-top: 1rem;
  display: block;
}

.steps li::before {
  counter-increment: steps;
  content: counter(steps);
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.3;
  display: block;
  margin-bottom: -1rem;
}

/* About Section */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.checks {
  list-style: none;
  margin-top: 2rem;
}

.checks li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.checks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

.about-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
}

/* Contact */
.contact-email {
  margin-bottom: 0;
}

.contact-email-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--primary);
}

/* Footer - 3 Column */
.site-footer {
  background: var(--bg-footer);
  padding: 4rem 0 0;
  margin-top: 4rem;
}

.footer-top-rule {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  opacity: 0.4;
  margin-bottom: 0;
}

.footer-inner-3col {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding: 3rem 0 2.5rem;
  align-items: start;
}

.footer-brand-col .brand {
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  display: inline-flex;
}

.footer-brand-col .brand strong {
  color: #FFFFFF;
}

.footer-tagline {
  color: var(--footer-text, #718096);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 260px;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  color: var(--footer-text, #718096);
  transition: color 0.2s ease, transform 0.2s ease;
  display: block;
}

.footer-social a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav-col a {
  color: var(--footer-text, #718096);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-nav-col a:hover {
  color: #FFFFFF;
}

.footer-col-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}

.footer-contact-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-email {
  color: var(--footer-text, #718096);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.footer-email a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0;
}

.footer-bottom .muted {
  font-size: 0.8rem;
  color: var(--footer-text, #718096) !important;
  text-align: center;
  margin: 0;
}

/* Legacy footer classes kept for other pages */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  color: var(--text-dim);
}

.footer-nav a:hover {
  color: var(--text-main);
}

.footer-meta {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.brandline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .brand-text {
    display: none;
  }

  .hero-sub,
  .hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-eyebrow {
    text-align: center;
  }

  .section {
    padding: 4rem 0;
  }

  .hero-art {
    margin-top: 2rem;
    width: 100%;
  }

  .hero-mockup {
    max-width: 100%;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .footer-inner-3col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 90;
  }

  .nav-list.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Simple mobile menu fallback if needed */
  .nav-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
  }

  .nav-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
  }
}

/* Utilities tailored to original class names */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
  /* Ensure it stays on top when focused */
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 1rem;
  background: var(--bg-dark);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  clip: auto;
  overflow: visible;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Theme toggle icons */
.sun-icon,
.moon-icon {
  fill: currentColor;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle,
.lang-toggle {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.theme-toggle:hover,
.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--primary);
}

[data-theme="light"] .moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

html:not([data-theme]) .sun-icon {
  display: none;
}
