/* WaterGrug 官网 — 手绘原始人手账风格 */

@font-face {
  font-family: "ZCOOL KuaiLe";
  src: url("../fonts/zcool-kuaile.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #F5F0E8;
  --paper: #FAF7F2;
  --ink: #2A2118;
  --ink-light: #6B5B45;
  --water: #4A8BC4;
  --water-fill: #7BB3E0;
  --water-light: #B8D4EE;
  --shadow: rgba(42, 33, 24, 0.18);
  --font-body: "ZCOOL KuaiLe", "Kaiti SC", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --font-num: "Caveat", "ZCOOL KuaiLe", cursive;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1813;
    --paper: #252018;
    --ink: #F0EAE0;
    --ink-light: #A89070;
    --water: #5B9BD5;
    --water-fill: #4A7BA8;
    --water-light: #1A3550;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 纸张颗粒 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::before { opacity: 0.08; } }

main, header, footer { position: relative; z-index: 1; }

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

img { max-width: 100%; display: block; }

a { color: var(--water); }

/* ---------- 手绘工具类 ---------- */

.sk-a { border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
.sk-b { border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px; }
.sk-c { border-radius: 225px 15px 255px 15px / 15px 255px 15px 225px; }
.sk-card { border-radius: 18px 22px 20px 24px / 22px 18px 24px 20px; }

.hand-border { border: 2.5px solid var(--ink); }

.tilt-l { transform: rotate(-0.6deg); }
.tilt-r { transform: rotate(0.5deg); }

/* ---------- 布局 ---------- */

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- 头部 ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 2.5px solid var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 22px;
  margin-right: auto;
}

.logo svg { width: 34px; height: 34px; }

.nav-links { display: flex; gap: 4px; align-items: center; }

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 12px 14px 12px 16px / 14px 12px 16px 12px;
  border: 2px solid transparent;
}

.nav-links a:hover { border-color: var(--ink); background: var(--paper); }

.lang-switch { display: flex; gap: 2px; margin-left: 8px; }

.lang-switch button {
  font-family: var(--font-body);
  font-size: 14px;
  background: none;
  color: var(--ink-light);
  border: 2px solid transparent;
  border-radius: 10px 12px 10px 12px / 12px 10px 12px 10px;
  padding: 3px 8px;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper);
}

@media (max-width: 820px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 2.5px solid var(--ink);
  padding: 10px 22px;
  border-radius: 16px 20px 16px 22px / 20px 16px 22px 16px;
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

.btn-primary { background: var(--water-fill); }
@media (prefers-color-scheme: dark) { .btn-primary { background: var(--water); color: #fff; } }

.btn-small { font-size: 15px; padding: 6px 14px; box-shadow: 2px 2px 0 var(--ink); }

.nav-cta { white-space: nowrap; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 72px 0 56px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; text-align: center; }
  .hero .phone-zone { order: -1; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-light);
  border: 2px solid var(--ink-light);
  border-radius: 999px;
  padding: 3px 14px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: 0.01em;
}

h1 .hl {
  color: var(--water);
  background: linear-gradient(transparent 68%, var(--water-light) 68%);
  padding: 0 4px;
}

.hero-sub {
  margin: 20px 0 28px;
  font-size: 19px;
  color: var(--ink-light);
  max-width: 30em;
}

@media (max-width: 860px) { .hero-sub { margin-inline: auto; } }

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 860px) { .hero-ctas { justify-content: center; } }

.hero-note { margin-top: 18px; font-size: 14px; color: var(--ink-light); }

/* ---------- 手机模型 ---------- */

.phone-zone { display: flex; justify-content: center; position: relative; }

.phone {
  width: min(300px, 74vw);
  aspect-ratio: 445 / 948;
  border: 3px solid var(--ink);
  border-radius: 40px;
  overflow: hidden;
  background-color: var(--paper);
  background-size: 139.55% auto;
  box-shadow: 6px 8px 0 var(--shadow);
}

.phone-home { background-image: url("../img/shots/shot-home.jpg"); aspect-ratio: 445 / 880; background-position: 50% 71.6%; }
.phone-history { background-image: url("../img/shots/shot-history.jpg"); background-position: 50% 83.8%; }
.phone-reminders { background-image: url("../img/shots/shot-reminders.jpg"); aspect-ratio: 445 / 870; background-position: 50% 70%; }
.phone-widgets { background-image: url("../img/shots/shot-widgets.jpg"); background-position: 50% 90%; }

.phone-deco {
  position: absolute;
  font-family: var(--font-num);
  color: var(--water);
  font-size: 26px;
  transform: rotate(-8deg);
}

/* ---------- 区块标题 ---------- */

section { padding: 64px 0; }

.sec-head { text-align: center; margin-bottom: 44px; }

.sec-head h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 400;
  display: inline-block;
  position: relative;
}

.sec-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8'%3E%3Cpath d='M2 5 Q 12 1 24 5 T 46 5 T 68 5 T 90 5 T 114 4' fill='none' stroke='%234A8BC4' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 120px 8px;
}

.sec-head p { color: var(--ink-light); margin-top: 20px; font-size: 17px; }

