/* emu-gate theme — owned by themes/emu-gate, not the site.
   Edit palette in the :root block below; everything else inherits.
   Tailwind utilities live in styles.css (built per-site by tailwind). */

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

:root {
  --blue:   #00d4ff;
  --blue2:  #0099cc;
  --blue3:  #003844;
  --bg:     #010a14;
  --text:   #c8e0e6;
  --muted:  #2d5a6a;
  --mono:   'Share Tech Mono', monospace;
  --orb:    'Orbitron', monospace;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  overflow-x: hidden;
}

/* ── WebGL canvas ── */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ── Layout ── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav ── */
/* Scoped to .site-nav (not bare `nav`) so this rule does NOT leak into
   the admin-spa shell, which renders its own <nav> elements (sidebar
   groups + topbar section pills). theme.css is now @import'd into
   per-site styles.css and loaded by /admin/index.html. */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(0,212,255,.1);
  backdrop-filter: blur(4px);
}
.nav-brand {
  font-family: var(--orb);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--muted);
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--blue); }
.nav-register {
  padding: 6px 18px;
  border: 1px solid rgba(0,212,255,.4);
  border-radius: 2px;
  color: var(--blue) !important;
  font-family: var(--orb);
  font-size: 10px !important;
  letter-spacing: .12em;
  transition: background .2s, box-shadow .2s !important;
}
.nav-register:hover {
  background: rgba(0,212,255,.08) !important;
  box-shadow: 0 0 16px rgba(0,212,255,.25) !important;
}

/* ── Auth-state chip (used by topbar.js — populates [data-topbar-user]
   on both the homepage <nav> and the /gateways topbar partial). */
.emu-topbar-user {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--text);
  letter-spacing: .08em;
}
.emu-topbar-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 6px rgba(0,212,255,.8); }
.emu-topbar-name  { color: var(--text); }
.emu-topbar-admin {
  margin-left: 8px;
  color: var(--blue);
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid rgba(0,212,255,.4);
  border-radius: 2px;
  transition: background .15s, box-shadow .15s;
}
.emu-topbar-admin:hover { background: rgba(0,212,255,.08); box-shadow: 0 0 14px rgba(0,212,255,.3); }
.emu-topbar-signin {
  color: var(--blue);
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid rgba(0,212,255,.4);
  border-radius: 2px;
  transition: background .15s, box-shadow .15s;
}
.emu-topbar-signin:hover { background: rgba(0,212,255,.08); box-shadow: 0 0 14px rgba(0,212,255,.3); }

/* Hover dropdown: appears below the username chip with admin + logout. */
.emu-topbar-user-wrap { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.emu-topbar-user-wrap .emu-topbar-user { cursor: pointer; padding: 6px 4px; }
.emu-topbar-caret { color: var(--muted); font-size: 10px; margin-left: 4px; transition: color .15s, transform .15s; }
.emu-topbar-user-wrap:hover .emu-topbar-caret { color: var(--blue); transform: translateY(1px); }

.emu-topbar-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 180px;
  background: rgba(1,10,20,.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,212,255,.25);
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(0,0,0,.6), 0 0 16px rgba(0,212,255,.18);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 50;
}
/* Show on hover or focus-within so keyboard users can reach it.
   Tiny invisible bridge above keeps the menu open as the cursor
   crosses the 6px gap below the chip. */
.emu-topbar-user-wrap:hover .emu-topbar-menu,
.emu-topbar-user-wrap:focus-within .emu-topbar-menu { display: flex; }
.emu-topbar-menu::before { content: ''; position: absolute; top: -6px; left: 0; right: 0; height: 6px; }

.emu-topbar-menu > a,
.emu-topbar-menu > button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.emu-topbar-menu > a:hover,
.emu-topbar-menu > button:hover { background: rgba(0,212,255,.08); color: var(--blue); }

