:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --header-bg: rgba(245, 245, 247, 0.72);
  --header-bg-scrolled: rgba(245, 245, 247, 0.88);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --subtle-border: rgba(0, 0, 0, 0.05);
  --accent: #ff3b30;
  --accent-soft: rgba(255, 59, 48, 0.1);
  --accent-hover: #e0342a;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
  --pill-bg: rgba(0, 0, 0, 0.05);
  --pill-hover: rgba(0, 0, 0, 0.09);
  --ambient-glow: radial-gradient(circle at 50% 0%, rgba(255, 59, 48, 0.08), transparent 62%);
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
  --max-width: 980px;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-soft: rgba(28, 28, 30, 0.72);
  --header-bg: rgba(0, 0, 0, 0.65);
  --header-bg-scrolled: rgba(18, 18, 20, 0.85);
  --text: #f5f5f7;
  --muted: #86868b;
  --subtle-border: rgba(255, 255, 255, 0.08);
  --accent: #ff453a;
  --accent-soft: rgba(255, 69, 58, 0.15);
  --accent-hover: #ff5e54;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 20px 48px rgba(0, 0, 0, 0.55);
  --pill-bg: rgba(255, 255, 255, 0.1);
  --pill-hover: rgba(255, 255, 255, 0.16);
  --ambient-glow: radial-gradient(circle at 50% 0%, rgba(255, 69, 58, 0.14), transparent 62%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-soft: rgba(28, 28, 30, 0.72);
    --header-bg: rgba(0, 0, 0, 0.65);
    --header-bg-scrolled: rgba(18, 18, 20, 0.85);
    --text: #f5f5f7;
    --muted: #86868b;
    --subtle-border: rgba(255, 255, 255, 0.08);
    --accent: #ff453a;
    --accent-soft: rgba(255, 69, 58, 0.15);
    --accent-hover: #ff5e54;
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 20px 48px rgba(0, 0, 0, 0.55);
    --pill-bg: rgba(255, 255, 255, 0.1);
    --pill-hover: rgba(255, 255, 255, 0.16);
    --ambient-glow: radial-gradient(circle at 50% 0%, rgba(255, 69, 58, 0.14), transparent 62%);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease-apple), color 0.35s var(--ease-apple);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* Frosted Glass Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease-apple), border-color 0.3s var(--ease-apple);
}

.site-header.is-scrolled {
  background-color: var(--header-bg-scrolled);
  border-bottom-color: var(--subtle-border);
}

.header-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.brand-mark .bar {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background-color: var(--text);
}

.brand-mark .bar-accent {
  background-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-btn {
  background-color: var(--pill-bg);
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-apple), transform 0.15s var(--ease-apple);
}

.pill-btn:hover {
  background-color: var(--pill-hover);
}

.pill-btn:active {
  transform: scale(0.95);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-ambient {
  position: absolute;
  inset: 0;
  background: var(--ambient-glow);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  will-change: transform, opacity;
  transform: translate3d(0, var(--hero-y, 0px), 0) scale(var(--hero-scale, 1));
  opacity: var(--hero-opacity, 1);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 14px;
  border-radius: 999px;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 auto 26px;
  max-width: 780px;
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-lead {
  margin: 0 auto;
  max-width: 620px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--muted);
  font-weight: 400;
}

.hero-scroll-hint {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}

.scroll-pill {
  width: 24px;
  height: 40px;
  border-radius: 999px;
  background-color: var(--pill-bg);
  position: relative;
}

.scroll-pill::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 999px;
  background-color: var(--muted);
  animation: scrollFloat 2.2s var(--ease-apple) infinite;
}

@keyframes scrollFloat {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(10px);
    opacity: 1;
  }
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-header {
  margin-bottom: 36px;
}

.section-kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}

/* Bento Grid Cards */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  background-color: var(--surface);
  border: 1px solid var(--subtle-border);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  will-change: transform, opacity;
  transition: transform 0.45s var(--ease-apple), box-shadow 0.45s var(--ease-apple);
}

.bento-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.bento-card h3 {
  margin: 0 0 12px;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.bento-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Surface Panel */
.surface-panel {
  background-color: var(--surface);
  border: 1px solid var(--subtle-border);
  border-radius: 28px;
  padding: 44px;
  box-shadow: var(--shadow-card);
  will-change: transform, opacity;
}

.panel-intro {
  margin: 0 0 32px;
  font-size: 1.12rem;
  color: var(--text);
  font-weight: 500;
  max-width: 720px;
}

.diff-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.diff-item h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.diff-item p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Demands 2x2 Grid */
.demands-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.demand-card {
  background-color: var(--surface);
  border: 1px solid var(--subtle-border);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease-apple), box-shadow 0.4s var(--ease-apple);
}

.demand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.demand-index {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.demand-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.demand-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Pledge Card */
.pledge-section {
  padding-bottom: 100px;
}

.pledge-card {
  background-color: var(--surface);
  border: 1px solid var(--subtle-border);
  border-radius: 32px;
  padding: 56px 44px;
  text-align: center;
  box-shadow: var(--shadow-card);
  will-change: transform, opacity;
}

.pledge-title {
  margin: 12px auto 18px;
  max-width: 620px;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.pledge-text {
  margin: 0 auto 32px;
  max-width: 580px;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
}

.pledge-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cta-btn {
  background-color: var(--text);
  color: var(--bg);
  border: none;
  padding: 14px 32px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-apple), opacity 0.2s var(--ease-apple), background-color 0.2s var(--ease-apple);
}

.cta-btn:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

.cta-btn:active {
  transform: scale(0.97);
}

.feedback {
  min-height: 1.4em;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
}

/* Footer */
.site-footer {
  padding: 32px 0 48px;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-weight: 600;
  color: var(--text);
}

/* Apple-style Scroll Reveal & Parallax */
.reveal {
  opacity: 0;
  transform: translate3d(0, 32px, 0) scale(0.985);
  transition:
    opacity 0.85s var(--ease-apple) var(--delay, 0ms),
    transform 0.95s var(--ease-apple) var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1);
}

.bento-card.reveal.is-visible:hover {
  transform: translate3d(0, calc(var(--parallax-y, 0px) - 5px), 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .hero-inner {
    transform: none;
    opacity: 1;
  }

  .scroll-pill::after {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 820px) {
  .bento-grid,
  .diff-list,
  .demands-grid {
    grid-template-columns: 1fr;
  }

  .surface-panel,
  .pledge-card {
    padding: 32px 24px;
    border-radius: 24px;
  }

  .hero {
    min-height: 78vh;
    padding: 110px 0 60px;
  }

  .section {
    padding: 44px 0;
  }
}
