/* ============================================
   ChronoTec Official Website - Shared Styles
   Style: Warm & Comfortable Home Feel
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Base colors */
  --bg-primary: #FAF7F2;       /* warm cream white */
  --bg-secondary: #F3EDE4;     /* warm beige */
  --bg-card: #FFFFFF;           /* pure white card */
  --bg-hero: #F0E8DB;          /* warm tan hero */

  /* Text colors */
  --text-primary: #3A322B;     /* warm near-black */
  --text-secondary: #6B5F54;   /* warm brown */
  --text-light: #9A8E83;       /* light warm gray */
  --text-on-dark: #FAF7F2;     /* light text on dark bg */

  /* Accent colors */
  --accent-primary: #C4956A;   /* warm gold-brown */
  --accent-hover: #B07D52;     /* darker gold-brown */

  /* Product accent colors (muted, warm-tinted) */
  --color-basic: #6E9E62;      /* muted sage green */
  --color-basic-light: #E8F0E5;/* very light green tint */
  --color-basic-dark: #4A7A3F; /* darker green for emphasis */

  --color-mid: #C8864A;        /* muted warm amber */
  --color-mid-light: #F5EDE3;  /* very light amber tint */
  --color-mid-dark: #9A6530;   /* darker amber for emphasis */

  --color-pro: #7E6199;        /* muted soft purple */
  --color-pro-light: #EDE5F3;  /* very light purple tint */
  --color-pro-dark: #5C4077;   /* darker purple for emphasis */

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(58, 50, 43, 0.06);
  --shadow-md: 0 4px 12px rgba(58, 50, 43, 0.08);
  --shadow-lg: 0 8px 30px rgba(58, 50, 43, 0.10);

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Spacing */
  --section-padding: 80px 0;
  --container-max: 1100px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

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

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(58, 50, 43, 0.06);
  transition: box-shadow 0.3s;
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
  line-height: 1.2;
  text-decoration: none;
}
.nav-logo .logo-icon {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}
.nav-logo span {
  color: var(--accent-primary);
}
.nav-logo .tagline {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-top: 1px;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 15px;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 1px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 1px;
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(170deg, var(--bg-hero) 0%, var(--bg-primary) 70%);
  text-align: center;
}
.hero-badge {
  display: inline-block;
  font-size: 13px;
  color: var(--accent-primary);
  background: rgba(196, 149, 106, 0.12);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 1px;
}
.hero h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-primary);
}
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196, 149, 106, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid rgba(58, 50, 43, 0.2);
}
.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* --- Pain Points Section --- */
.pain-section {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.pain-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.pain-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pain-icon {
  font-size: 28px;
  margin-bottom: 12px;
}
.pain-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.pain-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Products Overview --- */
.products-section {
  padding: var(--section-padding);
  background: var(--bg-primary);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-secondary);
}
.product-card-body {
  padding: 24px;
}
.product-card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.product-card-tag.green {
  background: var(--color-basic-light);
  color: var(--color-basic-dark);
}
.product-card-tag.amber {
  background: var(--color-mid-light);
  color: var(--color-mid-dark);
}
.product-card-tag.purple {
  background: var(--color-pro-light);
  color: var(--color-pro-dark);
}
.product-card-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.product-card-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.product-card-body .learn-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-primary);
  transition: gap 0.2s;
}
.product-card:hover .learn-more {
  gap: 8px;
}

/* --- Trust Section --- */
.trust-section {
  padding: 60px 0;
  background: var(--bg-secondary);
}
.trust-grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.trust-item {
  text-align: center;
}
.trust-item .icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.trust-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.trust-item p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- QR Code / Purchase Section --- */
.purchase-section {
  padding: var(--section-padding);
  background: var(--bg-primary);
}
.qr-grid {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.qr-item {
  text-align: center;
}
.qr-item img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.qr-item p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Footer --- */
.footer {
  background: #3A322B;
  color: rgba(250, 247, 242, 0.7);
  padding: 40px 0 24px;
}
.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: 1px;
  line-height: 1.2;
}
.footer-logo .logo-icon {
  height: 30px;
  width: auto;
  flex-shrink: 0;
}
.footer-logo span { color: var(--accent-primary); }
.footer-logo .tagline {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: rgba(250, 247, 242, 0.4);
  margin-top: 2px;
}
.footer-info {
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}
.footer-icp {
  font-size: 12px;
  color: rgba(250, 247, 242, 0.4);
  margin-top: 8px;
}

/* ============================================
   Product Page Specific Styles
   ============================================ */

/* Product Tier Switcher */
.product-switcher {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(58, 50, 43, 0.08);
  padding: 12px 0;
}
.product-switcher .container {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.switcher-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1.5px solid rgba(58, 50, 43, 0.08);
  text-decoration: none;
  transition: all 0.25s;
  white-space: nowrap;
}
.switcher-tab:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.switcher-tab .tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.switcher-tab.basic .tab-dot { background: var(--color-basic); }
.switcher-tab.mid .tab-dot { background: var(--color-mid); }
.switcher-tab.pro .tab-dot { background: var(--color-pro); }

