/*
 * ONE Buddy 落地页响应式适配。
 * 原页面自带 680/780 断点，但小屏下导航链接被隐藏、产品区图文重叠，
 * 这里以追加样式覆盖，不改动原页面的内联样式。
 */

section[id],
main[id],
#philosophy,
#brand-story {
  scroll-margin-top: 96px;
}

.nav-anchor {
  display: block;
}

/* 平板 / 小笔记本：导航收紧，避免品牌 + 5 个链接 + 按钮挤在一行 */
@media (max-width: 1024px) {
  .nav {
    padding: 14px clamp(16px, 4vw, 40px) !important;
  }
  .navlinks {
    gap: 16px;
    font-size: 12.5px;
  }
  .navbtn {
    padding: 11px 18px;
    font-size: 12px;
  }
}

/* 平板竖屏：夜间区与工作区改为单栏 */
@media (max-width: 900px) {
  .night,
  .work-grid {
    grid-template-columns: 1fr;
  }
  .night {
    min-height: 0;
    padding: 90px 7%;
  }
  .work-grid {
    gap: 40px;
  }
  .lamp-stage {
    justify-self: center;
  }
}

/* 手机：导航折成两行（链接可横向滑动），各区块改为单列 */
@media (max-width: 780px) {
  .nav {
    flex-wrap: wrap;
    row-gap: 6px !important;
    padding: 10px 16px !important;
  }
  .brand {
    font-size: 19px;
  }
  .navlinks {
    display: flex !important;
    order: 3;
    width: 100%;
    gap: 18px;
    font-size: 12.5px;
    line-height: 1.5;
    white-space: nowrap;
    overflow-x: auto;
    padding: 4px 0 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .navlinks::-webkit-scrollbar {
    display: none;
  }
  .navlinks a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
  }
  .navbtn {
    display: none !important;
  }

  .hero {
    padding: 128px 18px 44px !important;
    min-height: 92svh !important;
    justify-content: center !important;
  }
  .clean-hero-copy h1 {
    font-size: clamp(30px, 9vw, 43px);
    letter-spacing: -0.05em;
  }
  .clean-hero-copy p {
    font-size: 15px;
    line-height: 1.7;
    padding: 0 6px;
  }
  .clean-actions {
    gap: 10px;
    margin-top: 24px;
  }
  .clean-actions a {
    padding: 12px 18px;
    font-size: 13.5px;
  }
  .clean-showcase {
    height: clamp(220px, 62vw, 300px);
    margin-top: 34px;
    gap: 2px;
  }
  .clean-product {
    width: 33%;
  }
  .clean-product span {
    font-size: 13px;
    margin-top: -8px;
  }
  .clean-foot {
    font-size: 11px;
    letter-spacing: 0.04em;
    line-height: 1.9;
    padding: 0 6px;
    margin-top: 20px;
  }

  .intro {
    padding: 80px 18px 56px !important;
  }
  .intro h2,
  .section-head h2 {
    font-size: clamp(28px, 8.6vw, 40px);
    letter-spacing: -0.04em;
  }
  .intro p,
  .section-head p {
    font-size: 14.5px;
    line-height: 1.9;
  }

  /* 产品区：绝对定位的产品图改为正常文档流，图文不再互相压住 */
  .product {
    display: block !important;
    min-height: 0 !important;
    padding: 78px 7% 0 !important;
  }
  .product-copy {
    width: 100% !important;
  }
  .product-copy h2 {
    font-size: clamp(42px, 13vw, 62px);
  }
  .product-copy h3 {
    font-size: clamp(21px, 6vw, 28px);
  }
  .product-copy p {
    font-size: 15px;
    line-height: 1.85;
  }
  .product-photo {
    position: static !important;
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: 8px auto 0 !important;
    animation: none !important;
    transform: none !important;
    mask-image: linear-gradient(0deg, transparent 0%, #000 14%, #000 86%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 14%, #000 86%, transparent 100%) !important;
  }
  .product .bubble {
    position: static !important;
    margin: 0 auto 44px;
    width: fit-content;
    max-width: 100%;
    animation: none !important;
    font-size: 13px;
    padding: 12px 18px;
  }

  .scenes {
    padding: 76px 0 !important;
  }
  .section-head {
    padding: 0 18px 38px !important;
  }
  .scene-stage {
    min-height: 0 !important;
  }
  .scene-content {
    width: 100% !important;
    padding: 54px 7% !important;
  }
  .scene-content h3 {
    font-size: clamp(26px, 8vw, 38px);
    letter-spacing: -0.04em;
  }
  .scene-content p {
    font-size: 15px;
    line-height: 1.8;
  }
  .scene-tabs {
    gap: 8px;
    margin-top: 24px;
  }
  .scene-tabs button {
    padding: 10px 14px;
    font-size: 13px;
  }
  .reply {
    font-size: 14px;
    line-height: 1.7;
  }

  .night {
    padding: 78px 7% !important;
    min-height: 0 !important;
    gap: 6px;
  }
  .night h2 {
    font-size: clamp(32px, 9.4vw, 46px);
    letter-spacing: -0.04em;
  }
  .night p {
    font-size: 15px;
    line-height: 1.8;
  }
  .night-controls {
    gap: 8px;
    margin-top: 22px;
  }
  .night-controls button {
    padding: 10px 14px;
    font-size: 13px;
  }
  .lamp-stage {
    height: 290px !important;
  }
  .lamp-image {
    height: 280px !important;
    width: min(300px, 80vw);
  }

  .work {
    padding: 76px 7% !important;
  }
  .work h2 {
    font-size: clamp(29px, 7.8vw, 40px);
  }
  /* 手机上去掉强制换行，交给浏览器自然折行，避免出现单字尾行 */
  .work h2 br,
  #sceneTitle br {
    display: none;
  }
  .work p {
    font-size: 15px;
    line-height: 1.85;
  }
  .workflow {
    padding: 18px;
    border-radius: 18px;
  }
  .workflow header {
    font-size: 11.5px;
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .step {
    font-size: 13px;
    padding: 12px;
    line-height: 1.6;
  }
  .work small {
    font-size: 11.5px;
  }

  .footer {
    padding: 42px 7% !important;
    flex-direction: column;
    gap: 16px;
    font-size: 14px;
    line-height: 1.8;
  }
  .footer .brand {
    font-size: 19px;
  }
}

/* 小屏手机 */
@media (max-width: 420px) {
  .nav {
    padding: 9px 14px !important;
  }
  .brand {
    font-size: 18px;
  }
  .navlinks {
    gap: 15px;
    font-size: 12px;
  }
  .hero {
    padding: 120px 16px 30px !important;
  }
  .clean-hero-copy p {
    font-size: 14px;
  }
  .clean-hero-copy h1 {
    font-size: clamp(28px, 8.8vw, 36px);
  }
  .clean-kicker {
    font-size: 10.5px;
    letter-spacing: 0.14em;
  }
  .clean-showcase {
    height: 210px;
    margin-top: 28px;
  }
  .product {
    padding-top: 68px !important;
  }
  .scene-tabs button,
  .night-controls button {
    padding: 9px 12px;
    font-size: 12.5px;
  }
}

/* 页面内返回官网入口 */
.footer-back {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: #8a6a58;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-back:hover {
  color: #1d1d1f;
}
