/* ==========================================================================
   BizCalcLab — Design System & CSS Foundation
   Premium Financial Tools for Small Businesses & Freelancers
   
   FIXED: All class names now match HTML elements exactly.
   ========================================================================== */


/* ==========================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* ---- Color Palette: Dark Theme ---- */
  --color-bg-primary:       #0a0f1e;
  --color-bg-secondary:     #111827;
  --color-bg-tertiary:      #1a1f35;
  --color-bg-elevated:      #1e2540;

  --color-surface:          rgba(26, 31, 53, 0.7);
  --color-surface-hover:    rgba(30, 37, 64, 0.85);
  --color-surface-border:   rgba(59, 130, 246, 0.15);
  --color-surface-border-hover: rgba(59, 130, 246, 0.35);

  /* Primary Accent: Electric Blue */
  --color-primary:          #3b82f6;
  --color-primary-light:    #60a5fa;
  --color-primary-dark:     #2563eb;
  --color-primary-rgb:      59, 130, 246;
  --gradient-primary:       linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-primary-hover: linear-gradient(135deg, #2563eb, #0891b2);

  /* Secondary Accent: Emerald (Profit / Positive) */
  --color-success:          #10b981;
  --color-success-light:    #34d399;
  --color-success-dark:     #059669;
  --color-success-rgb:      16, 185, 129;

  /* Warning: Amber */
  --color-warning:          #f59e0b;
  --color-warning-light:    #fbbf24;
  --color-warning-dark:     #d97706;
  --color-warning-rgb:      245, 158, 11;

  /* Error / Loss: Rose */
  --color-error:            #f43f5e;
  --color-error-light:      #fb7185;
  --color-error-dark:       #e11d48;
  --color-error-rgb:        244, 63, 94;

  /* Text Colors */
  --color-text-primary:     #f8fafc;
  --color-text-secondary:   #cbd5e1;
  --color-text-tertiary:    #94a3b8;
  --color-text-muted:       #64748b;
  --color-text-inverse:     #0f172a;


  /* Borders & Dividers */
  --color-border:           rgba(59, 130, 246, 0.12);
  --color-border-strong:    rgba(59, 130, 246, 0.25);
  --color-divider:          rgba(148, 163, 184, 0.1);

  /* Glassmorphism */
  --glass-bg:               rgba(17, 24, 39, 0.6);
  --glass-bg-dense:         rgba(17, 24, 39, 0.8);
  --glass-border:           rgba(59, 130, 246, 0.2);
  --glass-blur:             16px;
  --glass-blur-heavy:       24px;

  /* Shadows */
  --shadow-sm:              0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:              0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg:              0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-xl:              0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow:            0 0 20px rgba(59, 130, 246, 0.3);
  --shadow-glow-strong:     0 0 40px rgba(59, 130, 246, 0.4);
  --shadow-glow-success:    0 0 20px rgba(16, 185, 129, 0.3);
  --shadow-glow-error:      0 0 20px rgba(244, 63, 94, 0.3);

  /* ---- Typography ---- */
  --font-heading:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:              'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:              'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Fluid Type Scale */
  --text-xs:                clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm:                clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base:              clamp(0.9rem, 0.85rem + 0.3vw, 1rem);
  --text-lg:                clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
  --text-xl:                clamp(1.15rem, 1rem + 0.5vw, 1.25rem);
  --text-2xl:               clamp(1.35rem, 1.1rem + 0.8vw, 1.5rem);
  --text-3xl:               clamp(1.6rem, 1.2rem + 1.2vw, 1.875rem);
  --text-4xl:               clamp(1.9rem, 1.4rem + 1.8vw, 2.25rem);
  --text-5xl:               clamp(2.2rem, 1.5rem + 2.5vw, 3rem);
  --text-6xl:               clamp(2.8rem, 1.8rem + 3.2vw, 3.75rem);

  --font-weight-light:      300;
  --font-weight-normal:     400;
  --font-weight-medium:     500;
  --font-weight-semibold:   600;
  --font-weight-bold:       700;
  --font-weight-extrabold:  800;

  --line-height-tight:      1.2;
  --line-height-snug:       1.375;
  --line-height-normal:     1.5;
  --line-height-relaxed:    1.625;

  --letter-spacing-tight:   -0.025em;
  --letter-spacing-normal:  0;
  --letter-spacing-wide:    0.025em;
  --letter-spacing-wider:   0.05em;
  --letter-spacing-widest:  0.1em;

  /* ---- Spacing Scale ---- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ---- Border Radius ---- */
  --radius-sm:    0.375rem;
  --radius-md:    0.5rem;
  --radius-lg:    0.75rem;
  --radius-xl:    1rem;
  --radius-2xl:   1.25rem;
  --radius-full:  9999px;

  /* ---- Transitions ---- */
  --transition-fast:    150ms ease;
  --transition-base:    300ms ease;
  --transition-slow:    500ms ease;
  --transition-bounce:  500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---- Z-Index Scale ---- */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-nav:      500;
  --z-modal:    1000;
  --z-toast:    1100;

  /* ---- Layout ---- */
  --container-max:      1200px;
  --container-padding:  var(--space-6);
  --sidebar-width:      320px;
  --nav-height:         72px;
}


