/* HIDDEN-FIX */
[hidden] { display: none !important; }

/* ==========================================================================
   ClawRescue — CRT green-phosphor monochrome theme
   Master stylesheet — loaded by /, /user/*, /admin/*
   ========================================================================== */

:root {
  --bg:              #020a02;
  --bg-2:            #031203;
  --bg-3:            #04180a;
  --panel:           rgba(51, 255, 102, 0.025);
  --panel-strong:    rgba(51, 255, 102, 0.06);

  --green-dim:       #1d4d1d;
  --green:           #33ff66;
  --green-bright:    #7fff8f;
  --green-text:      #b7ffc6;          /* slightly desaturated for body text */
  --green-mute:      #4a8a55;
  --green-glow:      rgba(51, 255, 102, 0.45);
  --green-glow-soft: rgba(51, 255, 102, 0.18);
  --green-glow-strong: rgba(51, 255, 102, 0.65);

  --amber-warn:      #ffae33;
  --amber-glow:      rgba(255, 174, 51, 0.45);

  --red-err:         #ff5a4a;
  --red-glow:        rgba(255, 90, 74, 0.45);

  --mono:    "JetBrains Mono", "Fira Code", "VT323", "Courier New", monospace;
  --display: "VT323", "JetBrains Mono", "Courier New", monospace;

  /* legacy aliases — keep existing markup working */
  --accent:        var(--green);
  --accent-2:      var(--green-bright);
  --text:          var(--green-text);
  --muted:         var(--green-mute);
  --success:       var(--green-bright);
  --danger:        var(--red-err);
  --warning:       var(--amber-warn);
  --line:          rgba(51, 255, 102, 0.18);
  --line-strong:   rgba(51, 255, 102, 0.32);
  --border:        rgba(51, 255, 102, 0.25);
  --radius:        2px;
  --radius-lg:     2px;
  --shadow:        0 0 32px var(--green-glow-soft);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--green-bright); text-decoration: none; }
a:hover { color: var(--green); text-shadow: 0 0 8px var(--green-glow); }

/* --------------------------------------------------------------------------
   Base typography
   -------------------------------------------------------------------------- */
body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  color: var(--green-text);
  background:
    radial-gradient(ellipse at center, #052a0d 0%, #02100a 55%, #010604 100%);
  min-height: 100vh;
  text-shadow: 0 0 6px var(--green-glow-soft);
  text-rendering: geometricPrecision;
  font-feature-settings: "liga" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--green-bright);
  text-shadow: 0 0 10px var(--green-glow);
  margin: 0 0 0.5em;
}
h1 { font-size: 56px; line-height: 1.05; }
h2 { font-size: 36px; line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.2; font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
h4 { font-size: 16px; font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

p { margin: 0 0 1em; }
small { font-size: 12px; color: var(--green-mute); }

::selection { background: var(--green); color: var(--bg); text-shadow: none; }

/* Scrollbars */
* { scrollbar-color: var(--green-dim) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--green-dim); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--green-mute); }

/* --------------------------------------------------------------------------
   CRT overlays
   body::before  -> scanlines
   body::after   -> vignette
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  animation: crt-flicker 4.2s steps(12) infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 51;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.65) 100%);
}

@keyframes crt-flicker {
  0%   { opacity: 0.95; }
  50%  { opacity: 1;    }
  100% { opacity: 0.97; }
}

@keyframes crt-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Decorative grid kept for backward compat */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(51,255,102,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51,255,102,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.5), transparent 90%);
}

/* main content sits above the grid, below the overlays */
main, header, footer { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green);
  border-radius: 2px;
  text-shadow: 0 0 8px var(--green-glow);
  box-shadow: 0 0 0 0 var(--green-glow-soft);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: pointer;
}
.btn:hover {
  background: var(--green);
  color: var(--bg);
  text-shadow: none;
  box-shadow: 0 0 18px var(--green-glow);
  border-color: var(--green-bright);
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--green);
  color: var(--bg);
  text-shadow: none;
  border-color: var(--green);
  box-shadow: 0 0 18px var(--green-glow);
}
.btn-primary:hover {
  background: var(--green-bright);
  border-color: var(--green-bright);
  box-shadow: 0 0 22px var(--green-glow-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--green-dim);
}
.btn-ghost:hover {
  background: rgba(51, 255, 102, 0.08);
  color: var(--green-bright);
  border-color: var(--green);
}