.emu-topbar-logout {
  border-top: 1px solid rgba(255,255,255,.06) !important;
  margin-top: 4px !important;
  padding-top: 10px !important;
  color: #ff8585 !important;
}
.emu-topbar-logout:hover { background: rgba(255,80,80,.08) !important; color: #ff6b6b !important; }

/* ── Hero ── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 40px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--blue2);
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: .7;
}

.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.wordmark-drezdin {
  font-family: 'UnifrakturMaguntia', serif;
  font-size: clamp(52px, 9vw, 110px);
  color: var(--blue);
  line-height: 1;
  text-shadow:
    0 0 20px rgba(0,212,255,.8),
    0 0 60px rgba(0,212,255,.4),
    0 0 120px rgba(0,212,255,.2);
  animation: pulse-glow 3s ease-in-out infinite;
  letter-spacing: .02em;
}

.wordmark-labs {
  font-size: clamp(22px, 3.5vw, 42px);
  font-weight: 700;
  color: #fff;
  letter-spacing: .5em;
  text-transform: uppercase;
  line-height: 1;
  margin-top: -4px;
  font-family: var(--orb);
}

.hero-product {
  font-family: var(--orb);
  font-size: clamp(28px, 5vw, 64px);
  font-weight: 900;
  color: var(--blue);
  letter-spacing: .08em;
  margin: 32px 0 20px;
  text-shadow:
    0 0 10px rgba(0,212,255,.9),
    0 0 40px rgba(0,212,255,.5),
    0 0 80px rgba(0,212,255,.25);
  position: relative;
}
.hero-product::after {
  /* glitch-scan overlay copy is set in template via data-glitch=… */
  content: attr(data-glitch);
  position: absolute;
  inset: 0;
  color: #fff;
  clip-path: inset(0 100% 0 0);
  animation: scan-text 4s steps(8, end) infinite;
  text-shadow: none;
  opacity: .06;
}

.hero-tagline {
  font-size: clamp(12px, 1.8vw, 16px);
  color: var(--muted);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 48px;
  letter-spacing: .04em;
}
.hero-tagline strong { color: var(--blue2); }

/* ── CTA buttons ── */
.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 80px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--blue);
  color: #010a14;
  font-family: var(--orb);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transform: translateX(-100%);
  transition: transform .4s;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0,212,255,.6), 0 0 60px rgba(0,212,255,.3);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  background: transparent;
  color: var(--blue);
  font-family: var(--orb);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(0,212,255,.5);
  border-radius: 2px;
  cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .15s;
}
.btn-ghost:hover {
  background: rgba(0,212,255,.07);
  box-shadow: 0 0 20px rgba(0,212,255,.3);
  transform: translateY(-2px);
}

/* ── Terminal feed (moved out of inline style on the div) ── */
.terminal-feed {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .05em;
  line-height: 2;
  max-width: 480px;
  text-align: left;
  border-left: 2px solid rgba(0,212,255,.2);
  padding-left: 16px;
  margin-bottom: 60px;
}
.terminal-feed .tag { color: var(--blue2); }
.terminal-feed .ok  { color: var(--blue); }

/* ── Feature grid ── */
.features {
  padding: 60px 40px 100px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(0,212,255,.08);
  border-top: 1px solid rgba(0,212,255,.1);
  border-bottom: 1px solid rgba(0,212,255,.1);
}

.feature {
  padding: 36px 32px;
  background: rgba(1,10,20,.85);
  backdrop-filter: blur(8px);
  transition: background .2s;
}
.feature:hover { background: rgba(0,20,40,.9); }

.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(0,212,255,.6));
}

.feature-title {
  font-family: var(--orb);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  letter-spacing: .03em;
}

/* ── Presented by (theme/site partner credit) ── */
.presented-by {
  display: flex;
  justify-content: center;
  padding: 60px 24px 40px;
}
.presented-by-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 12px;
  border: 1px solid rgba(0,212,255,.18);
  border-radius: 999px;
  text-decoration: none;
  background: rgba(0,212,255,.03);
  transition: background .2s, box-shadow .2s, border-color .2s;
}
.presented-by-link:hover {
  background: rgba(0,212,255,.08);
  border-color: rgba(0,212,255,.45);
  box-shadow: 0 0 22px rgba(0,212,255,.25);
}
.presented-by-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,.55);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(1,10,20,.6);
  box-shadow:
    0 0 12px rgba(0,212,255,.35),
    inset 0 0 8px rgba(0,212,255,.15);
}
.presented-by-avatar img { width: 100%; height: 100%; object-fit: contain; }
.presented-by-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.presented-by-prefix {
  font-family: var(--orb);
  font-size: 9px;
  letter-spacing: .25em;
  color: var(--muted);
  text-transform: uppercase;
}
.presented-by-name {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--blue);
}

