/* ==========================================================================
   AEMVO — MASTER STYLESHEET
   Brand Identity & CRO-Engineered Design System (Light & Dark Mode)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Brand Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Core Brand Colors (Exact Hex from Brand Identity Guidelines) */
  --brand-gold: #FBC643;
  --brand-gold-hover: #FFC32E;
  --brand-bronze: #926900;
  --brand-navy: #00092A;
  --brand-black: #000000;
  --brand-white: #FFFFFF;
  --brand-light-grey: #F2F2F2;
  --brand-body-grey: #666666;
  --brand-text-dark: #ECECEC;
  --brand-text-muted-dark: #CCCED4;

  /* Derived Brand Tints */
  --tint-pale-gold: #FEF4D9;
  --tint-mid-gold: #FDE2A1;
  --tint-deep-gold: #C99E36;
  --tint-pale-bronze: #E9E1CC;
  --tint-pale-navy: #CCCED4;

  /* ========================================================================
     THEME DYNAMIC TOKENS — DEFAULT DARK MODE (Midnight Navy base)
     ======================================================================== */
  --bg-primary: #00092A;
  --bg-secondary: #050D24;
  --bg-surface: #071233;
  --bg-card: #08153A;
  --bg-card-hover: #0C1E4F;
  --bg-header: #000000;
  --bg-footer: #000000;
  --bg-alt-section: #03081D;

  --text-heading: #FFFFFF;
  --text-subheading: #FBC643;
  --text-hero-accent: #FBC643; /* Accent span in hero headline */
  --text-body: #ECECEC;
  --text-muted: #A3A8B8;
  --text-label: #FBC643;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-card: rgba(251, 198, 67, 0.2);
  --border-card-hover: rgba(251, 198, 67, 0.6);
  --border-divider: rgba(255, 255, 255, 0.1);

  --badge-bg: rgba(251, 198, 67, 0.12);
  --badge-border: rgba(251, 198, 67, 0.35);
  --badge-text: #FBC643;
  --badge-dot: #FBC643;

  --metric-number-accent: #FBC643;

  --btn-primary-bg: #FBC643;
  --btn-primary-hover: #FFC32E;
  --btn-primary-text: #00092A;
  --btn-primary-shadow: rgba(251, 198, 67, 0.25);

  --btn-whatsapp-bg: rgba(37, 211, 102, 0.12);
  --btn-whatsapp-border: rgba(37, 211, 102, 0.3);
  --btn-whatsapp-text: #25D366;
  --btn-whatsapp-hover-bg: rgba(37, 211, 102, 0.2);

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 20px 40px -15px rgba(251, 198, 67, 0.15);

  --input-bg: rgba(0, 0, 0, 0.5);
  --input-border: rgba(255, 255, 255, 0.15);
  --input-text: #FFFFFF;
  --input-placeholder: rgba(255, 255, 255, 0.35);

  --callout-bg: rgba(251, 198, 67, 0.08);
  --callout-border: rgba(251, 198, 67, 0.25);
  --callout-text: #FFFFFF;

  --sim-inner-bg: rgba(0, 0, 0, 0.4);
  --sim-inner-border: rgba(255, 255, 255, 0.1);
  --sim-inspect-color: #FBC643;
}

