:root {
  color-scheme: light;
  --paper: #f5f6ef;
  --ink: #172c25;
  --muted: #4a6055;
  --accent: #245c48;
  --surface: #e2ece0;
  --line: #d1dbcf;
  --stage: #122e25;
  --stage-text: #eaf5ea;
  --stage-muted: #c1d7c8;
  --stage-accent: #b9dfbf;
  --gutter: clamp(20px, 5.2vw, 76px);
  font-family: "Instrument Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

:root[data-theme="ocean"] {
  --paper: #f3f6f9;
  --ink: #172c3b;
  --muted: #4b6375;
  --accent: #245b83;
  --surface: #deebf6;
  --line: #cbdbe8;
  --stage: #122e45;
  --stage-text: #e9f5ff;
  --stage-muted: #c0d6e9;
  --stage-accent: #b7dcf6;
}

:root[data-theme="ink"] {
  --paper: #f6f4f8;
  --ink: #2b2232;
  --muted: #5d5362;
  --accent: #624474;
  --surface: #ece4f2;
  --line: #d9cedf;
  --stage: #302439;
  --stage-text: #f6effa;
  --stage-muted: #dbcde2;
  --stage-accent: #e7cff4;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.journey :focus-visible { outline-color: var(--stage-accent); }
.wrap { width: min(1280px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
section[id], main[id] { scroll-margin-top: 16px; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }

.skip-link {
  position: fixed;
  z-index: 5;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  min-height: 74px;
}

.brand { justify-self: start; }
.brand img { width: 108px; height: auto; }
.section-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 3vw, 38px); }
.section-nav a, .portal-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.section-nav a { color: var(--muted); }
.portal-link { justify-self: end; gap: 9px; color: var(--accent); font-weight: 650; }
.section-nav a:hover, .portal-link:hover, .footer a:hover { text-decoration: underline; text-underline-offset: 5px; }

.hero { padding-top: clamp(40px, 7vw, 96px); }

.hero-header {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(230px, 1fr);
  align-items: end;
  gap: clamp(24px, 5vw, 80px);
  margin-bottom: clamp(24px, 4vw, 46px);
}

.project-name, .section-label { color: var(--accent); font-weight: 700; font-size: 14px; margin-bottom: 17px; }

h1 {
  font-size: clamp(44px, 6.1vw, 88px);
  line-height: 1.08;
  letter-spacing: -.075em;
  font-weight: 780;
}
h1 span { display: block; }
.hero-summary { max-width: 350px; padding-bottom: 7px; }
.hero-summary p { color: var(--muted); font-size: clamp(15px, 1.4vw, 19px); line-height: 1.8; text-wrap: pretty; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 48px;
  padding: 10px 20px;
  margin-top: 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-weight: 650;
  font-size: 14px;
}

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

.hero-photo {
  overflow: hidden;
  border-radius: clamp(12px, 1.5vw, 22px);
  aspect-ratio: 2.42;
  background: var(--surface);
}

.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 56% 46%; }
.hero-photo[data-fit="contain"] img { object-fit: contain; object-position: center; }
.facts { display: flex; flex-wrap: wrap; column-gap: clamp(28px, 6vw, 88px); row-gap: 18px; margin: 0; padding: 23px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 650; font-size: 15px; }

.text-section, .decisions { padding-block: clamp(60px, 10vw, 138px); }
.text-section { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(26px, 8vw, 118px); align-items: start; }
h2 { font-size: clamp(31px, 4vw, 57px); font-weight: 760; letter-spacing: -.065em; line-height: 1.2; }
.body-copy p, .outcome p:last-child { color: var(--muted); font-size: clamp(16px, 1.5vw, 20px); line-height: 1.85; }
.body-copy p + p { margin-top: 18px; }

.journey {
  background: var(--stage);
  color: var(--stage-text);
  padding-block: clamp(52px, 8vw, 112px);
}

.journey-layout { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.1fr); gap: clamp(34px, 7vw, 108px); align-items: center; }
.journey .section-label { color: var(--stage-accent); }
.journey-description { max-width: 380px; margin-top: 16px; color: var(--stage-muted); font-size: 16px; line-height: 1.8; }

