/* DooAny 官网原型 · 设计系统见 ../01-设计系统.md */

:root {
  --navy: #0f2f4d;
  --navy-deep: #0a1f33;
  --teal: #0ab7ad;          /* 只用于色块，不可作浅底文字 */
  --teal-ink: #07766f;      /* 浅底上的青绿文字 5.48 */
  --ink: #0f2f4d;
  --ink-2: #5b6b7a;
  --ink-on-dark: #ffffff;
  --ink-on-dark-2: #a9bccb;
  --bg: #ffffff;
  --bg-2: #f5f7f8;
  --line: #e3e8ec;
  --line-dark: rgba(255, 255, 255, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Inter", sans-serif;

  --fs-display: clamp(48px, 7.2vw, 88px);
  --fs-h2: clamp(34px, 4.6vw, 56px);
  --fs-lead: clamp(19px, 1.9vw, 24px);
  --fs-body: clamp(16px, 1.4vw, 18px);

  --wrap: 1120px;
  --gap-section: clamp(96px, 12vw, 160px);

  --radius-card: 20px;
  --radius-product: 24px;
  --shadow-product: 0 1px 2px rgba(15, 47, 77, 0.06), 0 24px 64px -16px rgba(15, 47, 77, 0.18);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- 导航 ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.8) blur(16px);
  -webkit-backdrop-filter: saturate(1.8) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo img {
  height: 28px;
  width: auto;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  white-space: nowrap;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--ink);
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out);
}
.btn:active {
  transform: scale(0.98);
}
.btn--primary {
  background: var(--navy);
  color: #fff;
}
.btn--primary:hover {
  background: #173f63;
}
.btn--lg {
  min-height: 56px;
  padding: 0 32px;
  font-size: 17px;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover {
  background: var(--bg-2);
}
.btn--on-dark {
  background: #fff;
  color: var(--navy);
}
.btn--on-dark:hover {
  background: #e8f1f5;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--teal-ink);
}
.link-arrow svg {
  transition: transform 0.2s var(--ease-out);
}
.link-arrow:hover svg {
  transform: translateX(3px);
}

/* ---------- 排版 ---------- */

.display {
  margin: 0;
  font-feature-settings: "halt"; /* 压缩中文全角标点，大字号下不留空洞 */
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.h2 {
  margin: 0;
  font-feature-settings: "halt";
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  margin: 0;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}
.center {
  text-align: center;
}
.center .lead,
.lead.center {
  text-wrap: balance;
}
.measure {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: var(--gap-section) 0;
}
.section--alt {
  background: var(--bg-2);
}
.section--dark {
  background: var(--navy-deep);
  color: var(--ink-on-dark);
}
.section--dark .lead {
  color: var(--ink-on-dark-2);
}
.section--dark .link-arrow {
  color: var(--teal);
}

/* ---------- 进入视口淡入 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 640px) {
  .nav__link {
    padding: 0 8px;
  }
  .nav__links {
    gap: 2px;
  }
  .nav .btn {
    padding: 0 16px;
    white-space: nowrap;
  }
  .nav .btn .btn__i {
    display: none; /* 窄屏导航放不下图标（英文尤其） */
  }
  /* 窄屏只留 登录 / 注册 / 下载，页内锚点链接收起，否则文字会被挤成竖排 */
  .nav__link:not(.nav__link--account) {
    display: none;
  }
  .nav__logo img {
    height: 24px;
  }
}
@media (max-width: 360px) {
  /* 320 宽下英文「Log in / Sign up / Download」再收一点间距才放得下 */
  .nav__links {
    gap: 0;
  }
  .nav__link {
    padding: 0 6px;
  }
  .nav .btn {
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ================= v2：产品化官网 ================= */

.wrap--wide {
  max-width: 1240px;
}

/* 区块标题：左边大标题，右边一句说明（参考 workbuddy.cn） */
.sec-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: end;
  gap: 24px 64px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.sec-head .lead {
  font-size: clamp(16px, 1.4vw, 18px);
  max-width: 480px;
  justify-self: end;
}
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(10, 183, 173, 0.1);
  color: var(--teal-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.section--dark .label {
  background: rgba(10, 183, 173, 0.16);
  color: var(--teal);
}

/* ---------- 场景页签 ---------- */
.tablist {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.tablist [role='tab'] {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tablist [role='tab']:hover {
  color: var(--ink);
}
.tablist [role='tab'][aria-selected='true'] {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 47, 77, 0.08), 0 2px 8px -2px rgba(15, 47, 77, 0.08);
}
.scene {
  display: grid;
  grid-template-columns: 380px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
}
.scene[hidden] {
  display: none;
}
.scene.is-shown .scene__stage .fit__inner {
  animation: stage-in 0.5s var(--ease-out);
}
@keyframes stage-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}
.scene__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
}
.scene__kind {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-ink);
}
.scene__claim {
  margin: 12px 0 0;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-feature-settings: 'halt';
}
.scene__desc {
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}
.scene__say {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-2);
  font-size: 15px;
}
.scene__say span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ink-2);
}
.scene__stage {
  padding: 40px 0 0 40px;
  min-width: 0;
  overflow: hidden;
}
.tint-mint {
  background: radial-gradient(120% 90% at 100% 0%, #d8f3ef 0%, #eef9f7 45%, #f6fbfa 100%);
}
.tint-sky {
  background: radial-gradient(120% 90% at 100% 0%, #dde8f5 0%, #eef3f9 45%, #f7f9fc 100%);
}
.tint-sand {
  background: radial-gradient(120% 90% at 100% 0%, #f6ead8 0%, #faf4ea 45%, #fcfaf6 100%);
}
.tint-lilac {
  background: radial-gradient(120% 90% at 100% 0%, #e7e4f6 0%, #f2f1fa 45%, #f9f9fc 100%);
}

/* ---------- 功能卡（2×2） ---------- */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.feat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}
.feat__stage {
  position: relative;
  padding: 32px 32px 0;
  overflow: hidden;
  height: 320px;
}
.feat__stage::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.feat__text {
  padding: 8px 32px 32px;
}
.feat__text h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
  font-feature-settings: 'halt';
}
.feat__text p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}

/* ---------- 按钮里的小图标 ---------- */
.btn__i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 下载卡片（首页下载区、开始页共用） ---------- */
.downloads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 920px;
  margin: 40px auto 0;
}
.dl-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease-out);
}
.dl-card:hover {
  border-color: var(--teal);
  box-shadow: 0 12px 28px -16px rgba(15, 47, 77, 0.35);
  transform: translateY(-2px);
}
.dl-card > svg {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  color: var(--navy);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dl-card b {
  font-size: 19px;
}
.dl-card span {
  font-size: 13.5px;
  color: var(--ink-2);
}
.dl-card em {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-style: normal;
  font-size: 15px;
  font-weight: 600;
}
.dl-card em svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* 还没有可下载版本的平台：site.js 加 .is-soon（按钮显示「即将推出」） */
[data-dl].is-soon {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}
.dl-card.is-soon em {
  background: var(--line);
  color: var(--ink-2);
}
.dl-card.is-soon em svg {
  display: none;
}
.dl-mobile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  max-width: 920px;
  margin: 16px auto 0;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-2);
  text-align: left;
}
.dl-mobile > svg {
  width: 32px;
  height: 32px;
  color: var(--navy);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dl-mobile > div {
  flex: 1;
  min-width: 220px;
}
.dl-mobile b {
  display: block;
  font-size: 17px;
}
.dl-mobile div span {
  font-size: 14px;
  color: var(--ink-2);
}
.dl-soon {
  font-size: 13.5px;
  color: var(--ink-2);
}
.dl-next {
  margin: 24px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}
.dl-next a {
  color: var(--teal-ink);
  font-weight: 600;
}
@media (max-width: 760px) {
  .downloads {
    grid-template-columns: 1fr;
  }
}

/* ---------- 深色安全区 ---------- */
.sec-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.sec-card {
  padding: 28px;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.sec-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}
.sec-card svg {
  width: 28px;
  height: 28px;
  color: var(--teal);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sec-card h3 {
  margin: 20px 0 0;
  font-size: 19px;
  line-height: 1.4;
}
.sec-card p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-on-dark-2);
}
.sec-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  color: #fff;
}

