/* =========================================================
   ChocoBar 官网样式
   配色取自 App 内 ChocolateTheme：
   primary #8B4513 / secondary #D2691E / accent #F4A460 / background #FFFAE6
   ========================================================= */

:root {
  --primary: #8B4513;
  --primary-dark: #5c2d0c;
  --secondary: #D2691E;
  --accent: #F4A460;
  --bg: #FFFAE6;
  --bg-alt: #FFF3D6;
  --ink: #2A160A;
  --ink-soft: #6b5648;
  --white: #ffffff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-soft: 0 20px 45px -20px rgba(139, 69, 19, 0.35);
  --shadow-card: 0 10px 30px -12px rgba(139, 69, 19, 0.18);
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* 吸顶导航下锚点跳转不被遮挡 */
section[id] { scroll-margin-top: 76px; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: rgba(139, 69, 19, 0.09);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- 导航栏 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 250, 230, 0.78);
  border-bottom: 1px solid rgba(139, 69, 19, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
}

.nav-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a { color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

.nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--primary-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 96px 24px 80px;
}

.hero-glow {
  position: absolute;
  top: -220px;
  right: -160px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(244, 164, 96, 0.45), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
}

.hero-copy h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.15;
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-copy .highlight {
  color: var(--primary);
  position: relative;
}

.hero-sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(139, 69, 19, 0.25);
}
.btn-ghost:hover { background: rgba(139, 69, 19, 0.06); }

.btn-lg { padding: 16px 32px; font-size: 16px; }

.apple-icon { width: 18px; height: 18px; }

.hero-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-meta strong { font-size: 15px; color: var(--ink); }
.hero-meta span { font-size: 13px; color: var(--ink-soft); }

/* ---------- Hero art / 手机框 ---------- */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

/* 通用手机框：深色边框 + 圆角屏幕 */
.ph {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #3b2213, #1c110a);
  padding: 9px;
  border-radius: 44px;
  box-shadow: 0 34px 60px -26px rgba(92, 45, 12, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 35px;
}

/* Hero：前后双机错落倾斜 */
.hero-phones {
  position: relative;
  flex: none;
  width: 440px;
  height: 560px;
}

.ph--hero-front {
  position: absolute;
  left: 0;
  top: 0;
  width: 250px;
  aspect-ratio: 9 / 19.5;
  transform: rotate(-4deg);
  z-index: 2;
}

.ph--hero-back {
  position: absolute;
  right: 48px;
  top: 64px;
  width: 190px;
  aspect-ratio: 9 / 15;
  transform: rotate(6deg);
  z-index: 1;
}
.ph--hero-back img {
  transform: scale(1.3);
  transform-origin: 50% 20%;
}

.floating-logo {
  position: absolute;
  width: 64px;
  opacity: 0.9;
  filter: drop-shadow(0 10px 20px rgba(139, 69, 19, 0.25));
}
.floating-logo--1 { top: 6%; left: -6%; width: 56px; animation: float 6s ease-in-out infinite; }
.floating-logo--2 { bottom: 8%; right: -8%; width: 44px; animation: float 7s ease-in-out infinite reverse; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- Section shared ---------- */
section {
  position: relative;
  padding: 96px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin: 0 0 12px;
  font-weight: 800;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
}

/* ---------- Philosophy ---------- */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.philosophy-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.philosophy-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(139, 69, 19, 0.28);
}

.philosophy-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(244, 164, 96, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 18px;
}

.philosophy-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.philosophy-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ---------- Features：三行式，简约大气 ---------- */
.features {
  position: relative;
}

.frow {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 88px 40px;
  isolation: isolate;
}

/* 中间一行铺淡色全宽背景，形成呼吸感与节奏 */
.frow--tint::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background: linear-gradient(180deg, rgba(244, 164, 96, 0.12), rgba(244, 164, 96, 0.05));
  z-index: -1;
}

.frow--reverse .frow-text { order: 2; }
.frow--reverse .frow-visual { order: 1; }

.frow-num {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--primary);
  margin-bottom: 16px;
}

.frow-text h3 {
  margin: 0 0 14px;
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.frow-text p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 460px;
}

.frow-visual {
  display: flex;
  justify-content: center;
}

/* 功能行：单台直立手机，简约干净 */
.frow-phone {
  width: 240px;
  aspect-ratio: 9 / 19.5;
}

.features-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  margin: 8px 0 0;
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  background: linear-gradient(160deg, var(--accent) 0%, var(--secondary) 55%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  color: var(--white);
  padding: 72px 24px;
  margin: 40px auto 96px;
}

.cta-inner { max-width: 560px; margin: 0 auto; }

.cta-logo {
  width: 72px;
  margin: 0 auto 20px;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.25);
}

.cta h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  margin: 0 0 12px;
  font-weight: 800;
}
.cta p { margin: 0 0 28px; opacity: 0.92; }
.cta .btn-primary {
  background: var(--white);
  color: var(--primary);
}
.cta .btn-primary:hover { background: #fff4e2; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(139, 69, 19, 0.1);
  padding: 32px 24px 40px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.footer-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer-links a:hover { color: var(--primary); }
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 8px 0 0;
}

/* ---------- Responsive ---------- */
/* 中等宽度：双栏 Hero 右列变窄，双机等比缩小避免被裁 */
@media (max-width: 1080px) {
  .hero-phones { width: 380px; height: 500px; }
  .ph--hero-front { width: 215px; }
  .ph--hero-back { width: 165px; right: 24px; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin: 0 auto 32px; }
  .hero-actions, .hero-meta { justify-content: center; }
  .hero-art { margin-top: 20px; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .frow,
  .frow--reverse {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 56px 24px;
  }
  .frow--reverse .frow-text,
  .frow--reverse .frow-visual { order: initial; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 24px 28px;
    border-bottom: 1px solid rgba(139,69,19,0.08);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-phones { width: 100%; max-width: 330px; height: 460px; }
  .ph--hero-front { width: 195px; }
  .ph--hero-back { width: 150px; right: 6px; top: 60px; }
  .frow-phone { width: 200px; }
  .frow,
  .frow--reverse { padding: 44px 4px; gap: 28px; }
  section { padding: 72px 20px; }
}