.step-list {
  position: relative;
  margin-top: 29px;
  display: grid;
  align-items: start;
  gap: 6px;
}

.step-list button {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--stage-text);
  border: 1px solid color-mix(in srgb, var(--stage-accent) 30%, transparent);
  background: transparent;
  padding: 10px 14px;
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 650;
  text-align: left;
}

.step-list button:hover { background: color-mix(in srgb, var(--stage-accent) 12%, transparent); }
.step-list button[aria-selected="true"] { color: var(--stage); background: var(--stage-accent); border-color: var(--stage-accent); }
.step-list button span { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .85; }
.step-panels, .step-panel { min-width: 0; }
.step-panel + .step-panel { margin-top: 30px; }
.step-panel[role="tabpanel"] { margin-top: 0; }

.screen-stage {
  display: grid;
  place-items: center;
  min-height: 100px;
  padding: clamp(20px, 3vw, 42px);
  border-radius: 16px;
  background: radial-gradient(ellipse at 55% 65%, color-mix(in srgb, var(--stage-accent) 23%, var(--stage)), color-mix(in srgb, var(--stage-text) 4%, var(--stage)) 72%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stage-accent) 20%, transparent);
}

.screen {
  position: relative;
  box-shadow: 0 20px 34px #0005;
  overflow: hidden;
  padding: 5px;
  background: #101714;
  border-radius: 16px;
}

[data-frame="phone"] .screen {
  width: clamp(190px, 19vw, 238px);
  max-width: 100%;
  border-radius: 26px;
}

[data-frame="phone"] img { border-radius: 21px; aspect-ratio: 375 / 812; }
[data-frame="browser"] .screen { width: 100%; }
[data-frame="browser"] img { border-radius: 12px; aspect-ratio: 16 / 10; }
.screen img { width: 100%; object-fit: contain; background: #fff; }

.step-panel[role="tabpanel"] .screen { animation: show-screen 210ms ease-out both; }
@keyframes show-screen {
  from { opacity: .65; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-copy { display: grid; gap: 7px; margin-top: 16px; }
.step-copy h3 { font-size: 18px; }
.step-copy p { min-height: 3em; color: var(--stage-muted); font-size: 15px; line-height: 1.65; }

.decision-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px; margin-top: 34px; }
.decision-grid article { border-top: 1px solid var(--line); padding-top: 18px; }
.decision-grid h3 { font-size: clamp(19px, 2vw, 24px); letter-spacing: -.045em; line-height: 1.35; }
.decision-grid p { margin-top: 10px; color: var(--muted); line-height: 1.75; }

.outcome { margin-bottom: clamp(38px, 7vw, 92px); }
.outcome-content { padding: clamp(24px, 5vw, 68px); border-radius: 16px; background: var(--surface); }
.outcome p:last-child { margin-top: 18px; max-width: 680px; }

.footer { display: flex; gap: 10px 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 82px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding-block: 9px; }
.footer div { display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }

@media (max-width: 760px) {
  .header-inner { grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 0; min-height: 58px; }
  .brand img { width: 92px; }
  .section-nav { grid-row: 2; grid-column: 1 / -1; justify-content: start; gap: 0 20px; }
  .section-nav a, .portal-link { font-size: 13px; }
  .hero-header, .text-section, .journey-layout { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: clamp(38px, 10.8vw, 70px); }
  .hero-summary { padding-bottom: 0; }
  .button { margin-top: 13px; }
  .hero-photo { aspect-ratio: 1.37; }
  .facts { padding-block: 17px; }
  .step-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    gap: 8px;
    margin: 22px -4px 0;
    padding: 4px 4px 8px;
  }
  .step-list button { flex: 0 0 auto; scroll-snap-align: start; max-width: 90%; }
  .journey-layout { gap: 18px; }
  .screen-stage { padding-block: 22px; }
  .step-copy p { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step-panel[role="tabpanel"] .screen { animation: none; }
}
