/* shared/core.css — All foundational styles loaded on every page.
   Combines: container, variables, buttons, back-link, header, footer, faq.
   Reduces render-blocking CSS requests from 7 to 1. */

/* ===== INTER FONT (self-hosted, variable weight 100-900, latin only) ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2-variations'),
       url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== CONTAINER SYSTEM ===== */

:root {
  --container-max: 1080px;
  --container-pad: clamp(16px, 3vw, 48px);
  --nav-height: 73px;
}

html, body {
  overflow-x: clip;
  max-width: 100vw;
}

@media (max-width: 768px) {
  .btn-primary, .btn-secondary,
  .btn-hero-primary, .btn-hero-secondary {
    padding: 12px 24px !important;
    font-size: 0.9rem !important;
  }
}
@media (max-width: 400px) {
  .btn-primary, .btn-secondary,
  .btn-hero-primary, .btn-hero-secondary {
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
  }
}

@media (min-width: 1800px) {
  :root {
    --container-max: 1060px;
    --container-pad: clamp(24px, 4vw, 64px);
  }
}

/* ===== VARIABLES — Color palette, reset, body base ===== */

:root {
  --navy: #1B2A4A;
  --navy-light: #2C3E6B;
  --slate: #4A5568;
  --slate-light: #64748B;
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --light-gray: #E2E8F0;
  --accent-blue: #2563EB;
  --accent-blue-dark: #1D4ED8;
  --trust-green: #047857;
  --trust-green-bg: #ECFDF5;
  --brand-green: #799A3D;
  --brand-green-dark: #5B7A2E;
  --brand-green-light: #8FB245;
  --brand-lime: #C0D330;
  --warm-gold: #F59E0B;
  --warm-gold-bg: #FEF3C7;
  --alert-red: #DC2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--slate);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1 em { font-style: normal; color: var(--brand-lime); }

/* ===== BUTTONS ===== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 8px;
  background: var(--accent-blue);
  color: var(--white);
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--accent-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.25);
  transition: all 0.2s;
  cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

/* ===== BREADCRUMB BAR ===== */

.back-link-bar {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--nav-height) - 1px);
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--light-gray);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  padding: 14px 0;
}

.back-link-bar nav,
.back-link-bar a:only-child {
  max-width: var(--container-max, 1080px);
  width: calc(100% - 2 * var(--container-pad, 24px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.back-link-bar a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
}

.back-link-bar a:hover { text-decoration: underline; }

.breadcrumb-sep {
  color: var(--slate-light, #94A3B8);
  margin: 0 2px;
  user-select: none;
}

.breadcrumb-current {
  color: var(--slate);
  font-weight: 400;
}

.back-link-bar svg { flex-shrink: 0; }

@media (max-width: 1200px) {
  .back-link-bar nav,
  .back-link-bar a:only-child {
    width: 100%;
    padding: 0 16px;
  }
}
@media (max-width: 768px) {
  .back-link-bar { top: 61px; }
  .breadcrumb-current { display: none; }
}

/* ===== SKIP LINK (ACCESSIBILITY) ===== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  background: var(--navy);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ===== GLOBAL FOCUS INDICATOR ===== */

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}
.hero :focus-visible,
.cta-section :focus-visible,
.comparison-section :focus-visible,
.topbar .nav-cta:focus-visible,
footer :focus-visible {
  outline-color: var(--white);
}

/* ===== HEADER / NAVIGATION ===== */

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
  padding: 14px 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.topbar-inner {
  max-width: var(--container-max, 1080px);
  width: calc(100% - 2 * var(--container-pad, 24px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
  flex-shrink: 0;
}
.logo svg {
  flex-shrink: 0;
}
.logo-text {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.5px;
  font-stretch: condensed;
  white-space: nowrap;
}
.logo-text .two {
  color: var(--brand-lime);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--navy);
}
.nav-links a.active {
  color: var(--accent-blue);
  font-weight: 600;
}
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--light-gray);
  margin: 0 4px;
  align-self: center;
  flex-shrink: 0;
}
.nav-login {
  color: var(--navy) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  border: 1.5px solid #CBD5E1 !important;
  padding: 8px 18px;
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s !important;
}
.nav-login:hover {
  color: var(--navy) !important;
  border-color: #94A3B8 !important;
  background: var(--off-white);
}
.nav-cta {
  background: var(--accent-blue-dark) !important;
  color: var(--white) !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: background 0.2s;
}
.nav-cta:hover {
  background: #1e40af !important;
}

/* Desktop Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 4px; }
.dropdown-chevron { transition: transform 0.2s; flex-shrink: 0; }
.nav-dropdown:hover .dropdown-chevron { transform: rotate(180deg); }

.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 20px;
  display: none;
}
.nav-dropdown:hover::after { display: block; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 8px 0;
  min-width: 180px;
  z-index: 100;
  list-style: none;
}
.nav-dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu li { padding: 0; }
.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.dropdown-menu a:hover {
  background: var(--off-white);
  color: var(--navy);
}

/* Mobile Dropdown */
.mobile-dropdown-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
}
.mobile-dropdown.open .mobile-dropdown-menu { display: block; }
.mobile-dropdown-menu a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
}
.mobile-dropdown-menu a:hover { color: var(--accent-blue); }
.mobile-dropdown-toggle { display: flex; align-items: center; gap: 4px; }
.mobile-dropdown-toggle .dropdown-chevron { transition: transform 0.2s; }

