/* 星芽玩具 — design tokens & layout */
@font-face {
  font-family: "Baloo 2";
  src: url("../assets/fonts/baloo2-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Comic Neue";
  src: url("../assets/fonts/comicneue-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Comic Neue";
  src: url("../assets/fonts/comicneue-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --secondary: #3b82f6;
  --cta: #f97316;
  --cta-hover: #ea580c;
  --bg: #f8fafc;
  --bg-warm: #fff7ed;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-warm: #fed7aa;
  --success: #16a34a;
  --pink: #ec4899;
  --yellow: #f59e0b;
  --mint: #34d399;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 12px 32px rgba(37, 99, 235, 0.12);
  --container: 1120px;
  --nav-h: 72px;
  --font-display: "Baloo 2", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Comic Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--cta-hover);
}

:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text);
}

.brand img,
.brand svg {
  width: 168px;
  height: 40px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-links a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  text-decoration: none;
}

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

.btn-primary {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
  background: var(--cta-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  background:
    radial-gradient(circle at 12% 20%, rgba(37, 99, 235, 0.12), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(249, 115, 22, 0.14), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-warm);
  border: 1px solid var(--border-warm);
  color: #9a3412;
  font-weight: 700;
  font-size: 0.875rem;
  margin: 0 0 1rem;
}

.hero h1,
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-lead,
.page-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--primary);
  line-height: 1.2;
}

.stat span {
  color: var(--muted);
  font-size: 0.875rem;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--bg-warm);
}

.badge-float {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.badge-float.top {
  top: -0.75rem;
  right: 1rem;
  color: #9a3412;
}

.badge-float.bottom {
  left: 1rem;
  bottom: -0.75rem;
  color: var(--primary);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* Cards / grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-warm);
}

.card-body {
  padding: 1.15rem 1.2rem 1.35rem;
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}

.tag.orange {
  background: #ffedd5;
  color: #9a3412;
}

.tag.pink {
  background: #fce7f3;
  color: #9d174d;
}

.tag.mint {
  background: #d1fae5;
  color: #065f46;
}

/* Feature blocks */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.feature-row + .feature-row {
  margin-top: 3.5rem;
}

.feature-row.reverse .feature-copy {
  order: 2;
}

.feature-media img {
  border-radius: 20px;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.feature-copy h2,
.feature-copy h3 {
  font-family: var(--font-display);
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.feature-copy p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.checklist {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Category strip */
.category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.category-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.category-chip:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.category-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.category-chip span {
  color: var(--muted);
  font-size: 0.875rem;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
  vertical-align: middle;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3rem 0 2.5rem;
  background:
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.1), transparent 30%),
    linear-gradient(180deg, #fff, var(--bg));
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 3px solid var(--primary-soft);
}

.timeline li {
  position: relative;
  padding: 0 0 1.75rem 1.5rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.35rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--cta);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.timeline strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.timeline p {
  margin: 0;
  color: var(--muted);
}

/* News list */
.news-list {
  display: grid;
  gap: 1.25rem;
}

.news-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.news-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.news-item img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

.news-item .news-body {
  padding: 1.25rem 1.25rem 1.25rem 0;
}

.news-meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 0 0.4rem;
}

.news-item h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.news-item p {
  margin: 0;
  color: var(--muted);
}

/* Info grid (contact, no form) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.info-card p,
.info-card address {
  margin: 0;
  color: var(--muted);
  font-style: normal;
}

.info-card a {
  font-weight: 700;
}

/* Table */
.cert-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.cert-table th,
.cert-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cert-table th {
  background: var(--primary-soft);
  color: #1e3a8a;
  font-family: var(--font-display);
}

.cert-table tr:last-child td {
  border-bottom: 0;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #1d4ed8, #2563eb 45%, #f97316 140%);
  color: #fff;
  border-radius: 24px;
  padding: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.cta-band h2 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-band p {
  margin: 0;
  opacity: 0.92;
  max-width: 36rem;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  color: #fff;
  font-family: var(--font-display);
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.panel h3 {
  font-family: var(--font-display);
  margin: 0 0 0.65rem;
}

.panel p {
  margin: 0;
  color: var(--muted);
}

/* Product filter chips */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.filter-chip:hover {
  border-color: var(--secondary);
  color: var(--primary);
}

.filter-chip[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.product-card[hidden] {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-copy {
    order: 0;
  }

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

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

  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.25rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    border-radius: 12px;
  }

  .hero {
    padding: 2.25rem 0 3rem;
  }

  .hero-stats,
  .info-grid,
  .grid-2,
  .card-grid,
  .category-strip {
    grid-template-columns: 1fr;
  }

  .news-item {
    grid-template-columns: 1fr;
  }

  .news-item .news-body {
    padding: 0 1.1rem 1.25rem;
  }

  .news-item img {
    min-height: 200px;
  }

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

  .cta-band {
    padding: 1.75rem;
  }

  .section {
    padding: 3rem 0;
  }

  .cert-table {
    display: block;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