/* ── Footer ── */
footer {
  padding: 24px 40px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
  border-top: 1px solid rgba(0,212,255,.06);
}
footer a       { color: var(--blue2); text-decoration: none; }
.footer-glyph  { color: rgba(0,212,255,.3); }
.footer-version{ color: rgba(0,212,255,.4); font-family: 'Share Tech Mono', monospace; }

/* ── Scanline overlay ── */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.03) 2px,
    rgba(0,0,0,.03) 4px
  );
}

/* ── Animations ── */
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 20px rgba(0,212,255,.8), 0 0 60px rgba(0,212,255,.4), 0 0 120px rgba(0,212,255,.2); }
  50%      { text-shadow: 0 0 30px rgba(0,212,255,1),  0 0 80px rgba(0,212,255,.6), 0 0 160px rgba(0,212,255,.3); }
}
@keyframes scan-text {
  0%   { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}

/* ── Glitch effect on hover ── */
.hero-product:hover { animation: glitch .3s steps(2) forwards; }
@keyframes glitch {
  0%   { transform: translate(0); }
  20%  { transform: translate(-3px, 1px); filter: hue-rotate(90deg); }
  40%  { transform: translate(3px, -1px); filter: hue-rotate(-90deg); }
  60%  { transform: translate(-2px, 2px); }
  80%  { transform: translate(2px, -2px); filter: hue-rotate(45deg); }
  100% { transform: translate(0); filter: none; }
}

/* ── Terminal cursor blink ── */
.cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: var(--blue);
  vertical-align: text-bottom;
  animation: blink .8s step-end infinite;
  box-shadow: 0 0 8px rgba(0,212,255,.8);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Hex corner accents ── */
.corner {
  position: fixed;
  width: 80px;
  height: 80px;
  z-index: 1;
  pointer-events: none;
}
.corner svg { width: 100%; height: 100%; }
.corner-tl { top: 0;    left: 0; }
.corner-tr { top: 0;    right: 0; transform: scaleX(-1); }
.corner-bl { bottom: 0; left: 0;  transform: scaleY(-1); }
.corner-br { bottom: 0; right: 0; transform: scale(-1); }
/* ── DevBanner (shared/js/vue/dev/DevBanner.vue) ────────────── */
.dl-dev-banner {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 2147483600;        /* above app + admin shells */
  font-family: ui-monospace, "Share Tech Mono", monospace;
}

.dl-dev-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 200, 90, 0.95);
  color: #1a1200;
  border: 1px solid #c88a00;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  transition: background .12s;
}
.dl-dev-chip:hover { background: rgb(255, 215, 130); }