/* --------------------------------------------------------------------------
   2. LIGHT MODE OVERHAUL (WCAG AAA Contrast & Brand Identity p.04-08)
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-header: #000000; /* Stays black ground per brand identity rule p.03 */
  --bg-footer: #000000; /* Stays black ground per brand identity rule p.03 */
  --bg-alt-section: #F3F4F7; /* Crisp, architectural light grey separating sections */

  --text-heading: #00092A; /* Deep Midnight Navy for high contrast & gravitas */
  --text-subheading: #926900; /* Antique Bronze headings on light grounds (4.95:1 ratio) */
  --text-hero-accent: #926900; /* Antique Bronze for hero headline highlight */
  --text-body: #334155; /* Slate 700 - rich, deep readability */
  --text-muted: #475569; /* Slate 600 - high contrast, passes accessibility */
  --text-label: #926900; /* Bronze tracked labels */

  --border-light: #E2E8F0;
  --border-card: #E2E8F0;
  --border-card-hover: rgba(146, 105, 0, 0.45);
  --border-divider: #E2E8F0;

  --badge-bg: #FEF4D9; /* Pale Gold derived tint */
  --badge-border: #FDE2A1;
  --badge-text: #926900; /* Antique bronze text for full readability */
  --badge-dot: #926900;

  --metric-number-accent: #926900; /* Antique Bronze for highlighted numbers */

  --btn-primary-bg: #FBC643;
  --btn-primary-hover: #FFC32E;
  --btn-primary-text: #00092A;
  --btn-primary-shadow: rgba(251, 198, 67, 0.35);

  --btn-whatsapp-bg: #ECFDF5;
  --btn-whatsapp-border: #A7F3D0;
  --btn-whatsapp-text: #065F46; /* Dark emerald for crystal clear contrast */
  --btn-whatsapp-hover-bg: #D1FAE5;

  --shadow-card: 0 4px 20px -2px rgba(0, 9, 42, 0.07), 0 2px 6px -1px rgba(0, 9, 42, 0.04);
  --shadow-pop: 0 16px 32px -4px rgba(0, 9, 42, 0.12), 0 4px 12px -2px rgba(0, 9, 42, 0.06);

  --input-bg: #FFFFFF;
  --input-border: #CBD5E1;
  --input-text: #00092A;
  --input-placeholder: #94A3B8;

  --callout-bg: #FEF4D9; /* Pale Gold derived tint */
  --callout-border: #FDE2A1;
  --callout-text: #00092A;

  --sim-inner-bg: #F8FAFC;
  --sim-inner-border: #E2E8F0;
  --sim-inspect-color: #926900;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

::selection {
  background-color: var(--brand-gold);
  color: var(--brand-navy);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   4. Custom Cursor Physics (Desktop Only)
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: default;
  }

  .cursor-dot {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--brand-gold);
    border-radius: 50%;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.15s ease, height 0.15s ease, opacity 0.15s ease;
  }

  .cursor-ring {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border: 1.5px solid rgba(251, 198, 67, 0.6);
    border-radius: 50%;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.25s ease, 
                background-color 0.25s ease;
  }

  [data-theme="light"] .cursor-ring {
    border-color: rgba(146, 105, 0, 0.5);
  }

  .cursor-ring.active-hover {
    width: 52px;
    height: 52px;
    border-color: var(--brand-gold);
    background-color: rgba(251, 198, 67, 0.12);
  }

  [data-theme="light"] .cursor-ring.active-hover {
    border-color: var(--brand-bronze);
    background-color: rgba(146, 105, 0, 0.08);
  }

  .cursor-ring.magnetic-snap {
    width: 64px;
    height: 64px;
    border-color: var(--brand-gold);
    border-width: 2px;
    background-color: rgba(251, 198, 67, 0.18);
  }
}

@media (hover: none) or (pointer: coarse) {
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   5. Typography Hierarchy (Poppins Exclusively)
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-hero-accent {
  color: var(--text-hero-accent);
  transition: color 0.3s ease;
}

.metric-accent {
  color: var(--metric-number-accent);
  transition: color 0.3s ease;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-label);
  display: inline-block;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.icp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.icp-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--badge-dot);
}

/* --------------------------------------------------------------------------
   6. Button & CTA Styles ("Talk to Expert")
   -------------------------------------------------------------------------- */
.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px var(--btn-primary-shadow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  min-height: 48px;
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(251, 198, 67, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-heading);
  border: 1px solid var(--border-light);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 48px;
}

.btn-secondary:hover {
  border-color: var(--brand-bronze);
  color: var(--brand-bronze);
  background-color: rgba(146, 105, 0, 0.05);
}

.btn-whatsapp {
  background-color: var(--btn-whatsapp-bg);
  color: var(--btn-whatsapp-text);
  border: 1px solid var(--btn-whatsapp-border);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 48px;
}

.btn-whatsapp:hover {
  background-color: var(--btn-whatsapp-hover-bg);
}

/* --------------------------------------------------------------------------
   7. Cards & Layout Containers
   -------------------------------------------------------------------------- */
.aemvo-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease,
              background-color 0.3s ease;
  box-shadow: var(--shadow-card);
}

.aemvo-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-pop);
}

.alt-section {
  background-color: var(--bg-alt-section);
  transition: background-color 0.3s ease;
}

.service-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  white-space: nowrap;
}

