/* ============================================
   KMK Solutions – Shared Design System
   Inspired by Wise.com: warm, professional, trustworthy
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Primary Navy */
  --navy: #1A2744;
  --navy-dark: #0F1A30;
  --navy-light: #2A3D5C;

  /* Accent Gold */
  --accent: #D4A03C;
  --accent-hover: #B8862F;
  --accent-light: #F0DCA0;

  /* Text */
  --text-primary: #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted: #7A7A7A;
  --text-inverse: #FFFFFF;

  /* Backgrounds */
  --bg-white: #FFFFFF;
  --bg-warm: #FAF8F5;
  --bg-cream: #F5F0EB;
  --bg-dark: #1A2744;

  /* Borders & Dividers */
  --border-light: #E8E4DF;
  --border-medium: #D1CBC4;

  /* Status */
  --success: #10B981;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10);

  /* Typography */
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Layout */
  --max-w: 1200px;
  --section-pad: clamp(64px, 10vw, 120px);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text-secondary);
  background: var(--bg-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.7;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* --- Scroll Reveal --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }
.reveal-d4 { transition-delay: 0.48s; }

/* --- Gradient shimmer on section tags --- */
.section-tag {
  background: linear-gradient(90deg, var(--accent), var(--accent-hover), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}
.section-tag::before {
  -webkit-text-fill-color: initial;
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Button glow pulse on primary --- */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: none;
}
.btn-primary:hover::after {
  animation: btnShine 0.6s ease-out;
}
@keyframes btnShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Smooth counter for stat numbers --- */
.stat-card, .about-stat {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* --- Feature card border glow on hover --- */
.feature-card {
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: -50%;
  width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transform: translateX(-100%);
  transition: none;
}
.feature-card:hover::before {
  animation: cardSweep 0.8s ease-out;
}
@keyframes cardSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Glow effect for step numbers --- */
.step-num {
  transition: all 0.3s ease;
}
.step-card:hover .step-num {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(26,39,68,0.25);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 40px;
  width: auto;
  transition: filter 0.4s;
}

.nav:not(.scrolled) .nav-logo img {
  filter: brightness(0) invert(1);
}

.nav-product {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.4s;
}

.nav:not(.scrolled) .nav-product { color: var(--text-inverse); }
.nav.scrolled .nav-product { color: var(--navy); }

.nav-product .by {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.6;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}

.nav:not(.scrolled) .nav-links a { color: rgba(255,255,255,0.8); }
.nav:not(.scrolled) .nav-links a:hover { color: #fff; }
.nav.scrolled .nav-links a { color: var(--text-secondary); }
.nav.scrolled .nav-links a:hover { color: var(--navy); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(212,160,60,0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,160,60,0.3);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--text-inverse);
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}

.btn-outline-dark {
  background: transparent;
  border: 1.5px solid var(--border-light);
  color: var(--text-primary);
}

.btn-outline-dark:hover {
  border-color: var(--navy);
  background: var(--bg-warm);
}

.btn-dark {
  background: var(--navy);
  color: var(--text-inverse);
}

.btn-dark:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 10px;
}

/* --- Section Utilities --- */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-tag::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-header h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  background: var(--navy-dark);
  padding: 48px 24px 28px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo img {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.7);
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.2);
  width: 100%;
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* --- Mobile Navigation --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  transition: 0.4s;
}

.nav:not(.scrolled) .nav-toggle span { background: #fff; }
.nav.scrolled .nav-toggle span { background: var(--navy); }

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

.nav-links.active {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-white);
  padding: 100px 32px 32px;
  gap: 24px;
  z-index: 998;
  animation: fadeIn 0.3s ease;
}

.nav-links.active a {
  color: var(--text-primary) !important;
  font-size: 18px !important;
}

.nav-links.active .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

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

/* --- FAQ Accordion --- */
.faq { padding: var(--section-pad) 24px; }

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  transition: color 0.2s;
}

.faq-q:hover { color: var(--accent); }

.faq-chevron {
  font-size: 12px;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s;
}

.faq-item.open .faq-a {
  max-height: 300px;
  padding-bottom: 22px;
}

.faq-a p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 40px;
  }
  .hero-text { max-width: 100%; margin: 0 auto; }
  .hero-sub { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: 2; }
  .features-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .demo-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .steps { grid-template-columns: 1fr !important; max-width: 400px; margin: 0 auto; }
  .steps::before { display: none; }
  .features-grid { grid-template-columns: 1fr !important; }
  .footer-inner { flex-direction: column; text-align: center; }
  .products-grid { grid-template-columns: 1fr !important; }
  .trust-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
