:root {
  --header-height: 58px;
}

body > main { padding-top: var(--header-height); }
main[id] { scroll-margin-top: var(--header-height); }
main section[id], main article[id] { scroll-margin-top: calc(var(--header-height) + 20px); }

.site-header {
  position: fixed;
  z-index: 5;
  inset: 0 0 auto;
  background: #07101df5;
  border-bottom: 1px dashed var(--line);
}
.site-header-row {
  width: min(1510px, calc(100% - 56px));
  margin-inline: auto;
  height: calc(var(--header-height) - 1px);
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  gap: clamp(12px, 3vw, 34px);
}
.site-header .brand { font-family: var(--mono); font-size: clamp(16px, 1.55vw, 22px); letter-spacing: -.05em; }
.site-header .brand img { width: 30px; height: 24px; }
.header-link, .header-contact { font: 600 13px/1.15 var(--mono); white-space: nowrap; }
.header-link { padding: 12px 0; }
.header-link:hover { color: var(--signal); text-decoration: underline; text-underline-offset: 4px; }
.header-contact {
  justify-self: end;
}
.contact-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  translate: var(--magnet-x, 0px) var(--magnet-y, 0px);
  transition: translate .18s ease-out, box-shadow .2s, border-color .2s;
}
.contact-face::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at var(--light-x, 50%) 50%, #fff8, transparent 63%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.contact-arrow { transition: translate .18s ease-out; }
[data-magnet]:is(.is-near, :hover, :focus-visible) .contact-face::before { opacity: .65; }
[data-magnet]:is(.is-near, :hover, :focus-visible) .contact-arrow { translate: 3px 0; }
.header-contact .contact-face {
  gap: 8px;
  min-height: 34px;
  padding-inline: 12px;
  border: 1px dashed #63809d;
  border-radius: 5px;
  background: #0d1929;
}
.header-contact:is(.is-near, :hover, :focus-visible) .contact-face {
  border-color: var(--signal);
  box-shadow: 0 0 16px color-mix(in srgb, var(--signal) 20%, transparent);
}
[data-theme="neon"] .header-contact .contact-face { border-color: var(--signal); color: var(--signal); }

