/* radacuxiv / software — the catalogue and the product pages.
   Same sheet of paper as the "work in progress" pages: a blueprint grid,
   Handjet, outlined titles with a red echo, ink plates with hard shadows.
   The drawings around the tiles / headers live on one canvas under the page
   (software.js, each product's art.js). Square corners everywhere. */

:root {
  --paper: #faf9f6; --ink: #121317; --blue: #1f4fd1; --red: #d0342c; --constr: #97a6ba;
  --gut: clamp(16px, 4vw, 56px);
  --wide: min(1680px, 100% - 2 * max(72px, 5vw));
  --font: "Handjet", "Arial Narrow", system-ui, sans-serif;
  color-scheme: light;
}
html[lang="ja"] { --font: "Handjet", "DotGothic16", "Hiragino Sans", "Yu Gothic", sans-serif; }
html[lang="zh"] { --font: "Handjet", "ZCOOL QingKe HuangYou", "PingFang SC", "Microsoft YaHei", sans-serif; }
html[lang="ja"], html[lang="zh"] { font-synthesis: none; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body {
  font: 400 19px/1.3 var(--font);
  font-variation-settings: "ELSH" 2, "ELGR" 1;
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, transparent 0 39px, rgba(151, 166, 186, .22) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(151, 166, 186, .22) 39px 40px);
  background-attachment: fixed;
  overflow-x: hidden;
}
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; }

.art-layer { position: fixed; left: 0; top: 0; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; padding-bottom: 40px; }

