/* CSS Custom Properties for Theme System */
:root {
  /* Light Theme Colors (using your palette) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f0f2f5;
  --bg-hero-gradient: radial-gradient(
    circle at right center,
    rgba(2, 91, 175, 0.15),
    transparent 60%
  );

  /* Text Colors */
  --text-primary: #03115a;
  --text-secondary: #444444;
  --text-muted: #666666;
  --text-invert: #ffffff;

  /* Brand Colors from your palette */
  --brand-primary: #025baf; /* Deep blue */
  --brand-secondary: #3c108b; /* Purple */
  --brand-accent: #0e9ce4; /* Cyan */
  --brand-pink: #a0107f; /* Magenta */
  --brand-dark-blue: #023c9f; /* Dark blue */
  --brand-purple-dark: #6039a6; /* Deep purple */
  --brand-magenta: #de128d; /* Bright magenta */
  --brand-teal: #026398; /* Teal */
  --brand-navy: #003c78; /* Navy */

  /* Foundation Overrides */
  --foundation-primary: #025baf;
  --foundation-secondary: #3c108b;
  --foundation-success: #2ecc71;
  --foundation-warning: #f1c40f;
  --foundation-alert: #e74c3c;

  /* UI Elements */
  --panel-bg: #ffffff;
  --panel-border: rgba(0, 0, 0, 0.05);
  --panel-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  --panel-hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  /* Buttons */
  --btn-primary-bg: #025baf;
  --btn-primary-hover: #023c9f;
  --btn-primary-border: #025baf;
  --btn-secondary-bg: #3c108b;
  --btn-secondary-hover: #6039a6;
  --btn-secondary-border: #3c108b;
  --btn-text: #ffffff;

  /* Theme Switch */
  --theme-switch-bg: rgba(255, 255, 255, 0.9);
  --theme-switch-border: rgba(0, 0, 0, 0.1);
  --theme-switch-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Dark Theme Colors */
[data-theme="dark"] {
  /* Dark Theme Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-hero-gradient: radial-gradient(
    circle at right center,
    rgba(14, 156, 228, 0.15),
    transparent 60%
  );

  /* Text Colors */
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-invert: #0f172a;

  /* Brand Colors (adjusted for dark theme) */
  --brand-primary: #38bdf8; /* Lighter cyan for better visibility */
  --brand-secondary: #a78bfa; /* Lighter purple */
  --brand-accent: #06b6d4; /* Teal */
  --brand-pink: #f472b6; /* Lighter pink */
  --brand-dark-blue: #60a5fa; /* Lighter blue */
  --brand-purple-dark: #c084fc; /* Lighter deep purple */
  --brand-magenta: #fb7185; /* Lighter magenta */
  --brand-teal: #22d3ee; /* Lighter teal */
  --brand-navy: #93c5fd; /* Lighter navy */

  /* Foundation Overrides */
  --foundation-primary: #38bdf8;
  --foundation-secondary: #a78bfa;

  /* UI Elements */
  --panel-bg: #111827;
  --panel-border: rgba(255, 255, 255, 0.1);
  --panel-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  --panel-hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);

  /* Buttons */
  --btn-primary-bg: #38bdf8;
  --btn-primary-hover: #06b6d4;
  --btn-primary-border: #38bdf8;
  --btn-secondary-bg: #a78bfa;
  --btn-secondary-hover: #c084fc;
  --btn-secondary-border: #a78bfa;
  --btn-text: #0f172a;

  /* Theme Switch */
  --theme-switch-bg: rgba(17, 24, 39, 0.9);
  --theme-switch-border: rgba(255, 255, 255, 0.2);
  --theme-switch-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Global typography with smooth transitions */
* {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

/* Section padding */
.section-padding {
  padding: 4rem 0;
}

/* Ensure content never touches screen edges */
.grid-container {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* HERO Full-Width Background Wrapper */
.hero-wrapper {
  background: var(--bg-hero-gradient);
  width: 100%;
  padding: 5rem 2rem;
}

.hero.grid-container.fluid {
  padding: 0;
  max-width: 1200px !important;
  margin: 0 auto;
}

.hero-text h1 {
  font-weight: 800;
  line-height: 1.1;
}

.hero-text .brand {
  color: var(--brand-primary);
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-accent)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-visual img {
  max-width: 80%;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

.hero-capabilities {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 1.5rem 0 2.5rem;
  color: var(--text-secondary);
}

/* PANEL (Services, Who, Approach) */
.panel {
  padding: 1rem 1.2rem;
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: var(--panel-shadow);
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: 1.5rem;
}

.panel.accent-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 4px;
  background-color: var(--brand-primary);
  border-radius: 2px 2px 0 0;
}

.panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--panel-hover-shadow);
}

.panel h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.panel p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 36rem;
}

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

/* FOUNDERS */
.founder-card {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--panel-shadow);
  padding: 1.5rem;
  transition: all 0.3s ease;
  height: 100%;
}

.founder-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--panel-hover-shadow);
}

.founder-card h4 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.founder-role {
  font-size: 0.95rem;
  color: var(--brand-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.founder-card p {
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
}

.founders .grid-x > .cell {
  margin-top: 1.5rem;
}

/* Foundation Button Overrides */
.button {
  background-color: var(--btn-primary-bg);
  border-color: var(--btn-primary-border);
  color: var(--btn-text);
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.button:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.button.secondary {
  background-color: var(--btn-secondary-bg);
  border-color: var(--btn-secondary-border);
}

.button.secondary:hover {
  background-color: var(--btn-secondary-hover);
}

.button.hollow {
  background-color: transparent;
  border: 2px solid var(--btn-primary-bg);
  color: var(--btn-primary-bg);
}

.button.hollow:hover {
  background-color: var(--btn-primary-bg);
  color: var(--btn-text);
}

/* Button Group Spacing */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* TOOLS Section */
.tools .cell h3 {
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.tools .cell h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--brand-accent);
  border-radius: 2px;
}

.tools .cell p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Language Switch Component */
.language-switch {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 1000;
}

/* Theme Switch Component */
.theme-switch {
  position: fixed;
  top: 2rem;
  left: 9rem;
  z-index: 1000;
}

/* Shared styles for language and theme toggle buttons */
.language-toggle,
.theme-toggle {
  background-color: var(--theme-switch-bg);
  border: 1px solid var(--theme-switch-border);
  color: var(--text-primary);
  padding: 0 1.5rem;
  height: 3rem;
  line-height: 1;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: var(--theme-switch-shadow);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
  box-sizing: border-box;
}

.language-toggle:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.language-icon,
.theme-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.language-toggle:hover .language-icon,
.theme-toggle:hover .theme-icon {
  transform: scale(1.1);
}

/* FOOTER Full-Width Background Wrapper */
.footer-wrapper {
  background-color: var(--bg-secondary);
  width: 100%;
  padding: 2rem 2rem;
  border-top: 1px solid var(--panel-border);
}

.footer {
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Contact Section */
.contact h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Approach Section */
.approach h3 {
  color: var(--text-primary);
  margin-bottom: 2rem;
}

/* Responsive Design */

/* Medium and down (< 1024px) */
@media screen and (max-width: 63.9375em) {
  .hero.grid-container.fluid {
    padding: 3rem 1.5rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .theme-switch {
    bottom: 1rem;
    right: 1rem;
  }

  .theme-toggle {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  .theme-toggle {
    transition: background-color 0.2s ease;
  }
}

/* Focus states for accessibility */
.theme-toggle:focus {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
}

.button:focus {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Scrollbar styling for modern browsers */
::-webkit-scrollbar {
  width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-accent);
}
