/* ==========================================================================
   K-CHAN S.A.S. — Design System & Main Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Tokens */
  --brand-red: #DD0A15;
  --brand-red-hover: #B80710;
  --brand-red-light: rgba(221, 10, 21, 0.08);
  --brand-red-glow: rgba(221, 10, 21, 0.25);
  
  --store-green: #059669;
  --store-green-hover: #047857;
  --store-green-light: rgba(5, 150, 105, 0.1);

  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  --white: #FFFFFF;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout & Spacing */
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-red: 0 12px 24px -6px rgba(221, 10, 21, 0.3);
  --shadow-green: 0 12px 24px -6px rgba(5, 150, 105, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--slate-800);
  background-color: var(--slate-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--brand-red);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-red-hover);
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.03em;
}

.brand-logo .dot {
  color: var(--brand-red);
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--brand-red-light);
  color: var(--brand-red);
}

.brand-badge.store-badge {
  background: var(--store-green-light);
  color: var(--store-green);
}

/* Nav Switcher Tabs */
.nav-switcher {
  display: flex;
  background: var(--slate-100);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
}

.nav-tab {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-600);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-tab:hover {
  color: var(--slate-900);
}

.nav-tab.active {
  background: var(--white);
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-red);
  color: var(--white);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  background: var(--brand-red-hover);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-store {
  background: var(--store-green);
  color: var(--white);
  box-shadow: var(--shadow-green);
}

.btn-store:hover {
  background: var(--store-green-hover);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--slate-800);
  border: 1px solid var(--slate-200);
}

.btn-secondary:hover {
  background: var(--slate-100);
  border-color: var(--slate-300);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-tag .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-red);
  box-shadow: 0 0 0 0 rgba(221, 10, 21, 0.4);
  animation: pulse 2s infinite;
}

.hero-tag .pulse-dot.green {
  background: var(--store-green);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(221, 10, 21, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(221, 10, 21, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(221, 10, 21, 0); }
}

.hero-title {
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--slate-900);
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--brand-red);
}

.hero-title span.green {
  color: var(--store-green);
}

.hero-subtitle {
  font-size: 19px;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-trust-badges {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-600);
}

.trust-item svg {
  color: var(--brand-red);
}

/* Interactive Preview Cards */
.preview-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--slate-100);
}

.preview-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-900);
}

.preview-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--store-green);
  background: var(--store-green-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.list-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--slate-50);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

.item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-800);
}

.store-comparison-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--white);
  transition: all var(--transition-fast);
}

.store-row.best-price {
  border-color: var(--store-green);
  background: var(--store-green-light);
}

.store-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--slate-900);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}

.store-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-900);
}

.store-dist {
  font-size: 13px;
  color: var(--slate-500);
}

.store-price {
  text-align: right;
}

.price-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--slate-900);
}

.best-price .price-val {
  color: var(--store-green);
}

.price-savings {
  font-size: 12px;
  font-weight: 700;
  color: var(--store-green);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-bg-white {
  background: var(--white);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-tag {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-red);
  margin-bottom: 12px;
  display: block;
}

.section-tag.green {
  color: var(--store-green);
}

.section-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 18px;
  color: var(--slate-600);
}

/* Feature Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-normal);
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--slate-300);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--brand-red-light);
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.card-icon.green {
  background: var(--store-green-light);
  color: var(--store-green);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 12px;
}

.card-text {
  font-size: 15px;
  color: var(--slate-600);
  line-height: 1.6;
}

/* Steps / How it works */
.step-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-red);
  color: var(--white);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-red);
}

.step-num.green {
  background: var(--store-green);
  box-shadow: var(--shadow-green);
}

.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.step-content p {
  font-size: 15px;
  color: var(--slate-600);
}

/* Tendero Calculator Widget */
.calc-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
}

.calc-slider-group {
  margin: 32px 0;
}

.calc-label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--slate-900);
}

.calc-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--slate-200);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--store-green);
  cursor: pointer;
  box-shadow: var(--shadow-green);
  transition: transform var(--transition-fast);
}

.calc-result-card {
  background: var(--slate-900);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  margin-top: 24px;
}

.calc-result-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  margin-bottom: 8px;
}

.calc-result-value {
  font-size: 38px;
  font-weight: 800;
  color: #34D399;
}

/* Accordion FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-button {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  font-size: 17px;
  font-weight: 700;
  color: var(--slate-900);
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-fast);
}

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

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
  padding: 0 24px;
  color: var(--slate-600);
  font-size: 15px;
  line-height: 1.6;
}

.faq-item.open .faq-content {
  padding: 0 24px 20px;
  max-height: 300px;
}

/* Store Lead Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--slate-400);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--store-green);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Footer */
.footer {
  background: var(--slate-900);
  color: var(--slate-400);
  padding: 80px 0 40px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-brand span {
  color: var(--brand-red);
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--slate-400);
  margin-bottom: 24px;
  max-width: 320px;
}

.footer-title {
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--slate-400);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--slate-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 68px;
  }
  .nav-tab {
    padding: 6px 12px;
    font-size: 13px;
  }
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 34px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
