/* fritidsgarden.com — FRITIDSGÅRDEN // SYS-01
   Telemetry-console HUD. Rationed amber on void. Mono chrome, sans only for
   the human voice (quote text). All FX are pure CSS (CSP-safe).
   Landing = a clean, anonymous gate; the personality lives behind the login. */

:root {
  --bg:        #07090C;
  --bg2:       #0A0E12;
  --surface:   #0C1116;
  --primary:   #FF8A1E;   /* amber — RATIONED to the live/important thing */
  --secondary: #3FBFD4;   /* cyan  — second signal: your-vote, links */
  --accent:    #FFB35C;
  --danger:    #E24B4A;
  --text:      #EDF3F7;
  --muted:     #9DB0BD;
  --line:      #1C2530;
  --empty-pip: #6B7C89;   /* ≥3:1 on surface so unrated rating pips stay visible */

  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --amber-glow: 0 0 22px rgba(255,138,30,0.45);
  --amber-ring: 0 0 0 2px rgba(255,138,30,0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;               /* overlay anchor — NOT position:fixed */
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(63,191,212,0.05) 1px, transparent 1px);
  background-size: 22px 22px;       /* dot-grid graph-paper */
}

/* CRT scanline overlay — one absolute, full-document, click-through layer */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  background-image: repeating-linear-gradient(
    0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  animation: roll .3s steps(2) infinite;
}
.deny .scanlines { background-image: repeating-linear-gradient(
    0deg, rgba(226,75,74,0.05) 0 1px, transparent 1px 3px); }

a { color: var(--secondary); text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--primary); color: var(--bg); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* L-shaped amber corner brackets (top-left + bottom-right) */
.framed { position: relative; }
.framed::before, .framed::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  pointer-events: none;
}
.framed::before { top: -1px;  left: -1px;  border-top: 2px solid var(--primary);    border-left: 2px solid var(--primary); }
.framed::after  { bottom: -1px; right: -1px; border-bottom: 2px solid var(--primary); border-right: 2px solid var(--primary); }

/* ===================================================================== gate
   The public landing: minimal, anonymous, discreet. Mark + login, nothing else. */
.landing { display: flex; flex-direction: column; }

.gate {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}
.gate-card {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 120px 20px rgba(0,0,0,0.6);
  padding: clamp(2.6rem, 8vw, 4.5rem) clamp(2rem, 9vw, 4.5rem);
}
.wordmark {
  font-family: var(--mono);
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
  line-height: 1;
}
.wordmark .amber {
  color: var(--primary);
  text-shadow: var(--amber-glow);
  animation: flick 6s steps(1, end) infinite;
}
.gate-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.4rem 0 2.4rem;
}
.gate-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 1.1rem 0 0;
}
.gate-foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}

/* amber login slab — shared by the gate, the vault submit, and the deny retry */
.login-slab, .btn--go {
  display: inline-flex;
  align-items: center;
  gap: .5ch;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--bg);
  background: var(--primary);
  border: 0;
  cursor: pointer;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: 0 0 24px rgba(255,138,30,0.4);
  transition: filter .12s ease, transform .08s ease;
}
.login-slab { font-size: 1rem; padding: .95rem 2.4rem; }
.login-slab:hover, .btn--go:hover { color: var(--bg); filter: brightness(1.12); }
.login-slab:active, .btn--go:active { transform: scale(.98); }

/* ------------------------------------------------ shared quote-card primitives
   (used by the vault; the vault adds interactivity in quotes.css) */
.qcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--primary);
  padding: 16px 18px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.qrank {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(255,138,30,0.4);
}
.qtext {
  font-family: var(--sans);          /* the human voice trapped in the machine */
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text);
  margin: .35rem 0 .7rem;
}
.qtext::before { content: "\201C"; color: var(--primary); }
.qtext::after  { content: "\201D"; color: var(--primary); }
.qcard.rank-1 {
  border-left-width: 3px;
  box-shadow: 0 0 20px rgba(255,138,30,0.35);
  animation: rankpulse 2.4s ease-in-out infinite;
}
.qcard.rank-1 .qrank::after {
  content: " ▲ HÖGSTA HOTNIVÅ";
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--primary);
}

/* ----------------------------------------------------------------- deny */
.deny { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.deny-card {
  position: relative;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--danger);
  box-shadow: 0 0 30px rgba(226,75,74,0.25), inset 0 0 80px rgba(0,0,0,0.6);
  padding: 2.5rem 2rem;
  max-width: 480px;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.deny-card::before, .deny-card::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
}
.deny-card::before { top: -1px; left: -1px; border-top: 2px solid var(--danger); border-left: 2px solid var(--danger); }
.deny-card::after  { bottom: -1px; right: -1px; border-bottom: 2px solid var(--danger); border-right: 2px solid var(--danger); }
.deny-emoji {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--danger);
  text-shadow: 0 0 18px rgba(226,75,74,0.5);
}
.deny-card h1 {
  font-family: var(--mono);
  font-size: 1.15rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--danger);
  margin: .8rem 0 .75rem;
}
.deny-card p { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.deny-actions { display: flex; gap: .7rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---------------------------------------------------------- shared buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5ch;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .7rem 1.3rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}
.btn--go { padding: .8rem 1.6rem; }
/* compound override (0,2,0) so the amber slab fill beats the later `.btn` base rule */
.btn.btn--go { background: var(--primary); color: var(--bg); border: 0; }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn--ghost:hover { color: var(--text); background: var(--bg2); border-color: var(--secondary); }

/* ------------------------------------------------------------ animations */
@keyframes flick {
  0%,88%,100% { text-shadow: 0 0 22px rgba(255,138,30,.45); }
  90%,92%     { text-shadow: 0 0 8px rgba(255,138,30,.25); }
}
@keyframes roll { from { background-position-y: 0; } to { background-position-y: 3px; } }
@keyframes rankpulse {
  0%,100% { box-shadow: 0 0 14px rgba(255,138,30,.3); }
  50%     { box-shadow: 0 0 26px rgba(255,138,30,.5); }
}

@media (prefers-reduced-motion: reduce) {
  .scanlines, .wordmark .amber, .qcard.rank-1 { animation: none !important; }
}
