/* site.css — liquid future: Y2K futurism in polished chrome, not green code. */

/* Self-hosted display faces (Google Fonts, OFL): Coiny is the bubbly liquid
   wordmark; Orbitron is the tech face for buttons, CTAs and machine text. */
@font-face {
  font-family: "Coiny";
  src: url("/fonts/coiny-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Orbitron";
  src: url("/fonts/orbitron-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05070c;
  --panel: rgba(10, 14, 21, 0.86);
  --ink: #d9e3ee;
  --ink-dim: #8fa3b8;
  --steel: #9fb7cf;
  --steel-dim: rgba(159, 183, 207, 0.35);
  --chrome-grad: linear-gradient(180deg,
    #ffffff 0%, #e6edf6 14%, #a9b8cc 30%, #4d5d72 47%,
    #131a24 52%, #46556a 57%, #b7c6d9 74%, #f2f6fb 92%, #ffffff 100%);
  --cube: 300px;
  --display: "Coiny", "Avenir Next", "Futura", sans-serif;
  --tech: "Orbitron", ui-monospace, "SF Mono", "IBM Plex Mono", "Cascadia Mono", "Courier New", monospace;
  --mono: ui-monospace, "SF Mono", "IBM Plex Mono", "Cascadia Mono", "Courier New", monospace;
  --sans: "Avenir Next", "Futura", "Century Gothic", system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; }

html, body { min-height: 100vh; }

body {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(38, 52, 74, 0.55), transparent 60%),
    radial-gradient(100% 120% at 50% 115%, rgba(22, 32, 46, 0.6), transparent 55%),
    var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(190, 215, 235, 0.85); color: #0a0e15; }

/* ------------------------------------------------------------ backdrop */

canvas.dreams {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

canvas.rain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.goo-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(115% 100% at 50% 42%, transparent 55%, rgba(2, 4, 8, 0.72) 100%);
}

/* chrome text: the liquid-metal lettering */
.chrome {
  background: var(--chrome-grad);
  background-size: 100% 320%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: specular 9s ease-in-out infinite;
}

@keyframes specular {
  0%   { background-position-y: 8%; }
  50%  { background-position-y: 68%; }
  100% { background-position-y: 8%; }
}

/* ------------------------------------------------------------- masthead */

.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 24px 10px;
  pointer-events: none;
}

.wordmark {
  font: 700 34px/0.9 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
  filter: url(#goo);
}

.sysline {
  font: 500 11px/1 var(--tech);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--steel);
  opacity: 0.85;
}

/* ---------------------------------------------------------------- stage */

.stage {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 120px 24px 40px;
}

/* ------------------------------------------------------------- the cube */

.scene {
  position: relative;
  width: calc(var(--cube) * 2.1);
  height: calc(var(--cube) * 1.7);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

/* chrome halo ring spinning behind the cube */
.scene::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--cube) * 1.62);
  height: calc(var(--cube) * 1.62);
  margin: calc(var(--cube) * -0.81) 0 0 calc(var(--cube) * -0.81);
  border-radius: 50%;
  background: conic-gradient(
    #f4f8fe, #6e82a0 12%, #141b26 24%, #b9c9de 36%, #3c4a60 48%,
    #eef4fb 60%, #55667e 72%, #202a38 84%, #f4f8fe 100%);
  -webkit-mask: radial-gradient(closest-side, transparent 66%, #000 67%, #000 76%, transparent 77%);
  mask: radial-gradient(closest-side, transparent 66%, #000 67%, #000 76%, transparent 77%);
  filter: blur(0.6px);
  opacity: 0.75;
  animation: ring-spin 26s linear infinite;
  pointer-events: none;
}

@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.cube {
  position: relative;
  width: var(--cube);
  height: var(--cube);
  transform-style: preserve-3d;
  transform: rotateX(-14deg) rotateY(-26deg);
  touch-action: none;
}

.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 20px;
  text-align: center;
  backface-visibility: hidden;
  touch-action: none;
  user-select: none;
  background:
    linear-gradient(165deg, rgba(18, 25, 36, 0.93), rgba(7, 10, 15, 0.95));
  border: 1px solid rgba(170, 190, 215, 0.38);
  box-shadow: inset 0 1px 0 rgba(210, 228, 244, 0.14), inset 0 0 40px rgba(120, 150, 190, 0.1);
  border-radius: 10px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.face-front  { transform: rotateY(0deg) translateZ(calc(var(--cube) / 2)); }
.face-right  { transform: rotateY(90deg) translateZ(calc(var(--cube) / 2)); }
.face-back   { transform: rotateY(180deg) translateZ(calc(var(--cube) / 2)); }
.face-left   { transform: rotateY(-90deg) translateZ(calc(var(--cube) / 2)); }
.face-top    { transform: rotateX(90deg) translateZ(calc(var(--cube) / 2)); }
.face-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube) / 2)); }

