/* ============================================================
   DYAD — dyad.chat
   纸与墨：网站是纸（#F4F1EA），App 是墨（#121212）
   ============================================================ */

:root {
  --paper: #F4F1EA;
  --paper-deep: #EDE9DF;
  --ink: #151515;
  --ink-soft: #2A2A28;
  --gray: #6A6964;
  --gray-light: #A3A19A;
  --line: rgba(21, 21, 21, 0.10);
  --phone: #121212;

  /* 五行矿物色 —— 只做点缀，控制在视觉面积 5% 以内 */
  --wood: #5C8A6A;
  --fire: #C25B4A;
  --earth: #C9A227;
  --metal: #9C8E6E;
  --water: #4A6B8A;

  --font-latin: "Inter", "Satoshi", -apple-system, sans-serif;
  --font-zh: -apple-system, "PingFang SC", "Hiragino Sans GB",
             "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;

  --maxw: 1120px;
  --radius-phone: 44px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-latin), var(--font-zh);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .35s ease, box-shadow .35s ease;
}
.nav.scrolled {
  background: rgba(244, 241, 234, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 15px;
}
.brand img { width: 26px; height: 26px; object-fit: contain; }
.nav-links {
  display: flex;
  gap: 34px;
  font-size: 14px;
  color: var(--gray);
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-size: 13px;
  padding: 8px 18px;
  border: 1px solid var(--ink);
  border-radius: 100px;
  color: var(--ink);
  transition: all .25s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- 通用 Section ---------- */
section { position: relative; }

.section {
  padding: 140px 0;
}
@media (max-width: 720px) {
  .section { padding: 88px 0; }
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--gray);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--gray-light);
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: none;
}

h2.title {
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--gray);
  max-width: 560px;
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 0 60px;
  text-align: center;
  overflow: hidden;
}
.hero-logo {
  width: 74px;
  margin: 0 auto 30px;
}
.hero h1 {
  font-size: clamp(40px, 7.2vw, 78px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.hero .sub {
  margin: 30px auto 0;
  max-width: 520px;
  color: var(--gray);
  font-size: clamp(15px, 1.5vw, 18px);
}
.hero-cta {
  margin-top: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border: 1px solid var(--ink);
  border-radius: 100px;
  font-size: 15px;
  color: var(--ink);
  cursor: default;
}
.badge-soon svg { flex: none; }

/* Hero 手机：从纸面浮出 */
.hero-stage {
  margin-top: 76px;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

/* ---------- 手机框 ---------- */
.phone {
  position: relative;
  width: 300px;
  aspect-ratio: 300 / 620;
  background: var(--phone);
  border-radius: var(--radius-phone);
  padding: 11px;
  box-shadow:
    0 1px 2px rgba(21,21,21,.12),
    0 12px 28px rgba(21,21,21,.14),
    0 44px 90px rgba(21,21,21,.20);
  flex: none;
}
.phone::before { /* 侧边按键 */
  content: "";
  position: absolute;
  right: -2px; top: 120px;
  width: 3px; height: 64px;
  background: #0a0a0a;
  border-radius: 2px;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: calc(var(--radius-phone) - 11px);
  overflow: hidden;
  background: #000;
}
.phone-screen img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.phone-notch {
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 34%; height: 26px;
  background: #000;
  border-radius: 20px;
  z-index: 3;
}
/* 截图未到位时的占位屏 */
.phone-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(120% 90% at 50% 0%, #1d1d1c 0%, #000 70%);
  color: rgba(244,241,234,.28);
  font-size: 12px;
  letter-spacing: .3em;
}
.phone.no-shot .phone-placeholder { display: flex; }
.phone.no-shot .phone-screen img { display: none; }
.phone-placeholder .pdot {
  width: 9px; height: 9px;
  border-radius: 50%;
  opacity: .55;
}

/* 手机尺寸变体 */
.phone.lg { width: 320px; }
@media (max-width: 720px) {
  .phone, .phone.lg { width: min(268px, 74vw); }
}

/* ---------- App Store 展示图卡 ---------- */
.shot-card {
  width: 340px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(21,21,21,.08),
    0 16px 40px rgba(21,21,21,.12),
    0 48px 100px rgba(21,21,21,.14);
  flex: none;
}
.shot-card img { width: 100%; height: auto; }
.shot-card.lg { width: 380px; }
@media (max-width: 720px) {
  .shot-card, .shot-card.lg { width: min(300px, 82vw); }
}

/* ---------- Why Dyad ---------- */
.why {
  text-align: center;
  padding: 170px 0;
}
.why .big {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.5;
  max-width: 780px;
  margin: 0 auto;
}
.why .big em {
  font-style: normal;
  color: var(--gray);
}
.why .turn {
  margin-top: 56px;
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--ink);
  display: inline-block;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}

/* ---------- 体验区块（图文交替） ---------- */
.feat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}
.feat.flip .feat-copy { order: 2; }
.feat.flip .feat-visual { order: 1; }
.feat.center {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}
.feat.center .lead { margin: 0 auto; }
@media (max-width: 860px) {
  .feat { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .feat.flip .feat-copy { order: 1; }
  .feat.flip .feat-visual { order: 2; }
  .feat .eyebrow { justify-content: center; }
  .feat .lead { margin: 0 auto; }
}
.feat-visual { display: flex; justify-content: center; }

/* Locked 区块：页面收束的唯一深色过渡 */
.lock-section {
  background: linear-gradient(var(--paper), var(--paper-deep));
}

/* ---------- 五行身份 ---------- */
.elements-section .markers {
  display: flex;
  gap: 26px;
  margin-top: 40px;
  justify-content: center;
}
.emarker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray);
  letter-spacing: .1em;
}
.emarker i {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: block;
}
.emarker:nth-child(1) i { background: var(--wood); }
.emarker:nth-child(2) i { background: var(--fire); }
.emarker:nth-child(3) i { background: var(--earth); }
.emarker:nth-child(4) i { background: var(--metal); }
.emarker:nth-child(5) i { background: var(--water); }

