/* CheburaNet — one page, dark by design.
   The palette comes from the mascot: charcoal #323a3d behind him, silver
   plating, and the green of his eyes. Nothing here is a theme toggle —
   the whole site is one committed, dark instrument panel. */

:root {
  color-scheme: dark;

  --ink:        #0f1315;
  --ground:     #12171a;
  --stage:      #323a3d;
  --panel:      #1a2023;
  --panel-hi:   #20272b;
  --line:       #2b3438;
  --text:       #e8eeef;
  --muted:      #9aa7aa;
  --dim:        #6d7a7e;

  --green:      #6ad02f;
  --green-soft: #8be455;
  --green-deep: #3f8f1c;
  --glow:       rgba(122, 235, 70, .32);

  --radius:     18px;
  --gutter:     24px;
  --max:        1160px;

  --font-display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:    "Cascadia Mono", "Consolas", ui-monospace, monospace;
}

* { box-sizing: border-box; }

/* Sections behind the access code stay out of the page until it is entered. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-inline: var(--gutter);
  background:
    radial-gradient(1100px 600px at 78% -10%, rgba(106, 208, 47, .10), transparent 60%),
    radial-gradient(900px 520px at 0% 30%, rgba(106, 208, 47, .045), transparent 55%),
    var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.16rem; letter-spacing: -.005em; }

p { margin: 0; }

/* ── top bar ─────────────────────────────────────────────────────────── */

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding-block: 22px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand-mark { width: 32px; height: 32px; flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.14rem;
  letter-spacing: .01em;
}

/* ── buttons ─────────────────────────────────────────────────────────── */

.btn {
  font: inherit;
  font-size: .97rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 13px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .16s, background .18s, border-color .18s, color .18s, box-shadow .18s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green);
  color: #0d1408;
  box-shadow: 0 8px 26px -8px var(--glow);
}

.btn-primary:hover { background: var(--green-soft); box-shadow: 0 12px 34px -8px var(--glow); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
  padding: 10px 20px;
}

.btn-ghost:hover { border-color: var(--green-deep); color: var(--green-soft); }

.btn-quiet {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}

.btn-quiet:hover { background: var(--panel-hi); border-color: #3a464b; }

.btn-wide { width: 100%; }

.btn-primary.is-done {
  background: transparent;
  color: var(--green-soft);
  border-color: var(--green-deep);
  box-shadow: none;
}

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

/* ── hero ────────────────────────────────────────────────────────────── */

main { max-width: var(--max); margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: min(76vh, 760px);
  padding-block: clamp(28px, 5vw, 64px) clamp(48px, 7vw, 96px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(106, 208, 47, .14);
  animation: blink 2.6s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

.lead {
  margin-top: 22px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.09rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.fine {
  margin-top: 18px;
  color: var(--dim);
  font-size: .86rem;
}

/* ── the stage: mascot + reticle ─────────────────────────────────────── */

.stage {
  position: relative;
  aspect-ratio: 1;
  border-radius: 28px;
  background:
    radial-gradient(closest-side at 50% 46%, #3a4448 0%, #323a3d 72%),
    var(--stage);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, .35),
    0 40px 80px -50px rgba(0, 0, 0, .9);
  overflow: hidden;
  isolation: isolate;
  cursor: crosshair;
}

.mascot {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Fades the square photo edge into the stage so the mascot sits in his own
     light instead of on a pasted rectangle. */
  -webkit-mask-image: radial-gradient(closest-side at 50% 48%, #000 68%, transparent 100%);
  mask-image: radial-gradient(closest-side at 50% 48%, #000 68%, transparent 100%);
  transition: filter .5s ease;
}

.stage:hover .mascot { filter: saturate(1.08) brightness(1.04); }

.scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 16%;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(106, 208, 47, .03) 50%,
      rgba(140, 245, 90, .16) 88%,
      rgba(196, 255, 165, .34) 100%);
  mix-blend-mode: screen;
  opacity: .6;
  /* Blurred on purpose: a sharp edge sweeping across a still picture reads as
     a rendering seam, while a soft band of light reads as scanning. */
  filter: blur(7px);
  animation: scan 6.5s cubic-bezier(.45, 0, .55, 1) infinite;
  pointer-events: none;
}

@keyframes scan {
  0%        { transform: translateY(-100%); opacity: 0; }
  12%       { opacity: .55; }
  60%, 100% { transform: translateY(560%); opacity: .55; }
}

/* The reticle covers the whole mascot, not a point on him: a red targeting
   frame around the figure. */
.reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 94%;
  height: 94%;
  transform: translate(-50%, -50%);
  color: rgba(255, 92, 78, .9);
  pointer-events: none;
  /* A dark halo underneath, or the red lines vanish against his silver belly. */
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9))
          drop-shadow(0 0 12px rgba(255, 60, 45, .45));
  transition: color .22s;
}

.reticle-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed currentColor;
}