/* Active states */
.switcher-tab.basic.active {
  background: var(--color-basic-light);
  border-color: var(--color-basic);
  color: var(--color-basic-dark);
  font-weight: 600;
}
.switcher-tab.mid.active {
  background: var(--color-mid-light);
  border-color: var(--color-mid);
  color: var(--color-mid-dark);
  font-weight: 600;
}
.switcher-tab.pro.active {
  background: var(--color-pro-light);
  border-color: var(--color-pro);
  color: var(--color-pro-dark);
  font-weight: 600;
}

/* Product hero - different color per product */
.product-hero {
  padding: 120px 0 60px;
  text-align: center;
}
.product-hero.basic {
  background: linear-gradient(170deg, var(--color-basic-light) 0%, var(--bg-primary) 70%);
}
.product-hero.mid {
  background: linear-gradient(170deg, var(--color-mid-light) 0%, var(--bg-primary) 70%);
}
.product-hero.pro {
  background: linear-gradient(170deg, var(--color-pro-light) 0%, var(--bg-primary) 70%);
}
.product-hero .product-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.product-hero .product-tag.green {
  background: rgba(110, 158, 98, 0.15);
  color: var(--color-basic-dark);
}
.product-hero .product-tag.amber {
  background: rgba(200, 134, 74, 0.15);
  color: var(--color-mid-dark);
}
.product-hero .product-tag.purple {
  background: rgba(126, 97, 153, 0.15);
  color: var(--color-pro-dark);
}
.product-hero h1 {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.product-hero .tagline {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Selling points */
.selling-section {
  padding: var(--section-padding);
}
.selling-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.selling-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid transparent;
  transition: transform 0.25s, box-shadow 0.25s;
}
.selling-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.selling-card.basic { border-top-color: var(--color-basic); }
.selling-card.mid { border-top-color: var(--color-mid); }
.selling-card.pro { border-top-color: var(--color-pro); }

.selling-card .card-icon {
  font-size: 28px;
  margin-bottom: 14px;
}
.selling-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.selling-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Special highlight banner for PRO */
.highlight-banner {
  background: linear-gradient(135deg, var(--color-pro-light) 0%, rgba(126, 97, 153, 0.12) 100%);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  margin-bottom: 40px;
  border: 1px solid rgba(126, 97, 153, 0.15);
}
.highlight-banner h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-pro-dark);
  margin-bottom: 8px;
}
.highlight-banner p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Install section */
.install-section {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}
.install-category {
  margin: 40px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-primary);
}
.install-category:first-of-type {
  margin-top: 0;
}
.install-category-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.install-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.install-flow {
  font-size: 13px;
  color: var(--accent-primary);
  text-align: center;
  margin-top: 12px;
  padding: 8px 16px;
  background: rgba(217, 104, 21, 0.06);
  border-radius: var(--radius-sm);
}
.install-block {
  margin-bottom: 48px;
}
.install-block:last-child {
  margin-bottom: 0;
}
.install-block h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.install-block h3 .badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--accent-primary);
  color: #fff;
}
.install-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.install-diagram {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.install-diagram img {
  width: 100%;
  border-radius: var(--radius-sm);
}
.install-diagram .caption {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  margin-top: 10px;
}
.install-scenes-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.install-scene {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.install-scene img {
  width: 100%;
  border-radius: var(--radius-sm);
}
.install-scene .caption {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  margin-top: 10px;
}

/* Notice box */
.notice-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 32px;
  border-left: 4px solid var(--accent-primary);
}
.notice-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.notice-box ul {
  list-style: none;
  padding: 0;
}
.notice-box li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
}
.notice-box li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--accent-primary);
  font-weight: 700;
}

/* ============================================
   About Page
   ============================================ */
.about-section {
  padding: 120px 0 80px;
}
.about-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
  max-width: 720px;
  margin: 0 auto;
}
.about-card h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.about-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-card .contact-list {
  margin-top: 28px;
}
.about-card .contact-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(58, 50, 43, 0.06);
}
.about-card .contact-item:last-child {
  border-bottom: none;
}
.about-card .contact-label {
  font-size: 14px;
  color: var(--text-light);
  min-width: 80px;
}
.about-card .contact-value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 48px 0;
  }

  .hero {
    padding: 110px 0 48px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero p {
    font-size: 16px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(58, 50, 43, 0.06);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }

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

  .products-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

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

  .install-content {
    grid-template-columns: 1fr;
  }

  .install-scenes-group {
    grid-template-columns: 1fr;
  }

  .qr-grid {
    gap: 20px;
  }
  .qr-item img {
    width: 110px;
    height: 110px;
  }

  .product-hero h1 {
    font-size: 26px;
  }

  .product-switcher {
    top: 64px;
  }
  .switcher-tab {
    padding: 7px 14px;
    font-size: 13px;
  }

  .about-card {
    padding: 28px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .product-card-img {
    height: 180px;
  }
}
