:root {
  color-scheme: dark;
  --base: #0b1016;
  --surface: #101922;
  --stroke: #2c3b48;
  --ink: #f3f7fb;
  --muted: #b5c3d0;
  --ice: #a9d9ff;
  --line: rgb(165 192 210 / 28%);
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--base);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }
.frame { width: min(100% - var(--pad) * 2, 77.5rem); margin-inline: auto; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 5;
  padding: .5rem 1rem;
  background: var(--surface);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  background: linear-gradient(180deg, rgb(6 11 16 / 76%), rgb(6 11 16 / 0%));
}
.header-row {
  display: flex;
  align-items: center;
  min-height: 5rem;
  gap: clamp(1.2rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: .7rem; align-items: center; font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.brand img { flex-shrink: 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: .26em; }
.account-link {
  margin-inline-start: auto;
  padding: .5rem .85rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: rgb(10 17 23 / 43%);
  font-size: .925rem;
  white-space: nowrap;
}
.account-link:hover { border-color: var(--ice); }

.hero {
  position: relative;
  background: #111c26;
  border-bottom: 1px solid var(--stroke);
}
.hero-stage {
  position: relative;
  isolation: isolate;
  background: var(--base);
}
.hero-grid, .hero-frame { display: none; }
.hero-media, .hero-media img, .hero-media video, .hero-media::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -1; overflow: hidden; }
.hero-media img, .hero-media video { object-fit: cover; object-position: 58% 49%; }
.hero-media video { opacity: 0; }
.hero-media video[data-frame-visible] { opacity: 1; }
.hero-media::after {
  content: "";
  background:
    linear-gradient(90deg, rgb(6 11 17 / 95%) 0%, rgb(6 11 17 / 76%) 31%, rgb(6 11 17 / 30%) 59%, rgb(6 11 17 / 5%) 100%),
    linear-gradient(0deg, #0b1016 0%, rgb(11 16 22 / 30%) 36%, rgb(7 12 18 / 12%) 69%, rgb(7 12 18 / 60%) 100%);
}
.hero-inner {
  min-height: clamp(36rem, 80svh, 53rem);
  padding-block: 6.5rem 3rem;
  display: grid;
  align-items: center;
}
.hero-copy { padding-block: 1rem; }
.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 6.6vw, 6.4rem);
  font-weight: 730;
  line-height: 1.06;
  letter-spacing: -.055em;
  text-wrap: balance;
  max-width: 12ch;
  text-shadow: 0 8px 40px rgb(0 0 0 / 48%);
}
.hero-copy p { margin: 1.2rem 0 0; max-width: 30rem; font-size: clamp(1.05rem, 1.65vw, 1.35rem); color: #d6e1ed; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button {
  min-height: 3.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.5rem;
  border: 1px solid transparent;
  border-radius: .25rem;
  font-weight: 650;
}
.button-primary { color: #061321; background: var(--ice); }
.button-primary:hover { background: #d6ebff; }

/* Give the scene a short scroll track while keeping the tool links in the same stage. */
@media (min-width: 60rem) and (min-height: 36rem) and (prefers-reduced-motion: no-preference) {
  .hero[data-scroll-hero] { min-height: calc(100svh + clamp(16rem, 54svh, 32rem)); }
  .hero[data-scroll-hero] .hero-stage {
    --hero-reveal: var(--hero-progress, 0);
    --hero-gutter: max(var(--pad), (100% - 77.5rem) / 2);
    --window-top: calc(17% * var(--hero-reveal));
    --window-side: calc(var(--hero-gutter) * var(--hero-reveal));
    --window-bottom: calc(16% * var(--hero-reveal));
    --window-left: calc((var(--hero-gutter) + min(42vw, 32rem)) * var(--hero-reveal));
    --window-radius: calc(.7rem * var(--hero-reveal));
    position: sticky;
    top: 0;
    height: 100svh;
  }
  .hero[data-scroll-hero] .hero-inner { height: 100%; min-height: 0; }
  .hero[data-scroll-hero] .hero-media {
    clip-path: inset(var(--window-top) var(--window-side) var(--window-bottom) var(--window-left) round var(--window-radius));
  }
  .hero[data-scroll-hero] .hero-media img,
  .hero[data-scroll-hero] .hero-media video {
    transform: translateX(calc(2% * var(--hero-reveal))) scale(calc(1 + .07 * var(--hero-reveal)));
  }
  .hero[data-scroll-hero] .hero-grid {
    display: block;
    position: absolute;
    z-index: -2;
    inset: 0;
    opacity: var(--hero-reveal);
    background:
      linear-gradient(0deg, var(--base), transparent 26%, transparent 75%, var(--base)),
      radial-gradient(ellipse at 72% 44%, rgb(55 106 145 / 21%), transparent 65%),
      radial-gradient(circle, rgb(173 221 255 / 55%) 1px, transparent 1.5px) 0 0 / 8rem 8rem,
      linear-gradient(90deg, rgb(145 190 225 / 10%) 1px, transparent 1px) 0 0 / 2rem 2rem,
      linear-gradient(rgb(145 190 225 / 10%) 1px, transparent 1px) 0 0 / 2rem 2rem;
  }
  .hero[data-scroll-hero] .hero-frame {
    display: block;
    position: absolute;
    inset: var(--window-top) var(--window-side) var(--window-bottom) var(--window-left);
    pointer-events: none;
    opacity: var(--hero-reveal);
    border: 1px solid rgb(173 221 255 / 46%);
    border-radius: var(--window-radius);
    background:
      radial-gradient(ellipse at 70% 56%, transparent 43%, rgb(159 212 254 / 18%) 43.2%, transparent 43.5%),
      radial-gradient(ellipse at 70% 56%, transparent 32%, rgb(159 212 254 / 15%) 32.2%, transparent 32.5%);
    box-shadow: 0 0 2.5rem rgb(53 107 150 / 20%);
  }
  .hero[data-scroll-hero] .hero-copy { transform: translateY(calc(-1.6rem * var(--hero-reveal))); }
  .hero[data-scroll-hero] .hero-copy h1 {
    transform: scale(calc(1 - .2 * var(--hero-reveal)));
    transform-origin: left center;
  }
}

.showcase {
  --showcase-bg: #e8eef2;
  --showcase-ink: #132632;
  --showcase-muted: #405566;
  --showcase-line: #b8c9d4;
  --showcase-accent: #174762;
  background: var(--showcase-bg);
  color: var(--showcase-ink);
  padding-block: clamp(3rem, 7vw, 7rem);
  scroll-margin-top: 1rem;
}
.showcase-inner { width: min(100% - var(--pad) * 2, 84rem); }
#features { scroll-margin-block-start: 1rem; }
.showcase-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding-bottom: clamp(.9rem, 2.2vw, 1.5rem);
  border-bottom: 1px solid var(--showcase-line);
}
.showcase h2 {
  margin: 0;
  font-size: clamp(2.35rem, 5.3vw, 4.5rem);
  font-weight: 720;
  line-height: 1.09;
  letter-spacing: -.045em;
}
.showcase :focus-visible { outline-color: var(--showcase-accent); }
.feature-index { display: flex; flex-wrap: wrap; gap: .2rem clamp(.7rem, 2vw, 1.6rem); }
.feature-index a {
  padding-block: .35rem;
  color: var(--showcase-muted);
  font-size: .92rem;
  white-space: nowrap;
}
.feature-index a:hover, .tool-groups a:hover {
  color: var(--showcase-accent);
  text-decoration: underline;
  text-underline-offset: .24em;
}
.feature-stories {
  display: grid;
  gap: clamp(3.25rem, 9vw, 8rem);
  margin-top: clamp(2rem, 5.5vw, 5rem);
}
.feature-story {
  display: grid;
  align-items: center;
  gap: clamp(1.25rem, 4.2vw, 5rem);
  min-width: 0;
  scroll-margin-top: clamp(1rem, 5vh, 3rem);
}
.feature-copy h3 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3.25rem);
  font-weight: 710;
  line-height: 1.14;
  letter-spacing: -.035em;
}
.feature-copy p {
  max-width: 24em;
  margin: .9rem 0 0;
  color: var(--showcase-muted);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.75;
}
.feature-entry {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: clamp(.9rem, 2.5vw, 1.6rem);
  min-height: 2.75rem;
  padding: .55rem .95rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: #193b50;
  color: #fff;
  font-weight: 650;
}
.feature-entry:hover { background: #225775; }
.feature-entry::after { content: "→"; font-size: 1.05rem; }
#preview-industry {
  --picture-mask: url("./mask-dry-brush.svg");
  --picture-ratio: 2.03;
}
#preview-market {
  --picture-mask: url("./mask-paint-swipe.svg");
  --picture-ratio: 2.02;
  --picture-focus: 28% 45%;
}
#preview-fitting {
  --picture-mask: url("./mask-ink-splash.svg");
  --picture-ratio: 1.62;
}
#preview-starmap {
  --picture-mask: url("./mask-ink-cloud.svg");
  --picture-ratio: 1.56;
  --picture-focus: 42% 50%;
}
#preview-fleet {
  --picture-mask: url("./mask-splatter-drip.svg");
  --picture-ratio: 1.43;
  --picture-focus: center 30%;
}
.feature-image {
  display: block;
  position: relative;
  min-width: 0;
  aspect-ratio: var(--picture-ratio, 16 / 10);
}
.feature-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--picture-focus, center);
  -webkit-mask: var(--picture-mask, none) center / 100% 100% no-repeat;
  mask: var(--picture-mask, none) center / 100% 100% no-repeat;
}

