/* ═══════════════════════════════════════════════════════════
   CREDITFORGE DESIGN SYSTEM — Polish Round Foundation
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Color Palette — Forge Brand */
  --forge-amber: #F59E0B;
  --forge-amber-light: #FBBF24;
  --forge-amber-dark: #D97706;
  --forge-copper: #D4A574;
  --forge-copper-light: #E8C09A;
  --forge-copper-dark: #B87333;
  --forge-charcoal: #2C2C2C;
  --forge-bg-dark: #0F1724;
  --forge-bg-card: #1A2332;
  --forge-bg-elevated: #1E2A3A;
  
  /* Border Colors */
  --forge-border: #2A3040;
  --forge-border-light: #3A4050;
  --forge-border-accent: rgba(212, 165, 116, 0.2);
  
  /* Text Colors */
  --forge-text-primary: #F1F5F9;
  --forge-text-secondary: #94A3B8;
  --forge-text-muted: #64748B;
  --forge-text-accent: var(--forge-copper);
  
  /* Feedback Colors */
  --forge-success: #86EFAC;
  --forge-error: #FCA5A5;
  --forge-warning: var(--forge-amber);
  
  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  
  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --letter-spacing-display: -0.03em;
  --letter-spacing-body: 0;
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;
  
  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 165, 116, 0.15);
  --shadow-glow: 0 0 20px rgba(212, 165, 116, 0.15);
  --shadow-input-focus: 0 0 0 3px rgba(212, 165, 116, 0.25);
  
  /* Glass morphism */
  --blur-glass: blur(12px);
  --glass-bg: rgba(15, 23, 36, 0.85);
  --glass-border: rgba(212, 165, 116, 0.12);
  
  /* Animation */
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.6s;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ── Typography Scale ────────────────────────────────────── */
.text-display { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: var(--letter-spacing-display); line-height: var(--line-height-tight); }
.text-h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: var(--letter-spacing-display); line-height: var(--line-height-tight); }
.text-h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: var(--letter-spacing-display); line-height: var(--line-height-tight); }
.text-h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 600; line-height: 1.3; }
.text-body-lg { font-size: 1.125rem; line-height: var(--line-height-relaxed); color: var(--forge-text-secondary); }
.text-body { font-size: 1rem; line-height: var(--line-height-normal); color: var(--forge-text-secondary); }
.text-small { font-size: 0.875rem; line-height: var(--line-height-normal); color: var(--forge-text-muted); }
.text-overline { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--forge-copper); }

/* ── Button System ───────────────────────────────────────── */
.btn { 
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; border-radius: var(--radius-full); cursor: pointer;
  transition: all var(--duration-normal) ease;
  border: none; text-decoration: none;
  min-height: 44px; /* accessibility tap target */
}
.btn:focus-visible { outline: 2px solid var(--forge-copper); outline-offset: 2px; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; min-height: 36px; }
.btn-md { padding: 12px 24px; font-size: 0.9375rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-primary { 
  background: linear-gradient(135deg, var(--forge-amber), var(--forge-amber-dark));
  color: #1a1a1a; 
}
.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
  filter: brightness(1.05);
}
.btn-secondary { 
  background: transparent; 
  border: 1.5px solid var(--forge-copper); 
  color: var(--forge-copper); 
}
.btn-secondary:hover { 
  background: rgba(212, 165, 116, 0.1); 
  border-color: var(--forge-copper-light);
  transform: translateY(-1px);
}
.btn-ghost { 
  background: transparent; 
  color: var(--forge-copper); 
  padding: 8px 4px;
  min-height: auto;
}
.btn-ghost:hover { color: var(--forge-copper-light); }
.btn-ghost::after { 
  content: ''; display: block; width: 0; height: 1.5px; 
  background: var(--forge-copper-light); 
  transition: width var(--duration-normal) ease; 
}
.btn-ghost:hover::after { width: 100%; }