.ring-outer { inset: 5%;  opacity: .42; animation: spin 26s linear infinite; }
.ring-inner { inset: 15%; opacity: .62; border-style: dotted; animation: spin 17s linear infinite reverse; }

@keyframes spin { to { transform: rotate(360deg); } }

.br { transition: transform .3s cubic-bezier(.2, .9, .3, 1); }

.stage:hover .reticle { color: #ff6f60; }

.stage:hover .br-a { transform: translate(6px, 6px); }
.stage:hover .br-b { transform: translate(-6px, 6px); }
.stage:hover .br-c { transform: translate(-6px, -6px); }
.stage:hover .br-d { transform: translate(6px, -6px); }

.reticle-label {
  position: absolute;
  left: 50%;
  top: 64%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ff8577;
  background: rgba(18, 8, 7, .8);
  border: 1px solid rgba(255, 92, 78, .45);
  border-radius: 999px;
  padding: 3px 11px 3px 13px;
  opacity: 0;
  transition: opacity .22s;
}

.stage:hover .reticle-label { opacity: 1; }

.stage-caption {
  position: absolute;
  left: 20px;
  bottom: 16px;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .3);
}

/* ── after login ─────────────────────────────────────────────────────── */

.console { padding-block: clamp(20px, 3vw, 36px) clamp(48px, 7vw, 96px); }

.btn-sm { padding: 8px 16px; font-size: .86rem; }

/* ── sections under the panel ────────────────────────────────────────── */

.block { margin-top: clamp(36px, 5vw, 56px); }

.block h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }

.block-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.block-head h2 { margin-right: auto; }

.block-note {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 14px;
}

.cfg-list { display: grid; gap: 10px; }

.cfg {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cfg-main { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }

.cfg-ip {
  font-family: var(--font-mono);
  font-size: .95rem;
  letter-spacing: .06em;
}

.cfg-date {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

.cfg-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.steps {
  margin: 16px 0 0;
  padding-left: 22px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.steps li::marker { color: var(--green); }

.dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.dl-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 22px 20px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .18s, transform .16s, background .18s;
}

.dl-item:hover {
  border-color: var(--green-deep);
  background: linear-gradient(180deg, #232b2f, var(--panel));
  transform: translateY(-2px);
}

.dl-os {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: -.005em;
}

.dl-note {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── footer ──────────────────────────────────────────────────────────── */

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding-block: 40px 56px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: .88rem;
}

/* ── login dialog ────────────────────────────────────────────────────── */

dialog.login {
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text);
  width: min(430px, calc(100vw - 32px));
}

dialog.login::backdrop {
  background: rgba(6, 9, 10, .72);
  backdrop-filter: blur(6px);
}

.login-box {
  position: relative;
  background: linear-gradient(180deg, #1d2427, #171d20);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 28px 26px;
  box-shadow: 0 40px 90px -40px #000;
}

.login-box h2 { font-size: 1.5rem; }

.login-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: .95rem;
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.login-close:hover { color: var(--text); border-color: #3d4a4f; }

.field { display: block; margin-top: 22px; }

.field span {
  display: block;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 1.06rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.field input::placeholder { color: #4c585c; letter-spacing: .12em; }

.field input:focus {
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(106, 208, 47, .12);
}

.login-error {
  margin-top: 12px;
  color: #ff8a7a;
  font-size: .9rem;
}

.login-box .btn-wide { margin-top: 20px; }

/* ── narrow screens ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .stage { order: -1; max-width: 460px; margin-inline: auto; width: 100%; }
  .dl { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { padding-inline: 16px; font-size: 16px; }
  .top { padding-block: 16px; gap: 14px; }
  .brand-name { font-size: 1rem; }
  .btn { padding: 12px 18px; }
  .foot { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scan, .ring-outer, .ring-inner, .dot { animation: none; }
  * { transition-duration: .01ms !important; }
}