@media (min-width: 52rem) {
  .feature-story { grid-template-columns: minmax(0, 1fr) minmax(0, 2.25fr); }
  .feature-story:nth-child(even) { grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); }
  .feature-story:nth-child(even) .feature-copy { grid-column: 2; grid-row: 1; }
  .feature-story:nth-child(even) .feature-image { grid-column: 1; grid-row: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .feature-story .feature-image { transition: opacity .46s ease-out, transform .48s cubic-bezier(.22, .65, .28, 1); }
  .feature-story[data-image-pending] .feature-image { transform: translateY(.85rem); opacity: .8; }
  .feature-story:focus-within .feature-image { transform: none; opacity: 1; }
}

.tools-section {
  margin-top: clamp(3rem, 8vw, 7rem);
  padding-top: clamp(1.1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--showcase-line);
  scroll-margin-top: 2rem;
}
.tools-section > h3 { margin: 0 0 1rem; font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
.tool-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgb(255 255 255 / 48%);
  border: 1px solid var(--showcase-line);
  border-radius: .55rem;
}
.tool-groups section { display: grid; align-content: start; padding: clamp(1rem, 2.5vw, 2rem); }
.tool-groups section + section { border-inline-start: 1px solid var(--showcase-line); }
.tool-groups h4 { margin: 0 0 .6rem; color: var(--showcase-ink); font-size: 1rem; }
.tool-groups a { display: block; padding: .42rem 0; color: var(--showcase-muted); }
.site-footer { border-top: 1px solid var(--stroke); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem 2rem; padding-block: 1.6rem; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: .45rem 1.5rem; }
.footer-credit { flex-basis: 100%; font-size: .85rem; }

@media (max-width: 48rem) {
  .header-row { min-height: 4.25rem; }
  .hero-inner { min-height: clamp(31rem, 76svh, 39rem); padding-top: 5.5rem; }
  .hero-media img, .hero-media video { object-position: 67% 50%; }
  .hero-media::after {
    background: linear-gradient(90deg, rgb(6 11 17 / 85%), rgb(6 11 17 / 39%)),
      linear-gradient(0deg, #0b1016 0%, rgb(11 16 22 / 13%) 62%, rgb(7 12 18 / 59%));
  }
}

@media (max-width: 35rem) {
  .header-row { gap: .6rem; }
  .hero h1 { max-width: none; font-size: clamp(2.5rem, 11vw, 3.4rem); }
  .hero-actions { gap: .5rem; }
  .button { padding-inline: .9rem; min-height: 2.95rem; }
  .tool-groups { grid-template-columns: 1fr; }
  .tool-groups section + section { border-inline-start: 0; border-top: 1px solid var(--showcase-line); }
}