/* ---------- 功能卡片 ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.feature {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  padding: 24px 22px;
  box-shadow: 4px 4px 0 var(--shadow);
}

.feature:nth-child(odd) { transform: rotate(-0.4deg); }
.feature:nth-child(even) { transform: rotate(0.4deg); }

.feature .ico {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--ink);
  background: var(--water-light);
  margin-bottom: 14px;
  border-radius: 16px 18px 15px 19px / 18px 15px 19px 16px;
}

.feature .ico svg { width: 30px; height: 30px; }

.feature h3 { font-size: 20px; font-weight: 400; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--ink-light); }

/* ---------- 截图区 ---------- */

.shots-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .shots-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    gap: 16px;
  }
  .shot-item { flex: 0 0 62vw; scroll-snap-align: center; }
}

.shot-item { text-align: center; }

.shot-item .phone { width: 100%; box-shadow: 4px 5px 0 var(--shadow); }

.shot-item figcaption { margin-top: 14px; font-size: 15px; color: var(--ink-light); }

/* ---------- Watch 区 ---------- */

.watch-band {
  background: var(--paper);
  border-block: 2.5px solid var(--ink);
}

.watch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}

@media (max-width: 860px) { .watch-grid { grid-template-columns: 1fr; } }

.watch-shots { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.watch-frame {
  width: 148px;
  border: 3px solid var(--ink);
  border-radius: 42px;
  overflow: hidden;
  box-shadow: 4px 5px 0 var(--shadow);
  background: #000;
}

.watch-copy h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 400; margin-bottom: 16px; }
.watch-copy p { color: var(--ink-light); margin-bottom: 14px; }

.check-list { list-style: none; }
.check-list li {
  padding-left: 34px;
  position: relative;
  margin-bottom: 10px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 13 Q 8 15 10 19 Q 14 9 21 4' fill='none' stroke='%234A8BC4' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- PRO ---------- */

.pro-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 34px;
  align-items: center;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: 5px 6px 0 var(--shadow);
  padding: 36px 40px;
}

@media (max-width: 720px) { .pro-card { grid-template-columns: 1fr; text-align: center; } }

.pro-price {
  font-family: var(--font-num);
  text-align: center;
  border: 2.5px solid var(--ink);
  background: var(--water-light);
  padding: 18px 26px;
  transform: rotate(-2deg);
}

.pro-price .num { font-size: 54px; line-height: 1; color: var(--ink); }
.pro-price .per { font-size: 15px; color: var(--ink-light); font-family: var(--font-body); }

.pro-card h2 { font-size: 28px; font-weight: 400; margin-bottom: 10px; }
.pro-card ul { margin: 12px 0 0; }

/* ---------- 隐私 ---------- */

.privacy-trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

/* ---------- FAQ ---------- */

details.faq {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  margin-bottom: 14px;
  padding: 16px 22px;
  box-shadow: 3px 3px 0 var(--shadow);
}

details.faq summary {
  cursor: pointer;
  font-size: 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

details.faq summary::-webkit-details-marker { display: none; }

details.faq summary::after {
  content: "+";
  font-family: var(--font-num);
  font-size: 26px;
  color: var(--water);
  transition: transform 0.15s ease;
}

details.faq[open] summary::after { transform: rotate(45deg); }

details.faq p { margin-top: 10px; color: var(--ink-light); font-size: 15px; }

/* ---------- 页脚 ---------- */

footer.site {
  border-top: 2.5px solid var(--ink);
  padding: 40px 0 48px;
  margin-top: 40px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-light);
  font-size: 14px;
}

.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--ink-light); text-decoration: none; }
.foot a:hover { color: var(--water); }

/* ---------- 子页面 ---------- */

.page-head { padding: 64px 0 8px; text-align: center; }
.page-head h1 { font-size: clamp(30px, 4.6vw, 46px); }
.page-head .sub { color: var(--ink-light); margin-top: 14px; }

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.prose h2 {
  font-size: 22px;
  font-weight: 400;
  margin: 38px 0 12px;
  padding-left: 14px;
  border-left: 5px solid var(--water);
}

.prose p, .prose li { font-size: 16px; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 8px 0; }
.prose li { margin-bottom: 6px; }
.prose .muted { color: var(--ink-light); font-size: 14px; }

/* ---------- Changelog ---------- */

.cl-entry {
  max-width: 760px;
  margin: 0 auto 34px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 26px 30px;
  position: relative;
}

.cl-entry:nth-child(odd) { transform: rotate(-0.3deg); }
.cl-entry:nth-child(even) { transform: rotate(0.3deg); }

.cl-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }

.cl-ver { font-family: var(--font-num); font-size: 34px; color: var(--water); }

.cl-date { color: var(--ink-light); font-size: 14px; }

.cl-tag {
  font-size: 12px;
  border: 2px solid var(--water);
  color: var(--water);
  border-radius: 999px;
  padding: 1px 10px;
}

.cl-entry ul { margin-top: 12px; padding-left: 1.2em; }
.cl-entry li { margin-bottom: 8px; font-size: 15.5px; }
.cl-entry li::marker { color: var(--water); }

/* ---------- 跳转与无障碍 ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; }

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