/* ---------- 安全与信任 ---------- */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 64px;
}
@media (max-width: 860px) {
  .safety-grid { grid-template-columns: repeat(2, 1fr); }
}
.safety-item {
  background: var(--paper);
  padding: 40px 30px;
  transition: background .3s;
}
.safety-item:hover { background: var(--paper-deep); }
.safety-item h3 {
  font-size: 17px;
  margin-bottom: 12px;
  font-weight: 600;
}
.safety-item p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
}
.safety-links {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  font-size: 14px;
}
.safety-links a {
  color: var(--gray);
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
  padding-bottom: 2px;
}
.safety-links a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- 最终 CTA ---------- */
.final {
  text-align: center;
  padding: 190px 0;
}
.final h2 {
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.final .badge-soon { margin-top: 52px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 48px;
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  font-size: 14px;
}
.foot-brand img { width: 24px; height: 24px; object-fit: contain; }
.foot-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--gray-light);
}
.foot-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}
.foot-col h4 {
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--gray-light);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.foot-col a {
  display: block;
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 10px;
  transition: color .2s;
}
.foot-col a:hover { color: var(--ink); }
.foot-legal {
  margin-top: 44px;
  font-size: 12.5px;
  color: var(--gray-light);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- 文档页（Privacy / Terms 等） ---------- */
.doc-hero {
  padding: 180px 0 60px;
  border-bottom: 1px solid var(--line);
}
.doc-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.doc-hero .meta {
  margin-top: 16px;
  font-size: 14px;
  color: var(--gray-light);
}
.doc-body {
  max-width: 720px;
  padding: 70px 0 120px;
}
.doc-body h2 {
  font-size: 21px;
  font-weight: 600;
  margin: 54px 0 16px;
}
.doc-body p, .doc-body li {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.9;
}
.doc-body p { margin-bottom: 14px; }
.doc-body ul { padding-left: 22px; margin-bottom: 14px; }
.doc-body li { margin-bottom: 8px; }
.doc-body .placeholder-note {
  background: var(--paper-deep);
  border-left: 2px solid var(--earth);
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--gray);
  margin: 40px 0 0;
}
