/* h1v3MIND/ed site: shared styles, in the app's 16-bit look (hive/static/style.css, data-theme="pixel"). Self-hosted
   fonts, no CDNs: Pixelify Sans for text, Silkscreen for labels, JetBrains Mono for code and keys. */
@font-face { font-family: "Pixelify Sans"; src: url("../fonts/pixelify-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("../fonts/pixelify-sans-600.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("../fonts/silkscreen-400.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #17132b; --panel: #221a38; --panel-2: #2b2140; --raised: #352a4f; --hover: #3a2f57;
  --line: #6c5f96; --line-soft: #3d3260;
  --text: #f4f0ff; --muted: #c9c1ec; --subtle: #a59cc9;
  --gold: #ffd65a; --gold-2: #fff6b0; --gold-bg: #3b3226; --gold-line: #a8893a; --on-gold: #1b1530;
  --green: #6fdc8c; --green-bg: #1e3a2c; --red: #ff8a78; --red-bg: #42222a; --blue: #9fd3ff; --purple: #d0b4ff;
  --frame: #f4f0ff; --shadow: 6px 6px 0 #0009;
  --sans: "Pixelify Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "Pixelify Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --pixel: "Silkscreen", "Pixelify Sans", ui-monospace, monospace;
  --gut: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --nav-h: 64px;
  --cut: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* Pixelify Sans draws "fi" and "ff" as one joined glyph that reads as "A". Every `font:` shorthand turns ligatures
   back on, hence !important. */
*, *::before, *::after { font-variant-ligatures: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 8px); scrollbar-color: var(--line) var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.55 var(--sans);
  background-image: radial-gradient(#ffffff0f 1px, transparent 1.5px); background-size: 22px 22px;
  overflow-x: clip;
}
@media (max-width: 600px) { body { font-size: 16px; } }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-2); }
p, h1, h2, h3, h4, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
code { font-family: var(--mono); font-size: .92em; color: var(--gold-2); background: var(--gold-bg); padding: .1em .38em; border-radius: 3px; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
::selection { background: #ffd65a66; color: var(--text); }
input, textarea { caret-color: var(--gold); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid var(--bg); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 2000; background: var(--gold); color: var(--bg);
  padding: 10px 14px; font-weight: 700; text-decoration: none; transition: top .15s;
}
.skip:focus { top: 12px; color: var(--bg); }

.pix { font-family: var(--pixel); font-weight: 400; letter-spacing: .06em; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- type ---------- */
.h-xl, .h-lg { font-family: var(--display); font-weight: 600; line-height: 1.02; letter-spacing: 0; color: var(--text); text-wrap: balance; }
.h-xl { font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.6rem); }
.h-lg { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3.2rem); }
.h-md { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.3; color: var(--text); }
.muted-s { color: var(--subtle); font-size: .92em; }
.note { color: var(--subtle); font-size: 15px; line-height: 1.4; }


/* ---------- buttons ---------- */
.btn {
  --b: var(--frame);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 46px; padding: .75em 1.25em;
  font: 400 13px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--text); background: var(--panel-2); border: 3px solid var(--b); box-shadow: 4px 4px 0 #000a;
  transition: background-color .12s, color .12s, transform .08s, box-shadow .08s;
  position: relative;
}
.btn:hover { color: var(--gold-2); background: var(--raised); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000a; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-gold { background: var(--gold); color: var(--on-gold); --b: var(--on-gold); }
.btn-gold:hover { background: var(--gold-2); color: var(--on-gold); }
.btn-ghost { color: var(--text); background: transparent; --b: var(--line); box-shadow: none; }
.btn-ghost:hover { --b: var(--frame); }
.btn-sm { min-height: 36px; padding: .55em .9em; font-size: 11px; border-width: 2px; box-shadow: 3px 3px 0 #000a; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: 1; color: var(--subtle); background: var(--panel-2); --b: var(--line); box-shadow: none; transform: none; }
.btn-k { font-family: var(--pixel); font-size: 1.1em; letter-spacing: 0; font-weight: 400; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .4em; font: 400 11px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase;
  padding: .4em .6em .35em; border: 2px solid currentColor; vertical-align: middle; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.badge-live { color: var(--green); background: var(--green-bg); }
.badge-soon { color: var(--gold); background: var(--gold-bg); }
.badge-planned { color: var(--muted); background: var(--panel-2); }
.badge-live::before { animation: blink 1.6s steps(1) infinite; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 900; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gut);
  background: #17132bf0; border-bottom: 3px solid #0c0a18;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.brand-word { font: 400 14px/1 var(--pixel); letter-spacing: .04em; color: var(--muted); }
.brand-word b { color: var(--gold); font-weight: 400; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  font: 400 12px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none;
  padding: 9px 12px; border: 2px solid transparent; position: relative;
}
.nav-links a:hover, .nav-links a.on { color: var(--gold-2); border-color: var(--line-soft); background: var(--panel); }
.nav-links a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--gold); }
.fx-toggle { display: none !important; }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-links ~ .nav-right { margin-left: 12px; }
.fx-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); color: var(--muted); font: 400 18px/1 var(--pixel); letter-spacing: .08em;
}
.fx-toggle:hover { color: var(--gold-2); border-color: var(--gold-line); }
.fx-state { color: var(--green); min-width: 2.2em; text-align: left; }
html[data-fx="off"] .fx-state { color: var(--subtle); }
.nav-right .btn { white-space: nowrap; }
@media (max-width: 980px) { .nav-links { display: none; } .nav-links ~ .nav-right { margin-left: auto; } }
/* phones: drop the optional links and the brand word so Account and the main button keep fitting */
@media (max-width: 580px) { .nav-opt { display: none; } .brand-word { display: none; } .nav { gap: 10px; } }
@media (max-width: 400px) {
  .nav-right { gap: 6px; }
  .nav-right .btn-sm { padding-left: .75em; padding-right: .75em; }
  .fx-toggle { padding: 0 8px; }
}
@media (max-width: 350px) { .nav-right .btn-sm { padding-left: .55em; padding-right: .55em; letter-spacing: .04em; } .fx-toggle { padding: 0 6px; } }