/* ==========================================================================
   8. JTTL CASE STUDY SECTION DEDICATED STYLES (WCAG AAA VISIBILITY)
   ========================================================================== */
.case-study-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 1.5rem;
  padding: 2.25rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .case-study-card {
  background-color: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 12px 36px -4px rgba(0, 9, 42, 0.08), 0 4px 12px -2px rgba(0, 9, 42, 0.04);
}

[data-theme="dark"] .case-study-card {
  background-color: #050D24;
  border-color: rgba(251, 198, 67, 0.35);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

/* Metric Stats Badges in Case Study */
.stat-pill {
  padding: 1rem 1.15rem;
  border-radius: 0.875rem;
  border: 1px solid var(--border-divider);
  background-color: var(--bg-surface);
  transition: all 0.3s ease;
}

[data-theme="light"] .stat-pill {
  background-color: #F8FAFC;
  border-color: #E2E8F0;
}

[data-theme="dark"] .stat-pill {
  background-color: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.08);
}

.stat-pill-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-pill-val-green {
  font-size: 1.25rem;
  font-weight: 700;
  color: #15803D; /* High contrast Dark Emerald */
}

[data-theme="dark"] .stat-pill-val-green {
  color: #34D399; /* Crisp Light Emerald */
}

.stat-pill-val-accent {
  font-size: 1.25rem;
  font-weight: 700;
  color: #926900; /* Antique Bronze */
}

[data-theme="dark"] .stat-pill-val-accent {
  color: #FBC643; /* Aemvo Gold */
}

/* Operational Architecture Container (Right Box) */
.blueprint-card {
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

[data-theme="light"] .blueprint-card {
  background-color: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  box-shadow: 0 6px 20px -3px rgba(0, 9, 42, 0.07);
}

[data-theme="dark"] .blueprint-card {
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* Architecture Step Boxes */
.arch-legacy-box {
  padding: 0.85rem 1rem;
  border-radius: 0.625rem;
  font-family: monospace;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  transition: all 0.3s ease;
}

[data-theme="light"] .arch-legacy-box {
  background-color: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #9F1239;
}

[data-theme="dark"] .arch-legacy-box {
  background-color: rgba(136, 19, 55, 0.25);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #FDA4AF;
}

.arch-unified-box {
  padding: 0.85rem 1rem;
  border-radius: 0.625rem;
  font-family: monospace;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  transition: all 0.3s ease;
}

[data-theme="light"] .arch-unified-box {
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

[data-theme="dark"] .arch-unified-box {
  background-color: rgba(6, 78, 59, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6EE7B7;
}

.arch-results-box {
  padding: 0.85rem 1rem;
  border-radius: 0.625rem;
  font-family: monospace;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

[data-theme="light"] .arch-results-box {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #0F172A;
}

[data-theme="dark"] .arch-results-box {
  background-color: #00092A;
  border: 1px solid rgba(251, 198, 67, 0.3);
  color: #FFFFFF;
}

.arch-arrow {
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.35rem 0;
  color: var(--text-hero-accent);
}

/* --------------------------------------------------------------------------
   9. Form & Inputs
   -------------------------------------------------------------------------- */
.form-input {
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  border-radius: 0.625rem;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(251, 198, 67, 0.25);
}

.form-input::placeholder {
  color: var(--input-placeholder);
}

[data-theme="light"] .form-card {
  background-color: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 20px 40px -10px rgba(0, 9, 42, 0.1) !important;
}

[data-theme="light"] .form-card h3 {
  color: #00092A !important;
}

[data-theme="light"] .form-card label {
  color: #1E293B !important;
}

[data-theme="light"] .form-card select {
  background-color: #F8FAFC !important;
  color: #00092A !important;
}

/* --------------------------------------------------------------------------
   10. Mobile Sticky CTA Bar
   -------------------------------------------------------------------------- */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(251, 198, 67, 0.3);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
}

.mobile-sticky-bar.visible {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .mobile-sticky-bar {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   11. Accordion Animation
   -------------------------------------------------------------------------- */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.active .faq-content {
  max-height: 500px;
  opacity: 1;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--brand-gold);
}

[data-theme="light"] .faq-item.active .faq-chevron {
  color: var(--brand-bronze);
}

/* --------------------------------------------------------------------------
   12. Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #2a3456;
  border-radius: 4px;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #CBD5E1;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-gold);
}