.dl-dev-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
}
.dl-dev-dot-online       { background: #00d04e; box-shadow: 0 0 6px rgba(0, 208, 78, .8); }
.dl-dev-dot-offline      { background: #ff4040; box-shadow: 0 0 6px rgba(255, 64, 64, .8); }
.dl-dev-dot-unconfigured { background: #1a1200; }

.dl-dev-label   { font-weight: 700; letter-spacing: .15em; }
.dl-dev-summary { font-weight: 400; opacity: .8; }
.dl-dev-caret   { font-size: 10px; }

.dl-dev-panel {
  position: absolute;
  left: 0; bottom: calc(100% + 8px);
  /* Wide enough that mock/real toggle never truncates; long upstream
     URLs still fit on one line. */
  min-width: 560px;
  max-width: 90vw;
  background: #16110a;
  border: 1px solid #c88a00;
  border-radius: 4px;
  padding: 8px 0;
  font-size: 12px;
  color: #fff7e6;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .5);
}

.dl-dev-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 6px 14px;
}
.dl-dev-row-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(255, 247, 230, .55);
  border-bottom: 1px solid rgba(255, 200, 90, .2);
  margin-bottom: 4px;
}
.dl-dev-ns   { color: #ffc85a; font-weight: 600; }
.dl-dev-cols { color: rgba(255, 247, 230, .55); }

.dl-dev-toggle { display: inline-flex; border: 1px solid rgba(255, 200, 90, .35); border-radius: 3px; overflow: hidden; }
.dl-dev-toggle-btn {
  background: transparent;
  color: rgba(255, 247, 230, .65);
  border: none;
  padding: 4px 10px;
  font: inherit;
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background .1s, color .1s;
}
.dl-dev-toggle-btn:hover:not(:disabled)  { background: rgba(255, 200, 90, .12); color: #fff7e6; }
.dl-dev-toggle-btn.active                { background: #ffc85a; color: #1a1200; font-weight: 700; }
.dl-dev-toggle-btn:disabled              { opacity: .35; cursor: not-allowed; }

.dl-dev-foot {
  margin-top: 6px;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 200, 90, .2);
  display: flex; flex-direction: column; gap: 8px;
}
.dl-dev-upstream { font-size: 11px; color: rgba(255, 247, 230, .75); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl-dev-upstream code { color: #ffc85a; font-family: ui-monospace, monospace; font-size: 11px; }
.dl-dev-upstream-none { color: rgba(255, 247, 230, .4); font-style: italic; }
.dl-dev-status            { margin-left: auto; font-size: 10px; letter-spacing: .1em; }
.dl-dev-status-online       { color: #80ff9a; }
.dl-dev-status-offline      { color: #ff8585; }
.dl-dev-status-unconfigured { color: rgba(255, 247, 230, .45); }

.dl-dev-reset {
  background: transparent;
  color: rgba(255, 247, 230, .8);
  border: 1px solid rgba(255, 200, 90, .35);
  border-radius: 3px;
  padding: 5px 10px;
  font: inherit;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .1s, color .1s;
}
.dl-dev-reset:hover { background: rgba(255, 200, 90, .12); color: #fff7e6; }
/* ── DevBanner v2 — draggable + per-ns rows + toast ─────────────── */
.dl-dev-banner { position: fixed; right: auto; bottom: auto; }
.dl-dev-grip   { color: rgba(0,0,0,.4); font-weight: 700; letter-spacing: -2px; margin-right: 2px; cursor: grab; }
.dl-dev-chip-dragging .dl-dev-grip,
.dl-dev-chip-dragging                 { cursor: grabbing !important; }
.dl-dev-chip                          { cursor: pointer; }

/* ns | upstream(stretches) | status(fixed) | provider toggle(fixed) */
.dl-dev-row { display: grid; grid-template-columns: minmax(80px, .8fr) minmax(180px, 2fr) 120px 130px; align-items: center; gap: 14px; padding: 7px 14px; }
.dl-dev-row-head .dl-dev-col-ns,
.dl-dev-row-head .dl-dev-col-up,
.dl-dev-row-head .dl-dev-col-st,
.dl-dev-row-head .dl-dev-col-pr { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 247, 230, .55); }
.dl-dev-col-ns       { color: #ffc85a; font-weight: 600; }
.dl-dev-ns-offline   { color: #ff8585; }
.dl-dev-ns-online    { color: #80ff9a; }
.dl-dev-col-up code  { color: rgba(255, 247, 230, .85); font-size: 11px; font-family: ui-monospace, monospace; }
.dl-dev-upstream-none { color: rgba(255, 247, 230, .35); }
.dl-dev-col-st       { font-size: 10px; }

.dl-dev-empty {
  padding: 12px 14px;
  font-size: 11px;
  color: rgba(255, 247, 230, .7);
  border-bottom: 1px solid rgba(255, 200, 90, .15);
}
.dl-dev-empty code { color: #ffc85a; font-family: ui-monospace, monospace; font-size: 10px; }

.dl-dev-toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2147483601;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.dl-dev-toast {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(22, 17, 10, .96);
  color: #fff7e6;
  border: 1px solid rgba(255, 200, 90, .35);
  border-left-width: 3px;
  border-radius: 3px;
  padding: 8px 12px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .04em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
  animation: dl-dev-toast-in .2s ease-out, dl-dev-toast-out .3s 3.7s ease-in forwards;
}
.dl-dev-toast-success  { border-left-color: #80ff9a; }
.dl-dev-toast-info     { border-left-color: #ffc85a; }
.dl-dev-toast-warning  { border-left-color: #ff9a40; }
.dl-dev-toast-ns       { color: #ffc85a; font-weight: 600; text-transform: lowercase; }
.dl-dev-toast-msg      { color: rgba(255, 247, 230, .75); }
@keyframes dl-dev-toast-in  { from { transform: translateY(-6px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes dl-dev-toast-out { to { opacity: 0; transform: translateY(-6px) } }