/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.3); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.5); }

::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--color-text-primary);
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover { color: var(--color-primary); }

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}


/* ==========================================================================
   3. Typography System
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-5xl); font-weight: var(--font-weight-extrabold); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); font-weight: var(--font-weight-semibold); }
h4 { font-size: var(--text-2xl); font-weight: var(--font-weight-semibold); }

p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-4);
}
p:last-child { margin-bottom: 0; }

strong, b {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--color-primary-light);
}


/* ==========================================================================
   4. Layout System
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}


/* ==========================================================================
   5. Text Gradient Utility
   ========================================================================== */

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ==========================================================================
   6. Navigation Header  (matches HTML classes)
   ========================================================================== */

.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: var(--z-nav);
  background: var(--glass-bg-dense);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav-header.scrolled {
  background: rgba(10, 15, 30, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* .nav-container — the flex row inside header */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text-primary);
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: var(--letter-spacing-tight);
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text-primary);
  background: rgba(59, 130, 246, 0.1);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.nav-link svg {
  transition: transform var(--transition-base);
}

/* Dropdown */
.has-dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--glass-bg-dense);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-base);
  z-index: var(--z-dropdown);
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-text-primary);
}

/* Nav Actions (theme toggle + hamburger) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  color: var(--color-text-secondary);
}

.theme-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-text-primary);
}

.icon-sun, .icon-moon {
  transition: transform var(--transition-base);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: calc(var(--z-nav) + 1);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   7. Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-16)) var(--container-padding) var(--space-16);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6, 182, 212, 0.08), transparent),
    var(--color-bg-primary);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 60px 60px, 80px 80px;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  margin-inline: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary-light);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.6s ease backwards;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.6s ease 0.1s backwards;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  line-height: var(--line-height-relaxed);
  animation: fadeInUp 0.6s ease 0.2s backwards;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s backwards;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  margin-top: var(--space-16);
  animation: fadeInUp 0.6s ease 0.4s backwards;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-suffix {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-divider);
}


/* ==========================================================================
   8. Section Styling
   ========================================================================== */

.section {
  padding: var(--space-20) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-badge {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-light);
  background: rgba(59, 130, 246, 0.1);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-inline: auto;
  line-height: var(--line-height-relaxed);
}


/* ==========================================================================
   9. Tool Cards — Featured (Wave 1)
   ========================================================================== */

.tools-grid {
  margin-top: var(--space-4);
}

.tool-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: all var(--transition-base);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: inherit;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-surface-border-hover);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.15);
  background: var(--color-surface-hover);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: rgba(var(--icon-color, 59, 130, 246), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--space-5);
  transition: all var(--transition-base);
}

.tool-card:hover .tool-card-icon {
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

.tool-card-content {
  flex: 1;
}

.tool-card-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.tool-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-5);
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.tool-card-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-light);
  transition: all var(--transition-base);
}

.tool-card:hover .tool-card-cta {
  gap: var(--space-3);
}