/* Mobile Nav Right (hidden on desktop) */
.mobile-nav-right {
  display: none;
  align-items: center;
  gap: 12px;
}
.mobile-cta {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
}

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile Slide-Down Menu */
.mobile-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--white);
  border-top: 1px solid var(--light-gray);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 24px 24px 24px;
  z-index: 99;
}
.mobile-menu.open {
  display: block;
}
.mobile-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu-links li {
  border-bottom: 1px solid #F1F5F9;
}
.mobile-menu-links a {
  display: block;
  padding: 14px 0;
  text-decoration: none;
  color: var(--slate);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s;
}
.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: var(--accent-blue);
}
.mobile-menu-divider {
  border-bottom: none !important;
  height: 0;
  margin: 4px 0;
  border-top: 1px solid var(--light-gray);
}
.mobile-menu-links a.mobile-secondary {
  color: var(--slate-light);
  font-size: 0.9rem;
  font-weight: 400;
}
.mobile-menu-links a.mobile-secondary:hover {
  color: var(--navy);
}
.mobile-menu-login {
  display: block;
  text-align: center;
  margin-top: 12px;
  padding: 13px 24px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.mobile-menu-login:hover {
  border-color: #94A3B8;
  background: var(--off-white);
}
.mobile-menu-cta {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 14px 24px;
  background: var(--accent-blue-dark);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s;
}
.mobile-menu-cta:hover {
  background: #1e40af;
}

/* Mobile (<=1200px) */
@media (max-width: 1200px) {
  :root { --nav-height: 60px; }
  .nav-links { display: none; }
  .topbar {
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
  body { padding-top: var(--nav-height); }
  .topbar-inner { width: 100%; padding: 0 16px; }
  .mobile-nav-right { display: flex !important; }
  .hamburger { display: flex; }
  .logo svg { width: 34px; height: 34px; }
  .logo-text { font-size: 1.75rem; }
  .logo { gap: 8px; }
}
@media (max-width: 400px) {
  .logo svg { width: 28px; height: 28px; }
  .logo-text { font-size: 1.4rem; }
  .logo { gap: 6px; }
}

/* ===== FOOTER ===== */

footer {
  background: #111827;
  color: rgba(255,255,255,0.75);
  padding: 48px 0 32px;
}
.footer-inner {
  max-width: var(--container-max, 1080px);
  width: calc(100% - 2 * var(--container-pad, 24px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
footer .footer-heading {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
footer p {
  font-size: 0.85rem;
  line-height: 1.65;
  margin-bottom: 16px;
}
footer .footer-inner > div {
  align-self: start;
}
footer .footer-inner > div:not(:first-child) a {
  line-height: 1.2;
  padding: 4px 0;
  margin-bottom: 0;
}
footer a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.4;
  display: block;
  margin-bottom: 4px;
  transition: color 0.2s;
}
footer a:hover {
  color: #fff;
}
footer .footer-cta {
  color: #60A5FA;
  font-weight: 600;
}
footer .footer-cta:hover {
  color: #93C5FD;
}
.footer-bottom {
  max-width: var(--container-max, 1080px);
  width: calc(100% - 2 * var(--container-pad, 24px));
  margin: 32px auto 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  margin: 4px 2px;
}

/* Social links */
.footer-social {
  margin-top: 14px;
  display: flex;
  gap: 12px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  margin-bottom: 0;
  padding: 0;
  transition: background 0.2s, color 0.2s;
}
.footer-social a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.footer-social svg {
  flex-shrink: 0;
}

/* Newsletter subscribe form */
.footer-subscribe-row {
  display: flex;
  gap: 6px;
}
.footer-subscribe-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 0.85rem;
  outline: 0;
  transition: border-color 0.2s;
}
.footer-subscribe-input::placeholder {
  color: rgba(255,255,255,0.4);
}
.footer-subscribe-input:focus {
  border-color: #60A5FA;
  box-shadow: 0 0 0 2px #60A5FA;
}
.footer-subscribe-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #60A5FA;
  color: #111827;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.footer-subscribe-btn:hover {
  background: #93C5FD;
}
.footer-subscribe-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.footer-subscribe-msg {
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 1.2em;
}
.footer-subscribe-msg.success {
  color: #86EFAC;
}
.footer-subscribe-msg.error {
  color: #FCA5A5;
}

/* Footer tablet */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Footer mobile */
@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    width: 100%;
    padding: 0 16px;
  }
  .footer-bottom {
    width: 100%;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 16px 16px 0;
  }
  .footer-bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    margin: 4px 2px;
  }
  footer a {
    padding: 6px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ===== FAQ ACCORDION ===== */

.faq-section {
  padding: 72px 0;
  background: var(--white);
}
.faq-inner {
  max-width: var(--container-max, 1080px);
  width: calc(100% - 2 * var(--container-pad, 24px));
  margin: 0 auto;
}
.faq-section h2 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
  text-align: center;
}
.faq-sub {
  font-size: 1.05rem;
  color: var(--slate-light);
  margin-bottom: 48px;
  line-height: 1.65;
  text-align: center;
}
.faq-item {
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.2s;
}
.faq-item:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(59,130,246,0.1);
}
.faq-question {
  background: var(--off-white);
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-family: inherit;
  font-size: inherit;
  color: var(--navy);
  user-select: none;
  transition: background 0.2s;
  border: none;
  width: 100%;
  text-align: left;
}
.faq-item.active .faq-question {
  background: var(--white);
}
.faq-question:hover {
  background: var(--white);
}
.faq-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--slate-light);
  transition: transform 0.3s ease;
}
.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--white);
}
.faq-item.active .faq-answer {
  max-height: 500px;
}
.faq-answer-content {
  padding: 20px 24px;
  color: var(--slate-light);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ==========================================================
   LUCIDE ICON SIZING
   Default sizes per context. Page-specific sizes can override
   in their own stylesheet. Previously these rules were
   duplicated inline on every page that uses lucide icons —
   now defined once here.
   ========================================================== */
[data-lucide] { display: inline-block; vertical-align: middle; }
.back-link-bar [data-lucide] { width: 16px; height: 16px; }
.btn-primary [data-lucide] { width: 18px; height: 18px; }
.btn-secondary [data-lucide] { width: 16px; height: 16px; }
.ph-icon [data-lucide] { width: 32px; height: 32px; }
.card-icon [data-lucide],
.feature-icon [data-lucide],
.trust-icon [data-lucide],
.trust-item-icon [data-lucide],
.check-icon [data-lucide] {
  width: 48px;
  height: 48px;
  color: #3B82F6;
}
.feature-icon [data-lucide] { width: 32px; height: 32px; }
.check-icon [data-lucide] { width: 20px; height: 20px; color: #059669; }
.trust-icon [data-lucide] { width: 24px; height: 24px; color: #059669; }
.trust-item-icon [data-lucide] { width: 32px; height: 32px; color: #059669; }