/* ---------- terminal window ---------- */
.term {
  position: relative; background: var(--panel); border: 3px solid var(--frame); box-shadow: var(--shadow); overflow: hidden; color: var(--muted);
}
.term-bar {
  display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px;
  background: var(--panel-2); border-bottom: 3px solid #0c0a18;
}
.term-dots { display: inline-flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 2px; background: var(--line); }
.term-dots i:nth-child(1) { background: var(--red); } .term-dots i:nth-child(2) { background: var(--gold); } .term-dots i:nth-child(3) { background: var(--green); }
.term-title { font: 400 11px/1 var(--pixel); letter-spacing: .04em; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-body { margin: 0; padding: 18px 20px 20px; font: 400 13px/1.75 var(--mono); color: var(--muted); overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

.c-p { color: var(--gold); } .c-c { color: var(--subtle); } .c-o { color: var(--green); }

/* ---------- screen / monitor chrome ---------- */
.screen {
  position: relative; background: var(--panel); border: 3px solid var(--frame); box-shadow: var(--shadow);
}
.screen-bar {
  display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--line-soft);
  font: 400 10.5px/1 var(--pixel); letter-spacing: .04em; color: var(--subtle); text-transform: lowercase; white-space: nowrap; overflow: hidden;
  background: var(--panel-2); border-bottom: 3px solid #0c0a18;
}
.sb-dot { width: 7px; height: 7px; background: var(--green); flex-shrink: 0; }
.sb-r { margin-left: auto; color: var(--gold-line); overflow: hidden; text-overflow: ellipsis; }
.screen-view { position: relative; overflow: hidden; background: var(--bg); aspect-ratio: 8 / 5; }
.screen-view img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

.screen figcaption, figure > figcaption { padding: 14px 4px 0; color: var(--subtle); font-size: .86rem; line-height: 1.55; }
.screen > figcaption { position: absolute; top: 100%; left: 0; right: 0; }
.slice { position: absolute; left: 0; right: 0; background-size: 100% auto; background-repeat: no-repeat; pointer-events: none; z-index: 2; }

/* ---------- phone frame ---------- */
.phone {
  position: relative; width: 100%; aspect-ratio: 1170 / 1992; padding: 7px; border-radius: 30px;
  background: #0c0a18; border: 3px solid var(--frame); box-shadow: var(--shadow);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; }
.phone::before {
  content: ""; position: absolute; top: 14px; left: 50%; width: 30%; height: 16px; transform: translateX(-50%);
  background: #05080a; border-radius: 10px; z-index: 2;
}

/* ---------- stickers ---------- */
.sticker {
  position: absolute; z-index: 4; display: inline-block; padding: .5em .8em .45em;
  font: 400 12px/1 var(--pixel); letter-spacing: .04em; text-transform: uppercase;
  background: var(--gold); color: var(--on-gold); transform: rotate(-7deg); box-shadow: 3px 4px 0 #000a; pointer-events: none; white-space: nowrap;
}
.sticker::before {
  content: ""; position: absolute; left: 50%; top: -9px; width: 46px; height: 16px; transform: translateX(-50%) rotate(4deg);
  background: #edf0e933; border-left: 1px dashed #edf0e955; border-right: 1px dashed #edf0e955;
}
.sticker-outline { background: transparent; color: var(--gold); border: 2px dashed var(--gold); box-shadow: none; transform: rotate(5deg); }
.sticker-outline::before { display: none; }
.sticker-red { background: var(--red); transform: rotate(4deg); }
.sticker-blue { background: var(--blue); transform: rotate(-4deg); }
.sticker-purple { background: var(--purple); }

/* ---------- the old CRT layer: the pages still carry the element, the 16-bit look has no scanlines ---------- */
.fx-layer { display: none !important; }
@keyframes blink { 50% { opacity: 0; } }

/* glitch RGB split: gold main, red and blue channels */
.gl { position: relative; display: block; }
.gl::before, .gl::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0;
}
.gl::before { color: var(--red); transform: translateX(-3px); mix-blend-mode: screen; }
.gl::after { color: var(--blue); transform: translateX(3px); mix-blend-mode: screen; }
.motion:not([data-fx="off"]) .gl.glitching::before { opacity: .9; animation: slice-a .5s steps(1) infinite; }
.motion:not([data-fx="off"]) .gl.glitching::after { opacity: .9; animation: slice-b .5s steps(1) infinite; }
@keyframes slice-a {
  0% { clip-path: inset(10% 0 70% 0); transform: translate(-4px, 0); }
  20% { clip-path: inset(60% 0 12% 0); transform: translate(3px, 0); }
  40% { clip-path: inset(32% 0 44% 0); transform: translate(-6px, 0); }
  60% { clip-path: inset(80% 0 4% 0); transform: translate(2px, 0); }
  80% { clip-path: inset(0 0 86% 0); transform: translate(-3px, 0); }
}
@keyframes slice-b {
  0% { clip-path: inset(70% 0 8% 0); transform: translate(4px, 0); }
  20% { clip-path: inset(6% 0 76% 0); transform: translate(-3px, 0); }
  40% { clip-path: inset(48% 0 30% 0); transform: translate(6px, 0); }
  60% { clip-path: inset(22% 0 60% 0); transform: translate(-2px, 0); }
  80% { clip-path: inset(88% 0 0 0); transform: translate(3px, 0); }
}
.rgb { text-shadow: -2px 0 #f0a596b3, 2px 0 #a6cbe0b3; }

@keyframes deny-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-10px, 1px); } 20% { transform: translate(9px, -2px); } 30% { transform: translate(-7px, 2px); }
  40% { transform: translate(6px, 0); } 50% { transform: translate(-4px, 1px); } 60% { transform: translate(3px, -1px); } 70% { transform: translate(-2px, 0); }
}
@keyframes crt-on {
  0% { transform: scale(.02, .004); filter: brightness(4); opacity: .4; }
  35% { transform: scale(1, .006); filter: brightness(3); opacity: 1; }
  70% { transform: scale(1, 1.02); filter: brightness(1.4); }
  100% { transform: scale(1, 1); filter: none; }
}

/* ---------- footer ---------- */
.foot { position: relative; border-top: 3px solid #0c0a18; background: #120f22; padding: 56px 0 44px; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px 48px; align-items: start; }
.foot-word { font: 400 clamp(1.8rem, 4.4vw, 3.2rem)/1 var(--pixel); letter-spacing: 0; color: var(--muted); }
.foot-word b { color: var(--gold); font-weight: 400; }
.foot-tag { color: var(--subtle); font-size: 12px; text-transform: uppercase; margin-top: 12px; }
.foot-nav { display: grid; gap: 8px; justify-items: start; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 32px; font: 400 12px/1.4 var(--pixel); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.foot-nav a::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; vertical-align: 2px; background: var(--gold-line); }
.foot-nav a:hover { color: var(--gold-2); }
.foot-legal { grid-column: 1 / -1; color: var(--subtle); font-size: .9rem; border-top: 2px solid var(--line-soft); padding-top: 18px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
