/* style.css — 床的款式和类型大全 · 首页与内页共享样式
   设计基准宽度 1440；分区高度按视觉稿 03-ui/home-ui-desktop.png 的分区预算落位（合计 2160）。 */

*{ box-sizing: border-box; }

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

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

img{ display: block; max-width: 100%; height: auto; }
a{ color: inherit; text-decoration: none; }
h1, h2, h3, h4{ margin: 0; color: var(--ink); letter-spacing: -.01em; }
p{ margin: 0; }
ul, ol, dl, dd{ margin: 0; padding: 0; }
li{ list-style: none; }
figure{ margin: 0; }
button{ font-family: inherit; }

.wrap{ width: min(var(--wrap), calc(100% - 96px)); margin-inline: auto; }

/* ---------------------------------------------------------------- M0 header */
.site-header{
  height: var(--h-header);
  background: var(--bg-header);
  position: sticky; top: 0; z-index: 50;
}
.header-inner{ height: 100%; display: flex; align-items: center; gap: 30px; }

.brand{ display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark{
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--accent-ink); color: var(--bg-header);
  display: grid; place-items: center;
}
.brand-mark svg{ width: 19px; height: 19px; fill: currentColor; }
.brand-text{ display: flex; flex-direction: column; line-height: 1.2; }
.brand-name{ font-size: var(--fs-11); font-weight: 800; color: var(--ink); letter-spacing: .01em; }
.brand-sub{ font-size: var(--fs-3); color: var(--muted); letter-spacing: .12em; }

.site-nav{
  display: flex; align-items: center; gap: 15px;
  margin-left: auto; font-size: var(--fs-7); color: var(--body-soft); white-space: nowrap;
  max-width: 100%; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.site-nav::-webkit-scrollbar{ display: none; }
.site-nav a{ padding: 3px 1px; border-bottom: 1px solid transparent; flex: none; }
.site-nav a:hover{ color: var(--accent-ink); border-bottom-color: var(--accent); }
.site-nav a.is-active,
.site-nav a[aria-current="page"]{ color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }

.nav-toggle{
  display: none;
  font-size: var(--fs-7); font-weight: 700;
  background: var(--accent); color: var(--ink-invert); border: 0;
  padding: 9px 18px; border-radius: var(--pill); cursor: pointer;
}
.nav-toggle:hover{ background: var(--accent-ink); }

/* ------------------------------------------------------------------ M1 hero */
.hero{
  height: var(--h-hero);
  background: var(--bg-hero);
  overflow: hidden;
}
.hero-inner{
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
  grid-template-rows: 100%;
}
.hero-copy{
  padding: 44px 40px 0 max(46px, calc((100vw - var(--wrap)) / 2));
  min-width: 0;
}
.hero-title{
  margin-top: 14px;
  font-size: var(--fs-h1); line-height: 1.24; font-weight: 800;
  letter-spacing: -.015em;
}
.hero-lede{
  margin-top: 16px;
  max-width: 452px;
  font-size: var(--fs-10); line-height: 1.78; color: var(--body-soft);
}
.hero-lede-2{ margin-top: 9px; }
.hero-actions{ margin-top: 18px; display: flex; align-items: center; gap: 24px; }
.hero-actions .btn{ height: 40px; padding: 0 24px; }

.hero-media{
  height: 100%; min-height: 0; overflow: hidden;
  background: var(--bg-hero);
}
.hero-media img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: 58% 50%;
}