.service-contact, .closing-contact { display: inline-flex; vertical-align: middle; }
.service-contact .contact-face, .closing-contact .contact-face {
  gap: 21px;
  min-height: 46px;
  border: 1px dashed transparent;
  border-radius: 5px;
  padding: 10px 17px;
  font: 650 14px/1.2 var(--mono);
}
.service-contact .contact-face { border-color: var(--line); background: var(--panel); }
.service-contact:is(.is-near, :hover, :focus-visible) .contact-face {
  border-color: var(--signal);
  box-shadow: 0 0 16px color-mix(in srgb, var(--signal) 22%, transparent);
}
.closing-contact .contact-face { background: var(--button-fill); color: #151515; }
.closing-contact:is(.is-near, :hover, :focus-visible) .contact-face {
  box-shadow: 0 0 18px color-mix(in srgb, var(--signal) 30%, transparent);
}

.reference-hero {
  --hero-base: #06101e;
  --hero-accent: #ffa86f;
  --hero-ice: #bdcce2;
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: calc(100svh - var(--header-height));
  display: grid;
  place-items: center;
  padding: clamp(32px, 5vw, 74px) clamp(22px, 5vw, 82px);
  background:
    radial-gradient(ellipse at 72% 22%, #18385690, transparent 59%),
    radial-gradient(ellipse at 92% 73%, #152c46 0, transparent 49%),
    linear-gradient(175deg, #081422, var(--hero-base) 76%, var(--base));
  color: #f3f6fc;
}
.reference-hero::before, .reference-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}
.reference-hero::before {
  background: radial-gradient(circle, #7e9ccf66 .42px, transparent .9px) 0 0 / 6px 7px;
  mask-image: radial-gradient(ellipse at 78% 40%, black, transparent 75%);
}
.reference-hero[data-grain]::before { content: none; }
.reference-hero::after {
  inset: auto 6% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #365775 24%, #ff9a535c 69%, transparent);
}
.reference-field, .scene-reveal, .reference-flare {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.reference-field, .reference-flare, .reference-detail {
  pointer-events: none;
}
.reference-color { clip-path: circle(0 at 50% 50%); }
[data-theme="neon"] .reference-color { clip-path: none; }
.reference-flare {
  z-index: 1;
  background: radial-gradient(circle at var(--flare-x) var(--flare-y), #ffad6d3d, #ff974f0c 18%, transparent 45%);
  opacity: 0;
}
.scene-reveal {
  z-index: 1;
  background: transparent;
  border: 0;
}
.scene-reveal:focus-visible { outline-offset: -5px; }
.reference-frame {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(28px, 4.1vw, 76px);
  width: min(100%, 1484px);
}
.hero-copy {
  z-index: 2;
  min-width: 0;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
  color: var(--hero-accent);
  font: 650 11px/1.4 var(--mono);
  letter-spacing: .21em;
  text-transform: uppercase;
}
.hero-kicker::before {
  content: "";
  width: 23px;
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--hero-accent) 0 1px, transparent 1px 5px);
}
.hero-copy h1 {
  font: 720 clamp(44px, 5.4vw, 87px)/1.015 system-ui, sans-serif;
  letter-spacing: -.063em;
  word-spacing: .08em;
  text-wrap: balance;
}
.hero-copy h1 span {
  display: block;
  color: var(--hero-accent);
  background:
    repeating-linear-gradient(0deg, #070d1c20 0 1px, transparent 1px 4px),
    linear-gradient(105deg, #ffdcba 0%, #ffb986 42%, #ff9856 87%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-intro {
  max-width: 35ch;
  margin-top: clamp(19px, 2.8vw, 32px);
  color: var(--hero-ice);
  font-size: clamp(15px, 1.28vw, 19px);
  line-height: 1.64;
}
.scene-contact, .hero-console { pointer-events: auto; }
.scene-contact {
  display: inline-flex;
  margin-top: clamp(24px, 3vw, 38px);
  color: #19110b;
  font: 750 14px/1 var(--mono);
}
.scene-contact .contact-face {
  min-height: 52px;
  gap: 30px;
  padding: 0 19px;
  border: 1px solid #ffe1c4;
  border-radius: 5px;
  background: linear-gradient(110deg, #ffcca6, #ff9f61);
  box-shadow: inset 0 0 0 2px #52261410, 0 4px 24px #ff935527;
}
.scene-contact:is(.is-near, :hover, :focus-visible) .contact-face {
  box-shadow: inset 0 0 0 2px #52261413, 0 0 35px #ff93556e;
}
.hero-stack {
  position: relative;
  min-width: 0;
  padding-top: clamp(190px, 28svh, 260px);
}
.hero-mascot {
  position: absolute;
  z-index: -1;
  top: -73px;
  right: 11%;
  width: min(84%, 560px);
  aspect-ratio: 1100 / 943;
  transform: rotate(-8deg);
  mask-image: linear-gradient(#000 56%, #000b 72%, transparent 96%);
  pointer-events: none;
}
.hero-mascot img, .hero-mascot canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.hero-mascot img { filter: grayscale(1) sepia(.22) hue-rotate(157deg) brightness(.78); }
.hero-mascot[data-rendered] img { opacity: 0; }
.reference-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (pointer: fine) and (forced-colors: none) {
  body { cursor: url("/sotong-cursor.svg") 13 2, auto; }
  a, button:not(:disabled), summary, label:has(input) { cursor: url("/sotong-cursor.svg") 13 2, pointer; }
}

@media (min-width: 941px) and (max-height: 820px) {
  .reference-hero { padding-block: 38px; }
  .hero-stack { padding-top: clamp(160px, 25svh, 210px); }
  .hero-mascot { width: min(78%, 485px); }
}

@media (max-width: 940px) {
  .reference-frame { grid-template-columns: minmax(0, 1fr); width: min(100%, 670px); }
  .reference-hero { padding-block: clamp(34px, 7vw, 62px); }
  .hero-copy h1 { font-size: clamp(42px, 8.8vw, 76px); text-wrap: wrap; }
  .hero-intro { margin-top: 19px; }
  .hero-stack { padding-top: clamp(128px, 26vw, 203px); }
  .hero-mascot { top: -42px; right: 14%; width: min(77%, 476px); }
}

@media (max-width: 650px) {
  :root { --header-height: 54px; }
  .site-header-row { width: calc(100% - 26px); gap: 9px; }
  .site-header .brand { gap: 6px; }
  .site-header .brand img { width: 24px; height: 20px; }
  .header-link, .header-contact { font-size: 12px; }
  .header-contact .contact-face { gap: 5px; padding-inline: 8px; }
  .hero-kicker { margin-bottom: 14px; }
  .hero-intro { max-width: 32ch; }
  .scene-contact .contact-face { min-height: 46px; }
}

@media (max-width: 350px) {
  .site-header .brand { font-size: 14px; }
  .header-link, .header-contact { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-face, .contact-arrow { transition: none; }
  [data-magnet]:is(.is-near, :hover, :focus-visible) .contact-arrow { translate: none; }
}

@media (forced-colors: active) {
  .hero-copy h1 span { background: none; -webkit-text-fill-color: currentColor; }
}
