:root {
  --page: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #86868b;
  --line: rgba(29, 29, 31, 0.1);
  --accent: #ff3b30;
  --accent-hover: #e52d24;
  --accent-soft: #fff0ef;
  --dark: #1d1d1f;
  --radius: 28px;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.08);
  --system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--system);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.42);
  outline-offset: 3px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 30px;
  height: 56px;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  background: rgba(250, 250, 252, 0.82);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(255, 59, 48, 0.22);
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

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

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.lang button {
  border: 0;
  border-radius: 999px;
  padding: 4px 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.lang button.is-on {
  background: var(--ink);
  color: white;
}

section {
  scroll-margin-top: 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 80px;
  min-height: calc(100svh - 56px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 40px 120px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(64px, 8vw, 108px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.hero h1 span {
  display: block;
}

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

.hero-lead {
  max-width: 590px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(20px, 2vw, 25px);
  letter-spacing: -0.03em;
  line-height: 1.42;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 21px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

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

.button.quiet {
  color: #0066cc;
}

.hero-object {
  display: grid;
  min-height: 460px;
  place-items: center;
  padding: 36px;
  border-radius: 44px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 59, 48, 0.13), transparent 36%),
    var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.decision-orb {
  position: relative;
  display: flex;
  width: min(300px, 65vw);
  aspect-ratio: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 59, 48, 0.12);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #fff7f6);
  box-shadow:
    inset 0 0 0 14px rgba(255, 255, 255, 0.7),
    0 30px 70px rgba(255, 59, 48, 0.12);
}

.pulse {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255, 59, 48, 0.18);
  border-radius: 50%;
  animation: breathe 2.8s ease-in-out infinite;
}

.orb-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.decision-orb strong {
  margin-top: 8px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.orb-probability {
  margin-top: 4px;
  color: var(--accent);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.hero-object > p {
  align-self: end;
  margin: -34px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.playground,
.stories,
.how,
.start {
  max-width: 1248px;
  margin: 0 auto 28px;
  padding: 120px 64px;
  border-radius: 44px;
}

.playground,
.how {
  background: var(--surface);
}

.section-heading {
  max-width: 780px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2,
.start h2 {
  margin: 0;
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.section-heading > p:last-child,
.start-copy > p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 21px;
  letter-spacing: -0.025em;
}

.scenario-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 54px;
  padding: 6px;
  border-radius: 18px;
  background: var(--page);
}

.scenario-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.scenario-tabs button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.07);
}

.scenario-tabs button:hover:not(.is-active) {
  background: rgba(0, 0, 0, 0.04);
}

.decision-console {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  min-height: 490px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 30px;
  background: var(--dark);
  color: white;
}

.scene,
.decision {
  padding: 48px;
}

.scene {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.console-label {
  margin: 0 0 15px;
  color: #ff6961;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.scene h3 {
  margin: 0;
  font-size: clamp(30px, 3.5vw, 46px);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.scene p:not(.console-label) {
  margin: 18px 0 0;
  color: #a1a1a6;
}

.scene pre {
  margin: 32px 0;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #29292c;
  color: #d2d2d7;
  font: 13px/1.7 var(--mono);
  white-space: pre-wrap;
}

.scene a {
  align-self: flex-start;
  color: #ff6961;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.decision {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.decision-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
  color: #a1a1a6;
  font-size: 13px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 59, 48, 0.13);
}

.decision-list {
  display: grid;
  gap: 28px;
}

.answer {
  display: grid;
  gap: 10px;
  animation: answer-in 380ms ease both;
}

.answer:nth-child(2) {
  animation-delay: 50ms;
}

.answer:nth-child(3) {
  animation-delay: 100ms;
}

.answer-heading {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: baseline;
  gap: 12px;
}

.answer-heading span {
  color: #86868b;
  font: 11px var(--mono);
}

.answer-heading strong {
  font-size: 17px;
}

.answer-heading b {
  color: #ff6961;
  font-size: 18px;
}

.probability-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
}

.probability-track i {
  display: block;
  width: var(--probability);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3b30, #ff6961);
  animation: probability-in 600ms ease both;
  transform-origin: left;
}

.decision-note {
  margin: 34px 0 0;
  color: #6e6e73;
  font-size: 12px;
}

.stories {
  padding-top: 132px;
  padding-bottom: 132px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 62px;
}

.story-card {
  position: relative;
  display: flex;
  min-height: 520px;
  flex-direction: column;
  padding: 42px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.story-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  font-size: 32px;
}

.story-tag {
  margin: 38px 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.story-card h3 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.story-card > p:not(.story-tag) {
  max-width: 38ch;
  margin: 20px 0 0;
  color: var(--muted);
}

.story-card > strong {
  margin-top: auto;
  padding-top: 38px;
  color: var(--accent);
  font-size: 25px;
  letter-spacing: -0.035em;
}

.story-link {
  margin-top: 8px;
  color: var(--soft);
  font-size: 13px;
}

.story-flight {
  background: linear-gradient(145deg, #fff, #f1f7ff);
}

.story-spire {
  background: linear-gradient(145deg, #fff, #fff8ec);
}

.story-trade {
  background: linear-gradient(145deg, #fff, #f2fbf7);
}

.honest-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  margin-top: 20px;
  padding: 30px 34px;
  border-radius: 24px;
  background: #e8e8ed;
}

.honest-note > span {
  color: var(--accent);
  font-size: 32px;
}

.honest-note h3 {
  margin: 0;
  font-size: 18px;
}

.honest-note p {
  margin: 5px 0 0;
  color: #505056;
  font-size: 14px;
}

.honest-note a {
  color: #0066cc;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 18px;
  margin-top: 64px;
}

.flow-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fbfbfd;
}

.flow-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.flow-card strong {
  margin-top: 28px;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.flow-card p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 15px;
}

.flow-card code {
  margin-top: auto;
  color: var(--accent);
  font: 13px var(--mono);
}

.flow-card.result {
  border-color: rgba(255, 59, 48, 0.2);
  background: var(--accent-soft);
}

.flow-card.result .flow-number {
  background: var(--accent);
}

.flow-arrow {
  align-self: center;
  color: #c7c7cc;
  font-size: 24px;
}

.one-line {
  margin: 62px 0 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.045em;
  text-align: center;
}

.start {
  padding-top: 0;
}

.start-shell {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  padding: 70px;
  border-radius: 34px;
  background: var(--dark);
  color: white;
}

.start-copy {
  align-self: center;
}

.start-copy > p {
  color: #a1a1a6;
  font-size: 18px;
}

.platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.platform-links a {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #d2d2d7;
  font-size: 13px;
  text-decoration: none;
}

.platform-links a:hover {
  border-color: #ff6961;
  color: white;
}

.code {
  align-self: center;
  margin: 0;
  padding: 28px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #29292c;
  color: #f5f5f7;
  font: 13px/1.75 var(--mono);
}

.project-carousel {
  margin-top: 20px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface);
}

.project-carousel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 42px 40px 20px;
}

.project-carousel-head .eyebrow {
  margin-bottom: 9px;
}

.project-carousel-head h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.carousel-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.carousel-controls button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #e8e8ed;
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  transition: background-color 180ms ease, transform 180ms ease;
}

.carousel-controls button:hover:not(:disabled) {
  background: #d9d9de;
  transform: scale(1.04);
}

.carousel-controls button:disabled {
  color: #b7b7bc;
  cursor: default;
  opacity: 0.55;
}

.project-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 20px 40px 42px;
  scroll-padding-inline: 40px;
  scroll-snap-type: x mandatory;
  scrollbar-color: #c7c7cc transparent;
  scrollbar-width: thin;
}

.project-card {
  display: flex;
  min-height: 330px;
  flex: 0 0 min(400px, calc(100vw - 84px));
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fbfbfd;
  color: var(--ink);
  scroll-snap-align: start;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.project-card:hover {
  border-color: rgba(255, 59, 48, 0.3);
  transform: translateY(-3px);
}

.project-kind {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.project-card h4 {
  margin: 17px 0 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.project-card > p {
  margin: 16px 0 28px;
  color: var(--muted);
  font-size: 16px;
}

.project-path {
  margin-top: auto;
  color: #0066cc;
  font: 12px/1.45 var(--mono);
  overflow-wrap: anywhere;
}

.project-index {
  border-color: rgba(255, 59, 48, 0.2);
  background: var(--accent-soft);
}

footer {
  display: flex;
  max-width: 1120px;
  justify-content: space-between;
  gap: 32px;
  margin: 0 auto;
  padding: 44px 24px 70px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer p {
  margin: 0;
}

footer div {
  display: flex;
  gap: 22px;
}

footer a {
  text-decoration: none;
}

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

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes answer-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes probability-in {
  from {
    transform: scaleX(0);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .lang {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 88px 24px;
    text-align: center;
  }

  .hero-copy,
  .hero-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-object {
    width: min(100%, 540px);
    min-height: 420px;
    margin: 0 auto;
  }

  .playground,
  .stories,
  .how,
  .start {
    margin-bottom: 16px;
    padding: 84px 28px;
    border-radius: 30px;
  }

  .scenario-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .decision-console,
  .start-shell {
    grid-template-columns: 1fr;
  }

  .scene {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .story-card {
    min-height: 460px;
  }

  .honest-note {
    grid-template-columns: auto 1fr;
  }

  .honest-note a {
    grid-column: 2;
  }

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

  .flow-arrow {
    transform: rotate(90deg);
  }

  .start-shell {
    gap: 42px;
    padding: 48px 36px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .nav {
    padding: 0 16px;
  }

  .hero {
    min-height: auto;
    padding-top: 80px;
  }

  .hero h1 {
    font-size: clamp(54px, 16vw, 74px);
  }

  .hero-lead {
    font-size: 19px;
  }

  .hero-object {
    min-height: 360px;
    padding: 24px;
    border-radius: 30px;
  }

  .playground,
  .stories,
  .how,
  .start {
    padding: 72px 18px;
    border-radius: 24px;
  }

  .section-heading h2,
  .start h2 {
    font-size: 42px;
  }

  .section-heading > p:last-child {
    font-size: 18px;
  }

  .scenario-tabs button {
    font-size: 13px;
  }

  .scene,
  .decision {
    padding: 30px 24px;
  }

  .answer-heading {
    grid-template-columns: 58px 1fr auto;
    gap: 8px;
  }

  .story-card {
    min-height: 440px;
    padding: 30px;
  }

  .story-card h3 {
    font-size: 32px;
  }

  .honest-note {
    align-items: start;
    padding: 24px;
  }

  .start-shell {
    padding: 38px 24px;
  }

  .project-carousel-head {
    align-items: center;
    padding: 34px 24px 14px;
  }

  .project-track {
    padding: 18px 24px 34px;
    scroll-padding-inline: 24px;
  }

  .project-card {
    min-height: 310px;
  }

  footer {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
