/* ============================================================
   Apple-style Design System
   Default: Light mode | Dark: prefers-color-scheme
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  /* Light mode (default) */
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fbfbfd;
  --fg: #1d1d1f;
  --fg-secondary: #86868b;
  --fg-tertiary: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --nav-blur: saturate(180%) blur(20px);
  --card-bg: #f5f5f7;
  --card-hover: #ebebed;
  --hero-bg: #fbfbfd;
  --header-h: 52px;
  --header-compact-h: 48px;
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-secondary: #161617;
    --bg-tertiary: #0a0a0a;
    --fg: #f5f5f7;
    --fg-secondary: #98989d;
    --fg-tertiary: #86868b;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #2997ff;
    --accent-hover: #40a9ff;
    --nav-bg: rgba(0, 0, 0, 0.72);
    --nav-blur: saturate(180%) blur(20px);
    --card-bg: #161617;
    --card-hover: #1d1d1f;
    --hero-bg: #000000;
  }
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 300ms ease, color 300ms ease;
}

body.is-loading {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 200ms ease;
}

a:hover {
  color: var(--accent-hover);
}

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

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

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

/* ---- Loader ---- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition:
    opacity 500ms var(--ease-out),
    visibility 500ms var(--ease-out);
}

.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loader__inner {
  width: min(360px, calc(100vw - 48px));
  text-align: center;
}

.loader__brand {
  margin: 0 0 24px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.loader__bar {
  height: 3px;
  overflow: hidden;
  background: var(--bg-secondary);
  border-radius: 999px;
}

.loader__bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 200ms linear;
}

.loader__percent {
  margin: 16px 0 0;
  color: var(--fg-secondary);
  font-size: 0.8125rem;
}

/* ---- Navigation ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-h);
  padding: 0 44px;
  background: var(--nav-bg);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  transition:
    height 300ms var(--ease-out),
    background 300ms var(--ease-out),
    border-color 300ms var(--ease-out);
}

.site-header.is-scrolled {
  height: var(--header-compact-h);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1024px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  white-space: nowrap;
  transition: opacity 200ms ease;
}

.brand:hover {
  opacity: 0.7;
  color: var(--fg);
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.site-nav a {
  color: var(--fg);
  opacity: 0.8;
  padding: 6px 0;
  transition: opacity 200ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  opacity: 1;
  color: var(--fg);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 60px) 24px 60px;
  background: var(--hero-bg);
  text-align: center;
  overflow: hidden;
}

.hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero__title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--fg);
  max-width: 840px;
}

.hero__subtitle {
  margin-top: 16px;
  font-size: clamp(1.125rem, 2.5vw, 1.625rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg-secondary);
  max-width: 540px;
}

.hero__image-wrap {
  margin-top: 48px;
  width: 100%;
  max-width: 960px;
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 800ms var(--ease-out) 200ms,
    transform 800ms var(--ease-out) 200ms;
}

.hero__image-wrap.is-visible {
  opacity: 1;
  transform: scale(1);
}

.hero__image,
.hero__globe {
  width: 100%;
  height: auto;
}

canvas.hero__globe {
  display: block;
  aspect-ratio: 1 / 1;
  max-width: 100%;
}

.hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Buttons ---- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    background 200ms ease,
    color 200ms ease,
    transform 200ms var(--spring);
  cursor: pointer;
}

.button:hover {
  transform: scale(1.02);
}

.button:active {
  transform: scale(0.98);
}

.button--primary {
  background: var(--accent);
  color: #ffffff;
}

.button--primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.button--outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.button--outline:hover {
  background: var(--accent);
  color: #ffffff;
}

.button--ghost {
  color: var(--fg);
  background: var(--bg-secondary);
}

.button--ghost:hover {
  background: var(--card-hover);
  color: var(--fg);
}

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

.section--alt {
  background: var(--bg-secondary);
}

.section__inner {
  width: min(1024px, calc(100% - 48px));
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--fg);
  max-width: 720px;
  margin: 0 auto;
}

.section__desc {
  margin-top: 16px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Feature Rows (card layout) ---- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 48px 48px;
  margin-bottom: 24px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 300ms var(--ease-out);
}

.feature-row:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.feature-row:nth-child(even) .feature-row__media {
  order: 2;
}

.feature-row:nth-child(even) .feature-row__text {
  order: 1;
}

.feature-row__media {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
}

.feature-row__media.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.feature-row__media img,
.feature-row__media canvas {
  width: 100%;
  border-radius: 18px;
}

.feature-row__text {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 600ms var(--ease-out) 150ms,
    transform 600ms var(--ease-out) 150ms;
}

.feature-row__text.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.feature-row__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.feature-row__title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--fg);
}

.feature-row__desc {
  margin-top: 16px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg-secondary);
  max-width: 420px;
}

.feature-row__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.feature-row__link::after {
  content: "→";
  transition: transform 200ms ease;
}

.feature-row__link:hover::after {
  transform: translateX(4px);
}

/* ---- Benefit Grid ---- */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.benefit-card {
  padding: 32px;
  background: var(--card-bg);
  border-radius: 18px;
  transition: background 300ms ease, transform 300ms var(--spring);
}

