@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #08111b;
  --ink: #f2f8fb;
  --muted: #a5b6c5;
  --rule: #263949;
  --accent: #6cebf0;
  --glass: #142634;
  --glass-raised: #193544;
  --glass-menu: #101d29;
  --glass-highlight: #8cedf0;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --header-height: 69px;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
body { min-width: 0; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:is(a, button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; width: 100%; }
.shell { width: min(100% - 112px, 1264px); margin-inline: auto; }
.skip { position: fixed; z-index: 20; top: 14px; left: 14px; padding: 10px 14px; background: var(--accent); color: var(--bg); transform: translateY(-150%); }
.skip:focus { transform: none; }
.pointer-glow { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (any-hover: hover) and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .pointer-glow {
    position: fixed;
    display: block;
    top: 0;
    left: 0;
    z-index: 3;
    width: min(330px, 50vw);
    aspect-ratio: 1;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle, #a1e8f00c 0%, #a1e8f006 32%, transparent 70%);
    transition: opacity 180ms ease;
    will-change: transform;
  }
  .pointer-glow.is-visible { opacity: 1; }
}

.footer-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; white-space: nowrap; font-size: 15px; font-weight: 800; letter-spacing: .085em; }
.brand-year { color: var(--accent); }
.text-link:hover, address a:hover { color: var(--accent); }