.tool-card-badge {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

.badge-popular {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success-light);
}

.badge-essential {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-primary-light);
}

.badge-new {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}


/* ==========================================================================
   10. Tool Cards — Mini (All Tools Grid)
   ========================================================================== */

.tools-grid-all {
  margin-top: var(--space-4);
}

.tool-card-mini {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: all var(--transition-base);
}

.tool-card-mini:hover {
  transform: translateY(-4px);
  border-color: var(--color-surface-border-hover);
  box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.1);
}

.tool-mini-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}

.tool-card-mini h3 {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.tool-card-mini p {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-3);
}

.tool-status {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  display: inline-block;
  width: fit-content;
}

.status-available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success-light);
}

.status-coming {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning-light);
}

.tool-card-coming {
  opacity: 0.7;
  cursor: default;
}

.tool-card-coming:hover {
  transform: none;
  box-shadow: none;
}


/* ==========================================================================
   11. Feature Cards (Why Choose Us)
   ========================================================================== */

.features-grid {
  margin-top: var(--space-4);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-surface-border-hover);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-4);
}

.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-3);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}


/* ==========================================================================
   12. Step Cards (How It Works)
   ========================================================================== */

.steps-grid {
  margin-top: var(--space-4);
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  transition: all var(--transition-base);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-surface-border-hover);
}

.step-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: white;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.step-card h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-3);
}

.step-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}


/* ==========================================================================
   13. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: var(--gradient-primary-hover);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
  transform: translateY(-2px);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong);
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn-full {
  width: 100%;
}

.btn-success {
  background: linear-gradient(135deg, var(--color-success), var(--color-success-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
  transform: translateY(-2px);
  color: white;
}


/* ==========================================================================
   14. CTA Banner
   ========================================================================== */

.cta-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin: var(--space-12) 0;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.08), transparent 50%);
  animation: float 15s ease-in-out infinite;
  pointer-events: none;
}

.cta-container {
  padding: var(--space-12) var(--space-10);
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
}

.cta-content p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 550px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}


/* ==========================================================================
   15. Ad Slots
   ========================================================================== */

.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  padding: var(--space-4);
}

.ad-slot-leaderboard {
  max-width: 728px;
  min-height: 90px;
  margin: var(--space-8) auto;
}

.ad-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-widest);
  margin-bottom: var(--space-2);
  opacity: 0.5;
}

.ad-placeholder {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}


/* ==========================================================================
   16. Footer
   ========================================================================== */

.footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-divider);
  margin-top: var(--space-16);
  padding: var(--space-16) 0 var(--space-8);
  position: relative;
}

.footer-gradient-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-logo {
  display: inline-flex;
}

.footer-desc {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: var(--line-height-relaxed);
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-tertiary);
  transition: all var(--transition-base);
}

.social-link:hover {
  background: rgba(59, 130, 246, 0.2);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.footer-links h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  margin-bottom: var(--space-5);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
}

.footer-links li a {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.footer-links li a:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
  text-align: center;
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}


/* ==========================================================================
   17. Back to Top Button
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
}


/* ==========================================================================
   18. Breadcrumb & Page Header (Sub-pages)
   ========================================================================== */

.page-header {
  padding: calc(var(--nav-height) + var(--space-12)) 0 var(--space-10);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 30% 0%, rgba(59, 130, 246, 0.08), transparent),
    radial-gradient(ellipse 40% 60% at 80% 100%, rgba(6, 182, 212, 0.05), transparent);
  pointer-events: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  font-size: var(--text-sm);
  position: relative;
}

.breadcrumb a {
  color: var(--color-text-tertiary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-primary-light);
}

.breadcrumb-sep {
  color: var(--color-text-muted);
}

.breadcrumb-current {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

.page-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-3);
  position: relative;
}

.page-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  position: relative;
}


/* ==========================================================================
   19. Content Page (About, Privacy, Terms)
   ========================================================================== */

.content-page {
  padding-top: var(--space-4);
  padding-bottom: var(--space-16);
}

.content-container {
  max-width: 800px;
}

.content-section {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  margin-bottom: var(--space-8);
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.content-section p {
  font-size: var(--text-base);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-5);
}

