/* ==========================================================================
   WINKOO 顽可 — 官网首页
   Figma: app-design / Desktop - 11 (node 1405:10757), 1440 × 2820

   布局策略（网页端常规做法）：
   1440 是「版心」而非缩放基准 —— 字号、间距、控件高度一律采用设计稿绝对值，
   不随屏幕宽度放大。屏幕更宽时，版心保持 1440 居中，背景色与通栏大图向两侧延伸。
   1rem = 16px 恒定，故本文件中的 rem 值即设计稿 px 值 ÷ 16。
   ========================================================================== */

/* --- 自托管字体 ----------------------------------------------------------- */
/* Quicksand 可变字体 latin 子集（28 KB），单文件覆盖 300–700 全部字重。
   自托管而非引用 fonts.googleapis.com：该域名在国内基本不可达，
   一旦加载失败，导航与页脚的 WINKOO / About us 会回退成中文字体渲染。
   unicode-range 限定 latin，中文字符直接跳过本字体走 --font-cn 回退。 */
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/quicksand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- 设计变量 ------------------------------------------------------------ */
:root {
  /* 色彩 */
  --c-brand-dark:   #392401;              /* 导航 / 页脚底色，首屏小标题 */
  --c-brand-accent: #fca13d;              /* 导航当前项指示条 */
  --c-logo-orange:  #f78f44;              /* 产品区 logo 描线色 */
  --c-ink:          #333333;
  --c-ink-85:       rgba(51, 51, 51, .85);
  --c-ink-80:       rgba(51, 51, 51, .8);
  --c-ink-60:       rgba(51, 51, 51, .6);
  --c-ink-50:       rgba(51, 51, 51, .5);
  --c-brand-dark-50: rgba(57, 36, 1, .5);
  --c-footer-text:  #a7a096;
  --c-footer-rule:  #756d63;
  --c-surface:      #ffffff;

  /* 字体 */
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
             "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-en: "Quicksand", var(--font-cn);

  /* 布局（1rem = 16px @1440） */
  --canvas:   90rem;                      /* 1440 画板宽度 */
  --gutter:   8.5rem;                     /* 136 — 关于我们 / 页脚 左右留白 */
  --gutter-s: 3.25rem;                    /* 52  — 产品区 左右留白 */
  --nav-h:    4rem;                       /* 64  — 吸顶导航高度 */
}

/* --- 基础重置 ------------------------------------------------------------ */
html { font-size: 16px; }

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

/* 纵向滚动条常驻，避免短页面与长页面之间切换时版心横向跳动。
   横向溢出的兜底裁切必须放在 html 上（其 overflow 会上交给视口，
   html 自身不成为滚动容器）；一旦写在 body 上，body 会变成滚动容器，
   顶部导航的 position:sticky 将彻底失效。 */
html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--c-surface);
  color: var(--c-ink);
  font-family: var(--font-cn);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}

h2, p, figure { margin: 0; }
img, svg { display: block; }

/* 保留设计稿中的连续空格（如 "About  us"） */
.pre { white-space: pre; }

/* 锚点跳转时为吸顶导航让位 */
#home, #product, #about { scroll-margin-top: var(--nav-h); }

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

/* ==========================================================================
   顶部导航  ·  1440 × 64  ·  吸顶常驻
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-brand-dark);
}

.nav__inner {
  position: relative;
  width: var(--canvas);
  max-width: 100%;
  height: var(--nav-h);
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: flex;
  align-items: center;
}

.nav__links {
  display: flex;
  align-items: flex-end;
  gap: 2.5rem;
  height: 2rem;
}

.nav__link {
  position: relative;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s ease;
}
.nav__link:hover { opacity: .75; }

/* 当前板块：加粗 + 底部橙色指示条。
   指示条宽度自动等于导航项宽度（四字 ×14px = 56，与设计稿一致），
   下移 0.75rem 后正好落在导航底边 60–64 的位置。 */