/* ---------- plates and buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .25em;
  color: var(--ink);
  background: var(--paper);
  font: 700 19px/1 var(--font);
  text-decoration: none;
  border: 3px solid var(--ink);
  padding: 8px 14px 9px;
  box-shadow: 4px 4px 0 0 var(--ink);
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.btn .arr { font-weight: 900; }
.tag {
  display: inline-block;
  padding: 4px 10px 5px;
  font: 500 14px/1 var(--font);
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1.5px dashed var(--ink);
  background: var(--paper);
  transform: rotate(-2.5deg);
}
.rule { position: relative; height: 1px; margin: 26px auto 22px; width: min(70%, 640px); background: var(--constr); }
.rule::before, .rule::after { content: ""; position: absolute; top: -6px; width: 1px; height: 13px; background: var(--constr); }
.rule::before { left: 0; } .rule::after { right: 0; }
.lead { margin: 0 auto; max-width: 34em; font-size: 22px; text-align: center; }

/* ---------- top bar: the way back, the languages ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gut); }
.langs { display: flex; gap: 4px; }
/* a strip of the cube wall, drawn flat: 3 x 3 cells behind every letter */
.lang {
  position: relative;
  width: 62px; height: 62px;
  padding: 0;
  border: 1.5px solid var(--ink);
  background: var(--paper) linear-gradient(90deg, transparent 0 calc(100% / 3 - 1px), rgba(31, 79, 209, .5) calc(100% / 3 - 1px) calc(100% / 3), transparent calc(100% / 3) calc(200% / 3 - 1px), rgba(176, 38, 255, .5) calc(200% / 3 - 1px) calc(200% / 3), transparent 0),
    linear-gradient(0deg, transparent 0 calc(100% / 3 - 1px), rgba(255, 31, 143, .5) calc(100% / 3 - 1px) calc(100% / 3), transparent calc(100% / 3) calc(200% / 3 - 1px), rgba(208, 52, 44, .5) calc(200% / 3 - 1px) calc(200% / 3), transparent 0);
  cursor: pointer;
  color: var(--ink);
}
.lang-t {
  display: inline-block;
  font: 700 23px/1 var(--font);
  font-variation-settings: "ELSH" 2, "ELGR" 1;
  letter-spacing: .02em;
  filter: url(#lang-ol);          /* a thin white keyline, so the letter reads on anything */
}
.lang:hover { border-width: 3px; }
.lang[aria-pressed="true"] { border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.lang[aria-pressed="true"] .lang-t { font-weight: 900; }
.lang[aria-pressed="true"] .lang-t::after { content: ""; display: block; height: 3px; margin: 2px 1px 0; background: var(--ink); }

/* ---------- the catalogue ---------- */
.head { text-align: center; padding: 18px var(--gut) 0; }
.head .tag { margin-bottom: 22px; }
.head h1, .hero h1:not(.sr-only) {
  position: relative;
  z-index: 0;
  display: inline-block;
  margin: 0;
  max-width: 100%;
  font: 900 clamp(44px, 7.2vw, 108px)/.95 var(--font);
  font-variation-settings: "ELSH" 2, "ELGR" 1;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--blue);
}
.head h1::after {
  content: attr(data-t);
  position: absolute;
  left: 6px; top: -5px;
  width: 100%;
  z-index: -1;
  -webkit-text-stroke: 1px var(--red);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(72px, 8vw, 140px) clamp(64px, 7vw, 128px);
  width: var(--wide);
  margin: clamp(64px, 9vw, 120px) auto 0;
}
.tile {
  position: relative;
  aspect-ratio: 21 / 9;
  container-type: inline-size;
  display: grid;
  grid-template: "n go" auto "logo logo" 1fr "desc desc" auto / 1fr auto;
  gap: 2cqw;
  padding: 3.4cqw 4cqw 3.6cqw;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 0 var(--ink);
  transition: transform .18s steps(3, end), box-shadow .18s steps(3, end);
}
.tile:hover, .tile:focus-visible { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 0 var(--ink); outline: none; }
.tile-n { grid-area: n; font: 700 clamp(12px, 1.9cqw, 17px)/1 var(--font); letter-spacing: .18em; color: var(--constr); }
.tile-go {
  grid-area: go;
  align-self: start;
  padding: 3px 8px 4px;
  font: 500 clamp(12px, 1.8cqw, 16px)/1 var(--font);
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1.5px dashed currentColor;
  transform: rotate(2deg);
}
.tile:hover .tile-go, .tile:focus-visible .tile-go { background: var(--ink); color: var(--paper); border-style: solid; }
.tile-logo { grid-area: logo; align-self: center; justify-self: start; display: block; max-width: 92%; max-height: 100%; height: 17cqw; width: auto; }
.tile-desc { grid-area: desc; max-width: 40em; font: 400 clamp(15px, 3.1cqw, 28px)/1.16 var(--font); }
.foot { display: flex; justify-content: center; padding: clamp(64px, 8vw, 120px) var(--gut) 24px; }

/* ---------- contact (the home page's plate) ---------- */
.contact {
  display: inline-block;
  padding: 9px 15px 10px;
  font: 500 20px/1.15 var(--font);
  font-style: normal;
  background: var(--paper);
  border: 4px solid var(--ink);
}
.contact-lead { font-size: .86em; font-weight: 400; letter-spacing: .01em; }
.contact a { color: inherit; font-weight: 800; text-decoration: none; white-space: nowrap; }
.contact a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- a product page ---------- */
.hero {
  display: grid;
  justify-items: center;
  gap: clamp(18px, 2.4vw, 30px);
  width: min(1180px, 100% - 2 * max(96px, 7vw));
  margin: clamp(80px, 9vw, 120px) auto 0;
  padding: clamp(28px, 4.5vw, 64px) clamp(20px, 4vw, 60px) clamp(26px, 3.8vw, 52px);
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 0 var(--ink);
}
.hero-logo { display: block; width: min(760px, 100%); height: auto; }
.hero-tag { margin: 0; max-width: 30em; text-align: center; font: 400 clamp(18px, 2.1vw, 27px)/1.2 var(--font); }

.video, .cols, .foot-in { width: min(1180px, 100% - 2 * var(--gut)); margin-inline: auto; }
.video { margin-top: clamp(110px, 12vw, 160px); }
.video .tag { position: relative; z-index: 2; margin: 0 0 -6px 18px; }
.frame {
  position: relative;
  padding: clamp(6px, 1vw, 12px);
  background: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--ink), 10px 10px 0 4.5px var(--ink);
}
/* crop marks at the four corners, a little outside */
.frame::before, .frame::after, .crop::before, .crop::after { content: ""; position: absolute; width: 22px; height: 22px; border: 0 solid var(--ink); pointer-events: none; }
.frame::before { left: -22px; top: -22px; border-width: 1.5px 0 0 1.5px; }
.frame::after { right: -22px; top: -22px; border-width: 1.5px 1.5px 0 0; }
.crop::before { left: -22px; bottom: -22px; border-width: 0 0 1.5px 1.5px; }
.crop::after { right: -22px; bottom: -22px; border-width: 0 1.5px 1.5px 0; }
.crop { position: absolute; inset: 0; pointer-events: none; }
.screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #060709; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* no link yet: the house inks as colour bars, a dithered strip, snow, a plate */
.bars { position: absolute; inset: 0 0 26% 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.bars i:nth-child(1) { background: #faf9f6; } .bars i:nth-child(2) { background: #ffae00; } .bars i:nth-child(3) { background: #00b8d9; }
.bars i:nth-child(4) { background: #10c95a; } .bars i:nth-child(5) { background: #b026ff; } .bars i:nth-child(6) { background: #ff2e3b; }
.bars i:nth-child(7) { background: #1f51ff; }
.screen-off::after {
  content: "";
  position: absolute;
  inset: 74% 0 0 0;
  background: repeating-linear-gradient(90deg, #121317 0 calc(100% / 14), #faf9f6 calc(100% / 14) calc(100% / 7));
  -webkit-mask: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 6px 6px;
          mask: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 6px 6px;
}
.snow {
  position: absolute;
  inset: 0;
  opacity: .22;
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 4px 4px, repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 4px);
  mix-blend-mode: multiply;
  animation: snow .4s steps(4, end) infinite;
}
@keyframes snow { 25% { background-position: 2px 1px, 0 1px; } 50% { background-position: 1px 3px, 0 2px; } 75% { background-position: 3px 2px, 0 3px; } }
.nosig {
  position: absolute;
  left: 50%; top: 37%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 22px 14px;
  color: #faf9f6;
  background: #121317;
  border: 3px solid #faf9f6;
  box-shadow: 0 0 0 3px #121317;
  white-space: nowrap;
}
.nosig b { font: 900 clamp(26px, 4vw, 52px)/1 var(--font); letter-spacing: .08em; text-transform: uppercase; animation: blink 1.6s steps(1, end) infinite; }
.nosig small { font: 500 clamp(13px, 1.5vw, 18px)/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }
@keyframes blink { 50% { opacity: .25; } }

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(40px, 6vw, 96px);
  margin-top: clamp(72px, 8vw, 110px);
  align-items: start;
}
.sub {
  margin: 0 0 22px;
  font: 900 clamp(30px, 3.4vw, 44px)/1 var(--font);
  font-variation-settings: "ELSH" 2, "ELGR" 1;
  color: var(--ink);
  text-shadow: 3px -3px 0 rgba(31, 79, 209, .45);
}
.desc-body p { margin: 0 0 1em; max-width: 36em; font: 400 clamp(19px, 1.6vw, 22px)/1.38 var(--font); }
html[lang="ja"] .desc-body p, html[lang="zh"] .desc-body p { line-height: 1.6; }
.side { position: sticky; top: 24px; display: grid; gap: 30px; justify-items: start; }
.btn-big { position: relative; font-size: 30px; padding: 14px 24px 16px; box-shadow: 6px 6px 0 0 var(--ink); }
.btn-big .arr { font-size: 1.1em; }
.download.is-off {
  cursor: not-allowed;
  background: var(--paper) repeating-linear-gradient(-45deg, rgba(18, 19, 23, .14) 0 4px, transparent 4px 10px);
  border-style: dashed;
}
.download.is-off:hover { background: var(--paper) repeating-linear-gradient(-45deg, rgba(18, 19, 23, .14) 0 4px, transparent 4px 10px); color: var(--ink); }
.download .soon {
  position: absolute;
  right: -14px; top: -14px;
  padding: 3px 8px 4px;
  font: 500 13px/1 var(--font);
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--paper);
  transform: rotate(4deg);
  white-space: nowrap;
}
.foot .back { font-size: 20px; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .tiles { grid-template-columns: minmax(0, 1fr); width: calc(100% - 2 * max(40px, 6vw)); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
}
@media (max-width: 560px) {
  .top { flex-wrap: wrap; }
  .lang { width: 50px; height: 50px; }
  .langs { gap: 2px; }
  .lang-t { font-size: 20px; filter: url(#lang-ol-s); }
  .hero { width: calc(100% - 2 * var(--gut)); }
  .tile { grid-template: "n go" auto "logo logo" 1fr "desc desc" auto / 1fr auto; aspect-ratio: auto; min-height: calc((100vw - 80px) * 9 / 21); }
  .tile-desc { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .snow, .nosig b { animation: none; }
  .tile { transition: none; }
}