.benefit-card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

.benefit-card__index {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg-secondary);
  margin-bottom: 16px;
}

.benefit-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--fg);
  margin-bottom: 8px;
}

.benefit-card__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--fg-secondary);
}

/* ---- Nutrition Grid ---- */
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---- Nutrition Card ---- */
.nutrition-card {
  max-width: none;
  margin: 0 auto;
  padding: 32px;
  background: var(--card-bg);
  border-radius: 18px;
}

.nutrition-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 20px;
}

.fact-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.fact-line--large {
  border-bottom-width: 3px;
  font-size: 1.125rem;
  font-weight: 600;
}

.fact-line span {
  color: var(--fg-secondary);
}

.fact-line strong {
  color: var(--fg);
  font-weight: 600;
}

.nutrition-card__note {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--fg-tertiary);
  line-height: 1.5;
}

/* ---- Reviews ---- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  padding: 32px;
  background: var(--card-bg);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-card blockquote {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg);
  font-weight: 400;
}

.review-card figcaption {
  margin-top: 28px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-secondary);
}

/* ---- FAQ ---- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  list-style: none;
  transition: color 200ms ease;
}

summary:hover {
  color: var(--accent);
}

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

summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--fg-secondary);
  transition: transform 200ms ease;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--fg-secondary);
  max-width: 580px;
}

/* ---- CTA Section ---- */
.cta-section {
  padding: 120px 0;
  text-align: center;
  background: var(--bg-secondary);
}

.cta-section__inner {
  width: min(680px, calc(100% - 48px));
  margin: 0 auto;
}

.cta-section__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cta-section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--fg);
}

.cta-section__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.cta-section__link::after {
  content: "→";
  transition: transform 200ms ease;
}

.cta-section__link:hover::after {
  transform: translateX(4px);
}

.cta-section__email {
  display: block;
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--fg-tertiary);
}

/* ---- Footer ---- */
.site-footer {
  padding: 40px 0;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  width: min(1024px, calc(100% - 48px));
  margin: 0 auto;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 28px;
}

.site-footer__brand {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__links a {
  font-size: 0.75rem;
  color: var(--fg-tertiary);
  transition: color 200ms ease;
}

.site-footer__links a:hover {
  color: var(--fg);
}

.site-footer__bottom {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--fg-tertiary);
}

.site-footer__bottom p {
  margin-bottom: 8px;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__legal a {
  color: var(--fg-tertiary);
}

.site-footer__legal a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }

/* ---- Responsive ---- */
@media (max-width: 1040px) {
  .site-header {
    padding: 0 24px;
  }

  .site-nav {
    gap: 18px;
  }

  .hero__title {
    font-size: clamp(2.2rem, 7vw, 4.5rem);
  }

  .hero__image-wrap {
    max-width: 100%;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 32px;
  }

  .feature-row:nth-child(even) .feature-row__media,
  .feature-row:nth-child(even) .feature-row__text {
    order: 0;
  }

  .feature-row__title {
    font-size: 1.625rem;
  }

  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .review-grid,
  .nutrition-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 80px 0;
  }

  .section__header {
    margin-bottom: 48px;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: 48px;
    padding: 0 16px;
  }

  .site-header.is-scrolled {
    height: 44px;
  }

  .site-nav {
    display: none;
  }

  .brand {
    font-size: 0.9375rem;
  }

  .hero {
    padding: calc(48px + 40px) 16px 40px;
    min-height: 90svh;
  }

  .hero__eyebrow {
    font-size: 0.75rem;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .hero__image-wrap {
    margin-top: 32px;
  }

  .button {
    min-width: 100px;
    padding: 10px 20px;
    font-size: 0.8125rem;
  }

  .feature-row {
    gap: 24px;
    padding: 28px 24px;
  }

  .feature-row__title {
    font-size: 1.375rem;
  }

  .feature-row__desc {
    font-size: 0.9375rem;
  }

  .section {
    padding: 64px 0;
  }

  .section__title {
    font-size: 1.5rem;
  }

  .section__header {
    margin-bottom: 36px;
  }

  .benefit-card,
  .review-card {
    padding: 24px;
  }

  .nutrition-card {
    padding: 24px;
  }

  .faq-list {
    max-width: 100%;
  }

  summary {
    min-height: 56px;
    font-size: 0.9375rem;
  }

  .cta-section {
    padding: 80px 0;
  }

  .cta-section__title {
    font-size: 1.5rem;
  }

  .site-footer {
    padding: 32px 0;
  }

  .site-footer__top {
    gap: 20px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal,
  .feature-row__media,
  .feature-row__text {
    opacity: 1;
    transform: none;
  }
}