.content-section ul,
.content-section ol {
  margin-bottom: var(--space-5);
  padding-left: var(--space-6);
}

.content-section ul { list-style: disc; }
.content-section ol { list-style: decimal; }

.content-section li {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-2);
}

.content-section a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-section a:hover {
  color: var(--color-primary);
}

.legal-content h2 {
  font-size: var(--text-xl);
}

/* Feature List (About page) */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.feature-list-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5);
  background: rgba(59, 130, 246, 0.05);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-surface-border);
}

.feature-list-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.feature-list-item h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  margin-top: 0;
}

.feature-list-item p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}


/* ==========================================================================
   20. Contact Page
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.contact-form-card {
  padding: var(--space-10);
  border-radius: var(--radius-2xl);
}

.contact-form-card h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.contact-form-card > p {
  margin-bottom: var(--space-8);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Input Groups (used in contact and calculator pages) */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-group label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.required {
  color: var(--color-error);
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group input[type="email"],
.input-group input[type="url"],
.input-group textarea,
.input-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  outline: none;
  transition: all var(--transition-base);
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 0 16px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: var(--color-text-muted);
}

.input-group textarea {
  min-height: 120px;
  resize: vertical;
}

.input-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
  cursor: pointer;
}

.input-group select option {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.input-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 1em;
}

.form-success {
  text-align: center;
  padding: var(--space-8);
}

.success-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
}

.form-success h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--color-success);
}

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

/* Contact Info Sidebar */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-info-card {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  text-align: center;
}

.contact-info-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
}

.contact-info-card h3 {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
}

.contact-info-card p {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2);
}

.contact-info-card a {
  font-size: var(--text-sm);
  color: var(--color-primary-light);
  font-weight: var(--font-weight-medium);
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.contact-social a {
  font-size: var(--text-sm);
  color: var(--color-primary-light);
}

/* Contact FAQ */
.contact-faq {
  margin-top: var(--space-12);
}

.contact-faq h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-6);
  text-align: center;
}


/* ==========================================================================
   21. FAQ Accordion
   ========================================================================== */

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item.active {
  border-color: var(--color-surface-border-hover);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-base);
}

.faq-question:hover {
  background: rgba(59, 130, 246, 0.05);
}

.faq-question svg {
  flex-shrink: 0;
  margin-left: var(--space-4);
  color: var(--color-text-tertiary);
  transition: transform var(--transition-base);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.faq-answer {
  overflow: hidden;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p {
  padding: 0 var(--space-6) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}


/* ==========================================================================
   22. Glassmorphism Utility
   ========================================================================== */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}


/* ==========================================================================
   23. Scroll Animation
   ========================================================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   24. Calculator Container & Components (for tool pages)
   ========================================================================== */

.calculator-container {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.calculator-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

/* Result Display */
.result-display {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

.result-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
}

/* Page layout: main + sidebar */
.page-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-8);
  align-items: start;
}


/* ==========================================================================
   25. Keyframe Animations
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(10px, -15px); }
  50% { transform: translate(-5px, 10px); }
  75% { transform: translate(15px, 5px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}


/* ==========================================================================
   26. Responsive Design
   ========================================================================== */

/* --- Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
  :root {
    --container-padding: var(--space-5);
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .hero-section {
    min-height: 70vh;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Small Tablets / Large Phones (max-width: 768px) --- */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-4);
    --nav-height: 64px;
  }

  /* Nav: show hamburger, hide desktop nav */
  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg-dense);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    padding: var(--space-8) var(--space-6);
    flex-direction: column;
    z-index: calc(var(--z-nav) - 1);
    animation: fadeIn var(--transition-base);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu .nav-links {
    flex-direction: column;
    width: 100%;
  }

  .nav-menu .nav-link {
    font-size: var(--text-lg);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-divider);
    width: 100%;
    border-radius: 0;
  }

  .nav-menu .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    padding-left: var(--space-6);
    backdrop-filter: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-section {
    min-height: auto;
    padding: calc(var(--nav-height) + var(--space-12)) var(--container-padding) var(--space-12);
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-6);
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    text-align: center;
  }

  .cta-container {
    padding: var(--space-8) var(--space-6);
  }

  .content-section {
    padding: var(--space-6);
  }

  .page-header {
    padding-top: calc(var(--nav-height) + var(--space-8));
    padding-bottom: var(--space-6);
  }

  .contact-form-card {
    padding: var(--space-6);
  }

  .ad-slot-leaderboard {
    max-width: 320px;
    min-height: 50px;
  }
}

