/* ===========================================================
   家居照明灯库 · 首页样式
   基准宽度 1440（视觉稿 1024×1536 等比放大 1.40625）
   =========================================================== */

/* 设计 token 集中在 css/tokens.css（本文件不含 :root） */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -48px;
  padding: 8px 16px; border-radius: 0 0 8px 8px;
  background: var(--ink); color: #fff; font-size: 13px; z-index: 200;
}
.skip-link:focus { top: 0; }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------- M0 header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-stuck { box-shadow: 0 1px 12px rgba(60, 45, 32, .08); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 76px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.brand-text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--accent-ink);
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.site-nav a {
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 13px;
  font-size: 14px; color: var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease;
}
.site-nav a:hover { background: var(--hover-tint); }
.site-nav a.is-active {
  background: var(--accent);
  font-weight: 700;
}
.site-nav a[aria-current="page"] { background: var(--accent); font-weight: 700; }

.header-tools { display: flex; align-items: center; gap: 14px; flex: none; }
.btn-ghost {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px;
  border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--accent-ink);
  background: var(--ghost-bg);
  transition: background-color .18s ease;
}
.btn-ghost:hover { background: var(--ghost-bg-hover); }

.search {
  position: relative;
  display: flex; align-items: center;
  width: 140px;
}
.search-ico { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font: inherit; font-size: 13px;
  color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--accent-strong); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------------- M1 hero ---------------- */
.hero {
  position: relative;
  height: 423px;
  background: linear-gradient(96deg, var(--hero-1) 0%, var(--hero-2) 52%, #f0dcc6 100%);
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; height: 100%; }
.hero-copy {
  width: 46%;
  padding-top: 60px;
}
.eyebrow {
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 14px;
  border: 1px solid #ddc3a4;
  border-radius: 999px;
  background: rgba(255, 250, 243, .78);
  font-size: 13px; letter-spacing: .4px;
  color: #6d5942;
}
.hero h1 {
  margin-top: 9px;
  font-size: 42px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: .5px;
}
.hero-lead {
  margin-top: 13px;
  width: 580px;
  max-width: 100%;
  font-size: 15.5px;
  line-height: 1.9;
  color: #4a3f36;
}
.hero-media {
  position: absolute;
  top: 0; bottom: 0;
  right: max(0px, calc((100% - 1440px) / 2));
  width: min(49.6%, 713px);
  z-index: 1;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-l) 0 0 var(--radius-l);
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(270deg, rgba(236, 216, 196, .10) 0%, rgba(236, 216, 196, .34) 30%, rgba(236, 216, 196, .62) 46%, rgba(236, 216, 196, 0) 62%);
  border-radius: var(--radius-l) 0 0 var(--radius-l);
  pointer-events: none;
}

/* ---------------- M1b stats ---------------- */
.stats-bar { background: var(--bg); }
.stats-inner {
  display: flex; align-items: center; gap: 14px;
  padding-top: 2px; padding-bottom: 36px;
}
.stat-pills { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stat-pills li {
  display: inline-flex; align-items: center; gap: 8px;
  height: 50px; padding: 0 22px;
  background: var(--cream);
  border-radius: 10px;
  font-size: 14.5px; color: var(--ink);
}
.stat-pills strong { font-size: 16px; font-weight: 800; }
.stat-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  color: #c79620;
  border-radius: 6px;
}
.stat-ico--round { border-radius: 50%; }

