/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  /* Colors */
  --primary: #0D9488;
  --primary-hover: #0F766E;
  --navy: #0F172A;
  --navy-light: #1E293B;
  --white: #F8FAFC;
  --amber: #F59E0B;
  --amber-hover: #D97706;
  --gray-light: #E2E8F0;
  --gray-medium: #94A3B8;
  --gray-dark: #475569;
  
  /* Glitch Colors */
  --neon-green: #39FF14;
  --neon-magenta: #FF00FF;
  --black: #000000;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --container-padding: 1.5rem;
  --section-padding: 5rem 0;
  --border-radius: 8px;
  --border-radius-lg: 16px;
  
  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: linear-gradient(-45deg, #F8FAFC, #e6eff7, #ffffff, #f0fdfa);
  background-size: 400% 400%;
  line-height: 1.6;
  overflow-x: hidden;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

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

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

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

/* ==========================================================================
   Components
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-family: var(--font-heading);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--amber);
  color: var(--navy);
}
.btn-primary:hover {
  background-color: var(--amber-hover);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-secondary:hover {
  background-color: var(--white);
  color: var(--navy);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-pulse {
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--navy);
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--navy);
  position: relative;
  transition: var(--transition);
}
.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--navy);
  left: 0;
  transition: var(--transition);
}
.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

/* Scroll Animation Classes */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Animation */
.floating {
  animation: float-anim 6s ease-in-out infinite;
}
@keyframes float-anim {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Marquee */
.marquee-container {
  width: 100%;
  overflow: hidden;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 0;
  display: flex;
  white-space: nowrap;
  font-family: var(--font-heading);
  letter-spacing: 3px;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.marquee-content {
  display: inline-block;
  animation: marquee 25s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Page Specific Sections
   ========================================================================== */
/* Hero Section */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--primary) 100%);
  color: var(--white);
  text-align: center;
  padding-top: 80px; /* Offset for header */
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  max-width: 800px;
  margin: 0 auto 2.5rem;
  opacity: 0.9;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Trust Indicators */
.trust-bar {
  background-color: var(--white);
  padding: 2rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  position: relative;
  z-index: 10;
  margin-top: -2rem;
  border-radius: var(--border-radius);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.trust-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.trust-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
}

/* General Sections */
.section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--navy);
}
.section-header p {
  font-size: 1.125rem;
  color: var(--gray-dark);
}

.section-light { background-color: var(--white); }
.section-gray { background-color: var(--gray-light); }
.section-navy { background-color: var(--navy); color: var(--white); }
.section-amber { background-color: var(--amber); color: var(--navy); }

/* Two Column Layout */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Warning Signs Cards */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card p {
  flex: 1;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background-color: rgba(13, 148, 136, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

/* How to Help Steps */
.steps-row {
  display: flex;
  gap: 2rem;
}

.step-card {
  flex: 1;
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  text-align: center;
}
.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 0 0 6px var(--gray-light);
}

/* Chat Section */
.chat-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: 500px;
}
.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--gray-light);
}
.chat-bubble {
  max-width: 80%;
  padding: 1rem;
  border-radius: 16px;
  line-height: 1.5;
}
.chat-bubble.user {
  background-color: var(--amber);
  color: var(--navy);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-bubble.lomel {
  background-color: var(--primary);
  color: var(--white);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-input-area {
  display: flex;
  padding: 1rem;
  background: var(--white);
  border-top: 1px solid var(--gray-light);
}
.chat-input-area input {
  flex: 1;
  padding: 1rem;
  border: 1px solid var(--gray-medium);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
}
.chat-input-area button {
  margin-left: 1rem;
  min-width: 100px;
}
.chat-footer {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-medium);
  background: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

/* Placeholder Images */
.placeholder-img {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--gray-medium), var(--primary));
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  text-align: center;
  padding: 1rem;
}

/* Testimonials Carousel */
.carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.testimonial-card {
  min-width: 100%;
  padding: 2rem;
  text-align: center;
}
.testimonial-card blockquote {
  font-size: 1.5rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--navy);
}
.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.carousel-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gray-medium);
  cursor: pointer;
  border: none;
}
.carousel-dot.active {
  background: var(--primary);
}

/* FAQ Accordion */
.faq-grid {
  max-width: 800px;
  margin: 0 auto;
}
.accordion-item {
  border-bottom: 1px solid var(--gray-light);
}
.accordion-btn {
  width: 100%;
  text-align: left;
  padding: 1.5rem 0;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-icon {
  transition: transform 0.3s;
}
.accordion-btn[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.accordion-content-inner {
  padding-bottom: 1.5rem;
  color: var(--gray-dark);
}

/* Footer & Forms */
footer {
  background-color: var(--navy-light);
  color: var(--gray-light);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-grid h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
}
.footer-links {
  list-style: none;
}
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: var(--gray-medium); }
.footer-links a:hover { color: var(--white); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-control {
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--gray-dark);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
}
.form-control:focus {
  border-color: var(--primary);
}
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1; visibility: visible;
}

/* Lomel Trigger */
.lomel-btn {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gray-medium);
  background: transparent;
  color: var(--gray-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 14px;
  opacity: 0.3;
  cursor: pointer;
  z-index: 9999;
  transition: opacity 0.3s;
}
.lomel-btn:hover {
  opacity: 1;
}

/* Additional Page Utilities */
.page-header {
  background-color: var(--navy);
  color: var(--white);
  padding: 120px 0 60px;
  text-align: center;
}

/* ==========================================================================
   Lomel Mode Extreme Glitch Effects
   ========================================================================== */
.extreme-shake {
  animation: extremeShake 0.15s cubic-bezier(.36,.07,.19,.97) infinite !important;
}

@keyframes extremeShake {
  0% { transform: translate(2px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.extreme-invert {
  animation: aggressiveInvert 0.5s infinite alternate !important;
}

@keyframes aggressiveInvert {
  0% { filter: invert(0%) hue-rotate(0deg); }
  30% { filter: invert(100%) hue-rotate(180deg); }
  60% { filter: invert(0%) hue-rotate(0deg); }
  100% { filter: invert(100%) hue-rotate(90deg) contrast(200%); }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .grid-2-col, .cards-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 80px);
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
  }
  .nav-links.active {
    right: 0;
  }
  .mobile-menu-btn {
    display: block;
  }
  .grid-2-col, .cards-grid-3, .trust-grid, .steps-row {
    grid-template-columns: 1fr;
  }
  .steps-row {
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }
}