/* ── Card System ─────────────────────────────────────────── */
.card {
  background: var(--forge-bg-card);
  border: 1px solid var(--forge-border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 40px);
  transition: all var(--duration-normal) ease;
}
.card:hover {
  border-color: var(--forge-border-accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 40px);
  transition: all var(--duration-normal) ease;
}
.card-glass:hover {
  border-color: rgba(212, 165, 116, 0.25);
  box-shadow: var(--shadow-glow);
}

/* ── Icon Circles ────────────────────────────────────────── */
.icon-circle { 
  display: flex; align-items: center; justify-content: center;
  background: rgba(212, 165, 116, 0.1); border-radius: 50%;
  flex-shrink: 0;
}
.icon-circle-sm { width: 32px; height: 32px; font-size: 14px; }
.icon-circle-md { width: 48px; height: 48px; font-size: 20px; }
.icon-circle-lg { width: 64px; height: 64px; font-size: 28px; }

/* ── Badge System ────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.05em;
}
.badge-amber { background: rgba(245, 158, 11, 0.12); color: var(--forge-amber-light); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-copper { background: rgba(212, 165, 116, 0.1); color: var(--forge-copper-light); border: 1px solid rgba(212, 165, 116, 0.15); }
.badge-teal { background: rgba(45, 212, 191, 0.1); color: #5EEAD4; border: 1px solid rgba(45, 212, 191, 0.15); }
.badge-ghost { background: rgba(255,255,255,0.05); color: var(--forge-text-secondary); border: 1px solid var(--forge-border); }

/* ── Section Styling ─────────────────────────────────────── */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-header { text-align: center; margin-bottom: var(--space-3xl); }
.section-header h2 { margin-bottom: var(--space-md); }
.section-header p { max-width: 640px; margin: 0 auto; color: var(--forge-text-secondary); }
.section-accent::before {
  content: ''; display: block; width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--forge-copper), var(--forge-amber));
  border-radius: 2px; margin: 0 auto var(--space-lg);
}

/* ── Grid Layouts ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { 
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Form System ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: var(--space-sm); }
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--forge-text-primary); }
.form-input {
  width: 100%; padding: 12px 16px;
  background: var(--forge-bg-dark);
  border: 1px solid var(--forge-border);
  border-radius: var(--radius-md);
  color: var(--forge-text-primary);
  font-size: 1rem;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--forge-copper);
  box-shadow: var(--shadow-input-focus);
}
.form-input::placeholder { color: var(--forge-text-muted); }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px; border: none;
  background: linear-gradient(90deg, transparent, var(--forge-border-light), transparent);
  margin: var(--space-3xl) 0;
}

/* ── Container ───────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-md { max-width: 1000px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 var(--space-lg); }

/* ── Utility: Text Colors ────────────────────────────────── */
.text-copper { color: var(--forge-copper) !important; }
.text-amber { color: var(--forge-amber) !important; }
.text-success { color: var(--forge-success) !important; }
.text-error { color: var(--forge-error) !important; }
.text-muted { color: var(--forge-text-muted) !important; }
.text-secondary { color: var(--forge-text-secondary) !important; }

/* ── Mobile-first Responsive Overrides ───────────────────── */
@media (max-width: 768px) {
  .section { padding: clamp(32px, 6vw, 64px) 0; }
  .btn-lg { padding: 14px 24px; width: 100%; }
  body { font-size: 16px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ================================================================
   POLISH ROUNDS 4-10 - Comprehensive Visual System
   Added: June 2026
   ================================================================ */

/* ===== ROUND 4: Typography & Spacing ===== */

/* Consistent heading hierarchy across all pages */
h1, .h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--forge-text, #E5E7EB);
}

h2, .h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--forge-text, #E5E7EB);
}

h3, .h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--forge-text, #E5E7EB);
}

/* Body text comfort */
p, .body-text, li {
  line-height: 1.7;
}

