/* NetOS website — shared styles.
   Design tokens mirror the app (src/design/theme.ts) 1:1.
   Self-hosted fonts (see /fonts) — no third-party requests, no cookies, no trackers. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "VT323";
  src: url("../fonts/VT323-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Share Tech Mono";
  src: url("../fonts/ShareTechMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #000000;
  --panel: #060a07;
  --panel-raised: #0a130d;
  --border: #12331f;
  --border-dim: #0c1f14;

  --green: #39ff14;
  --green-dim: #1fa80c;
  --green-deep: #0b3d07;
  --white: #e8ffe8;
  --text-dim: #8fb79a;
  --mute: #3e6b4c;
  --red: #ff3b30;
  --amber: #ffb000;
  --cyan: #22d3ee;

  --font-display: "VT323", monospace;
  --font-body: "Share Tech Mono", monospace;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --maxw: 1080px;
  --gap: clamp(1rem, 4vw, 2rem);
  --radius: 8px;
  --radius-sm: 4px;

  --shadow-glow: 0 0 24px rgba(57, 255, 20, 0.18);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.1vw + 12px, 17px);
  line-height: 1.65;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  /* faint scanline texture, matches the in-app CRT feel — kept very subtle */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(57, 255, 20, 0.012) 0px,
    rgba(57, 255, 20, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin: 0 0 0.4em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  display: block;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--green);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--green);
  color: #000;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.brand .brand-net {
  color: var(--green);
  text-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav-links a {
  color: var(--text-dim);
  padding: 0.4rem 0;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--green);
  text-decoration: none;
}

.nav-cta {
  border: 1px solid var(--green);
  color: var(--green) !important;
  padding: 0.45rem 1rem !important;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 12px rgba(57, 255, 20, 0.08);
}
.nav-cta:hover {
  background: var(--green);
  color: #000 !important;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--green);
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    font-size: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .nav-links.open {
    max-height: 420px;
  }
  .nav-links li {
    border-top: 1px solid var(--border-dim);
  }
  .nav-links a {
    display: block;
    padding: 0.9rem clamp(1rem, 4vw, 2rem);
  }
  .nav-cta {
    margin: 0.6rem clamp(1rem, 4vw, 2rem);
    text-align: center;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--green);
  cursor: pointer;
}
.btn-primary {
  background: var(--green);
  color: #000;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  text-decoration: none;
  background: #4dff2e;
}
.btn-ghost {
  background: transparent;
  color: var(--green);
}
.btn-ghost:hover {
  text-decoration: none;
  background: rgba(57, 255, 20, 0.08);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding-block: clamp(3rem, 9vw, 6rem);
}

/* radar sweep behind hero */
.radar {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(120vw, 860px);
  height: min(120vw, 860px);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(circle, #000 0%, #000 55%, transparent 72%);
  mask-image: radial-gradient(circle, #000 0%, #000 55%, transparent 72%);
}
.radar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle,
      rgba(57, 255, 20, 0.09) 0,
      rgba(57, 255, 20, 0.09) 1px,
      transparent 1px,
      transparent 56px
    ),
    conic-gradient(
      from 0deg,
      transparent 0deg,
      transparent 300deg,
      rgba(57, 255, 20, 0.22) 355deg,
      rgba(57, 255, 20, 0.4) 360deg
    );
  animation: sweep 6s linear infinite;
}
.radar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(57, 255, 20, 0.18);
  box-shadow: inset 0 0 60px rgba(57, 255, 20, 0.08);
}
@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}
.hero h1 {
  font-size: clamp(3.6rem, 16vw, 8rem);
  color: var(--green);
  text-shadow: 0 0 30px rgba(57, 255, 20, 0.35);
  margin-bottom: 0.1em;
}
.hero h1 .h1-os {
  color: var(--white);
  text-shadow: 0 0 30px rgba(232, 255, 232, 0.35);
}
.hero .tagline {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: var(--white);
  margin-bottom: 0.5em;
}
.hero .subtag {
  color: var(--text-dim);
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.trust-row span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: var(--text-dim);
  background: var(--panel);
}
.trust-row span::before {
  content: "▹ ";
  color: var(--green);
}