.btn-cta {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 24px;
  background: var(--accent);
  border-radius: 10px;
  font-size: 14px; color: #2b2114;
  transition: transform .18s ease, background-color .18s ease;
}
.btn-cta:hover { background: #f6bb2b; transform: translateY(-1px); }
.cta-strong { font-weight: 800; }
.btn-cta::after { content: "→"; font-size: 15px; }

/* ---------------- shared section ---------------- */
section[id], .section[id] { scroll-margin-top: 92px; }
.section { padding: 0 var(--gutter); }
.section > .wrap { padding-left: 0; padding-right: 0; }
.sec-title {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .3px;
}
.sec-title::before {
  content: "";
  width: 4px; height: 19px;
  border-radius: 3px;
  background: var(--accent-strong);
}

/* ---------------- M2 category tiles ---------------- */
.section--cats { padding-top: 0; }
.tile-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}
.tile a {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile a:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.tile-media {
  display: block;
  background: var(--tile-bg);
  aspect-ratio: 1.6 / 1;
  overflow: hidden;
}
.tile-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.tile-label {
  display: flex; align-items: center; gap: 6px;
  height: 58px; padding: 0 11px;
  font-size: 14px; font-weight: 700;
  background: #fffdfb;
}
.tile-label em {
  font-style: normal; font-size: 11px; font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: .3px;
}
.tile-empty {
  margin-top: 14px;
  font-size: 13.5px; color: var(--ink-2);
}

/* ---------------- M3 wattage ---------------- */
.section--wattage { margin-top: 24px; }
.watt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 202px;
  gap: 16px;
  align-items: start;
}
.table-scroll { overflow-x: auto; cursor: pointer; }
.watt-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13.5px;
}
.watt-table col:nth-child(1) { width: 18.2%; }
.watt-table col:nth-child(2),
.watt-table col:nth-child(3),
.watt-table col:nth-child(4),
.watt-table col:nth-child(5) { width: 16%; }
.watt-table th, .watt-table td {
  padding: 0 18px;
  height: 36px;
  text-align: left;
  border-bottom: 1px solid #f0e4d8;
  white-space: nowrap;
}
.watt-table thead th {
  height: 40px;
  background: #ecd8c8;
  font-weight: 700;
  color: #3a2f26;
  border-bottom: 0;
}
.watt-table thead th:first-child { border-radius: 8px 0 0 0; }
.watt-table thead th:last-child { border-radius: 0 8px 0 0; }
.watt-table tbody th { font-weight: 700; }
.watt-table th:first-child, .watt-table td:first-child { padding-left: 32px; }
.watt-table tbody tr:last-child th, .watt-table tbody tr:last-child td { border-bottom: 0; }

.watt-note {
  display: flex; gap: 10px;
  padding: 14px 16px;
  background: var(--note-bg);
  border-radius: var(--radius-m);
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-warm);
}
.watt-note-ico { color: var(--accent-ink); flex: none; margin-top: 1px; }

/* ---------------- M4 featured ---------------- */
.section--featured { margin-top: 25px; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.feat-card a {
  display: flex; flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feat-card a:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); border-color: #e2cfbc; }
.feat-media { display: block; aspect-ratio: 3.2 / 1; overflow: hidden; background: var(--card-bg); }
.feat-media img { width: 100%; height: 100%; object-fit: cover; }
.feat-card h3 {
  padding: 16px 15px 0;
  font-size: 15px; font-weight: 800; line-height: 1.45;
}
.feat-card p {
  padding: 7px 15px 20px;
  font-size: 13px; line-height: 1.8;
  color: var(--ink-2);
}

/* ---------------- M5 steps ---------------- */
.section--steps { margin-top: 25px; }
.step-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 12px 14px 11px;
  background: linear-gradient(150deg, #fdf7ee 0%, #fbf1e3 100%);
  border-radius: var(--radius-m);
  counter-increment: step;
  text-align: center;
}
.step::before {
  content: counter(step);
  position: absolute; top: -8px; left: 12px;
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 12px; font-weight: 800; color: var(--on-accent);
}
.step::after {
  content: "";
  position: absolute; right: -22px; top: 50%;
  width: 14px; height: 14px;
  margin-top: -7px;
  border-top: 1.6px solid var(--chevron);
  border-right: 1.6px solid var(--chevron);
  transform: rotate(45deg);
}
.step:last-child::after { content: none; }
.step-ico { display: inline-flex; color: var(--ink); margin-bottom: 3px; }
.step-ico svg { width: 17px; height: 17px; }
.step h3 { font-size: 13.5px; font-weight: 800; }
.step p { margin-top: 3px; font-size: 11.5px; line-height: 1.65; color: var(--ink-2); }

/* ---------------- M6 spaces ---------------- */
.section--spaces { margin-top: 41px; }
.space-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.space-card {
  display: flex; gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: var(--radius-m);
}
.space-media {
  flex: none;
  width: 168px;
  aspect-ratio: 1.5 / 1;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--card-bg);
}
.space-media img { width: 100%; height: 100%; object-fit: cover; }
.space-body h3 { font-size: 14.5px; font-weight: 800; }
.space-body p { margin-top: 6px; font-size: 12px; line-height: 1.7; color: var(--ink-2); }