.btn-danger {
  color: var(--amber-warn);
  border-color: var(--amber-warn);
  text-shadow: 0 0 8px var(--amber-glow);
}
.btn-danger:hover {
  background: var(--amber-warn);
  color: var(--bg);
  text-shadow: none;
  box-shadow: 0 0 18px var(--amber-glow);
}

.btn-lg { padding: 14px 26px; font-size: 14px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Bracketed CLI variant: <a class="btn btn-bracket">SIGN IN</a> renders as [ SIGN IN ] */
.btn-bracket {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--green);
  text-shadow: 0 0 6px var(--green-glow);
  box-shadow: none;
}
.btn-bracket::before { content: "[ "; color: var(--green-mute); }
.btn-bracket::after  { content: " ]"; color: var(--green-mute); }
.btn-bracket:hover {
  background: transparent;
  color: var(--green-bright);
  text-shadow: 0 0 12px var(--green-glow-strong);
  box-shadow: none;
}
.btn-bracket:hover::before,
.btn-bracket:hover::after { color: var(--green-bright); }

/* --------------------------------------------------------------------------
   Header / branding
   -------------------------------------------------------------------------- */
.site-header,
.portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(2, 10, 2, 0.92);
  border-bottom: 1px solid var(--green-dim);
  backdrop-filter: blur(4px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--green-bright);
  font-weight: 700;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-family: var(--display);
  font-size: 20px;
  color: var(--bg);
  background: var(--green);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--green-glow);
  text-shadow: none;
}

.brand-name {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--green-bright);
  text-shadow: 0 0 10px var(--green-glow);
  text-transform: uppercase;
}

.site-cta,
.portal-account { display: flex; align-items: center; gap: 14px; }

.me-email { color: var(--green-mute); font-size: 12px; letter-spacing: 0.04em; }

/* --------------------------------------------------------------------------
   Marketing — hero / sections
   -------------------------------------------------------------------------- */
main { display: block; }

.hero {
  padding: 80px 28px 64px;
  max-width: 1100px;
  margin: 0 auto;
}
.hero-inner { display: flex; flex-direction: column; gap: 20px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  padding: 4px 0;
  border-top: 1px dashed var(--green-dim);
  border-bottom: 1px dashed var(--green-dim);
  align-self: flex-start;
}
.hero h1 { font-size: 64px; }
.hero h1 .cursor::after {
  content: "▮";
  display: inline-block;
  margin-left: 6px;
  color: var(--green);
  animation: crt-blink 1s steps(2) infinite;
}
.lead {
  max-width: 740px;
  font-size: 16px;
  color: var(--green-text);
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--green-dim);
}
.hero-stats > div { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong {
  font-family: var(--display);
  font-size: 32px;
  color: var(--green-bright);
  text-shadow: 0 0 10px var(--green-glow);
}
.hero-stats span { color: var(--green-mute); font-size: 12px; letter-spacing: 0.04em; }

.section {
  padding: 56px 28px;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px dashed var(--green-dim);
}
.section-band { background: rgba(51, 255, 102, 0.02); }
.section-head { margin-bottom: 28px; max-width: 760px; }
.section-head h2 { margin-bottom: 8px; }
.section-head p  { color: var(--green-mute); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--green-dim);
  background: var(--panel);
  padding: 22px;
  border-radius: 2px;
  box-shadow: inset 0 0 24px rgba(51, 255, 102, 0.04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--green); box-shadow: inset 0 0 24px rgba(51,255,102,0.10), 0 0 18px var(--green-glow-soft); }
