/* ============================================================
   Apple-style Design System
   ============================================================ */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;

  --c-bg: #ffffff;
  --c-bg-dark: #000000;
  --c-title: #1d1d1f;
  --c-title-inverse: #f5f5f7;
  --c-body: #424245;
  --c-body-inverse: #a1a1a6;
  --c-subtitle: #6e6e73;
  --c-line: #d2d2d7;
  --c-line-dark: #424245;
  --c-accent: #0071e3;
  --c-accent-hover: #0077ed;
  --c-highlight: #06c;

  --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-apple-in: cubic-bezier(0.42, 0, 1, 1);

  --shell-max: 1200px;
  --shell-pad: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  color: var(--c-title);
  background: var(--c-bg);
  line-height: 1.47059;
  letter-spacing: -0.022em;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }

/* ============================================================
   Nav (minimal top bar, Apple-style)
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: 48px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background 0.4s var(--ease-apple), border-color 0.4s var(--ease-apple);
}
.nav__inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--shell-pad);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
  color: var(--c-title);
}
.nav__brand { font-weight: 500; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  color: var(--c-body);
  text-decoration: none;
  transition: color 0.2s var(--ease-apple);
}
.nav__links a:hover { color: var(--c-title); }

/* dark nav variant (auto-applied by JS based on section) */
.nav.is-dark {
  background: rgba(0,0,0,0.72);
  border-bottom-color: rgba(255,255,255,0.06);
}
.nav.is-dark .nav__brand,
.nav.is-dark .nav__links a { color: #f5f5f7; }

/* ============================================================
   Sections
   ============================================================ */
.section {
  position: relative;
  padding: clamp(80px, 12vh, 140px) 0;
  overflow: hidden;
}
.section--dark {
  background: var(--c-bg-dark);
  color: var(--c-title-inverse);
}
.section--dark .eyebrow { color: #a1a1a6; }
.section--dark .body { color: var(--c-body-inverse); }

.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
}

.eyebrow {
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 600;
  color: var(--c-accent);
  letter-spacing: 0;
  margin-bottom: 12px;
}

.headline {
  font-size: clamp(40px, 6.5vw, 88px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: inherit;
}
.headline--hero {
  font-size: clamp(48px, 8.5vw, 112px);
  font-weight: 700;
  letter-spacing: -0.045em;
}
.headline--mega {
  font-size: clamp(72px, 14vw, 200px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.subhead {
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--c-body);
  margin-top: 20px;
  max-width: 780px;
}
.section--dark .subhead { color: var(--c-body-inverse); }

.body {
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--c-body);
  max-width: 640px;
}

/* ============================================================
   Buttons (Apple pill)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: 980px;
  font-size: 15px; font-weight: 400;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: background 0.2s var(--ease-apple), transform 0.2s var(--ease-apple);
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-accent);
  color: #fff;
}
.btn--primary:hover { background: var(--c-accent-hover); }
.btn--ghost {
  background: transparent;
  color: var(--c-accent);
  border: 1px solid transparent;
}
.btn--ghost::after {
  content: "›"; margin-left: 2px;
  transition: transform 0.2s var(--ease-apple);
}
.btn--ghost:hover::after { transform: translateX(4px); }
.section--dark .btn--ghost { color: #2997ff; }

.btn--large {
  height: 56px; padding: 0 32px;
  font-size: 17px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding-top: 48px;
  text-align: center;
}
.hero__inner { max-width: 1100px; padding: 0 var(--shell-pad); }
.hero__tag {
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 500;
  color: var(--c-subtitle);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero__cta {
  margin-top: 44px;
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

/* ============================================================
   Numbers wall
   ============================================================ */
.numbers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(56px, 7vw, 96px) clamp(32px, 5vw, 80px);
  margin-top: 80px;
}
@media (min-width: 900px) {
  .numbers { grid-template-columns: repeat(3, 1fr); }
}
.number { min-width: 0; }
.number__value {
  font-size: clamp(56px, 8vw, 116px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--c-title);
  display: flex; align-items: baseline; gap: 2px;
  flex-wrap: wrap;
}
.section--dark .number__value { color: var(--c-title-inverse); }
.number__value .unit {
  font-size: clamp(22px, 2.6vw, 40px);
  font-weight: 500;
  color: var(--c-subtitle);
  margin-left: 4px;
  letter-spacing: -0.02em;
}
.number__value .arrow {
  font-size: clamp(24px, 3vw, 44px);
  color: var(--c-subtitle);
  font-weight: 300;
  margin: 0 6px 0 4px;
  opacity: 0.55;
}
.number__value .from {
  font-size: clamp(26px, 3.2vw, 48px);
  font-weight: 600;
  color: var(--c-subtitle);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.45;
  letter-spacing: -0.03em;
}
.number__label {
  font-size: clamp(14px, 1.3vw, 16px);
  color: var(--c-subtitle);
  margin-top: 20px;
  letter-spacing: -0.01em;
  line-height: 1.4;
  font-weight: 500;
}
.section--dark .number__label { color: var(--c-body-inverse); }

.number__delta {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.number__delta--neutral {
  background: rgba(120, 120, 128, 0.12);
  color: var(--c-subtitle);
}
.section--dark .number__delta {
  background: rgba(41, 151, 255, 0.16);
  color: #2997ff;
}
.section--dark .number__delta--neutral {
  background: rgba(255,255,255,0.08);
  color: var(--c-body-inverse);
}

/* ============================================================
   Pain points
   ============================================================ */
.pain-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 80px;
}
@media (min-width: 800px) {
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
}
.pain-card {
  padding: 40px 36px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  background: rgba(255,255,255,0.02);
  transition: background 0.4s var(--ease-apple), border-color 0.4s var(--ease-apple);
}
.pain-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.14);
}
.pain-card__idx {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  font-feature-settings: "tnum";
}
.pain-card__title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--c-title-inverse);
  line-height: 1.15;
}
.pain-card__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-body-inverse);
  letter-spacing: -0.005em;
}

