/* 豆仓 Coffee Vault · landing page. Palette mirrors the app's dark-roast theme. */
:root {
  --bg: #1a1412;
  --surface: #231e1a;
  --surface-2: #2d251f;
  --surface-3: #382d25;
  --border: #493a2f;
  --text: #f0e8e0;
  --muted: #b8a79a;
  --faint: #7d6d61;
  --accent: #d4a574;
  --accent-ink: #23170f;
  --active: #78a67f;
  --danger: #df796d;
  --serif: "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --maxw: 1120px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 88% -8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 38%),
    radial-gradient(circle at 8% 4%, color-mix(in srgb, var(--active) 8%, transparent), transparent 30%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { border-radius: 11px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.brand-name { display: grid; line-height: 1.1; }
.brand-name b { font-family: var(--serif); font-size: 19px; }
.brand-name small { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 26px); }
.site-nav a { font-size: 15px; color: var(--muted); transition: color .18s; }
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.site-nav .nav-cta:hover { color: var(--accent-ink); filter: brightness(1.06); }
.lang-toggle {
  min-width: 44px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.lang-toggle:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ===== Layout ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 9vw, 104px) clamp(16px, 4vw, 40px); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 48px); }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); }

/* ===== Hero ===== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 84px) clamp(16px, 4vw, 40px) clamp(24px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-title { font-size: clamp(40px, 7vw, 68px); font-weight: 900; letter-spacing: -0.01em; }
.hero-title span { display: inline-block; color: var(--accent); }
.slogan {
  margin: 14px 0 20px;
  font-family: var(--serif);
  font-size: clamp(17px, 2.4vw, 22px);
  color: var(--text);
}
.hero-sub { margin: 0 0 28px; max-width: 30em; font-size: clamp(15px, 1.6vw, 17px); color: var(--muted); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-center { justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .16s ease, filter .16s, background .16s, border-color .16s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-ic { font-size: 13px; opacity: .85; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

.trust { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 26px 0 0; padding: 0; list-style: none; }
.trust li { position: relative; padding-left: 20px; font-size: 14px; color: var(--muted); }
.trust li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--active); font-weight: 700;
}

/* ===== Device mockups ===== */
.hero-visual { display: flex; justify-content: center; }
.device {
  margin: 0;
  padding: 8px;
  background: linear-gradient(160deg, var(--surface-3), var(--surface));
  border: 1px solid var(--border);
  border-radius: 34px;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.7), inset 0 1px 0 color-mix(in srgb, var(--accent) 18%, transparent);
}
.device img { width: 100%; height: auto; border-radius: 26px; display: block; }
.device-lg { width: min(300px, 78vw); }

/* Hero carousel: horizontal sliding track */
.carousel { position: relative; width: 100%; aspect-ratio: 390 / 844; border-radius: 26px; overflow: hidden; background: var(--bg); }
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 26px;
  pointer-events: none;
}
.device figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

/* ===== Features ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.feature {
  padding: 26px 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s, background .2s;
}
.feature:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 46%, var(--border)); background: var(--surface); }
.feature-ic {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  font-size: 22px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
}
.feature h3 { font-size: 19px; margin-bottom: 9px; }
.feature p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ===== Theme switch ===== */
.section-head--wide { max-width: 760px; }
.theme-title .theme-word {
  background-image: linear-gradient(92deg, var(--accent), #a9773f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: inherit;
}
.theme-switch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.theme-pill {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s, transform .12s;
}
.theme-pill:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 46%, var(--border)); }
.theme-pill:active { transform: translateY(1px); }
.theme-pill.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

/* ===== Screens rail ===== */
.screens-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(230px, 62vw);
  gap: clamp(18px, 3vw, 34px);
  overflow-x: auto;
  padding: 6px 4px 22px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.screens-rail .device { scroll-snap-align: center; padding: 7px; border-radius: 30px; }
.screens-rail .device img { border-radius: 23px; transition: opacity .3s ease; }
.screens-rail .device img.img-fade { opacity: 0; }

/* ===== Privacy ===== */
.privacy-card {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 52px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--active) 12%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 24px;
}
.privacy-card h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 16px; }
.privacy-card p { margin: 0 auto; max-width: 60ch; color: var(--muted); font-size: clamp(15px, 1.6vw, 16.5px); }

/* ===== Download ===== */
.download { text-align: center; }
.download h2 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 14px; }
.download-sub { max-width: 46ch; margin: 0 auto 30px; color: var(--muted); }
.download-note { margin: 20px 0 0; font-size: 13px; color: var(--faint); }

/* ===== Footer ===== */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 40px) 56px;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.foot-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.foot-brand img { border-radius: 8px; }
.foot-brand b { font-family: var(--serif); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-links a { font-size: 14px; color: var(--muted); transition: color .18s; }
.foot-links a:hover { color: var(--accent); }
.foot-meta { width: 100%; margin: 6px 0 0; font-size: 13px; color: var(--faint); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 1; }
  .hero-visual { order: 0; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .trust { justify-content: center; }
  .section-head { margin-left: auto; margin-right: auto; text-align: center; }
  .theme-switch { justify-content: center; }
}
@media (max-width: 560px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .brand-name small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