/* Stat numbers - monospace for tabular alignment */
.stat-number,
.counter,
[data-count],
.pricing-amount,
.score-number,
.gauge-label {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Consistent section vertical rhythm */
section,
.section {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* Section heading with copper accent underline */
.section-heading::after,
section > .text-center > h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--forge-copper, #D4A574), transparent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ===== ROUND 5: CTA Button System ===== */

/* Primary CTA - amber gradient */
.btn-primary,
a.btn-primary,
button.btn-primary,
.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--forge-amber, #F59E0B), #D97706);
  color: var(--forge-black, #0A0D11);
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
.cta-primary:hover {
  background: linear-gradient(135deg, #FBBF24, var(--forge-amber, #F59E0B));
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.3), 0 0 0 1px rgba(245, 158, 11, 0.1);
  transform: translateY(-2px);
}

.btn-primary:active,
a.btn-primary:active,
button.btn-primary:active,
.cta-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

/* Secondary CTA - copper outline */
.btn-secondary,
a.btn-secondary,
button.btn-secondary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--forge-copper, #D4A574);
  border: 1.5px solid var(--forge-copper, #D4A574);
  border-radius: 12px;
  padding: 13px 26px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-secondary:hover,
a.btn-secondary:hover,
button.btn-secondary:hover,
.cta-secondary:hover {
  background: rgba(212, 165, 116, 0.12);
  border-color: var(--forge-copper, #D4A574);
  color: #e8c09a;
  box-shadow: 0 0 20px rgba(212, 165, 116, 0.15);
  transform: translateY(-2px);
}

/* Ghost/link CTA - copper with underline animation */
.btn-ghost,
a.btn-ghost,
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--forge-copper, #D4A574);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 4px;
  position: relative;
  transition: color 0.3s ease;
}

.btn-ghost::after,
a.btn-ghost::after,
.cta-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: var(--forge-copper, #D4A574);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ghost:hover::after,
a.btn-ghost:hover::after,
.cta-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-ghost:hover,
a.btn-ghost:hover,
.cta-link:hover {
  color: #e8c09a;
}

/* Arrow animation on CTA hover */
.btn-primary .arrow,
.btn-secondary .arrow,
.btn-ghost .arrow,
.cta-arrow,
.btn-primary svg,
.btn-secondary svg {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover .arrow,
.btn-secondary:hover .arrow,
.btn-ghost:hover .arrow,
.btn-primary:hover .cta-arrow,
.btn-secondary:hover .cta-arrow,
.btn-primary:hover svg,
.btn-secondary:hover svg {
  transform: translateX(4px);
}

/* ===== ROUND 6: Color Consistency ===== */

/* Copper for all links, highlights, badges */

/* Gradient text for hero headings */
.hero-gradient-text,
.gradient-heading {
  background: linear-gradient(135deg, var(--forge-amber, #F59E0B) 0%, var(--forge-copper, #D4A574) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Badge/pill system - copper accent */
.badge,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  background: rgba(212, 165, 116, 0.08);
  border: 1px solid rgba(212, 165, 116, 0.2);
  color: var(--forge-copper, #D4A574);
  letter-spacing: 0.02em;
}

.badge-amber {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--forge-amber, #F59E0B);
}

/* Copper accent for check marks, icons in lists */
.check-icon,
.list-check svg,
.feature-check,
ul.features li::before {
  color: var(--forge-copper, #D4A574);
}

/* Highlighted/emphasized text */
mark, .highlight {
  background: rgba(212, 165, 116, 0.15);
  color: var(--forge-copper, #D4A574);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ===== ROUND 7: Card & Panel System ===== */

/* Glass-morphism card */
.glass-card,
.feature-card,
.pricing-card,
.step-card,
.info-card,
.testimonial-card {
  background: rgba(20, 24, 32, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 165, 116, 0.1);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.4s ease;
}

.glass-card:hover,
.feature-card:hover,
.step-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 165, 116, 0.15);
  border-color: rgba(212, 165, 116, 0.2);
}

/* Pricing card special hover - amber glow */
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 24px rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
}

/* Featured/popular pricing card */
.pricing-card.featured,
.pricing-card.popular {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.08);
}

/* Icon containers in cards */
.card-icon,
.feature-icon,
.step-icon,
.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.1);
  color: var(--forge-copper, #D4A574);
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}

.glass-card:hover .card-icon,
.feature-card:hover .feature-icon,
.step-card:hover .step-icon {
  background: rgba(212, 165, 116, 0.18);
  transform: scale(1.05);
}

/* Card header pattern */
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

/* Dividers inside cards */
.card-divider,
.pricing-card hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--forge-border, #2A3040), transparent);
  margin: 16px 0;
}

/* ===== ROUND 8: Mobile Responsive Refinements ===== */

@media (max-width: 768px) {
  /* Touch-friendly tap targets */
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  a.btn-primary,
  a.btn-secondary,
  a.btn-ghost,
  .cta-primary,
  .cta-secondary,
  button {
    min-height: 44px;
    min-width: 44px;
  }

  /* Heading scale-down */
  h1, .h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  h2, .h2 { font-size: clamp(1.4rem, 5vw, 2rem); }
  h3, .h3 { font-size: clamp(1.15rem, 4vw, 1.5rem); }

  /* Stack grids */
  .grid-2,
  .grid-3,
  .grid-4,
  .features-grid,
  .steps-grid,
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Cards: tighter padding on mobile */
  .glass-card,
  .feature-card,
  .pricing-card,
  .step-card,
  .info-card,
  .testimonial-card {
    padding: 20px;
    border-radius: 14px;
  }

  /* Section spacing tighter on mobile */
  section, .section {
    padding-top: clamp(2rem, 5vw, 3.5rem);
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
  }

  /* Footer: stack and center */
  footer .footer-grid,
  footer .grid,
  .footer-columns {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 24px;
  }

  footer .footer-grid > div,
  .footer-columns > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Horizontal scroll prevention */
  body {
    overflow-x: hidden;
  }
}

/* Tablet breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3,
  .features-grid,
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    margin-inline: auto;
  }
}

/* ===== ROUND 9: Footer Polish ===== */

/* Footer top border gradient */
footer,
.site-footer {
  position: relative;
  border-top: none;
}

footer::before,
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    var(--forge-charcoal, #141820) 0%,
    var(--forge-copper, #D4A574) 50%,
    var(--forge-charcoal, #141820) 100%
  );
}

/* Footer links */
footer a,
.site-footer a {
  color: var(--forge-muted, #6B7280);
  text-decoration: none;
  transition: color 0.25s ease;
}

footer a:hover,
.site-footer a:hover {
  color: var(--forge-copper, #D4A574);
}

/* Footer social icons */
footer .social-icon,
footer .social-links a,
.site-footer .social-icon,
.site-footer .social-links a {
  color: var(--forge-muted, #6B7280);
  transition: color 0.3s ease, transform 0.3s ease;
}

footer .social-icon:hover,
footer .social-links a:hover,
.site-footer .social-icon:hover,
.site-footer .social-links a:hover {
  color: var(--forge-copper, #D4A574);
  transform: translateY(-2px);
}

/* Copyright text */
footer .copyright,
.site-footer .copyright,
footer small {
  color: var(--forge-muted, #6B7280);
  font-size: 13px;
  opacity: 0.8;
}

/* Footer heading labels */
footer h4,
footer h5,
.site-footer h4,
.site-footer h5 {
  color: var(--forge-text, #E5E7EB);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* ===== ROUND 10: Micro-interactions & Final Touches ===== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background: rgba(212, 165, 116, 0.25);
  color: var(--forge-text, #E5E7EB);
}

/* Focus-visible for accessibility */
:focus-visible {
  outline: 2px solid var(--forge-copper, #D4A574);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Subtle pulse on featured elements */
@keyframes copperPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 165, 116, 0.2); }
  50% { box-shadow: 0 0 20px 4px rgba(212, 165, 116, 0.08); }
}

.pulse-copper {
  animation: copperPulse 3s ease-in-out infinite;
}

/* Shimmer effect for loading states or accents */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 165, 116, 0.06) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

/* Horizontal rule - branded */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--forge-border, #2A3040), transparent);
  margin: 2rem 0;
}

/* Scrollbar - dark theme */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--forge-black, #0A0D11);
}

::-webkit-scrollbar-thumb {
  background: var(--forge-steel, #1E2330);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--forge-border, #2A3040);
}

/* Image polish - prevent layout shift */
img {
  max-width: 100%;
  height: auto;
}

/* 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;
  }
}

/* ===== NUCLEAR: Desktop hamburger termination ===== */
@media (min-width: 769px) {
}

/* Nav Dropdown */

/* ====== Site Header (new nav) ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 64px;
  background: rgba(10, 13, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(42, 48, 64, 0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(10, 13, 17, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.header-logo-byline {
  font-size: 11px;
  color: rgba(212, 165, 116, 0.7);
  font-family: 'General Sans', 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}
.header-nav-link {
  font-family: 'General Sans', 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--forge-silver);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.header-nav-link:hover { color: var(--forge-text); }

/* More dropdown */
.header-more { position: relative; }
.header-more-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: 'General Sans', 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--forge-silver);
  transition: color 0.2s ease;
}
.header-more-btn:hover { color: var(--forge-text); }
.header-more-btn svg { transition: transform 0.2s ease; }
.header-more.open .header-more-btn svg,
.header-more:hover .header-more-btn svg { transform: rotate(180deg); }
.header-more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 24, 32, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(42, 48, 64, 0.5);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
}
.header-more:hover .header-more-menu,
.header-more.open .header-more-menu { display: block; }
.header-more-item {
  display: block;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'General Sans', 'DM Sans', sans-serif;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.header-more-item:hover {
  background: rgba(212, 165, 116, 0.1);
  color: var(--forge-copper);
}
.header-more-divider {
  height: 1px;
  background: rgba(42, 48, 64, 0.5);
  margin: 4px 0;
}

/* Right side */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
}
.header-ig {
  color: var(--forge-silver);
  transition: color 0.2s ease;
  display: flex;
}
.header-ig:hover { color: var(--forge-text); }
.header-cta {
  background: linear-gradient(135deg, #F59E0B, #D4A574);
  color: #0A0D11;
  font-family: 'General Sans', 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.header-cta:hover {
  opacity: 0.9;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* Hamburger */
.header-hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--forge-text);
  flex-shrink: 0;
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 17, 0.98);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-overlay.open { transform: translateX(0); }
.mobile-overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forge-text);
}
.mobile-overlay-link {
  font-family: 'Satoshi', 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--forge-text);
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-overlay-link:hover { color: var(--forge-copper); }
.mobile-overlay-divider {
  width: 60px;
  height: 1px;
  background: rgba(42, 48, 64, 0.5);
}
.mobile-overlay-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

/* ====== Header responsive ====== */
@media (max-width: 768px) {
  .site-header { height: 56px; }
  .header-nav { display: none; }
  .header-hamburger { display: flex; }
  .header-cta { font-size: 0.75rem; padding: 8px 14px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .header-inner { gap: 20px; }
  .header-nav { gap: 16px; }
  .header-nav-link, .header-more-btn { font-size: 0.8rem; }
  .header-cta { font-size: 0.78rem; padding: 8px 16px; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE POLISH — Rounds 25-30
   ═══════════════════════════════════════════════════════════ */

/* Prevent horizontal overflow on all pages */
body, html { overflow-x: hidden; max-width: 100vw; }

/* Mobile typography improvements */
@media (max-width: 768px) {
  /* Ensure base font is 16px to prevent iOS zoom on inputs */
  html { font-size: 16px; }
  
  /* Heading scale for mobile */
  h1, .text-display { font-size: clamp(1.75rem, 8vw, 2.5rem) !important; }
  h2, .text-h1 { font-size: clamp(1.5rem, 6vw, 2rem) !important; }
  h3, .text-h2 { font-size: clamp(1.25rem, 5vw, 1.5rem) !important; }
  
  /* Better mobile spacing */
  section, .section { padding-left: 16px; padding-right: 16px; }
  
  /* Full-width buttons on mobile */
  .btn-amber, .cta-primary, .btn-primary, a.btn-amber {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    min-height: 48px;
    line-height: 48px;
  }
  
  /* Stack grids to single column */
  .grid, [style*="grid-template-columns: repeat(3"], 
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Pricing cards stack and stretch */
  .pricing-card, [class*="pricing"] > div {
    margin-bottom: 16px;
  }
  
  /* Comparison tables horizontal scroll */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  
  /* Images don't overflow */
  img { max-width: 100%; height: auto; }
  
  /* Better touch targets */
  a, button, [role="button"], input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Footer stacks to single column */
  footer .grid, footer [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  
  /* Hide desktop-only elements */
  .desktop-only { display: none !important; }
  
  /* Reduce padding on cards */
  .glass-card, .card, [style*="padding: 40px"], [style*="padding:40px"] {
    padding: 20px !important;
  }
}

/* Tablet breakpoint refinements */
@media (min-width: 769px) and (max-width: 1024px) {
  /* 2-column grids on tablet */
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  
  /* Slightly reduced hero */
  .hero-main, [class*="hero"] { padding-top: 80px; padding-bottom: 60px; }
}

/* Small phones (iPhone SE, etc.) */
@media (max-width: 375px) {
  h1, .text-display { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  .container, .container-md, .container-sm { padding: 0 12px; }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-main, [class*="hero"] { padding-top: 40px; padding-bottom: 30px; min-height: auto; }
}

/* Print styles */
@media print {
  nav, .site-header, footer, .cta-section, .btn-amber { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  h1, h2, h3 { color: black; page-break-after: avoid; }
}

/* ═══════════════════════════════════════════════════════════
   MICRO-INTERACTIONS & PREMIUM FEEL — Rounds 36-42
   ═══════════════════════════════════════════════════════════ */

/* Staggered reveal animations for child elements */
.reveal.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal.visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal.visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal.visible > *:nth-child(6) { transition-delay: 0.4s; }

/* Smooth underline animation for text links in content areas */
article a, .content a, .blog-content a {
  text-decoration: none;
  background-image: linear-gradient(#D4A574, #D4A574);
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
  color: #D4A574;
}
article a:hover, .content a:hover, .blog-content a:hover {
  background-size: 100% 1.5px;
}

/* Premium card shine effect on hover */
.glass-card::before, .card::before, [style*="backdrop-filter"]::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transform: skewX(-15deg);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}
.glass-card:hover::before, .card:hover::before, [style*="backdrop-filter"]:hover::before {
  left: 125%;
}
.glass-card, .card, [style*="backdrop-filter"] {
  position: relative;
  overflow: hidden;
}

/* Smooth scroll indicator animation */
@keyframes scrollPulse {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}
.scroll-indicator { animation: scrollPulse 2s ease-in-out infinite; }

/* Number counter animation helper */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-number.visible { animation: countUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Tooltip styling */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1E2A3A;
  color: #F1F5F9;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  border: 1px solid #2A3040;
  z-index: 100;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Enhanced pricing card "Most Popular" badge pulse */
.popular-badge, [class*="popular"] {
  animation: subtlePulse 3s ease-in-out infinite;
}
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 165, 116, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(212, 165, 116, 0); }
}

/* Smooth image loading */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}
img[loading="lazy"].loaded, img[loading="lazy"][complete] {
  opacity: 1;
}

/* Better scrollbar styling for dark theme */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0F1724; }
::-webkit-scrollbar-thumb { background: #2A3040; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3A4050; }

/* Reduced motion preference (accessibility) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Focus-within for form groups */
.form-group:focus-within label {
  color: #D4A574;
}

/* Copper gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, #D4A574, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated border on active/focused cards */
.card:focus-within, .glass-card:focus-within {
  border-color: rgba(212, 165, 116, 0.3);
  box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.1), var(--shadow-card);
}
