/* Deviant brand layer — shared by every page under deviant.test / deviant.nav.
 *
 * Palette and type lifted from D:/Dev/Deviant/Parameters/webfiles/deviant_website.html
 * so pages built here sit next to the existing prototypes without a visual break.
 *
 * SELF-CONTAINED BY DESIGN. No @import, no CDN, no external font fetch. A page
 * using this file must render identically with the network unplugged — that is the
 * requirement for Sia-hosted sites, where there is no origin to fall back to.
 * To upgrade the typography, drop woff2 files into shared/fonts/ and the build
 * will emit the @font-face rules. See shared/fonts/README.md.
 */

:root {
  /* Sky — the dark ground everything sits on.
   * These match D:/Dev/Deviant/design/cosmo-genesis.css, which is the CANONICAL
   * palette: it is the later superset and the six dApp prototypes (anthemus,
   * potidaea, artemision, pinax, katalogos, agora) all link it. The older
   * webfiles/deviant_website.html duplicates an inline palette with a lighter
   * ramp (#050810/#0a0f1c/#131a2a); we follow cosmo-genesis instead so that
   * clicking from this hub into an app does not flash a different black. */
  --sky-deep: #02040a;
  --sky-mid:  #060912;
  --sky-rim:  #0c1220;
  --sky-cove: #070d1a;

  /* Semantic surface aliases — prefer these in components */
  --bg:        var(--sky-deep);
  --surface-1: var(--sky-mid);
  --surface-2: var(--sky-rim);
  --panel:     var(--sky-rim);

  --star-faint: rgba(255, 255, 255, 0.22);
  --star-mid: rgba(255, 255, 255, 0.38);
  --star-bright: rgba(255, 255, 255, 0.58);

  /* Ink */
  --ink: #d6dde9;
  --ink-soft: #b8c2d4;
  --ink-bright: #f1f4fa;
  --muted: #6a7488;
  --dim: #4a5265;

  /* Acid — the one accent. Use it sparingly; it means "this matters". */
  --acid: #d6ff3d;
  --acid-glow: rgba(214, 255, 61, 0.55);
  --acid-halo: rgba(214, 255, 61, 0.22);
  --acid-dim: rgba(214, 255, 61, 0.08);

  --rust-deep: #6b2a1c;

  /* Automated risk scale (cosmo-genesis: D-1/D-2 verification tier → colour).
   * Carried over so a badge rendered here means the same thing it means in the
   * wallet. Do not repurpose these for decoration. */
  --risk-safe:      var(--acid);
  --risk-safe-glow: var(--acid-glow);
  --risk-warn:      #ff9f1c;
  --risk-high:      #ff4d4d;
  --risk-neutral:   var(--muted);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Status colours — kept distinct from acid so a badge never reads as a CTA */
  --live: #4fd1a5;
  --live-bg: rgba(79, 209, 165, 0.13);
  --proto: #d6ff3d;
  --proto-bg: rgba(214, 255, 61, 0.11);
  --planned: #6a7488;
  --planned-bg: rgba(106, 116, 136, 0.14);

  /* Host-kind colours, matching the Silent Mode site's provenance vocabulary */
  --chain: #d6ff3d;
  --sia: #b39ddb;
  --srv: #4fd1a5;

  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.14);

  --header-h: 58px;
  --wrap: 1080px;

  /* Type. Fraunces/DM Sans/JetBrains Mono are named first so that if the build
   * self-hosts them they take over with no CSS change; the fallbacks are chosen
   * to hold the same feel (a transitional serif, a neutral grotesque, a mono). */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 14px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  padding-top: var(--header-h);
  background:
    radial-gradient(ellipse at top, var(--sky-rim) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, var(--sky-mid) 0%, transparent 50%),
    var(--sky-deep);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.4rem; }

/* ---------- Type ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  color: var(--ink-bright);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.1rem; line-height: 1.3; }

p { max-width: 68ch; }
.lede { color: var(--ink-soft); font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 64ch; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--font-mono); font-size: 0.9em; }
.acid { color: var(--acid); }

a { color: var(--acid); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Visible focus everywhere — keyboard users must be able to see where they are. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--acid);
  color: var(--sky-deep);
  padding: 10px 16px;
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  display: flex;
  align-items: center;
  background: rgba(5, 8, 16, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.4rem; width: 100%; }

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink-bright);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--acid); }

.nav { display: flex; gap: 1.15rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); font-size: 0.925rem; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--acid); text-decoration: none; }
.nav a[aria-current='page'] { font-weight: 600; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--acid);
  color: var(--sky-deep);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--ink-bright); }
.btn.ghost:hover { border-color: var(--acid); color: var(--acid); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- Sections & cards ---------- */

section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acid);
  margin-bottom: 0.9rem;
}

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card p { color: var(--muted); font-size: 0.9rem; margin-top: 0.45rem; }

a.card { display: block; color: inherit; }
a.card:hover { border-color: var(--acid-halo); text-decoration: none; transform: translateY(-2px); }
a.card:hover h3 { color: var(--acid); }

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  vertical-align: middle;
}
.badge.live    { background: var(--live-bg);    color: var(--live); }
.badge.proto   { background: var(--proto-bg);   color: var(--proto); }
.badge.planned { background: var(--planned-bg); color: var(--planned); }

.host {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.host .k-sia  { color: var(--sia); }
.host .k-vps  { color: var(--srv); }
.host .k-onchain { color: var(--chain); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.6rem 0 3.4rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .wrap { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.site-footer .spacer { margin-left: auto; }

/* ---------- Testnet notice — never let a visitor mistake chipnet for real money ---- */

.testnet-banner {
  background: var(--rust-deep);
  color: #ffd9cf;
  text-align: center;
  padding: 7px 1rem;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.testnet-banner strong { color: #fff; }

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

@media (max-width: 640px) {
  :root { --header-h: 54px; }
  .nav { gap: 0.85rem; }
  .nav a { font-size: 0.86rem; }
  .brand { font-size: 1.02rem; }
}
