/* StudyBuddy official site — 晨读墨色 · 统一字体系 */

:root {
  --ink: #152033;
  --ink-soft: #4a5a72;
  --mist: #e7eef5;
  --paper: #f7f4ef;
  --sky-top: #b8d4e8;
  --sky-mid: #d9e6f0;
  --accent: #1a8f7a;
  --accent-deep: #0f6b5c;
  --accent-glow: rgba(26, 143, 122, 0.22);
  --line: rgba(21, 32, 51, 0.1);
  --shadow: 0 14px 36px rgba(21, 32, 51, 0.12);
  --shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 24px rgba(21, 32, 51, 0.08),
    0 2px 6px rgba(21, 32, 51, 0.05);
  --shadow-card-press:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 4px 12px rgba(21, 32, 51, 0.1);
  --card-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(247, 244, 239, 0.92));
  --radius: 16px;

  /* 全站同一中文字体，靠字号/字重区分层级 */
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.75rem;
  --fs-hero: 2rem;
  --lh-tight: 1.35;
  --lh-body: 1.7;
  --space: 1.25rem;
  --max: 1080px;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  background: var(--paper);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

h1, h2, h3, h4, strong {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wrap {
  width: min(100% - (var(--space) * 2), var(--max));
  margin-inline: auto;
}

/* ── Nav ── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.is-solid,
.nav.is-open {
  background: rgba(247, 244, 239, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  min-height: 3.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: contain;
  background: #0c1219;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-name {
  font-size: var(--fs-md);
  font-weight: 700;
}

.brand-tag {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: none;
  gap: 1.25rem;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-soft);
}

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

.nav-cta {
  display: none;
  align-items: center;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--accent-deep);
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

.nav-drawer {
  display: none;
  padding: 0.35rem 0 0.95rem;
  margin: 0 calc(var(--space) * -1);
  padding-inline: var(--space);
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 16px 28px rgba(21, 32, 51, 0.1);
}

.nav-drawer.open {
  display: grid;
  gap: 0;
}

.nav-drawer a {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 500;
  background: var(--paper);
}

.nav-drawer a:last-child {
  color: var(--accent-deep);
  font-weight: 600;
  border-bottom: 0;
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 5rem 0 2rem;
  overflow: hidden;
}

.hero-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 70% 12%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(ellipse 50% 40% at 12% 28%, rgba(26, 143, 122, 0.14), transparent 55%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 48%, var(--paper) 100%);
  z-index: 0;
}

.hero-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero-copy {
  max-width: 36rem;
}

.hero-brand {
  font-family: var(--font);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: 0.02em;
  margin: 0 0 0.85rem;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-brand span {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  margin-bottom: 0.4rem;
}

.hero h1 {
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin: 0 0 0.75rem;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.hero-lead {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.hero-actions {
  display: grid;
  gap: 0.65rem;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 46px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-actions .btn {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(180deg, #243247, var(--ink));
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 10px 22px rgba(21, 32, 51, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #147a69, var(--accent-deep));
}

.btn-ghost {
  border: 1px solid rgba(21, 32, 51, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 12px rgba(21, 32, 51, 0.06);
}

.btn-ghost:hover {
  background: #fff;
}

/* Media */
.media-slot {
  margin: 0;
  animation: float-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.media-slot-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(160deg, #c5d9e8, #f3efe6);
  box-shadow: var(--shadow);
}

.media-slot--hero .media-slot-img {
  aspect-ratio: 4 / 3;
  max-height: 280px;
}

.media-slot--philo .media-slot-img {
  aspect-ratio: 4 / 3;
  max-height: 260px;
}

.media-slot--app {
  max-width: 180px;
  margin-inline: auto;
}

.media-slot--app .media-slot-img {
  aspect-ratio: 4 / 5;
  border-radius: 22px;
}

/* Sections */
section {
  padding: 3rem 0;
  position: relative;
}

.section-kicker {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent-deep);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 0.65rem;
}

.section-lead {
  margin: 0;
  color: var(--ink-soft);
  max-width: 36rem;
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

.section-head {
  margin-bottom: 1.5rem;
}

/* Entries — 手机端立体卡片 */
.entry-list {
  display: grid;
  gap: 0.9rem;
}

.entry {
  display: grid;
  gap: 0.35rem;
  padding: 1.2rem 1.2rem 1.15rem;
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  transform: translateZ(0);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.entry:last-child {
  border-bottom: 1px solid rgba(21, 32, 51, 0.08);
}

.entry:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-card-press);
}

.entry-kicker {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.entry strong {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
}

.entry > span:not(.entry-kicker):not(.entry-go) {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

.entry-go {
  margin-top: 0.3rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent-deep);
}

/* Download — 立体卡片 */
.download {
  background:
    radial-gradient(ellipse 55% 50% at 0% 100%, rgba(26, 143, 122, 0.08), transparent 55%),
    var(--paper);
}

.download-panel {
  display: grid;
  gap: 1.25rem;
  padding: 1.3rem 1.2rem;
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

.download-panel h3 {
  margin: 0 0 0.4rem;
  font-size: var(--fs-lg);
  font-weight: 700;
}

.download-status,
.download-notes {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

.download-notes {
  margin-top: 0.45rem;
}

.download-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.download-actions .btn {
  width: 100%;
}

.price-note {
  margin-top: 1rem;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-body);
}

/* Philosophy — 立体卡片 */
.philosophy {
  background: linear-gradient(180deg, var(--paper), #eef3f7 55%, var(--paper));
}

.philo-layout {
  display: grid;
  gap: 1.25rem;
}

.philo-grid {
  display: grid;
  gap: 0.85rem;
}

.philo-item {
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

.philo-item:last-child {
  border-bottom: 1px solid rgba(21, 32, 51, 0.08);
}

.philo-item h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.philo-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

.philo-num {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

/* Features — 立体卡片 */
.features-list {
  display: grid;
  gap: 0.85rem;
}

.feature {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.75rem 0.9rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  align-items: start;
}

.feature:last-child {
  border-bottom: 1px solid rgba(21, 32, 51, 0.08);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(26, 143, 122, 0.18), rgba(26, 143, 122, 0.08));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 4px 10px rgba(26, 143, 122, 0.12);
  font-size: 1.05rem;
}

.feature h3 {
  margin: 0 0 0.25rem;
  font-size: var(--fs-md);
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

/* Tutorial — 立体步骤卡片 */
.tutorial {
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(184, 212, 232, 0.45), transparent 60%),
    var(--paper);
}

.steps {
  display: grid;
  gap: 0.85rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.2rem 1.15rem 1.2rem 3.55rem;
  border-radius: 18px;
  border: 1px solid rgba(21, 32, 51, 0.08);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0.95rem;
  top: 1.15rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--accent-deep);
  background: linear-gradient(160deg, rgba(26, 143, 122, 0.18), rgba(26, 143, 122, 0.08));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 3px 8px rgba(26, 143, 122, 0.12);
}

.step h3 {
  margin: 0 0 0.3rem;
  font-size: var(--fs-md);
  font-weight: 700;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

/* CTA */
.cta-band {
  padding: 2.5rem 0 3.25rem;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 1.75rem 1.25rem;
  background:
    radial-gradient(ellipse 50% 80% at 90% 20%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(135deg, #1a2b3f, #0f6b5c 120%);
  color: #f2f6fa;
  text-align: center;
}

.cta-panel h2 {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 0.55rem;
}

.cta-panel p {
  margin: 0 auto 1.15rem;
  max-width: 28rem;
  color: rgba(242, 246, 250, 0.8);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

.cta-panel .btn {
  width: 100%;
  max-width: 280px;
}

.cta-panel .btn-primary {
  background: #fff;
  color: var(--ink);
}

.cta-panel .btn-primary:hover {
  background: var(--mist);
}

/* Footer */
.footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}

.footer a {
  font-weight: 500;
}

.footer a:hover {
  color: var(--ink);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Tablet+ ── */
@media (min-width: 640px) {
  :root {
    --fs-base: 1rem;
    --fs-hero: 2.35rem;
    --fs-2xl: 1.65rem;
    --fs-3xl: 1.9rem;
    --space: 1.5rem;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    width: auto;
  }

  .download-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .download-actions .btn {
    width: auto;
  }

  .media-slot--hero .media-slot-img {
    max-height: 360px;
  }
}

@media (min-width: 768px) {
  :root {
    --fs-hero: 2.75rem;
    --fs-2xl: 1.85rem;
    --space: 1.75rem;
  }

  .nav-inner {
    padding: 0.9rem 0;
  }

  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: inline-flex;
  }

  .nav-toggle,
  .nav-drawer,
  .nav-drawer.open {
    display: none !important;
  }

  .hero {
    padding: 6.5rem 0 3rem;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
  }

  .hero h1 {
    font-size: var(--fs-2xl);
  }

  .hero-lead {
    font-size: var(--fs-md);
  }

  section {
    padding: 4rem 0;
  }

  .section-head {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: var(--fs-3xl);
  }

  .philo-layout {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2rem;
    align-items: center;
  }

  .philo-grid {
    gap: 0.85rem;
  }

  .entry-list {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .entry:hover {
    border-color: rgba(26, 143, 122, 0.35);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.9) inset,
      0 16px 36px rgba(26, 143, 122, 0.14),
      0 4px 10px rgba(21, 32, 51, 0.06);
    transform: translateY(-2px);
  }

  .download-panel {
    grid-template-columns: 1.25fr 0.55fr;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
  }

  .media-slot--app {
    margin-inline: 0;
    justify-self: end;
    max-width: 220px;
  }

  .media-slot--hero .media-slot-img {
    max-height: min(52vh, 480px);
    border-radius: 20px;
  }

  .media-slot--philo .media-slot-img {
    max-height: 340px;
  }

  .features-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .cta-band {
    padding: 3.5rem 0 4.5rem;
  }

  .cta-panel {
    padding: 2.75rem 2rem;
    border-radius: 24px;
  }

  .cta-panel h2 {
    font-size: var(--fs-2xl);
  }

  .cta-panel p {
    font-size: var(--fs-base);
  }

  .cta-panel .btn {
    width: auto;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-brand {
    font-size: 3.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
