/*
Theme Name: XwebA Digital Growth
Theme URI: https://xweba.com
Author: XwebA Digital Growth Ltd
Author URI: https://xweba.com
Description: Full-service digital growth, bespoke web architecture, and Generative Engine Optimization (GEO) WordPress theme. Built for conversion velocity, human craftsmanship, and AI search citability in Kenya & globally.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xweba
Tags: agency, portfolio, custom-colors, custom-menu, featured-images, responsive-layout, theme-options, translation-ready
*/

:root {
  --xweba-navy: #0A3866;
  --xweba-navy-deep: #061D35;
  --xweba-navy-soft: #124B82;
  --xweba-orange: #F15A24;
  --xweba-orange-hover: #D94814;
  --xweba-amber: #FFA000;
  --font-display: 'Outfit', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Theme variables - Light Mode Default */
  --bg-primary: #FAF9F6;
  --bg-secondary: #F3F1EC;
  --bg-card: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --border-color: rgba(10, 56, 102, 0.12);
  --border-card: rgba(10, 56, 102, 0.1);
  --shadow-card: 0 4px 20px -2px rgba(10, 56, 102, 0.06), 0 2px 6px -1px rgba(10, 56, 102, 0.04);
  --shadow-hover: 0 12px 30px -4px rgba(10, 56, 102, 0.12);
  --input-bg: #FFFFFF;
}

[data-theme="dark"],
.dark {
  --bg-primary: #071320;
  --bg-secondary: #0A1E33;
  --bg-card: #0A1E33;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --border-color: rgba(14, 165, 233, 0.18);
  --border-card: rgba(14, 165, 233, 0.15);
  --shadow-card: 0 4px 24px -2px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 36px -4px rgba(0, 0, 0, 0.5);
  --input-bg: #071320;
}

/* Base resets & typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}

h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* Container */
.xweba-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 640px) {
  .xweba-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Brand Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.625rem;
  background-color: var(--xweba-orange);
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(241, 90, 36, 0.25);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--xweba-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(241, 90, 36, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.625rem;
  background-color: var(--bg-card);
  color: var(--xweba-navy) !important;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 2px solid rgba(10, 56, 102, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

[data-theme="dark"] .btn-secondary,
.dark .btn-secondary {
  color: #FFFFFF !important;
  border-color: rgba(14, 165, 233, 0.35);
  background-color: rgba(10, 30, 51, 0.6);
}

.btn-secondary:hover {
  border-color: var(--xweba-navy);
  background-color: rgba(10, 56, 102, 0.04);
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover {
  color: var(--xweba-orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--xweba-orange);
  border-color: var(--xweba-orange);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

@media (max-width: 992px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}

/* Mobile Drawer */
.mobile-nav-drawer {
  display: none;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.75rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.mobile-nav-drawer.active {
  display: flex;
}

.mobile-nav-drawer a {
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.5rem 0;
}

/* Section Common */
.xweba-section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .xweba-section {
    padding: 6.5rem 0;
  }
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--xweba-orange);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--xweba-navy);
}

[data-theme="dark"] .section-title,
.dark .section-title {
  color: #FFFFFF;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.7;
}

/* Hero Section */
.hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 3.5rem;
  padding-bottom: 5rem;
  background: var(--bg-primary);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.hero-kicker span.highlight {
  color: var(--xweba-navy);
}

[data-theme="dark"] .hero-kicker span.highlight,
.dark .hero-kicker span.highlight {
  color: #38BDF8;
}

.hero-kicker span.slash {
  color: var(--xweba-orange);
  font-weight: 900;
}

.hero-headline {
  font-size: 2.75rem;
  line-height: 1.1;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .hero-headline {
    font-size: 3.75rem;
  }
}

.hero-headline-gradient {
  background: linear-gradient(135deg, var(--xweba-navy) 0%, var(--xweba-orange) 50%, var(--xweba-amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-headline-gradient,
.dark .hero-headline-gradient {
  background: linear-gradient(135deg, #38BDF8 0%, var(--xweba-orange) 50%, var(--xweba-amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subhead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.5rem;
}

.hero-trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--xweba-navy);
}

[data-theme="dark"] .trust-item,
.dark .trust-item {
  color: var(--text-primary);
}

/* Hero Media Card */
.hero-visual-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 2px solid var(--border-card);
  background-color: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.hero-visual-img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hero-visual-card:hover .hero-visual-img {
  transform: scale(1.02);
}

.hero-telemetry-chip {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  pointer-events: none;
}

.chip-status {
  background: rgba(10, 56, 102, 0.95);
  color: #FFFFFF;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.chip-ttfb {
  background: rgba(255, 255, 255, 0.95);
  color: var(--xweba-orange);
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 800;
  border: 1px solid rgba(10, 56, 102, 0.15);
}

.hero-card-bottom {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(10, 56, 102, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

[data-theme="dark"] .hero-card-bottom,
.dark .hero-card-bottom {
  background: rgba(7, 19, 32, 0.96);
  border-color: rgba(14, 165, 233, 0.25);
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.xweba-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.xweba-card:hover {
  border-color: var(--xweba-orange);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-top-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--xweba-amber), var(--xweba-orange), #E64A00);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.xweba-card:hover .card-top-accent {
  opacity: 1;
}

/* Diagnostic & Estimator Modules */
.interactive-module {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-input, .form-select {
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--xweba-orange);
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.15);
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* Modal styling */
.xweba-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 19, 32, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.xweba-modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 1.25rem;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--xweba-orange);
}