/* --- Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
  :root {
    --container-padding: var(--space-3);
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .tool-card {
    padding: var(--space-6);
  }

  .calculator-container {
    padding: var(--space-4);
    border-radius: var(--radius-xl);
  }

  .faq-question {
    padding: var(--space-4);
    font-size: var(--text-sm);
  }
}

/* --- Large Desktop (min-width: 1200px) --- */
@media (min-width: 1200px) {
  .hero-section {
    min-height: 90vh;
  }
}

/* --- Print --- */
@media print {
  .nav-header, .footer, .sidebar, .ad-slot, .cta-banner, .back-to-top {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}


/* ==========================================================================
   27. Light Mode Overrides
   ========================================================================== */

[data-theme='light'] {
  --color-bg-primary:       #f8fafc;
  --color-bg-secondary:     #f1f5f9;
  --color-bg-tertiary:      #e2e8f0;
  --color-bg-elevated:      #ffffff;

  --color-surface:          rgba(255, 255, 255, 0.85);
  --color-surface-hover:    rgba(255, 255, 255, 0.95);
  --color-surface-border:   rgba(59, 130, 246, 0.12);
  --color-surface-border-hover: rgba(59, 130, 246, 0.3);

  --color-primary:          #2563eb;
  --color-primary-light:    #3b82f6;
  --color-primary-dark:     #1d4ed8;

  --color-text-primary:     #0f172a;
  --color-text-secondary:   #475569;
  --color-text-tertiary:    #64748b;
  --color-text-muted:       #94a3b8;

  --color-border:           rgba(15, 23, 42, 0.08);
  --color-border-strong:    rgba(15, 23, 42, 0.15);
  --color-divider:          rgba(15, 23, 42, 0.06);

  --glass-bg:               rgba(255, 255, 255, 0.7);
  --glass-bg-dense:         rgba(255, 255, 255, 0.9);
  --glass-border:           rgba(59, 130, 246, 0.15);

  --shadow-sm:              0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md:              0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:              0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-xl:              0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow:            0 0 20px rgba(59, 130, 246, 0.15);
  --shadow-glow-strong:     0 0 40px rgba(59, 130, 246, 0.2);
}

[data-theme='light'] .nav-header.scrolled {
  background: rgba(248, 250, 252, 0.95);
}

[data-theme='light'] .hero-section {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6, 182, 212, 0.05), transparent),
    var(--color-bg-primary);
}

[data-theme='light'] ::-webkit-scrollbar-track { background: var(--color-bg-secondary); }
[data-theme='light'] ::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.25); }

[data-theme='light'] ::selection {
  background: rgba(59, 130, 246, 0.2);
  color: var(--color-text-primary);
}

[data-theme='light'] code {
  background: rgba(59, 130, 246, 0.08);
  color: var(--color-primary-dark);
}

[data-theme='light'] .tool-card:hover {
  box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.08);
}

[data-theme='light'] .input-group input[type="text"],
[data-theme='light'] .input-group input[type="number"],
[data-theme='light'] .input-group input[type="email"],
[data-theme='light'] .input-group textarea,
[data-theme='light'] .input-group select {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
}

[data-theme='light'] .input-group input:focus,
[data-theme='light'] .input-group select:focus,
[data-theme='light'] .input-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.06);
}

[data-theme='light'] .input-group select option {
  background: #ffffff;
  color: var(--color-text-primary);
}

[data-theme='light'] .footer {
  background: var(--color-bg-secondary);
}

[data-theme='light'] .ad-slot {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(15, 23, 42, 0.1);
}


/* ==========================================================================
   End of BizCalcLab Design System
   ========================================================================== */