/* the face pointed at the camera gets lit by site.js via data-lit */
.face[data-lit="1"] {
  border: 1px solid rgba(235, 245, 255, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(230, 242, 255, 0.25),
    inset 0 0 46px rgba(150, 190, 235, 0.16),
    0 0 30px rgba(150, 190, 235, 0.3);
  background:
    linear-gradient(165deg, rgba(26, 36, 50, 0.95), rgba(10, 15, 22, 0.96));
}

.face-title {
  font: 700 24px/1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--chrome-grad);
  background-size: 100% 320%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: specular 9s ease-in-out infinite;
  filter: url(#goo-lite);
}

.face-cta {
  font: 600 11px/1 var(--tech);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--steel);
  opacity: 0.9;
}

.face:hover, .face:focus-visible {
  border: 1px solid rgba(235, 245, 255, 0.8);
  box-shadow: 0 0 24px rgba(160, 195, 235, 0.35);
}

/* network face (bottom): link constellation */
.net-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.net-link {
  font: 600 12px/1 var(--tech);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  border: 1px solid var(--steel-dim);
  border-radius: 999px;
  padding: 5px 14px;
}

.net-link:hover { color: #f2f6fb; border-color: rgba(235, 245, 255, 0.8); }

.floor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--cube) * 1.9);
  height: calc(var(--cube) * 1.9);
  transform: rotateX(90deg) translateZ(calc(var(--cube) * -0.62));
  transform-style: preserve-3d;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(150, 190, 230, 0.36), rgba(120, 155, 195, 0.12) 55%, transparent 78%);
}

/* wet-floor reflection streak under the cube */
.floor::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateZ(0.5px);
  background:
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(190, 215, 240, 0.05) 26px 27px),
    linear-gradient(180deg, rgba(200, 225, 250, 0.1), transparent 40%);
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 70%);
  mask: radial-gradient(closest-side, #000 20%, transparent 70%);
  pointer-events: none;
}

/* --------------------------------------------------------------- ticker */

.ticker {
  position: relative;
  width: min(560px, 86%);
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(150, 170, 195, 0.28);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.7), rgba(8, 11, 16, 0.72));
  box-shadow: inset 0 1px 0 rgba(200, 220, 240, 0.12);
}

.ticker-run {
  display: inline-block;
  white-space: nowrap;
  font: 600 12px/30px var(--tech);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--chrome-grad);
  background-size: 100% 320%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: crawl 34s linear infinite, specular 9s ease-in-out infinite;
}

@keyframes crawl {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----------------------------------------------------------------- dock */

.dock {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* content pages: the dock rides near the top of the stage instead of
   floating down with the centered column; it sits below the fixed
   masthead (wordmark band ends ~76px) so it never crosses the title */
.stage > .dock:first-child {
  position: absolute;
  left: 0;
  right: 0;
  top: 84px;
}

.dock-btn {
  font: 700 11px/1 var(--tech);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0a0e15;
  background: linear-gradient(180deg, #f2f7fd, #c3d1e4 30%, #6a7c92 49%, #3e4b5e 52%, #97a8c0 58%, #dde5ef 80%, #f6f9fe);
  border: 1px solid rgba(235, 245, 255, 0.6);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(160, 195, 235, 0.5);
}

/* --------------------------------------------------------------- footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 18px;
  padding: 18px 24px 26px;
  color: var(--ink-dim);
  font: 400 12px/1.5 var(--mono);
  letter-spacing: 0.12em;
}

.foot a { color: var(--steel); text-decoration: none; }
.foot a:hover { color: #f2f6fb; }

/* ------------------------------------------------------- content panel */

.badge {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  perspective: 300px;
}

.badge-cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: spin 14s linear infinite;
}

.badge-cube-face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(200, 220, 240, 0.55);
  border-radius: 6px;
  background: linear-gradient(160deg, rgba(170, 200, 235, 0.34), rgba(20, 28, 40, 0.5));
  box-shadow: inset 0 1px 0 rgba(235, 245, 255, 0.3);
}

.badge-cube-face.bf  { transform: rotateY(0deg) translateZ(22px); }
.badge-cube-face.br  { transform: rotateY(90deg) translateZ(22px); }
.badge-cube-face.bb  { transform: rotateY(180deg) translateZ(22px); }
.badge-cube-face.bl  { transform: rotateY(-90deg) translateZ(22px); }
.badge-cube-face.bt  { transform: rotateX(90deg) translateZ(22px); }
.badge-cube-face.bbo { transform: rotateX(-90deg) translateZ(22px); }

@keyframes spin {
  from { transform: rotateX(-18deg) rotateY(0deg); }
  to   { transform: rotateX(-18deg) rotateY(360deg); }
}

/* liquid chrome droplet orbiting the badge cube */
.badge::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff, #b9c9de 34%, #4d5d72 68%, #1a222e);
  box-shadow: 0 0 10px rgba(190, 215, 240, 0.5);
  offset-path: circle(34px at 50% 50%);
  offset-rotate: 0deg;
  animation: badge-orbit 6s linear infinite;
  pointer-events: none;
}

@keyframes badge-orbit {
  from { offset-distance: 0%; }
  to   { offset-distance: 100%; }
}