/* ---------- Store badges ---------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}
.store-badges a {
  display: inline-flex;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.store-badges a:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 10px rgba(57, 255, 20, 0.25));
}
.store-badges svg {
  height: 52px;
  width: auto;
}

/* ---------- Terminal strip ---------- */
.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  max-width: 720px;
  margin: clamp(2rem, 6vw, 3.5rem) auto 0;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel-raised);
}
.terminal-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border);
}
.terminal-bar .dot.g {
  background: var(--green);
}
.terminal-bar .title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.terminal-body {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 2.2vw, 0.92rem);
  padding: 1.1rem 1.2rem;
  line-height: 1.9;
  min-height: 12.5em;
}
.terminal-body .line {
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .prompt {
  color: var(--green);
}
.terminal-body .ok {
  color: var(--green);
}
.terminal-body .dim {
  color: var(--text-dim);
}
.terminal-body .muted {
  color: var(--mute);
}
.terminal-body .cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* data-flow readout terminal (static): label left, status right.
   Uses flex so source whitespace/formatting never leaks into the render. */
.terminal-body.dataflow {
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.df-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  color: var(--text-dim);
}
.df-row .df-status {
  font-weight: 700;
}

/* ---------- Sections ---------- */
section {
  padding-block: clamp(3rem, 8vw, 5rem);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--green-dim);
  margin-bottom: 0.6rem;
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}
.section-head h2 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--white);
}
.section-head p {
  color: var(--text-dim);
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 680px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--green-dim);
  transform: translateY(-3px);
}
.card .card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  color: var(--green);
  background: var(--panel-raised);
}
.card .card-icon svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green);
  letter-spacing: 0.12em;
}
.card p {
  color: var(--text-dim);
  font-size: 0.94rem;
  margin: 0;
}

/* ---------- Privacy feature section ---------- */
.privacy-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(
      ellipse at top,
      rgba(57, 255, 20, 0.05),
      transparent 60%
    ),
    var(--panel);
}
.privacy-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 860px) {
  .privacy-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.privacy-list {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.privacy-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--text-dim);
}
.privacy-list li strong {
  color: var(--white);
  font-weight: 400;
}
.privacy-list .check {
  color: var(--green);
  flex: 0 0 auto;
  margin-top: 0.15em;
  font-family: var(--font-mono);
}

/* ---------- Responsible-use callout ---------- */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.3rem 1.5rem;
  max-width: 760px;
  margin-inline: auto;
}
.callout .callout-title {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--amber);
  margin-bottom: 0.5rem;
}
.callout p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.94rem;
}

/* ---------- Download CTA band ---------- */
.download {
  text-align: center;
}
.download .store-badges {
  margin-top: 1.6rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--panel);
  padding-block: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  justify-content: space-between;
  align-items: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}
.footer-links a:hover {
  color: var(--green);
  text-decoration: none;
}
.footer-meta {
  color: var(--mute);
}
.footer-meta a {
  color: var(--text-dim);
}
.footer-meta a:hover {
  color: var(--green);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dim);
}
.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

/* ---------- Legal / content pages ---------- */
.legal {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.legal-inner {
  max-width: 760px;
  margin-inline: auto;
}
.legal-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.4rem;
  margin-bottom: 2rem;
}
.legal-header h1 {
  font-size: clamp(2.6rem, 8vw, 4rem);
  color: var(--green);
  text-shadow: 0 0 24px rgba(57, 255, 20, 0.28);
}
.legal-header .updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.legal h2 {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
  color: var(--green);
  margin-top: 2.4rem;
  margin-bottom: 0.7rem;
  scroll-margin-top: 80px;
}
.legal h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: var(--white);
  margin-top: 1.6rem;
  margin-bottom: 0.4rem;
}
.legal p,
.legal li {
  color: var(--text-dim);
}
.legal strong {
  color: var(--white);
  font-weight: 400;
}
.legal ul,
.legal ol {
  padding-left: 1.3rem;
  margin: 0 0 1.2rem;
}
.legal li {
  margin-bottom: 0.5rem;
}
.legal .lead {
  color: var(--white);
  font-size: 1.05rem;
}

/* definition-style block used in imprint */
.datablock {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.6rem;
}
.datablock dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mute);
  margin-top: 0.9rem;
}
.datablock dt:first-child {
  margin-top: 0;
}
.datablock dd {
  margin: 0.2rem 0 0;
  color: var(--white);
}

/* highlight box for the on-device privacy summary */
.note {
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0;
}
.note p:last-child {
  margin-bottom: 0;
}

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.1rem 1.4rem;
  margin-bottom: 2.4rem;
}
.toc p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mute);
  margin: 0 0 0.6rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.3rem;
  columns: 2;
  column-gap: 2rem;
}
@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}
.toc a {
  color: var(--text-dim);
  font-size: 0.9rem;
}
.toc a:hover {
  color: var(--green);
}
