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

:root {
  --primary:      #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.07);
  --primary-glow: rgba(37, 99, 235, 0.16);
  
  --green:        #0d9488;
  --green-dark:   #0f766e;
  --green-pale:   #f0fdfa;
  
  --charcoal:     #0f172a;
  --charcoal-mid: #1e293b;
  
  --slate-50:     #f8fafc;
  --slate-100:    #f1f5f9;
  --slate-200:    #e2e8f0;
  --slate-400:    #94a3b8;
  --slate-600:    #475569;
  --slate-900:    #0f172a;
  
  --white:        #ffffff;
  --off-white:    #f8fafc;
  --text:         #334155;
  --text-muted:   #64748b;
  
  /* Mock/Preview dark variables */
  --dark-surface:        #0f172a;
  --dark-surface-raised: #1e293b;
  --dark-border:         rgba(255, 255, 255, 0.08);
  --dark-text:           #f8fafc;
  --dark-text-secondary: #cbd5e1;
  --dark-text-faint:     #94a3b8;
  --accent-on-dark:      #60a5fa;
  
  --border:       rgba(15, 23, 42, 0.06);
  --border-light: rgba(15, 23, 42, 0.03);
  
  --shadow-sm:    0 1px 3px 0 rgba(15, 23, 42, 0.03);
  --shadow-md:    0 4px 12px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg:    0 12px 24px -4px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl:    0 24px 48px -8px rgba(15, 23, 42, 0.08), 0 8px 24px -4px rgba(15, 23, 42, 0.04);
  
  --glass:        rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;
  --px: 80px;
  --radius: 12px;
}

@media (max-width: 768px) {
  :root { --px: 24px; --radius: 10px; }
}

html { scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.34);
  outline-offset: 3px;
}

::selection {
  background: rgba(37, 99, 235, 0.18);
  color: var(--slate-900);
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--px);
  height: 80px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--slate-900); text-decoration: none;
  letter-spacing: -0.5px;
  display: inline-flex; align-items: center; gap: 10px;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: all 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav .nav-cta,
.nav-mobile-menu .nav-cta {
  background: var(--primary);
  color: white;
  padding: 12px 24px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(29, 78, 216, 0.2);
}
.nav .nav-cta:hover,
.nav-mobile-menu .nav-cta:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--slate-900);
}

.nav-mobile-menu {
  display: none;
  position: fixed; top: 80px; left: 0; right: 0; bottom: 0;
  background: var(--white);
  padding: 40px var(--px);
  flex-direction: column; gap: 32px;
  z-index: 99;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-size: 20px; font-weight: 600; color: var(--slate-900);
  text-decoration: none;
}
.nav-mobile-menu .nav-cta { text-align: center; padding: 16px; font-size: 16px; }

@media (max-width: 768px) {
  .nav { height: 72px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-menu { top: 72px; }
}

/* FOOTER */
.footer { background: var(--slate-50); border-top: 1px solid var(--border); padding: 100px var(--px) 40px; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px; padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
}
.footer-brand-logo {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--slate-900); margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px;
}
.footer-brand-text { font-size: 14px; color: var(--text-muted); line-height: 1.7; max-width: 280px; }
.footer-col-title { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--slate-900); margin-bottom: 24px; }
.footer-col-links { display: flex; flex-direction: column; gap: 14px; }
.footer-col-links a { font-size: 14px; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-col-links a:hover { color: var(--primary); }
.footer-bottom { padding-top: 32px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--primary); }

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-top > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-legal { justify-content: center; }
}

/* SHARED UTILITIES */
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 20px;
  background: var(--primary-soft); padding: 4px 12px; border-radius: 999px;
}
.section-tag::before { display: none; }
.section-title {
  font-family: var(--font-display); font-size: 48px; line-height: 1.1;
  font-weight: 700; color: var(--slate-900); letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.section-sub { font-size: 18px; line-height: 1.6; color: var(--text-muted); max-width: 600px; }

@media (max-width: 768px) {
  .section-title { font-size: 36px; letter-spacing: -1px; }
  .section-sub { font-size: 16px; }
}

.btn-primary {
  display: inline-block;
  background: var(--primary); color: white;
  padding: 14px 28px; border-radius: 8px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.22);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.28); }

