/* Design tokens — modeled on the Stripe Japan site system (type scale, ink, spacing) */
:root {
  color-scheme: light;
  --ink: #061b31;
  --ink-body: #50617a;
  --ink-muted: #64748d;
  --brand: #533afd;
  --brand-hover: #4434d4;
  --surface: #ffffff;
  --surface-tint: #f8fafd;
  --line: #e5edf5;
  --baseline: #8a99b0;
  --font: "Inter", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --gutter: 16px;
  --section-y: 112px;
  --radius: 8px;
  --shadow-card: 0 1px 2px rgba(6, 27, 49, .04), 0 12px 32px -8px rgba(50, 50, 93, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt";
}
/* Break Japanese at phrase boundaries instead of mid-word */
h1, h2, h3, .hero__lead, .quote p, .stat__label { word-break: auto-phrase; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.container { max-width: 1112px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* Site header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .78); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: border-color 200ms ease-out; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-header__home { font-size: 16px; font-weight: 600; letter-spacing: .04em; }
.site-header__nav { display: none; gap: 28px; }
.site-header__nav a { font-size: 14px; font-weight: 600; color: var(--ink); transition: color 150ms ease-out; }
.site-header__nav a:hover { color: var(--ink-muted); }
@media (min-width: 768px) { .site-header__nav { display: flex; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero__gradient {
  position: absolute; inset: -40% -10% auto -10%; height: 120%;
  background:
    radial-gradient(40% 50% at 78% 38%, rgba(255, 153, 102, .55), transparent 70%),
    radial-gradient(45% 55% at 92% 20%, rgba(255, 92, 170, .45), transparent 70%),
    radial-gradient(50% 60% at 70% 10%, rgba(83, 58, 253, .55), transparent 70%),
    radial-gradient(40% 50% at 98% 55%, rgba(0, 212, 255, .35), transparent 70%);
  transform: skewY(-12deg); transform-origin: top left;
  filter: blur(20px); opacity: .9; pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: skewY(-12deg) translate3d(-3%, 2%, 0); } }
.hero__layout { position: relative; display: grid; gap: 48px; }
@media (min-width: 960px) { .hero { padding: 112px 0 128px; } .hero__layout { grid-template-columns: 1.35fr 1fr; align-items: center; gap: 64px; } }

.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(83, 58, 253, .08); color: var(--brand); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.hero__title { margin-top: 24px; font-size: clamp(32px, 6vw, 52px); font-weight: 300; line-height: 1.22; letter-spacing: -.02em; text-wrap: balance; }
.hero__lead { margin-top: 24px; max-width: 34em; font-size: clamp(17px, 2vw, 20px); line-height: 1.75; color: var(--ink-muted); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.button { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 24px; border-radius: 4px; font-size: 16px; font-weight: 600; transition-property: background-color, color, transform; transition-duration: 150ms; transition-timing-function: ease-out; }
.button:active { transform: scale(.97); }
.button--primary { background: var(--brand); color: #fff; }
.button--primary:hover { background: var(--brand-hover); }
.button--ghost { color: var(--brand); padding: 0 12px; }
.button--ghost:hover { color: var(--ink); }

.profile-card { background: rgba(255, 255, 255, .92); border-radius: 12px; box-shadow: var(--shadow-card); padding: 28px; backdrop-filter: blur(6px); }
.profile-card__label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.profile-card__name { margin-top: 8px; font-size: 26px; font-weight: 400; letter-spacing: .02em; }
.profile-card__name span { display: block; font-size: 13px; color: var(--ink-muted); letter-spacing: .04em; }
.profile-card__list { margin-top: 20px; border-top: 1px solid var(--line); }
.profile-card__list div { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.profile-card__list dt { color: var(--ink-muted); font-weight: 600; font-size: 13px; }

/* Stat row */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stats__row { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat { padding: 32px 16px 32px 0; }
.stat:nth-child(odd) { border-right: 1px solid var(--line); }
.stat:nth-child(even) { padding-left: 16px; }
.stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
@media (min-width: 768px) {
  .stats__row { grid-template-columns: repeat(4, 1fr); }
  .stat, .stat:nth-child(even) { padding: 40px 24px; border-bottom: 0 !important; border-right: 1px solid var(--line); }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { border-right: 0; }
}
.stat__value { font-size: clamp(34px, 4.4vw, 48px); font-weight: 300; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__value small { font-size: .5em; letter-spacing: 0; margin: 0 .1em; }
.stat__value--accent { color: var(--brand); }
.stat__label { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--ink-body); }

.info-button { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; vertical-align: -3px; border: 1px solid var(--ink-muted); border-radius: 50%; background: none; color: var(--ink-muted); font-size: 11px; font-weight: 600; line-height: 1; cursor: pointer; transition: color 150ms ease-out, border-color 150ms ease-out; }
.info-button::after { content: ""; position: absolute; inset: -13px; }
.info-button:hover { color: var(--brand); border-color: var(--brand); }

/* Popover */
.popover { width: min(420px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 2px 4px rgba(6, 27, 49, .06), 0 30px 60px -12px rgba(50, 50, 93, .3); font-size: 15px; line-height: 1.75; opacity: 0; transform: translateY(8px) scale(.98); transition: opacity 200ms var(--ease), transform 200ms var(--ease), overlay 200ms allow-discrete, display 200ms allow-discrete; }
.popover:popover-open { opacity: 1; transform: none; }
@starting-style { .popover:popover-open { opacity: 0; transform: translateY(8px) scale(.98); } }
.popover::backdrop { background: rgba(6, 27, 49, .2); }
.popover__title { font-weight: 600; margin-bottom: 8px; }
.popover__note { margin-top: 10px; font-size: 13px; color: var(--ink-muted); }
.popover__close { margin-top: 16px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.popover__close:hover { background: var(--surface-tint); }

/* Sections */
.section { padding: var(--section-y) 0; }
.section--tint { background: var(--surface-tint); }
@media (max-width: 767px) { :root { --section-y: 72px; } }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--brand); letter-spacing: .04em; margin-bottom: 20px; }
.headline { max-width: 26em; font-size: clamp(24px, 3.4vw, 34px); font-weight: 300; line-height: 1.5; letter-spacing: -.01em; text-wrap: pretty; }
.headline span { display: block; margin-top: 12px; max-width: 40em; font-size: clamp(16px, 1.7vw, 18px); line-height: 1.85; color: var(--ink-muted); }
.headline--sm { font-size: clamp(22px, 2.8vw, 28px); }

/* Stepper */
.stepper { display: grid; gap: 40px; margin-top: 56px; counter-reset: step; }
@media (min-width: 768px) { .stepper { grid-template-columns: repeat(2, 1fr); gap: 48px 40px; } }
@media (min-width: 1040px) { .stepper { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.step { position: relative; padding-top: 20px; border-top: 1px solid var(--line); }
.step__number { display: block; font-family: "Inter", sans-serif; font-size: 48px; font-weight: 300; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--brand); }
.step__meta { margin-top: 20px; font-size: 13px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.step__title { margin-top: 6px; font-size: 19px; font-weight: 400; line-height: 1.5; text-wrap: balance; }
.step__body { margin-top: 10px; font-size: 15px; line-height: 1.85; color: var(--ink-body); text-wrap: pretty; }

/* Split + checklist */
.split { display: grid; gap: 48px; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; } }
.checklist { display: grid; gap: 24px; margin-top: 36px; }
.checklist li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.85; color: var(--ink-body); text-wrap: pretty; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: rgba(83, 58, 253, .12); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 14px var(--brand); }
.checklist strong { display: block; color: var(--ink); font-weight: 600; }

/* Bar chart */
.chart-card { position: relative; padding: 28px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); }
.chart-card__title { font-size: 16px; font-weight: 600; }
.chart-card__title span { display: block; font-size: 13px; font-weight: 300; color: var(--ink-muted); }
.chart-card__note { margin-top: 16px; font-size: 12px; color: var(--ink-muted); }
.bar-chart { position: relative; margin-top: 28px; }
.bar-chart__plot { position: relative; height: 260px; margin-left: 44px; }
.bar-chart__grid, .bar-chart__baseline { position: absolute; left: 0; right: 0; bottom: calc(var(--y) * 1%); height: 0; border-top: 1px solid var(--line); }
.bar-chart__grid span { position: absolute; left: -44px; top: -9px; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.bar-chart__grid--zero { border-top-color: var(--baseline); }
.bar-chart__baseline { z-index: 2; border-top: 2px dashed var(--baseline); pointer-events: none; }
.chart-key { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 13px; color: var(--ink-body); }
.chart-key__line { flex: none; width: 24px; border-top: 2px dashed var(--baseline); }
.bar-chart__bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 12px; align-items: end; }
.bar { position: relative; height: 100%; padding: 0; border: 0; background: none; cursor: default; display: flex; align-items: flex-end; justify-content: center; }
.bar::before { content: ""; width: min(72px, 100%); height: calc(var(--v) * 1%); border-radius: 4px 4px 0 0; background: rgba(83, 58, 253, .32); transform-origin: bottom; transform: scaleY(0); transition: transform 900ms var(--ease), background-color 150ms ease-out; }
.bar--final::before { background: var(--brand); }
.bar:hover::before, .bar:focus-visible::before { background: var(--brand-hover); }
.bar__value { position: absolute; bottom: calc(var(--v) * 1% + 8px); font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity 300ms ease-out 600ms; }
.is-visible .bar::before { transform: scaleY(1); }
.is-visible .bar:nth-child(2)::before { transition-delay: 120ms; }
.is-visible .bar:nth-child(3)::before { transition-delay: 240ms; }
.is-visible .bar__value { opacity: 1; }
.bar-chart__labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 10px 0 0 44px; padding: 0 12px; text-align: center; font-size: 13px; color: var(--ink-body); }
.tooltip { position: absolute; z-index: 5; max-width: 220px; padding: 10px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.6; pointer-events: none; opacity: 0; transform: translate(-50%, -100%) translateY(-6px); transition: opacity 150ms ease-out; }
.tooltip.is-shown { opacity: 1; }

/* Quote + callout */
.quote p { max-width: 24em; font-size: clamp(24px, 3.6vw, 36px); font-weight: 300; line-height: 1.55; letter-spacing: -.01em; text-wrap: balance; }
.quote footer { margin-top: 16px; font-size: 14px; color: var(--ink-muted); }
.callout { margin-top: 56px; max-width: 720px; padding: 24px 28px; border-left: 2px solid var(--brand); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; line-height: 1.85; color: var(--ink-body); }
.callout__title { margin-bottom: 6px; font-weight: 600; color: var(--ink); }
.callout__note { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-muted); }

/* Card grid */
.card-grid { display: grid; gap: 20px; margin-top: 56px; }
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.card { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: box-shadow 200ms ease-out, transform 200ms ease-out; }
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card__kicker { font-size: 13px; font-weight: 600; color: var(--brand); }
.card__title { margin-top: 10px; font-size: 19px; font-weight: 400; line-height: 1.5; }
.card__body { margin-top: 10px; font-size: 15px; line-height: 1.85; color: var(--ink-body); text-wrap: pretty; }

/* Profile table */
.profile-table dl > div { display: grid; gap: 8px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.profile-table dl > div:first-child { border-top: 1px solid var(--line); }
@media (min-width: 768px) { .profile-table dl > div { grid-template-columns: 160px 1fr; gap: 24px; } }
.profile-table dt { font-size: 14px; font-weight: 600; color: var(--ink-muted); }
.profile-table dd { font-size: 15px; line-height: 1.8; }
.timeline-item { display: block; }
.timeline-item + .timeline-item { margin-top: 14px; }
.timeline-item b { display: block; font-size: 13px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.timeline-item small { font-size: 13px; color: var(--ink-muted); }

/* Footer */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-muted); }
.footer__inner { display: grid; gap: 4px; }
@media (min-width: 768px) { .footer__inner { grid-template-columns: auto 1fr; gap: 24px; } .footer__inner p:last-child { text-align: right; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); filter: blur(4px); transition: opacity 700ms var(--ease), transform 700ms var(--ease), filter 700ms var(--ease); transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
.no-js .reveal { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__gradient { animation: none; }
  .reveal, .bar::before, .bar__value { transition: none; }
}

@media (max-width: 479px) {
  .chart-card { padding: 24px 20px; }
  .bar-chart__bars, .bar-chart__labels { gap: 12px; padding: 0 4px; }
  .bar-chart__labels { font-size: 12px; white-space: nowrap; }
}
.chart-key { word-break: auto-phrase; }