.nav__link--current { font-weight: 600; }
.nav__link--current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.75rem;
  height: 0.25rem;
  background: var(--c-brand-accent);
}

.nav__wordmark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 2rem;
  color: #fff;
  white-space: nowrap;
}

/* ==========================================================================
   首屏  ·  1440 × 876（主视觉 755.3 + 标语条 120.7）
   ========================================================================== */
.hero { position: relative; }

/* 主视觉：容器比例与图片裁切完全取自设计稿，高度随宽度按 1449:760 推导，不限高。 */
.hero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1449 / 760;
  overflow: hidden;
}
/* 高度交给 auto 由宽度按原图比例推导，避免任何情况下的拉伸变形。

   纵向定位用 translateY 而非 top 百分比：二者在设计稿比例下精确等价
   （实测可见区均为图片的 14.0%–78.4%），但 top 的百分比基于容器高，
   一旦容器高度偏离 1449:760，裁切窗口就会相对图片漂移、构图重心跑掉；
   translateY 的百分比基于图片自身高度，可使「图片 46.23% 处对齐容器中心」
   这一构图重心恒定，对容器高度变化免疫。 */
.hero__img {
  position: absolute;
  left: 0;               /* 设计稿为 0.07%（≈1px），系 Figma 舍入误差，取 0 以免左侧露白边 */
  top: 50%;
  transform: translateY(-46.23%);
  width: 122.15%;
  height: auto;
  max-width: none;
}

