:root {
  /* Brand Colors */
  --primary: #6d28d9;
  --primary-hover: #5b21b6;
  --secondary: #0ea5e9;
  --accent: #f43f5e;

  /* Backgrounds */
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-glass: rgba(30, 41, 59, 0.7);

  /* Text */
  --text-white: #f8fafc;
  --text-gray: #94a3b8;
  --text-muted: #64748b;

  /* Spacing & Borders */
  --radius-lg: 1rem;
  --radius-md: 0.5rem;
  --radius-xl: 2rem;
  --container-max: 1200px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Default links: only neutral in UI elements */
nav a,
header a,
footer a,
.btn,
.btn a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}


button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Glassmorphism utility */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s forwards;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 25px rgba(109, 40, 217, 0.3);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
}

.btn-outline:hover,
.btn-outline.active {
  background: white;
  color: var(--primary);
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 25px rgba(255, 255, 255, 0.1);
}

/* Standardized Section Spacing */
:root {
  --gap-section: 3.125rem;
  --gap-divider: 6.25rem;
  --gap-header: 3rem;
}

.section-standard {
  padding: var(--gap-section) 0;
  position: relative;
  width: 100%;
}

.section-edge-top {
  padding-top: var(--gap-divider) !important;
}

.section-edge-bottom {
  padding-bottom: var(--gap-divider) !important;
}

.section-header {
  text-align: center;
  margin-bottom: var(--gap-header);
}

.btn-text {
  color: #fff;
  transition: var(--transition);
}

.portfolio-item:hover .btn-text,
.btn-text:hover {
  color: var(--primary);
}

/* CTA Boxes */
.cta-box {
  margin: 3rem 0;
  padding: 1.25rem 3rem;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-box-light {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}

.cta-box-dark {
  background: #0f172a;
  border-color: var(--primary);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.cta-box-brand {
  background: linear-gradient(135deg, var(--primary) 0%, #4c1d95 100%);
  border: none;
}

.cta-box h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-white);
}

.cta-box p {
  color: var(--text-gray);
  margin-bottom: 2rem;
  max-width: 600px;
}

.cta-box-brand p {
  color: rgba(255, 255, 255, 0.9);
}

.cta-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
}

.cta-form input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-white);
}

/* Buttons in CTA boxes */
.cta-box .btn {
  font-weight: 700;
  padding: 0.85rem 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.cta-box-light .btn-primary {
  background: var(--primary);
  color: white;
}

.cta-box-light .btn-primary:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.cta-box-dark .btn-white {
  background: white;
  color: #0f172a;
}

.cta-box-dark .btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

.cta-box-brand .btn-white {
  background: white !important;
  color: var(--primary) !important;
}

.cta-box-brand .btn-white:hover {
  background: #f8fafc !important;
  transform: translateY(-2px);
}

/* Lists inside CTA boxes */
.cta-box ul,
.cta-box ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  color: var(--text-gray);
}

.cta-box li {
  margin-bottom: 0.5rem;
}

.cta-box-brand ul,
.cta-box-brand ol {
  color: rgba(255, 255, 255, 0.9);
}

.btn-text i {
  transition: var(--transition);
}

.btn-text:hover i {
  transform: translateX(5px);
}

/* Page Heroes (Sub-pages) */
.page-hero {
  padding: 12rem 0 4rem;
  text-align: center;
}

.page-hero h1 {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.page-hero p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-gray);
  font-size: 1.25rem;
}

.page-hero .category {
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-block;
}

/* --- Global Header & Footer --- */
header.glass {
  padding: 1.5rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

nav.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-gray);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-white) !important;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-links {
  list-style: none;
  color: var(--text-gray);
  margin-top: 1rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--text-white);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- CTA Popups --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.popup-content {
  background: #0f172a;
  padding: 3rem;
  border-radius: var(--radius-lg);
  position: relative;
  max-width: 600px;
  width: 100%;
  border: 1px solid var(--primary);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.popup-close:hover {
  color: var(--text-white);
}

/* --- Mobile Navigation --- */
.mobile-menu-logo {
  display: none;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  z-index: 1001;
  padding: 0.5rem;
}

/* Default Visibility */
.mobile-only {
  display: none !important;
}

.desktop-only {
  display: flex !important;
}

/* --- Responsive Utilities --- */
@media (max-width: 768px) {
  h1 {
    font-size: 2.25rem !important;
  }

  h2 {
    font-size: 1.85rem !important;
  }

  h3 {
    font-size: 1.6rem !important;
  }

  .container {
    padding: 0 1.5rem !important;
  }

  /* FORCE 160px TOP CLEARANCE */
  .page-hero,
  .blog-hero,
  #hero.hero {
    padding-top: 160px !important;
    padding-bottom: 3rem !important;
  }

  .page-hero h1 {
    font-size: 2.5rem !important;
  }

  /* Footer Centralization & Logo */
  footer {
    text-align: center;
    padding: 3rem 40px 2rem !important;
    /* 40px side padding */
  }

  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 3rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-grid div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Enlarge footer logo */
  footer .logo-img {
    height: auto !important;
    width: 280px !important;
    margin-bottom: 2rem;
  }

  .logo-img {
    width: 200px !important;
    height: auto !important;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-menu-logo {
    display: block;
    width: 200px;
    height: auto;
    margin-bottom: 2rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #0f172a;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    gap: 2.5rem !important;
  }

  .nav-links.active {
    right: 0;
  }

  /* Centered Mobile Buttons */
  .nav-links .btn {
    width: auto;
    min-width: 240px;
    padding: 1rem 2rem;
    justify-content: center;
    text-align: center;
    font-size: 1.1rem;
  }

  /* Visibility Overrides */
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .cta-form {
    flex-direction: column;
  }

  /* Fix Stats Slider */
  .stats-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
  }

  .slider-arrow {
    position: static !important;
    margin: 0 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------
   Global content links (no wrappers required)
   Targets real text links, not buttons or nav
-------------------------------------------------- */

/* Links inside text elements */
p a,
li a,
blockquote a,
td a,
dd a {
  color: #0ea5e9 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: var(--transition);
}

/* Hover state */
p a:hover,
li a:hover,
blockquote a:hover,
td a:hover,
dd a:hover {
  color: #af0ee9 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px;
}

/* Prevent buttons & nav from inheriting this */
.btn a,
nav a,
.nav a,
header a,
footer a {
  color: inherit;
  text-decoration: none;
}

/* ==================================================
   Blog & content text links
   ================================================== */

article.blog-article p a,
article.blog-article li a,
article.blog-article blockquote a,
article.blog-article td a,
article.blog-article dd a {
  color: #6d28d9;
  /* paars */
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration-thickness 0.2s ease;
}

article.blog-article p a:hover,
article.blog-article li a:hover,
article.blog-article blockquote a:hover {
  color: #5b21b6;
  text-decoration-thickness: 2px;
}

/* Language Switcher */
.lang-switch {
  font-weight: 700;
  color: var(--text-gray);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 0.8rem;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.lang-switch:hover {
  color: var(--text-white);
  border-color: var(--primary);
  background: rgba(109, 40, 217, 0.1);
}

.desktop-lang-top {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.mobile-lang-top {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  z-index: 1001;
}

@media (max-width: 768px) {
  .lang-switch {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
}