.card h3 { margin-bottom: 8px; }
.card p  { color: var(--green-mute); font-size: 14px; line-height: 1.6; margin: 0; }
.card-price {
  font-family: var(--display);
  font-size: 28px;
  color: var(--green-bright);
  text-shadow: 0 0 10px var(--green-glow);
  margin: 4px 0 12px;
}
.card-accent { border-color: var(--green); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li {
  border: 1px solid var(--green-dim);
  padding: 18px;
  border-radius: 2px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-num {
  font-family: var(--display);
  font-size: 28px;
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}
.steps h3 { font-size: 15px; }
.steps p  { color: var(--green-mute); font-size: 13px; margin: 0; }

.pricing-callout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.pricing-callout > div {
  border: 1px solid var(--green-dim);
  padding: 22px;
  background: var(--panel);
}
.pricing-callout h3 { margin-bottom: 6px; }
.pricing-callout p  { color: var(--green-mute); margin: 0; }

.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.site-footer {
  border-top: 1px dashed var(--green-dim);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--green-mute);
  letter-spacing: 0.04em;
  max-width: 1100px;
  margin: 24px auto 0;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--green-mute); }
.footer-links a:hover { color: var(--green); }

/* --------------------------------------------------------------------------
   Forms (shared by user + admin SPAs)
   -------------------------------------------------------------------------- */
input, select, textarea {
  font: inherit;
  color: var(--green-text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--green-dim);
  padding: 8px 0;
  caret-color: var(--green);
  width: 100%;
  outline: none;
  text-shadow: 0 0 6px var(--green-glow-soft);
}
input::placeholder, textarea::placeholder { color: var(--green-mute); opacity: 0.7; }
input:focus, select:focus, textarea:focus {
  border-bottom-color: var(--green);
  box-shadow: 0 1px 0 0 var(--green-glow);
}
textarea { min-height: 120px; resize: vertical; }
select {
  appearance: none;
  padding-right: 16px;
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%),
                    linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 6px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* --------------------------------------------------------------------------
   Status pills, tags, badges (used by user + admin)
   -------------------------------------------------------------------------- */
.pill, .badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--green-dim);
  background: transparent;
  color: var(--green);
  border-radius: 2px;
  text-shadow: 0 0 6px var(--green-glow-soft);
}
.pill::before, .badge::before { content: "[ "; color: var(--green-mute); }
.pill::after,  .badge::after  { content: " ]"; color: var(--green-mute); }

.badge-success { color: var(--green-bright); border-color: var(--green); }
.badge-warning { color: var(--amber-warn);   border-color: var(--amber-warn); text-shadow: 0 0 6px var(--amber-glow); }
.badge-danger  { color: var(--red-err);      border-color: var(--red-err);    text-shadow: 0 0 6px var(--red-glow); }
.badge-info    { color: var(--green-bright); border-color: var(--green-dim); }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  padding: 12px 18px;
  border: 1px solid var(--green);
  background: rgba(2, 10, 2, 0.95);
  color: var(--green);
  font-size: 13px;
  text-shadow: 0 0 6px var(--green-glow);
  box-shadow: 0 0 24px var(--green-glow-soft);
}
.toast[hidden] { display: none; }
.toast.toast-error  { color: var(--red-err);    border-color: var(--red-err);    text-shadow: 0 0 6px var(--red-glow); }
.toast.toast-warn   { color: var(--amber-warn); border-color: var(--amber-warn); text-shadow: 0 0 6px var(--amber-glow); }

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 800px) {
  .site-header, .portal-header { padding: 12px 16px; gap: 12px; }
  .brand-name { font-size: 20px; }
  .hero { padding: 48px 16px 40px; }
  .hero h1 { font-size: 38px; }
  h1 { font-size: 38px; }
  h2 { font-size: 26px; }
  .hero-stats { grid-template-columns: 1fr; }
  .section { padding: 36px 16px; }
  .site-footer { padding: 16px; flex-direction: column; gap: 8px; align-items: flex-start; }
}

@media (max-width: 600px) {
  body::before { display: none; } /* hide expensive scanlines on small screens */
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .hero h1 .cursor::after { animation: none; opacity: 1; }
  *, *::before, *::after { transition-duration: 0.001s !important; animation-duration: 0.001s !important; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  body { background: #fff; color: #000; text-shadow: none; }
  body::before, body::after, .bg-grid { display: none; }
  .btn, .pill, .badge, .tag { border-color: #000; color: #000; text-shadow: none; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
