/* =========================================
   1. VARIABLES & RESET (THEMING)
   ========================================= */
:root {
  /* LIGHT MODE (Default) */
  --bg-body: #F9FAFB;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F3F4F6;

  --text-main: #111827;
  --text-muted: #4B5563;
  --text-inverse: #FFFFFF;

  --primary: #1F9D55;
  --primary-hover: #166534;
  --primary-glow: rgba(31, 157, 85, 0.2);

  --accent: #2563EB;

  --border: #E5E7EB;
  --border-hover: #1F9D55;

  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Shared */
  --header-height: 80px;
  --container-width: 1280px;
  --radius: 12px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s ease;
}

/* DARK MODE OVERRIDES */
[data-theme="dark"] {
  --bg-body: #0B0F19;
  --bg-card: #151A25;
  --bg-card-hover: #1E2532;

  --text-main: #FFFFFF;
  --text-muted: #9CA3AF;
  --text-inverse: #0B0F19;

  --primary: #00E676;
  /* Neon Green */
  --primary-hover: #00C853;
  --primary-glow: rgba(0, 230, 118, 0.4);

  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(0, 230, 118, 0.5);

  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(0, 230, 118, 0.15);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  padding-top: var(--header-height);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.text-primary {
  color: var(--primary);
}

[data-theme="dark"] .text-primary {
  text-shadow: 0 0 15px var(--primary-glow);
}

.text-center {
  text-align: center;
}

.text-white {
  color: white !important;
}

/* Force white for dark sections */

/* =========================================
   3. COMPONENTS
   ========================================= */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  /* Always white text on green button in light mode */
}

[data-theme="dark"] .btn-primary {
  color: var(--bg-body);
  /* Dark text on neon button */
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 0 25px var(--primary-glow);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-white {
  border-color: white;
  color: white;
}

.btn-outline-white:hover {
  background: white;
  color: black;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-hover);
}

/* Icons within cards */
.icon-box {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background-color: rgba(31, 157, 85, 0.1);
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .icon-box {
  background-color: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

/* Placeholders */
.placeholder-img {
  background: #E5E7EB;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #9CA3AF;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  font-weight: 500;
}

[data-theme="dark"] .placeholder-img {
  background: #1A1F2E;
  color: #9CA3AF;
  border-color: #374151;
}

.hero-placeholder {
  height: 100%;
  border: none;
}

.section-placeholder {
  height: 400px;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* =========================================
   4. LAYOUT
   ========================================= */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.section {
  padding: 5rem 0;
}

.bg-light {
  background-color: var(--bg-card-hover);
}

.bg-secondary {
  background-color: #111;
  color: white;
}

/* Always dark sections */
.bg-primary {
  background-color: var(--primary);
  color: white;
}

/* =========================================
   5. NAVBAR
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

[data-theme="dark"] .navbar {
  background: rgba(11, 15, 25, 0.8);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.theme-toggle:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-body);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.5rem;
  }
}

/* =========================================
   6. HERO & FOOTER
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  margin-top: calc(-1 * var(--header-height));
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
}

.hero h1 {
  color: white;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
}

.footer {
  background-color: #111;
  color: #9CA3AF;
  padding: 5rem 0 2rem;
}

.footer h4 {
  color: white;
  margin-bottom: 1.5rem;
}

.footer a {
  color: #9CA3AF;
  display: block;
  margin-bottom: 0.5rem;
}

.footer a:hover {
  color: var(--primary);
}

/* Animation Utility */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.6s ease-out;
}


.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   7. PROCESS ARROWS
   ========================================= */
.process-arrow-container {
  display: flex;
  width: 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.process-step {
  flex: 1;
  position: relative;
  background: var(--primary);
  color: white;
  padding: 2rem 1rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  clip-path: polygon(calc(100% - 30px) 0%, 100% 50%, calc(100% - 30px) 100%,
      0% 100%, 30px 50%, 0% 0%);
  margin-left: -30px;
  z-index: 1;
  transition: transform 0.3s ease;
}

.process-step:hover {
  transform: scale(1.02);
  z-index: 10 !important;
  /* Bring to front on hover */
}

/* First Step: Flat Left */
.process-step:first-child {
  margin-left: 0;
  padding-left: 1.5rem;
  clip-path: polygon(0 0,
      calc(100% - 30px) 0,
      100% 50%,
      calc(100% - 30px) 100%,
      0 100%);
  z-index: 4;
}

/* Last Step: Flat Right (or just end arrow?) 
   Let's keep the arrow shape for flow, or make it flat. 
   Flat looks better for "Finish". */
.process-step:last-child {
  padding-right: 1.5rem;
  clip-path: polygon(0 0,
      100% 0,
      100% 100%,
      0 100%,
      30px 50%);
  z-index: 1;
}

/* Middle Steps z-index */
.process-step:nth-child(2) {
  z-index: 3;
}

.process-step:nth-child(3) {
  z-index: 2;
}

/* Alternating Colors for contrast */
.process-step:nth-child(even) {
  background-color: #166534;
  /* Darker Green */
}

.process-step:nth-child(odd) {
  background-color: var(--primary);
  /* Standard Green */
}

/* Content Styling */
.process-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.process-step h4 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.process-step p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 992px) {
  .process-step {
    padding: 1.5rem 0.5rem 1.5rem 2rem;
  }
}

@media (max-width: 768px) {
  .process-arrow-container {
    flex-direction: column;
    filter: none;
    gap: 1rem;
  }

  .process-step {
    width: 100%;
    margin-left: 0;
    clip-path: none !important;
    /* Remove arrow shape on mobile */
    border-radius: var(--radius);
    padding: 2rem;
  }

  .process-step:hover {
    transform: none;
  }
}

/* =========================================
   8. UTILITIES & FIXES
   ========================================= */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-sm {
  gap: 1rem;
}

.gap-md {
  gap: 1.5rem;
}

.gap-lg {
  gap: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

/* Override for footer social icons to be horizontal */
.footer .flex a,
.footer .flex-col a {
  display: inline-block;
  margin-bottom: 0;
}