.btn-outline {
  display: inline-block;
  background: white; color: var(--slate-900);
  padding: 13px 26px; border-radius: 8px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid var(--slate-200);
  transition: all 0.2s ease;
}
.btn-outline:hover { background: var(--slate-50); border-color: var(--slate-400); transform: translateY(-1px); }

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* TALLIED T LOGO */
.tally-mark {
  display: inline-block; width: 22px; height: 22px; flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='90 90 320 320'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%2360a5fa'/><stop offset='.5' stop-color='%232563eb'/><stop offset='1' stop-color='%230f3eb8'/></linearGradient></defs><path d='M100,250 L100,100 L400,100 L400,400 L250,400' fill='none' stroke='url(%23g)' stroke-width='8' stroke-linecap='square' stroke-linejoin='miter'/><path d='M220,195 L280,195 M250,195 L250,305' fill='none' stroke='url(%23g)' stroke-width='12' stroke-linecap='square'/></svg>");
  background-size: contain; background-repeat: no-repeat; background-position: left center;
  font-size: 0; vertical-align: -2px;
}
.tally-mark.white {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='90 90 320 320'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%2360a5fa'/><stop offset='.5' stop-color='%232563eb'/><stop offset='1' stop-color='%230f3eb8'/></linearGradient></defs><path d='M100,250 L100,100 L400,100 L400,400 L250,400' fill='none' stroke='url(%23g)' stroke-width='8' stroke-linecap='square' stroke-linejoin='miter'/><path d='M220,195 L280,195 M250,195 L250,305' fill='none' stroke='url(%23g)' stroke-width='12' stroke-linecap='square'/></svg>");
}

/* APP MOCK */
.app-mock {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}
.app-mock-bar {
  background: var(--slate-50); padding: 12px 20px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.app-mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-200); }
.app-mock-title { font-size: 12px; color: var(--slate-400); margin-left: 8px; font-family: var(--font-body); }
.app-mock-body { display: flex; flex: 1; }
.app-mock-sidebar {
  width: 180px; background: var(--slate-50); padding: 24px 16px;
  display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--border);
}
@media (max-width: 768px) {
  .app-mock-sidebar { display: none; }
}
.app-mock-brand { font-size: 14px; font-weight: 700; color: var(--slate-900); padding: 0 10px; margin-bottom: 20px; font-family: var(--font-display); }
.app-mock-scheme { font-size: 11px; color: var(--slate-400); padding: 0 10px; margin-bottom: 20px; font-family: var(--font-body); }
.app-mock-nav { font-size: 12px; padding: 10px 12px; border-radius: 6px; color: var(--text-muted); font-family: var(--font-body); display: flex; align-items: center; gap: 10px; }
.app-mock-nav.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }
.app-mock-nav-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.app-mock-main { flex: 1; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.app-mock-heading { font-size: 20px; font-weight: 700; color: var(--slate-900); font-family: var(--font-display); margin-bottom: 4px; }
.app-mock-sub { font-size: 12px; color: var(--text-muted); font-family: var(--font-body); }
.app-mock-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 768px) {
  .app-mock-cards { grid-template-columns: repeat(2, 1fr); }
}
.app-mock-card { background: var(--white); border-radius: 10px; padding: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.app-mock-card-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-400); margin-bottom: 8px; font-family: var(--font-body); font-weight: 600; }
.app-mock-card-val { font-size: 24px; font-weight: 700; color: var(--slate-900); font-family: var(--font-display); }
.app-mock-card-sub { font-size: 10px; color: var(--slate-400); margin-top: 4px; font-family: var(--font-body); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.fade-up-1 { animation-delay: 0.08s; }
.fade-up-2 { animation-delay: 0.16s; }
.fade-up-3 { animation-delay: 0.24s; }
.fade-up-4 { animation-delay: 0.32s; }

/* Custom slider styling */
.billing-slider-container {
  width: 100%;
  padding: 10px 0;
}
.premium-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--slate-200);
  outline: none;
  transition: background 0.2s;
}
.premium-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--primary-glow);
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
}
.premium-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  background: var(--primary-dark);
}
.premium-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--primary-glow);
  cursor: pointer;
  transition: transform 0.1s;
}
.premium-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
}

/* Shimmer scan effects */
@keyframes scanning {
  0% { top: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.scanner-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-on-dark), transparent);
  box-shadow: 0 0 12px var(--accent-on-dark), 0 0 4px var(--accent-on-dark);
  z-index: 10;
  animation: scanning 3s infinite ease-in-out;
  display: none;
}
.scanning .scanner-line {
  display: block;
}

/* ALTERNATING SECTION BACKGROUNDS */
.section-alt {
  background: var(--slate-50);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ACCESSIBILITY: respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom premium hover cards */
.interactive-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.interactive-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.15);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-glow);
}