/* liquid-glass sheen sweeping across the panel */
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(215, 232, 250, 0.07) 46%, rgba(240, 248, 255, 0.12) 50%, rgba(215, 232, 250, 0.07) 54%, transparent 70%);
  background-size: 260% 100%;
  background-position-x: 130%;
  animation: sheen 11s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes sheen {
  0%   { background-position-x: 130%; }
  50%  { background-position-x: -160%; }
  100% { background-position-x: 130%; }
}

/* train-videos: the video column should not splay across wide screens */
.panel-train-videos {
  max-width: 900px;
}

.panel-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}

.panel-title {
  font: 700 28px/1.1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.panel-meta {
  font: 500 11px/1 var(--tech);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--steel);
  opacity: 0.8;
}

/* rendered markdown inside the panel */

.panel h1 {
  font: 700 30px/1.15 var(--display);
  letter-spacing: 0.04em;
  margin: 0 0 18px;
  background: var(--chrome-grad);
  background-size: 100% 320%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: specular 9s ease-in-out infinite;
  filter: url(#goo-lite);
}

.panel h2 {
  font: 700 19px/1.3 var(--tech);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 30px 0 12px;
  border-bottom: 1px solid rgba(159, 183, 207, 0.25);
  padding-bottom: 8px;
}

.panel h3, .panel h4 {
  font: 600 15px/1.4 var(--sans);
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 20px 0 8px;
}

.panel p { margin: 0 0 14px; }

.panel ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.panel li { margin: 0 0 4px; }
.panel li::marker { color: var(--steel); }

.panel blockquote {
  margin: 14px 0;
  padding: 10px 0 10px 18px;
  border-left: 3px solid var(--steel);
  color: var(--ink-dim);
}

.panel hr {
  border: none;
  height: 1px;
  margin: 26px 0;
  background: linear-gradient(90deg, transparent, rgba(190, 210, 230, 0.5), transparent);
}

.panel a {
  color: #c8d6e8;
  text-decoration: none;
  border-bottom: 1px dotted rgba(190, 210, 230, 0.6);
}

.panel a:hover {
  color: #f2f6fb;
  border-bottom: 1px solid rgba(235, 245, 255, 0.85);
  text-shadow: 0 0 8px rgba(160, 195, 235, 0.6);
}

.panel iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(170, 190, 215, 0.4);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* contact form */

.panel input, .panel textarea {
  display: block;
  width: 100%;
  font: 400 14px/1.6 var(--sans);
  color: var(--ink);
  background: rgba(14, 19, 27, 0.9);
  border: 1px solid rgba(170, 190, 215, 0.4);
  border-radius: 8px;
  padding: 9px 12px;
  margin: 10px 0;
}

.panel textarea { height: 130px; }

.panel input[type="submit"], .panel input[type="reset"] {
  width: auto;
  min-width: 130px;
  font: 700 11px/1 var(--tech);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0a0e15;
  background: linear-gradient(180deg, #f2f7fd, #c3d1e4 30%, #6a7c92 49%, #3e4b5e 52%, #97a8c0 58%, #dde5ef 80%, #f6f9fe);
  border: 1px solid rgba(235, 245, 255, 0.6);
  border-radius: 999px;
  cursor: pointer;
}

.panel input[type="submit"]:hover, .panel input[type="reset"]:hover {
  box-shadow: 0 0 12px rgba(160, 195, 235, 0.5);
}

/* --------------------------------------------------------- responsive */

@media (max-width: 860px) {
  :root { --cube: 210px; }
  .stage { padding: 120px 18px 32px; gap: 20px; }
  .masthead { padding: 14px 18px 8px; }
  .wordmark { font-size: 26px; }
  .face { padding: 16px 14px; gap: 8px; }
  .face-title { font-size: 18px; }
}

@media (max-width: 560px) {
  :root { --cube: 164px; }
  .stage { padding: 132px 14px 26px; gap: 16px; }
  .masthead { padding: 10px 14px 6px; }
  .wordmark { font-size: 21px; letter-spacing: 0.04em; }
  .sysline { font-size: 9px; letter-spacing: 0.16em; }
  .face { padding: 12px 10px; border-radius: 7px; }
  .face-title { font-size: 15px; letter-spacing: 0.04em; }
  .face-cta { display: none; }
  .ticker { height: 24px; }
  .ticker-run { font: 600 9px/24px var(--tech); letter-spacing: 0.12em; }
  .dock-btn { padding: 6px 12px; font-size: 10px; }
  /* masthead shrinks to ~50px here; dock moves up to match. It wraps to
     two lines below ~490px, so the stage padding clears the taller case. */
  .stage > .dock:first-child { top: 62px; }
  .panel { padding: 26px 22px 30px; }
  .panel h1 { font-size: 23px; }
  .panel h2 { font-size: 15px; }
  .panel-title { font-size: 22px; }
}

@media (max-width: 400px) {
  :root { --cube: 138px; }
  .wordmark { font-size: 18px; }
  .face-title { font-size: 13px; }
}

/* ------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  .chrome, .ticker-run, .panel h1, .face-title { animation: none; }
  .badge-cube { animation: none; transform: rotateX(-18deg) rotateY(-30deg); }
  .scene::before { animation: none; }
  .panel::before { animation: none; }
}