/* -------------------------------------------------------------- M2 fact-band */
.fact-band{
  height: var(--h-fact);
  background: var(--bg);
  padding: 20px 0;
}
.fact-inner{
  height: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  padding: 0 34px;
}
.fact-head{
  font-size: var(--fs-14); font-weight: 800; line-height: 1.42; color: var(--ink);
  max-width: 200px;
}
.facts{
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}
.fact{ padding: 0 22px; border-left: 1px solid var(--line); }
.fact:first-child{ padding-left: 8px; border-left: 0; }
.fact dt{ font-size: var(--fs-8); font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.fact dd{ font-size: var(--fs-6); line-height: 1.68; color: var(--body-note); }

/* ------------------------------------------------------------ M3 type-index */
.types{
  height: var(--h-types);
  padding: 26px 0 26px;
  background: var(--bg);
}
.types-head{
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 16px;
}
.types-title{ font-size: var(--fs-16); font-weight: 800; line-height: 1.32; }
.types-note{ font-size: var(--fs-7); line-height: 1.7; color: var(--muted); margin-left: auto; text-align: right; }

.type-grid{
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.type-card{
  display: block; height: 100%;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.type-card:hover{
  transform: translateY(-2px); border-color: var(--line);
  box-shadow: var(--shadow-card);
}
.type-thumb{ display: block; aspect-ratio: 2.3 / 1; overflow: hidden; background: var(--bg-band); }
.type-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.type-line{
  display: flex; align-items: baseline; gap: 7px;
  padding: 7px 12px 0;
}
.type-num{ font-size: var(--fs-3); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.type-name{ font-size: var(--fs-8); font-weight: 700; color: var(--ink); }
.type-kind{ font-size: var(--fs-2); color: var(--muted-2); margin-left: auto; letter-spacing: .06em; }
.type-models{
  display: block; padding: 1px 12px 8px;
  font-size: var(--fs-3); line-height: 1.45; color: var(--muted);
}

/* -------------------------------------------------------------- M4 form-table */
.form-sec{
  height: var(--h-form);
  padding: 26px 0 24px;
  background: var(--bg);
}
.form-layout{
  display: grid; grid-template-columns: 330px minmax(0, 1fr);
  gap: 46px; align-items: start;
  height: 100%;
}
.form-head h2{ font-size: var(--fs-15); line-height: 1.34; font-weight: 800; }
.form-head p{ margin-top: 12px; font-size: var(--fs-6); line-height: 1.72; color: var(--muted); }
.form-table{ width: 100%; border-collapse: collapse; font-size: var(--fs-6); line-height: 1.45; }
.form-table th, .form-table td{ text-align: left; padding: 7px 14px; }
.form-table thead th{
  background: var(--bg-band); color: var(--accent-ink);
  font-size: var(--fs-4); font-weight: 700; letter-spacing: .04em; white-space: nowrap;
}
.form-table thead th:first-child{ border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.form-table thead th:last-child{ border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.form-table tbody th{ font-weight: 700; color: var(--ink); white-space: nowrap; }
.form-table tbody td{ border-bottom: 1px solid var(--line-soft); color: var(--body-soft); }
.form-table tbody tr:nth-child(even){ background: var(--card-tint); }
.form-table .num{ font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------- M5 materials + M6 featured */
.combo{
  height: var(--h-combo);
  padding: 16px 0 16px;
  background: var(--bg);
}
.combo-layout{
  display: grid; grid-template-columns: minmax(0, 1fr) 408px;
  gap: 32px; height: 100%;
}
.combo-head{ display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.materials-title{ font-size: var(--fs-12); font-weight: 800; line-height: 1.36; }
.material-grid{
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px 18px;
}
.material{
  display: grid; grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px; align-items: start;
}
.material-thumb{ display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 8px; background: var(--bg-band); }
.material-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.material-name{ font-size: var(--fs-7); font-weight: 700; color: var(--ink); line-height: 1.35; }
.material-desc{ margin-top: 2px; font-size: var(--fs-2); line-height: 1.5; color: var(--muted); }

.featured{ border-left: 1px solid var(--line); padding-left: 24px; }
.featured-head{ display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.featured-title{ font-size: var(--fs-11); font-weight: 800; line-height: 1.3; white-space: nowrap; }
.featured-note{ font-size: var(--fs-2); line-height: 1.5; color: var(--muted); }
.feature-list{ display: grid; gap: 7px; }
.feature-link-wrap{
  display: grid; grid-template-columns: 66px minmax(0, 1fr);
  gap: 9px; align-items: start;
}
.feature-thumb{ display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--bg-band); }
.feature-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.feature-title{ display: block; font-size: var(--fs-4); font-weight: 700; line-height: 1.36; color: var(--ink); }
.feature-sum{ display: block; margin-top: 1px; font-size: var(--fs-2); line-height: 1.42; color: var(--muted); }
.feature-more{ display: inline-block; margin-top: 1px; font-size: var(--fs-2); font-weight: 700; color: var(--accent-ink); }
.feature-link-wrap:hover .feature-title{ color: var(--accent-ink); }

/* ----------------------------------------------------------------- M7 picker */
.picker{
  height: var(--h-picker);
  padding: 24px 0 20px;
  background: var(--bg);
}
.picker-layout{
  display: grid;
  grid-template-columns: 300px repeat(3, minmax(0, 1fr)) auto;
  gap: 26px; align-items: start; height: 100%;
}
.picker-head h2{ font-size: var(--fs-13); line-height: 1.36; font-weight: 800; }
.picker-head p{ margin-top: 8px; font-size: var(--fs-4); line-height: 1.62; color: var(--muted); }
.steps{ display: contents; }
.step{ border-left: 1px solid var(--line); padding-left: 12px; }
.step-num{ font-size: var(--fs-2); font-weight: 700; letter-spacing: .1em; color: var(--accent); }
.step-name{ font-size: var(--fs-7); font-weight: 700; color: var(--ink); margin-top: 3px; }
.step-desc{ font-size: var(--fs-3); line-height: 1.55; color: var(--muted); margin-top: 4px; }
.picker-cta{ align-self: center; height: 38px; padding: 0 20px; font-size: var(--fs-7); white-space: nowrap; }

/* ------------------------------------------------------- M8 faq + M9 notice */
.faq-band{
  height: var(--h-faq);
  padding: 20px 0 12px;
  background: var(--bg);
}
.faq-layout{
  display: grid; grid-template-columns: 168px minmax(0, 1fr) 330px;
  gap: 26px; align-items: start; height: 100%;
}
.faq-head h2{ font-size: var(--fs-14); font-weight: 800; line-height: 1.3; }
.faq-list{ columns: 2; column-gap: 34px; }
.faq-a{ }

.faq-item{
  break-inside: avoid;
  border-top: 1px solid var(--line);
  padding: 6px 0 8px;
}
.faq-item:first-child{ border-top: 0; padding-top: 0; }
.faq-q{
  display: flex; align-items: baseline; gap: 2px;
  font-size: var(--fs-6); font-weight: 700; color: var(--ink);
  cursor: pointer; list-style: none;
}
.faq-q::-webkit-details-marker{ display: none; }
.faq-q::after{ content: "+"; margin-left: auto; color: var(--accent); font-weight: 700; }
.faq-item[open] .faq-q::after{ content: "−"; }
.faq-a{ margin-top: 5px; font-size: var(--fs-4); line-height: 1.66; color: var(--muted); }
.qa-mark{ color: var(--accent); font-weight: 700; }

/* ---------------------------------------------------------------- M10 footer */
.site-footer{
  height: var(--h-footer);
  background: var(--footer); color: var(--footer-ink);
  padding: 26px 0 0;
}
.footer-top{
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 28px 34px; align-items: flex-start;
}
.footer-top > *{ flex: 1 1 180px; min-width: 170px; }
.footer-top .footer-col--wide{ flex: 1.6 1 240px; }
.footer-name{ font-size: var(--fs-11); font-weight: 800; color: var(--ink-invert); }
.footer-desc{ margin-top: 9px; font-size: var(--fs-4); line-height: 1.7; color: var(--footer-muted); max-width: 268px; }
.footer-head{ font-size: var(--fs-2); font-weight: 700; letter-spacing: .16em; color: var(--footer-head); margin-bottom: 10px; }
.footer-cats{ display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px 16px; }
.footer-cats a, .footer-rules li{ font-size: var(--fs-4); line-height: 1.95; color: var(--footer-muted); }
.footer-cats a:hover{ color: var(--ink-invert); }
.footer-top-link a{ font-size: var(--fs-4); color: var(--footer-muted); white-space: nowrap; }
.footer-top-link a:hover{ color: var(--ink-invert); }
.footer-bottom{
  margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--line-invert);
  font-size: var(--fs-3); color: #b9a184;
}

/* ------------------------------------------------------------- 响应式收敛 */
@media (max-width: 1279px){
  .hero-title{ font-size: var(--fs-18); }
  .site-nav{ gap: 12px; font-size: var(--fs-6); }
  .type-kind{ display: none; }
  .picker-layout{ grid-template-columns: 260px repeat(3, minmax(0, 1fr)); }
  .picker-cta{ grid-column: 1 / -1; justify-self: start; }
  /* 中间宽度下 combo 双列空间不足，取消固定分区高度避免内容溢出 */
  .combo{ height: auto; }
  .combo-layout{ height: auto; }
}

@media (max-width: 1023px){
  /* 窄屏取消固定分区高度：改用 body 上的覆盖值，避免与 tokens.css 的 :root 重复定义 */
  body{
    --h-header: auto; --h-hero: auto; --h-fact: auto; --h-types: auto;
    --h-form: auto; --h-combo: auto; --h-picker: auto; --h-faq: auto; --h-footer: auto;
  }
  .wrap{ width: calc(100% - 48px); }
  .header-inner{ height: auto; min-height: 64px; padding: 10px 0; gap: 14px; flex-wrap: wrap; }
  .site-nav{
    order: 3; flex: 1 0 100%;
    margin-left: 0; justify-content: flex-start; gap: 16px;
    padding: 8px 0 2px; border-top: 1px solid var(--line-soft);
    font-size: var(--fs-7); overflow-x: auto; white-space: nowrap;
  }
  .site-nav a{ padding: 6px 0; flex: none; }

  .hero{ height: auto; }
  .hero-inner{ grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .hero-copy{ padding: 30px 0 26px; }
  .hero-media{ order: -1; height: 260px; }
  .hero-title{ font-size: var(--fs-17); }
  .hero-lede{ max-width: none; }

  .fact-band{ height: auto; padding: 22px 0; }
  .fact-inner{ grid-template-columns: 1fr; gap: 18px; padding: 24px; }
  .fact-head{ max-width: none; font-size: var(--fs-12); }
  .facts{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .fact{ padding: 0 18px; }
  .fact:nth-child(odd){ padding-left: 0; border-left: 0; }

  .types{ height: auto; padding: 30px 0; }
  .type-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .form-sec{ height: auto; padding: 24px 0; }
  .form-layout{ grid-template-columns: 1fr; gap: 18px; height: auto; }

  .combo{ height: auto; padding: 20px 0; }
  .combo-layout{ grid-template-columns: 1fr; gap: 26px; height: auto; }
  .material-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured{ border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }

  .picker{ height: auto; padding: 24px 0; }
  .picker-layout{ grid-template-columns: 1fr; gap: 18px; height: auto; }
  .steps{ display: grid; gap: 14px; }
  .picker-cta{ justify-self: start; }

  .faq-band{ height: auto; padding: 24px 0; }
  .faq-layout{ grid-template-columns: 1fr; gap: 20px; height: auto; }
  .faq-list{ columns: 1; }
  .notice{ width: 100%; }

  .site-footer{ height: auto; padding: 28px 0 24px; }
  .footer-top{ flex-direction: column; gap: 22px; }
  .footer-top > *{ flex: 1 1 auto; width: 100%; }
  .footer-bottom{ margin-top: 18px; }
}

@media (max-width: 640px){
  .wrap{ width: calc(100% - 36px); }
  .brand-name{ font-size: var(--fs-10); }
  .brand-sub{ font-size: var(--fs-1); }
  .hero-title{ font-size: var(--fs-15); }
  .hero-lede{ font-size: var(--fs-9); }
  .hero-actions{ flex-wrap: wrap; gap: 14px; }
  .types-title{ font-size: var(--fs-14); }
  .type-grid{ grid-template-columns: 1fr; }
  .material-grid{ grid-template-columns: 1fr; }
  .facts{ grid-template-columns: 1fr; gap: 12px; }
  .fact{ padding: 0; border-left: 0; }
  .feature-link-wrap{ grid-template-columns: 72px minmax(0, 1fr); }
  .footer-top{ grid-template-columns: 1fr; }
  .footer-cats{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-table th, .form-table td{ padding: 7px 10px; }
}

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