.scroll-stage { height: 255svh; }
#top { scroll-margin-top: var(--header-height); }
.scene {
  --scene-layout: side-by-side;
  position: sticky;
  top: var(--header-height);
  min-height: 468px;
  height: calc(100svh - var(--header-height));
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 72% 38%, #19354b, #091320 58%, var(--bg));
}
.scene canvas, .scene-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene canvas { display: block; }
.scene::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 35px, #79dfee13 35px 36px),
    repeating-linear-gradient(90deg, transparent 0 35px, #79dfee13 35px 36px);
  mask-image: linear-gradient(90deg, transparent 8%, #000 70%);
}
.scene-shade {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(0deg, #08111bc7 0%, #08111b10 15%, #08111b00 67%, #08111b34 100%),
    linear-gradient(90deg, #08111bf0 0%, #08111bcf 21%, #08111b45 46%, #08111b00 69%);
}
.hero { position: relative; z-index: 3; min-height: inherit; height: 100%; display: flex; align-items: center; }
.hero-copy { min-width: 0; padding-bottom: 36px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--accent);
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .115em;
}
.eyebrow > span { width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 15px #6cebf06b; }
h1 { margin-top: 22px; font-size: clamp(52px, 6.6vw, 108px); line-height: .93; letter-spacing: -.071em; font-weight: 800; }
h1 em { color: var(--accent); font-style: normal; }
.hero-description { max-width: 42ch; margin-top: 25px; color: #bdcbd6; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6; }
.hero-actions { margin-top: 26px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  min-height: 46px;
  gap: 15px;
  padding-inline-start: 12px;
}
.hero-actions .hero-download {
  --control-icon-width: 52px;
  position: relative;
  min-height: 54px;
  gap: clamp(16px, 3vw, 28px);
  padding-inline-start: clamp(12px, 2vw, 18px);
  font-size: clamp(12px, 1.3vw, 15px);
}
.hero-download:active { transform: translateY(1px); }

.hero-actions .hero-action-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--control-accent);
  border-radius: inherit;
  pointer-events: none;
  animation: hero-action-pulse 350ms ease-out both;
}
@keyframes hero-action-pulse {
  from { opacity: .9; transform: scale(.98); }
  to { opacity: 0; transform: scale(1.06, 1.22); }
}

.section, .project-section, .resources-section, .supercad-section { scroll-margin-top: calc(var(--header-height) + 8px); }
.section { padding-block: clamp(52px, 8.5vw, 128px); }
.section-heading h2, .project h2, .resources h2 { font-weight: 750; line-height: 1; letter-spacing: -.065em; font-size: clamp(37px, 5.8vw, 75px); }
.section-heading .eyebrow, .project .eyebrow { margin-bottom: 16px; }
.section-heading > p:last-child:not(.eyebrow) { margin-top: 17px; color: var(--muted); line-height: 1.65; }
.service-list { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--rule); }
.service-list article { padding: 25px 24px 28px; }
.service-list article:nth-child(3n + 1) { padding-inline-start: 0; }
.service-list article:not(:nth-child(3n + 1)) { border-inline-start: 1px solid var(--rule); }
.service-list article:nth-child(n + 4) { border-top: 1px solid var(--rule); }
.service-symbol { display: block; color: var(--accent); font-size: 25px; margin-bottom: 10px; }
.service-list h3 { font-size: clamp(17px, 2vw, 22px); letter-spacing: -.035em; }
.service-list p { margin-top: 9px; max-width: 34ch; color: var(--muted); font-size: 14px; line-height: 1.65; }

.project-section { background: #101e2a; border-block: 1px solid var(--rule); }
.project { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); align-items: center; gap: clamp(24px, 5.5vw, 82px); padding-block: clamp(36px, 6vw, 88px); }
.project-image { position: relative; overflow: hidden; border: 1px solid #476072; background: var(--bg); }
.project-image::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background:
    linear-gradient(#b3f5f5, #b3f5f5) top left / 16px 1px,
    linear-gradient(#b3f5f5, #b3f5f5) top left / 1px 16px,
    linear-gradient(#b3f5f5, #b3f5f5) bottom right / 16px 1px,
    linear-gradient(#b3f5f5, #b3f5f5) bottom right / 1px 16px;
  background-repeat: no-repeat;
}
.project-image img { aspect-ratio: 481 / 281; height: auto; object-fit: cover; }
.project h2 { font-size: clamp(37px, 5vw, 66px); }
.project-copy > p:not(.eyebrow) { margin-block: 16px 22px; color: var(--muted); line-height: 1.75; max-width: 46ch; }
.text-link { display: inline-flex; align-items: center; gap: 12px; padding-bottom: 5px; border-bottom: 1px solid #54898e; font-size: 14px; font-weight: 700; }
.text-link span { color: var(--accent); }

.catalog-tools { display: grid; grid-template-columns: minmax(230px,.85fr) 1fr; gap: 22px; align-items: end; margin-top: 32px; }
.catalog-search { display: grid; gap: 8px; }
.catalog-search label { font-size: 13px; font-weight: 650; }
.catalog-search input { min-width: 0; width: 100%; min-height: 46px; padding: 0 13px; color: var(--ink); border: 1px solid #3f5768; border-radius: 4px; background: var(--glass); font: inherit; }
.catalog-search input::placeholder { color: #91a6b8; }
.catalog-refine { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-filters button, .catalog-empty button { min-height: 46px; padding: 0 10px; }
.software :is(input, button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.catalog-count { color: var(--muted); font: 400 12px var(--mono); white-space: nowrap; }
.catalog-empty { margin-top: 20px; padding: 20px; border: 1px solid var(--rule); color: var(--muted); }
.catalog-empty button { margin-top: 12px; }
.software [hidden] { display: none !important; }
.download-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 14px; }
.download-list li { min-width: 0; }
.software-card { display: grid; grid-template-rows: auto minmax(3em,auto) minmax(4.5em,auto) auto auto; gap: 10px; padding: clamp(16px,2.2vw,26px); border: 1px solid var(--rule); background: #101e2a; border-radius: 6px; overflow-wrap: anywhere; }
.software-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; color: var(--muted); font: 400 11px/1.4 var(--mono); }
.software-meta span:first-child { color: var(--accent); }
.software-card h3 { align-self: end; font-size: clamp(19px,2vw,28px); line-height: 1.1; font-weight: 750; letter-spacing: -.04em; }
.software-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.download-button { justify-self: start; }
.software-card details[open] { background: var(--glass); }
.software-card summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding-inline-start: 10px; list-style: none; }
.software-card summary::-webkit-details-marker { display: none; }
.details-icon::after { content: "+"; font-size: 17px; }
.software-card details[open] .details-icon::after { content: "−"; }
.software-card details p { margin: 8px 10px; overflow-wrap: anywhere; }
.software-card details a { display: inline-block; margin: 0 10px 8px; color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.software-footer { margin-top: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 13px 22px; }
.software-help { color: var(--muted); font-size: 14px; }
.software-help .text-link { margin-left: 6px; color: var(--ink); }

.project-section, .supercad-section, .resources-section { position: relative; isolation: isolate; }
.project-section::before, .supercad-section::before, .resources-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, #79dfee13 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, #79dfee13 31px 32px),
    repeating-linear-gradient(135deg, transparent 0 87px, #79dfee18 87px 88px, transparent 88px 158px);
  mask-image: radial-gradient(ellipse at 95% 50%, #000, transparent 70%);
}
.supercad-section { background: radial-gradient(ellipse at 84% 38%, #122d3b, transparent 64%), #0b1721; border-block: 1px solid var(--rule); }
.supercad { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); align-items: center; gap: clamp(28px,5vw,74px); padding-block: clamp(46px,7vw,94px); }
.supercad-name { display: flex; align-items: center; gap: 16px; }
.supercad-name img { width: clamp(48px,7vw,82px); height: auto; border: 1px solid #7294a65e; border-radius: 19%; }
.supercad-name .eyebrow { margin-bottom: 8px; }
.supercad-name h2 { font-size: clamp(46px,6.3vw,86px); line-height: .95; letter-spacing: -.075em; }
.supercad-intro { margin-top: 20px; max-width: 47ch; color: var(--muted); font-size: clamp(15px,1.55vw,18px); line-height: 1.65; }
.supercad-download { margin-top: 14px; }
.supercad-features { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.supercad-features li { display: grid; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.supercad-features span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.supercad-gallery {
  display: grid;
  min-width: 0;
  gap: 14px;
  align-items: center;
}

.supercad-gallery-stage {
  min-width: 0;
  padding: clamp(8px,1.5vw,16px);
  border: 1px solid #79dfee43;
  border-radius: 16px;
  background:
    linear-gradient(#6cebf00b 1px, transparent 1px) center / 24px 24px,
    linear-gradient(90deg, #6cebf00b 1px, transparent 1px) center / 24px 24px,
    linear-gradient(155deg, #0c1a24, #0a131c 70%);
}

.supercad-gallery-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.supercad-gallery[data-enhanced] .supercad-gallery-track { grid-template-columns: minmax(0, 1fr); }

.supercad-slide {
  display: grid;
  min-width: 0;
  grid-template-rows: 1fr auto;
  justify-items: center;
  gap: 10px;
  padding: 4px 6px 9px;
}

.supercad-gallery[data-enhanced] .supercad-slide {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.supercad-gallery[data-enhanced] .supercad-slide.is-current {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.supercad-slide figcaption {
  align-self: center;
  padding: 2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.supercad-preview {
  display: grid;
  width: min(100%, clamp(205px, 39svh, 338px));
  padding: 6px;
  border: 1px solid #7294a686;
  border-radius: 14px;
  background: #070e15;
}

.supercad-preview:is(:hover, :focus-visible) { border-color: var(--accent); }
.supercad-preview img { aspect-ratio: 9 / 16; height: auto; border-radius: 8px; }

.supercad-preview-open {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 7px;
  padding: 7px 5px 1px;
  color: var(--control-ink);
  font: 500 11px/1.35 var(--mono);
}

.supercad-preview-open span { color: var(--accent); }

.supercad-autoplay {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.supercad-autoplay button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 10px;
  font-size: 12px;
}

.supercad-autoplay [data-supercad-play-icon] { color: var(--accent); }

.supercad-gallery-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.supercad-gallery-options button {
  min-height: 46px;
  padding: 7px 9px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.supercad-gallery-options button:last-child:nth-child(odd) { grid-column: 1 / -1; }

.supercad-gallery [hidden] { display: none; }

@media (min-width: 1120px) {
  .supercad-gallery[data-enhanced] {
    grid-template-areas: "stage controls";
    grid-template-columns: minmax(0, 1fr) minmax(120px, .34fr);
  }
  .supercad-gallery[data-enhanced] .supercad-gallery-stage { grid-area: stage; }
  .supercad-gallery-controls { grid-area: controls; }
  .supercad-gallery-options { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .supercad-gallery[data-enhanced] .supercad-slide {
    transition: opacity 420ms ease, visibility 0s linear 420ms;
  }
  .supercad-gallery[data-enhanced] .supercad-slide.is-current {
    transition-delay: 0s;
  }
}

.resources-section { background: #101e2a; border-block: 1px solid var(--rule); }
.resources { padding-block: clamp(36px, 6vw, 70px); }
.resources h2 { font-size: clamp(31px, 4.2vw, 52px); }
.resources ul { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; list-style: none; margin: 23px 0 0; padding: 0; }
.resources a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 7px 11px 7px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.resources a span { flex: none; color: var(--accent); }
.resources a:hover { border-color: var(--accent); }
.footer-inner { min-height: 95px; }
address { display: flex; gap: 9px 22px; flex-wrap: wrap; font-style: normal; font-size: 13px; color: var(--muted); }

@media (min-width: 901px) and (any-hover: hover) and (prefers-reduced-motion: no-preference) {
  :root {
    --glass: #142b3aaf;
    --glass-raised: #204354bd;
    --glass-menu: #101f2bd9;
    --glass-highlight: #8cedf0e0;
  }
  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .hero-download {
      -webkit-backdrop-filter: blur(8px) saturate(115%);
      backdrop-filter: blur(8px) saturate(115%);
    }
  }
}

@media (max-height: 615px) and (min-width: 701px) {
  .scene { min-height: 420px; }
  h1 { font-size: clamp(53px, 11.2vh, 80px); }
  .hero-description, .hero-actions { margin-top: 15px; }
}
@media (max-width: 900px) {
  .shell { width: calc(100% - 64px); }
  .scene-shade { background: linear-gradient(0deg,#08111bc7 0%,transparent 19%), linear-gradient(90deg,#08111bf0 0%,#08111b55 52%,transparent 79%); }
  .download-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 701px) and (max-width: 840px) and (orientation: portrait) {
  .scroll-stage { height: 218svh; }
  .scene { --scene-layout: stacked; }
  .hero { align-items: flex-start; }
  .hero-copy { padding: clamp(32px, 7svh, 70px) 0 0; }
  .scene-shade { background: linear-gradient(0deg,#08111bc7 0%,transparent 15%,#08111b1a 59%,#08111bc9 100%); }
}
@media (max-width: 700px) {
  :root { --header-height: 59px; }
  .shell { width: calc(100% - 36px); }
  .brand { font-size: 13px; }
  .scroll-stage { height: 218svh; }
  .scene { --scene-layout: stacked; min-height: 504px; }
  .scene::after { opacity: .68; }
  .hero { align-items: flex-start; }
  .hero-copy { padding: clamp(28px, 7.5svh, 65px) 0 0; }
  .scene-shade { background: linear-gradient(0deg,#08111bc7 0%,transparent 16%,#08111b22 48%,#08111bbd 88%), linear-gradient(90deg,#08111b9e 0%,transparent 92%); }
  .hero-description { text-shadow: 0 1px 5px #08111b, 0 0 9px #08111b; }
  h1 { font-size: clamp(27px, 10.2vw, 69px); margin-top: 15px; }
  .hero-description { max-width: 31ch; margin-top: 15px; }
  .hero-actions { margin-top: 17px; }
  .service-list, .project { grid-template-columns: 1fr; }
  .service-list article { padding: 17px 0; }
  .service-list article:not(:nth-child(3n + 1)) { border-inline-start: 0; }
  .service-list article + article { border-top: 1px solid var(--rule); }
  .project-copy { grid-row: 1; }
  .catalog-tools { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .supercad { grid-template-columns: minmax(0,1fr); }
  .resources ul { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .footer-inner { align-items: flex-start; flex-direction: column; padding-block: 22px; gap: 12px; }
}
@media (max-width: 360px) {
  .hero-actions .hero-download { min-height: 46px; }
  .hero-download { --control-icon-width: 44px; }
  .supercad-name { gap: 11px; }
  .supercad-name h2 { font-size: clamp(39px, 14vw, 46px); }
}
@media (max-width: 560px) {
  .download-list { grid-template-columns: minmax(0,1fr); }
  .software-card { grid-template-rows: auto auto auto auto auto; }
  .catalog-search input { font-size: 16px; }
}
@media (max-height: 480px) and (min-width: 560px) {
  .scroll-stage { height: 190svh; }
  .scene { --scene-layout: side-by-side; min-height: 0; }
  .scene::after { opacity: .58; }
  .hero { align-items: center; }
  .hero-copy { padding: 9px 0; }
  h1 { margin-top: 9px; font-size: clamp(32px, 9.5svh, 49px); }
  .hero-description { margin-top: 10px; font-size: 14px; }
  .hero-actions { margin-top: 12px; }
  .hero-actions .hero-download { min-height: 44px; }
  .scene-shade { background: linear-gradient(90deg,#08111bf0 0%,#08111b55 49%,transparent 79%); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-stage { height: auto; }
  .scene { position: relative; top: 0; }
  .hero-download:active { transform: none; }
  .hero-actions .hero-action-pulse::after { animation: none; }
}