/* ---------- 深色页脚 ---------- */
.footer {
  padding: 72px 0 40px;
  background: #07131f;
  color: #8fa3b5;
  font-size: 14px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
}
.footer__brand img {
  height: 26px;
  width: auto;
}
.footer__brand p {
  margin: 16px 0 0;
  max-width: 280px;
  line-height: 1.7;
}
.footer h4 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  transition: color 0.2s ease;
}
.footer li a:hover {
  color: #fff;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: #6f8496;
}

@media (max-width: 1024px) {
  .scene {
    grid-template-columns: 1fr;
  }
  .scene__text {
    padding: 32px 28px 8px;
  }
  .scene__stage {
    padding: 24px 0 0 24px;
  }
  .sec-cards {
    grid-template-columns: 1fr 1fr;
  }
  .footer__top {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .sec-head {
    grid-template-columns: 1fr;
  }
  .sec-head .lead {
    justify-self: start;
  }
  .bento,
  .sec-cards {
    grid-template-columns: 1fr;
  }
  .feat__stage {
    height: 260px;
    padding: 24px 20px 0;
  }
  .feat__text {
    padding: 8px 24px 28px;
  }
  .tablist {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }
  .tablist [role='tab'] {
    flex: 1;
    padding: 0 12px;
    white-space: nowrap;
  }
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }
}