/* 主视觉下方的白色标语条 */
.hero__strip {
  min-height: 7.545rem;
  padding: 1.5rem 1rem;
  background: var(--c-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}
.hero__strip-cn { font-size: 1.125rem; color: var(--c-brand-dark); }
.hero__strip-en { font-size: 1rem; color: var(--c-brand-dark-50); }

/* 叠加在主视觉上的品牌字与标语 */
.hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__frame {
  position: relative;
  width: var(--canvas);
  max-width: 100%;
  height: 100%;
  margin-inline: auto;
}
.hero__stage {
  position: absolute;
  left: 19.625rem;
  top: 4.375rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero__logo { width: 24.375rem; height: 4.1875rem; }
.hero__tagline {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 3.625rem;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

/* ==========================================================================
   产品  ·  1440 × 940
   ========================================================================== */
.product {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 940;
  background: url("assets/product-bg.jpg") center / cover no-repeat;
}

.product__frame {
  position: relative;
  width: var(--canvas);
  max-width: 100%;
  height: 100%;
  margin-inline: auto;
}

.product__head {
  position: absolute;
  left: 0;
  top: 0;
  height: 19.851625rem;
  padding: 2.5rem var(--gutter-s);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
}
.product__logo { width: 23.25rem; height: 3.9375rem; }
.product__title {
  font-size: 4rem;
  font-weight: 500;
  color: var(--c-ink);
  white-space: nowrap;
}

.product__foot {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 2rem var(--gutter-s);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
.product__claim    { font-size: 2.25rem; color: var(--c-ink-85); white-space: nowrap; }
.product__features { font-size: 1.5rem; color: var(--c-ink-50); white-space: nowrap; }

/* ==========================================================================
   关于我们  ·  1440 × 822
   ========================================================================== */
.about {
  min-height: 51.375rem;
  padding: 9.5rem var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
}

.about__inner {
  width: 73rem;
  max-width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 7.5rem;
}

.about__photo {
  flex: 0 0 auto;
  width: 22.375rem;
  height: 25.5rem;
  object-fit: cover;
}

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.about__heading { color: var(--c-ink-80); }
.about__title    { font-size: 2.25rem; font-weight: 400; }
.about__subtitle { font-family: var(--font-en); font-size: 1.25rem; }

.about__body {
  width: 36.625rem;
  max-width: 100%;
  font-size: 1.25rem;
  color: var(--c-ink-60);
}
/* 设计稿中两段之间为一个空行 */
.about__body p + p { margin-top: 1.4em; }

/* ==========================================================================
   页脚  ·  1440 × 118
   ========================================================================== */
.footer {
  height: 7.375rem;
  background: var(--c-brand-dark);
}

.footer__inner {
  width: var(--canvas);
  max-width: 100%;
  height: 100%;
  margin-inline: auto;
  padding: 0.9375rem var(--gutter) 0;
}

.footer__brand {
  height: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}
.footer__brand-en { font-family: var(--font-en); font-weight: 600; font-size: 1.25rem; }
.footer__brand-cn { font-size: 1rem; }

.footer__rule {
  margin: 1rem 0 0;
  border: 0;
  border-top: 1px solid var(--c-footer-rule);
}

.footer__copy {
  margin-top: 0.875rem;
  font-size: 1.125rem;
  color: var(--c-footer-text);
}

/* ==========================================================================
   窄屏降级
   ========================================================================== */
/* 视口窄于版心时收窄左右留白，避免「关于我们」的图文两栏被挤压换行 */
@media (max-width: 1439px) {
  :root { --gutter: 4.5rem; }
}

@media (max-width: 1279px) {
  :root { --gutter-s: 2.5rem; }

  .hero__stage { left: 50%; top: 4rem; transform: translateX(-50%); }
  .hero__logo    { width: 20rem; height: 3.4375rem; }
  .hero__tagline { font-size: 2.875rem; }

  .product__head  { height: 16.25rem; }
  .product__logo  { width: 18.75rem; height: 3.1875rem; }
  .product__title { font-size: 3rem; }
  .product__claim { font-size: 1.875rem; }
  .product__features { font-size: 1.25rem; }

  .about        { min-height: 0; padding: 6.5rem var(--gutter); }
  .about__inner { gap: 4.5rem; }
  .about__body  { width: auto; }
}

@media (max-width: 899px) {
  :root { --gutter: 2.5rem; --gutter-s: 1.75rem; }

  .nav__inner   { padding-inline: 1rem; }
  .nav__wordmark  { font-size: 1.5rem; }
  .nav__links     { gap: 1.5rem; }

  .hero__logo    { width: 13.75rem; height: 2.375rem; }
  .hero__tagline { font-size: 1.75rem; }
  .hero__strip   { min-height: 0; }

  /* 窄屏下产品区改为常规流布局：头部置顶、底部说明置底，高度由内容撑开 */
  .product        { aspect-ratio: auto; }
  .product__frame {
    height: auto;
    min-height: 32.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .product__head,
  .product__foot  { position: static; height: auto; }
  .product__head  { padding-block: 2rem; gap: 1rem; }
  .product__logo  { width: 12.5rem; height: 2.125rem; }
  .product__title { font-size: 2rem; }
  .product__foot  { padding-block: 1.5rem; }
  .product__claim { font-size: 1.375rem; }
  .product__features { font-size: 0.9375rem; white-space: normal; }

  .about__inner  { flex-direction: column; align-items: flex-start; gap: 2.5rem; }
  .about__photo  { width: 100%; max-width: 22.375rem; height: auto; aspect-ratio: 358 / 408; }
  .about__title  { font-size: 1.75rem; }
  .about__body   { font-size: 1rem; }

  .footer        { height: auto; }
  .footer__inner { padding-bottom: 1.5rem; }
  .footer__copy  { font-size: 0.875rem; white-space: normal; }
}

@media (max-width: 599px) {
  /* 极窄屏：品牌字回到常规流靠右，避免与导航项重叠 */
  .nav__wordmark { position: static; transform: none; margin-left: auto; font-size: 1.25rem; }
  .nav__links    { gap: 1rem; }
  .nav__link     { font-size: 0.75rem; }

  .hero__tagline  { font-size: 1.25rem; }
  .hero__logo     { width: 10rem; height: 1.6875rem; }
  .hero__strip-cn { font-size: 0.9375rem; }
  .hero__strip-en { font-size: 0.8125rem; white-space: normal; }
  .product__title { font-size: 1.5rem; }
  .product__claim { font-size: 1.125rem; white-space: normal; }
}