/* ============================================================
   Architecture flow (SVG pipeline)
   ============================================================ */
.arch {
  margin-top: 80px;
  position: relative;
}
.arch__svg {
  width: 100%;
  height: auto;
  max-height: 520px;
}
.arch__legend {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  margin-top: 40px;
  font-size: 14px;
  color: var(--c-subtitle);
}
.arch__legend-item { display: flex; align-items: center; gap: 8px; }
.arch__legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
}

/* Flow node styles inside SVG */
.arch-node {
  fill: #ffffff;
  stroke: var(--c-title);
  stroke-width: 1.5;
}
.arch-node--ai {
  fill: var(--c-accent);
  stroke: var(--c-accent);
}
.arch-node-label {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  fill: var(--c-title);
  text-anchor: middle;
}
.arch-node-sub {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  fill: var(--c-subtitle);
  text-anchor: middle;
  letter-spacing: -0.01em;
}
.arch-node-num {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  text-anchor: middle;
  letter-spacing: -0.01em;
}
.arch-node-num--dark { fill: #1d1d1f; }
.arch-node-num--light { fill: #ffffff; }
.arch-line {
  fill: none;
  stroke: var(--c-line);
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* ============================================================
   Systems trio
   ============================================================ */
.trio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 80px;
}
@media (min-width: 900px) {
  .trio { grid-template-columns: repeat(3, 1fr); }
}
.trio-card {
  padding: 48px 40px;
  border-radius: 28px;
  background: #1d1d1f;
  color: var(--c-title-inverse);
  min-height: 480px;
  display: flex; flex-direction: column;
  transition: transform 0.4s var(--ease-apple);
}
.trio-card:hover { transform: translateY(-4px); }
.trio-card__num {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-accent);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.trio-card__title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  line-height: 1.1;
}
.trio-card__body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-body-inverse);
  margin-bottom: auto;
}
.trio-card__foot {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  color: var(--c-subtitle);
}

/* ============================================================
   Rules ring (static/dynamic loop)
   ============================================================ */
.ring-wrap {
  display: flex; align-items: center; justify-content: center;
  margin-top: 80px;
  min-height: 500px;
}
.ring-svg { width: 100%; max-width: 720px; height: auto; }

/* ============================================================
   CTA footer
   ============================================================ */
.cta-final {
  text-align: center;
}
.cta-final__buttons {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin-top: 56px;
}
.cta-huge {
  min-width: 300px;
  padding: 22px 32px;
  border-radius: 22px;
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-decoration: none;
  transition: all 0.3s var(--ease-apple);
  letter-spacing: -0.01em;
  text-align: left;
}
.cta-huge__side {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  opacity: 0.65;
}
.cta-huge__main {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.cta-huge--biz {
  background: var(--c-title);
  color: #fff;
}
.cta-huge--biz:hover { background: #000; transform: translateY(-2px); }
.cta-huge--com {
  background: transparent;
  color: var(--c-title);
  border: 1.5px solid var(--c-title);
}
.cta-huge--com:hover { background: var(--c-title); color: #fff; transform: translateY(-2px); }
.cta-huge--com .cta-huge__side { opacity: 0.55; }

.cta-final__note {
  margin-top: 32px;
  font-size: 13px;
  color: var(--c-subtitle);
  letter-spacing: -0.01em;
}

/* ============================================================
   Reveal animations (Apple-style fade + slight up)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-apple), transform 1s var(--ease-apple);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 40px var(--shell-pad);
  border-top: 1px solid var(--c-line);
  text-align: center;
  font-size: 12px;
  color: var(--c-subtitle);
}