/* ---------------- M7 note ---------------- */
.section--note { margin-top: 28px; }
.note-card {
  display: flex; gap: 14px;
  padding: 21px 20px;
  background: var(--note-bg);
  border-radius: var(--radius-l);
}
.note-ico {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
}
.note-body h2 { font-size: 15px; font-weight: 800; }
.note-body p { margin-top: 2px; font-size: 12.5px; line-height: 1.8; color: var(--ink-warm); }

/* ---------------- M8 footer ---------------- */
.site-footer {
  margin-top: 28px;
  background: var(--dark);
  color: var(--footer-link);
  padding-top: 38px;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr);
  gap: 34px;
  padding-bottom: 26px;
}
.brand--footer .brand-text strong { color: #fff; font-size: 17px; }
.footer-brand p {
  margin-top: 12px;
  max-width: 330px;
  font-size: 12.5px; line-height: 1.85;
  color: var(--footer-muted);
}
.footer-col h3 { font-size: 13.5px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-col ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
}
.footer-col li { font-size: 12.5px; color: var(--footer-link); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--dark-line);
  padding: 16px var(--gutter) 20px;
  text-align: center;
}
.footer-bottom p { font-size: 11.5px; color: var(--footer-muted); }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  :root { --gutter: 28px; }
  .site-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 24px 18px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(60, 45, 32, .10);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { height: 42px; border-radius: 8px; }
  .nav-toggle { display: flex; order: 3; margin-left: auto; }
  .header-tools { order: 2; }
  .hero { height: auto; padding-bottom: 0; }
  .hero-inner { padding-bottom: 22px; }
  .hero-copy { width: 100%; padding-top: 34px; }
  .hero h1 { font-size: 34px; }
  .hero-lead { width: 100%; max-width: 620px; }
  .hero-media { position: static; width: 100%; height: 300px; }
  .hero-media img, .hero-media::after { border-radius: 0; }
  .hero-media::after { display: none; }
  .tile-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .step::after { content: none; }
  .space-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
}

@media (max-width: 900px) {
  .watt-grid { grid-template-columns: minmax(0, 1fr); }
  .search { width: 120px; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; }
  .header-inner { height: 66px; gap: 10px; }
  .brand-text strong { font-size: 15.5px; }
  .header-tools .btn-ghost { display: none; }
  .search { display: none; }
  .hero h1 { font-size: 28px; }
  .hero-lead { font-size: 13.5px; }
  .hero-media { height: 240px; }
  .stats-inner { flex-direction: column; align-items: stretch; gap: 12px; padding-bottom: 28px; }
  .stat-pills { gap: 8px; }
  .stat-pills li { height: 42px; font-size: 12.5px; padding: 0 12px; }
  .btn-cta { margin-left: 0; justify-content: center; }
  .sec-title { font-size: 17px; }
  .tile-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .feat-grid { grid-template-columns: minmax(0, 1fr); }
  .step-row { grid-template-columns: minmax(0, 1fr); }
  .space-grid { grid-template-columns: minmax(0, 1fr); }
  .space-media { width: 104px; }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .footer-col ul { grid-template-columns: repeat(2, minmax(0, max-content)); }
  .site-nav { top: 66px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* ---------------- 对接覆盖：页脚一行四栏 / 无汉堡导航常显 ---------------- */
.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px 34px;
}
.footer-brand { flex: 1 1 260px; min-width: 220px; }
.footer-col { flex: 1 1 180px; min-width: 160px; }
.footer-meta {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.85;
  color: var(--footer-muted);
}

@media (max-width: 1180px) {
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { height: 34px; border-radius: 999px; flex: 0 0 auto; }
  .nav-toggle { display: none; }
}

@media (max-width: 768px) {
  .footer-main { flex-direction: column; gap: 22px; }
  .footer-brand, .footer-col { flex: 1 1 auto; min-width: 0; width: 100%; }
}
