/* OTAKU NOIR — core stylesheet */

:root {
  --bg: #07070a;
  --bg-panel: #101015;
  --bg-panel-2: #16161d;
  --fg: #e8e8ec;
  --fg-dim: #8a8a92;
  --fg-faint: #4a4a52;
  --accent: #ff2e3c;
  --accent-2: #00e0ff;
  --accent-3: #ffd23f;
  --border: #25252e;
  --grid: rgba(255, 46, 60, 0.06);
  --mono: "JetBrains Mono", "IBM Plex Mono", "Courier New", monospace;
  --jp: "Noto Sans JP", "Yu Gothic", "Hiragino Sans", sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

/* scanlines + grid overlay (fixed, non-interactive) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 3px
    );
  z-index: 9998;
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(circle at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 9997;
}

/* ─── nav ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.nav-brand .jp {
  font-family: var(--jp);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.3em;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--fg-dim);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color 0.18s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: var(--accent);
}

.nav-status {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.2em;
}

.nav-status .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 1.6s ease-in-out infinite;
  vertical-align: middle;
}

/* ─── main shell ─────────────────────────────────── */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px 96px;
  position: relative;
  z-index: 1;
}

.page-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.page-header .label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-header .sub {
  margin-top: 8px;
  color: var(--fg-dim);
  font-size: 13px;
  max-width: 680px;
}

/* corner-bracket frame */
.bracket {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.bracket::before,
.bracket::after,
.bracket > .corner-tl,
.bracket > .corner-br {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
}
.bracket::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.bracket::after  { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.bracket > .corner-tl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.bracket > .corner-br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* ─── boot screen / index ────────────────────────── */
.boot {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
}

.boot h1.title {
  font-size: clamp(56px, 10vw, 132px);
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 0.95;
  margin-bottom: 18px;
}

.boot .jp-mark {
  font-family: var(--jp);
  color: #ffffff;
  opacity: 0.72;
  letter-spacing: 0.45em;
  font-size: 16px;
  margin-bottom: 32px;
}

.boot .tagline {
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--fg-dim);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.boot .boot-intro {
  max-width: 60ch;
  margin: 0 auto 34px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-dim);
}
.boot .boot-intro::first-line { color: var(--fg); }

.boot .typing {
  font-size: 13px;
  color: #ffffff;
  opacity: 0;
  letter-spacing: 0.05em;
  margin-bottom: 36px;
  min-height: 1.5em;
  transition: opacity 0.3s ease;
}

.boot .typing.ready {
  opacity: 0.65;
}

.boot .typing::after {
  content: "▌";
  margin-left: 2px;
  color: #ffffff;
  animation: blink 0.9s steps(1) infinite;
}

.boot-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── buttons / chips ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #07070a;
}

.btn.ghost:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.chip {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  text-transform: uppercase;
  background: var(--bg-panel-2);
}

.chip.live { color: var(--accent); border-color: var(--accent); }
.chip.cyan { color: var(--accent-2); border-color: var(--accent-2); }
.chip.gold { color: var(--accent-3); border-color: var(--accent-3); }

/* ─── archive · transmission cards ───────────────── */
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.filter-label { color: var(--accent); }
.filter-count { color: var(--fg-faint); }

.tx-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.tx {
  background: #0a0a0a;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.tx:hover {
  border-color: var(--accent);
  transform: scale(1.012);
  box-shadow: 0 0 0 1px rgba(255, 46, 60, 0.18), 0 12px 32px rgba(0, 0, 0, 0.55);
}

.tx:hover .tx-preview { opacity: 1; }
.tx:hover .tx-thumb-pattern::after {
  animation: tx-flicker 0.18s steps(1) 1;
}

/* Thumbnail panel */
.tx-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #050507;
}

.tx-thumb-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.85;
}

/* CSS-only pattern fallback when no image is provided */
.tx-thumb-pattern {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 46, 60, 0.06), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.05), transparent 70%),
    var(--bg-panel-2);
}

.tx-thumb-pattern::before {
  content: attr(data-prefix);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 64px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
  letter-spacing: 0.15em;
}

.tx-thumb-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(255, 46, 60, 0.05) 2px,
    rgba(255, 46, 60, 0.05) 3px
  );
  opacity: 0;
}

.tx:hover .tx-thumb-pattern::after { opacity: 1; }

.tx-id-overlay {
  position: absolute;
  left: 12px;
  top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.75);
  padding: 3px 8px;
  border: 1px solid var(--accent);
  z-index: 2;
}

.tx-time {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-dim);
  background: rgba(0, 0, 0, 0.75);
  padding: 2px 6px;
  border: 1px solid var(--border);
  z-index: 2;
}

.tx-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.75));
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
  text-transform: uppercase;
}

/* Body */
.tx-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tx-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 4px;
}

.tx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.tx-label { color: var(--fg-faint); }

.tx-status[data-status="LIVE"] { color: var(--accent); }
.tx-status[data-status="RESTRICTED"] { color: var(--accent-3); }

.tx-bars {
  font-family: var(--mono);
  letter-spacing: 1px;
  color: var(--accent);
}

.tx-view {
  margin-top: 8px;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent-2);
  cursor: pointer;
  transition: color 0.15s;
}

.tx:hover .tx-view { color: var(--accent); }

/* Random surfaced badge */
.tx[data-surfaced="true"]::before {
  content: ">> SURFACED";
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--accent);
  color: #000;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  z-index: 3;
  font-weight: 700;
}

/* tx hover glitch line — single quick flicker */
@keyframes tx-flicker {
  0%, 100% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(2px); opacity: 0.6; }
}

/* ─── modal · transmission detail ────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  background: #0a0a0a;
  border: 1px solid var(--border);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 36px 36px;
  animation: fadeUp 0.25s ease both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  width: 32px;
  height: 32px;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.modal-id {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 8px;
}

.modal-panel h2 {
  font-size: 26px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--fg);
  text-transform: uppercase;
  padding: 16px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

.modal-meta strong {
  display: block;
  color: var(--fg-faint);
  font-size: 10px;
  letter-spacing: 0.28em;
  margin-bottom: 4px;
  font-weight: 400;
}

.modal-meta [data-status="LIVE"] { color: var(--accent); }
.modal-meta [data-status="RESTRICTED"] { color: var(--accent-3); }

.modal-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  overflow: hidden;
}

.modal-player::before {
  content: attr(data-prefix);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 96px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.04);
  letter-spacing: 0.15em;
}

.modal-player::after {
  content: ">> PILOT VIEW PENDING · SIGNAL DECODING";
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--fg-dim);
}

.modal-notes {
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg);
}

.modal-notes p { margin-bottom: 14px; }

.modal-flags {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--fg-faint);
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .modal-panel { padding: 26px 22px; }
  .modal-meta { grid-template-columns: 1fr; }
  .modal-panel h2 { font-size: 22px; }
}

/* ─── filters ────────────────────────────────────── */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.filters button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 6px 12px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}

.filters button:hover { color: var(--fg); border-color: var(--fg-dim); }
.filters button.on { color: var(--accent); border-color: var(--accent); }

/* ─── system status strip ────────────────────────── */
.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: -16px 0 32px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: uppercase;
}

.status-strip span {
  position: relative;
  padding-left: 14px;
}

.status-strip span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ─── broadcast page ─────────────────────────────── */
.broadcast-feature {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

@media (max-width: 800px) {
  .broadcast-feature { grid-template-columns: 1fr; }
}

.now-playing {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.now-playing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 46, 60, 0.08), transparent 60%);
  pointer-events: none;
}

.now-playing .label {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 8px;
}

.now-playing h2 {
  font-size: 28px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.now-playing .jp-sub {
  font-family: var(--jp);
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.15em;
}

.now-playing .desc {
  color: var(--fg-dim);
  font-size: 13px;
  margin-bottom: 20px;
  max-width: 640px;
}

.now-playing .progress {
  height: 3px;
  background: var(--bg-panel-2);
  position: relative;
  margin-bottom: 8px;
}
.now-playing .progress > div {
  position: absolute;
  inset: 0;
  width: 38%;
  background: var(--accent);
  animation: progress 30s linear infinite;
}
.now-playing .timecode {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.2em;
}

.schedule-list {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 20px;
}

.schedule-list h3 {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--fg-dim);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.schedule-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.schedule-item:last-child { border-bottom: none; }

.schedule-item .time {
  color: var(--accent-2);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.schedule-item .name {
  font-size: 13px;
  color: var(--fg);
}

.schedule-item .name small {
  display: block;
  color: var(--fg-faint);
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-top: 2px;
}

/* ─── broadcast video player + clickable transmission rows ── */
.bc-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
  margin: 8px 0 14px;
}
.schedule-item.bc-row { cursor: pointer; transition: background 0.15s, padding-left 0.15s; }
.schedule-item.bc-row:hover { background: var(--bg-panel-2); padding-left: 8px; }
.schedule-item.bc-row.on { padding-left: 8px; border-left: 2px solid var(--accent); }
.schedule-item.bc-row.on .name { color: var(--accent); }

/* ─── signal log / codex ─────────────────────────── */
.log-grid { display: flex; flex-direction: column; gap: 18px; }
.log-entry {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--edge, var(--accent));
  padding: 20px 22px;
}
.log-tag {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--edge, var(--accent)); margin-bottom: 8px;
}
.log-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.log-title .jp {
  font-family: var(--jp); font-weight: 700; font-size: 13px;
  color: var(--fg-dim); margin-right: 10px; letter-spacing: 0.04em;
}
.log-source {
  font-size: 11px; color: var(--fg-faint); letter-spacing: 0.06em;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--border);
}
.log-body p { color: var(--fg); margin-bottom: 10px; max-width: 74ch; }
.log-body p:last-child { margin-bottom: 0; }
.log-body em { color: var(--edge, var(--accent)); font-style: normal; }
.log-cta { margin-top: 6px; color: var(--fg-dim); }
.log-cta a { color: var(--edge, var(--accent)); text-decoration: none; font-weight: 700; }
.log-cta a:hover { text-decoration: underline; }
.log-foot-strip { margin-top: 28px; }

/* ─── archive modal video player ─────────────────── */
.modal-player.has-video {
  display: block;          /* not flex — let the video fill the box */
  aspect-ratio: auto;      /* video carries its own size */
  padding: 0;
  background: #000;
  border: none;
}
/* kill the "PILOT VIEW PENDING · SIGNAL DECODING" placeholder over real video */
.modal-player.has-video::before,
.modal-player.has-video::after { content: none; display: none; }
.archive-video {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid var(--border);
}

/* ─── field reports ──────────────────────────────── */
.report {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 22px 24px;
  margin-bottom: 16px;
  position: relative;
}

.report .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.report .location {
  font-family: var(--jp);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.15em;
}

.report .date {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.2em;
}

.report h3 {
  font-size: 18px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.report p {
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.7;
}

.report .coords {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 8px;
  font-size: 10px;
  background: var(--bg-panel-2);
  color: var(--accent-2);
  letter-spacing: 0.2em;
}

/* ─── projects ───────────────────────────────────── */
.project {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  transition: border-color 0.18s;
}

.project:hover { border-color: var(--accent); }

.project .body h3 {
  font-size: 22px;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.project .body .jp-sub {
  font-family: var(--jp);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 14px;
  letter-spacing: 0.15em;
}

.project .body p {
  color: var(--fg-dim);
  font-size: 13px;
  margin-bottom: 14px;
  max-width: 720px;
}

.project .body .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project .status {
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
  text-transform: uppercase;
}

.project .status .big {
  display: block;
  font-size: 32px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

@media (max-width: 700px) {
  .project { grid-template-columns: 1fr; }
  .project .status { text-align: left; }
}

/* ─── members lock screen ────────────────────────── */
.lock {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.lock .icon {
  font-size: 64px;
  color: var(--accent);
  margin-bottom: 24px;
  animation: flicker 2.4s infinite;
}

.lock h1 {
  font-size: 32px;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.lock .jp-sub {
  font-family: var(--jp);
  color: var(--accent);
  margin-bottom: 28px;
  letter-spacing: 0.4em;
}

.lock .panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 28px 32px;
  margin-top: 20px;
  max-width: 420px;
  width: 100%;
}

.lock .panel input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  margin-bottom: 14px;
  outline: none;
}
.lock .panel input:focus { border-color: var(--accent); }

.lock .err {
  margin-top: 10px;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  min-height: 1em;
}

/* ─── footer ─────────────────────────────────────── */
.foot {
  margin-top: 80px;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ─── glitch effect ──────────────────────────────── */
/* Solid white at idle. Pseudo-elements flicker brief horizontal
   slice shifts every 2–4s. No RGB separation, no constant motion. */
.glitch {
  position: relative;
  color: #ffffff;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: #ffffff;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.glitch::before {
  clip-path: inset(0 0 62% 0);
  animation: glitch-top 3.7s infinite steps(1, end);
}

.glitch::after {
  clip-path: inset(62% 0 0 0);
  animation: glitch-bottom 5.1s infinite steps(1, end);
}

/* ─── animations ─────────────────────────────────── */
@keyframes glitch-top {
  0%, 23%, 31%, 100% { transform: translate(0, 0); opacity: 0; }
  24% { transform: translate(-2px, 0); opacity: 0.85; }
  26% { transform: translate(2px, -1px); opacity: 0.85; }
  28% { transform: translate(-1px, 0); opacity: 0.85; }
  30% { transform: translate(1px, 1px); opacity: 0.85; }
}

@keyframes glitch-bottom {
  0%, 51%, 59%, 100% { transform: translate(0, 0); opacity: 0; }
  52% { transform: translate(2px, 0); opacity: 0.85; }
  54% { transform: translate(-2px, 1px); opacity: 0.85; }
  56% { transform: translate(1px, 0); opacity: 0.85; }
  58% { transform: translate(-1px, -1px); opacity: 0.85; }
}

@keyframes blink { 50% { opacity: 0; } }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 46, 60, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(255, 46, 60, 0); }
}

@keyframes flicker {
  0%, 100%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.4; }
}

@keyframes progress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeUp 0.5s ease both; }
.fade-in:nth-child(2) { animation-delay: 0.05s; }
.fade-in:nth-child(3) { animation-delay: 0.1s; }
.fade-in:nth-child(4) { animation-delay: 0.15s; }
.fade-in:nth-child(5) { animation-delay: 0.2s; }
.fade-in:nth-child(6) { animation-delay: 0.25s; }

/* ─── petals after dark (page-only theme) ────────── */
/* Subtle warmth, softer contrast, slower motion, less glitch. */
.page-petals {
  --accent: #ff5577;
  --accent-2: #f0a888;
  --bg: #0a0608;
  --bg-panel: #120c10;
  --bg-panel-2: #1a1217;
  --border: #2a2025;
  --grid: rgba(255, 85, 119, 0.05);
}

/* Less glitch — hide the slice pseudo-elements entirely */
.page-petals .glitch::before,
.page-petals .glitch::after {
  display: none;
}

/* More fade — soft reveal on the title */
.page-petals .page-header h1 {
  animation: fade-soft 1.2s ease both;
}

.page-petals .header-jp {
  font-family: var(--jp);
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.4em;
  margin-top: 6px;
  margin-bottom: 14px;
  opacity: 0.85;
}

/* Softer, slower entry cards */
.page-petals #petals .report {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 28px 32px;
  margin-bottom: 18px;
  animation: fade-soft 0.9s ease both;
  transition: border-color 0.5s ease;
}

.page-petals #petals .report:hover {
  border-left-color: var(--accent-2);
}

.page-petals #petals .report .head {
  margin-bottom: 12px;
}

.page-petals #petals .report .location {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--accent);
}

.page-petals #petals .report .jp-sub {
  font-family: var(--jp);
  color: var(--accent-2);
  font-size: 13px;
  margin: 0 0 12px;
  letter-spacing: 0.18em;
  opacity: 0.8;
}

.page-petals #petals .report p {
  line-height: 1.85;
}

/* Stagger the entry fade so the page exhales rather than bursts */
.page-petals #petals .report:nth-child(1) { animation-delay: 0.05s; }
.page-petals #petals .report:nth-child(2) { animation-delay: 0.18s; }
.page-petals #petals .report:nth-child(3) { animation-delay: 0.31s; }
.page-petals #petals .report:nth-child(4) { animation-delay: 0.44s; }
.page-petals #petals .report:nth-child(5) { animation-delay: 0.57s; }
.page-petals #petals .report:nth-child(6) { animation-delay: 0.70s; }
.page-petals #petals .report:nth-child(7) { animation-delay: 0.83s; }
.page-petals #petals .report:nth-child(8) { animation-delay: 0.96s; }
.page-petals #petals .report:nth-child(n+9) { animation-delay: 1.05s; }

@keyframes fade-soft {
  from { opacity: 0; transform: translateY(8px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ─── Pirate-network channel hub ──────────────────── */
.page-channel { --ch-accent: var(--accent); }
.channel-head { padding: 10px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.channel-freq { font-size: 12px; letter-spacing: 0.2em; color: var(--fg-dim); margin-bottom: 8px; }
.onair { color: var(--ch-accent); font-weight: 700; }
.channel-head h1 { color: #fff; }
.signal-bars { display: flex; gap: 4px; margin-top: 14px; height: 20px; align-items: flex-end; }
.signal-bars i { width: 6px; background: var(--ch-accent); opacity: 0.5; animation: sig 1.1s ease-in-out infinite; }
.signal-bars i:nth-child(1){height:40%;animation-delay:0s} .signal-bars i:nth-child(2){height:70%;animation-delay:.15s}
.signal-bars i:nth-child(3){height:100%;animation-delay:.3s} .signal-bars i:nth-child(4){height:55%;animation-delay:.45s}
.signal-bars i:nth-child(5){height:80%;animation-delay:.6s}
@keyframes sig { 0%,100%{opacity:.3;transform:scaleY(.6)} 50%{opacity:1;transform:scaleY(1)} }

.channel-band { margin-bottom: 34px; }
.band-label { display: flex; align-items: baseline; gap: 10px; font-size: 15px; font-weight: 700;
  letter-spacing: 0.14em; color: #fff; margin-bottom: 14px; text-transform: uppercase; }
.band-label-dark { color: var(--ch-accent); }
.band-note { font-size: 11px; font-weight: 400; letter-spacing: 0.1em; color: var(--fg-faint); text-transform: none; }

.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.ch-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease; }
.ch-card:hover { border-color: var(--ch-accent); transform: translateY(-2px); }
.ch-media { position: relative; aspect-ratio: 3 / 4; background: #000; overflow: hidden; }
.ch-media img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.ch-meta { padding: 10px 12px 12px; }
.ch-series { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ch-accent); }
.ch-meta h3 { margin: 3px 0 0; font-size: 14px; color: #fff; }

.ch-scramble-overlay { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; background: rgba(7,7,10,0.35); }
.ch-lock { font-size: 11px; letter-spacing: 0.18em; color: var(--ch-accent); font-weight: 700;
  text-shadow: 0 0 12px rgba(0,0,0,0.9); }
.btn-decrypt { background: var(--ch-accent); border-color: var(--ch-accent); color: #0a0608;
  font-weight: 700; font-size: 12px; padding: 7px 16px; }
.btn-decrypt:hover { filter: brightness(1.15); }
.ch-locked .ch-media img { filter: saturate(0.7); }

/* ─── Cinematic system-boot overlay ───────────────── */
.boot-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #050507;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 0.55s ease;
}
.boot-overlay.boot-out { opacity: 0; pointer-events: none; }
.boot-frame { width: 100%; height: 100%; object-fit: contain; }
.boot-tag {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em;
  color: var(--accent);
  animation: bootPulse 0.9s ease-in-out infinite;
}
@keyframes bootPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.boot-overlay::after {   /* faint CRT scanlines over the whole thing */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.28) 2px 3px);
  opacity: 0.5;
}
html.booting, html.booting body { overflow: hidden; }

/* ─── Patreon buttons (promo + login) ─────────────── */
.btn-patreon {
  background: #f96854;
  border-color: #f96854;
  color: #1a0f0d;
  font-weight: 700;
}
.btn-patreon:hover { background: #ff7d6b; border-color: #ff7d6b; }
.nav-patreon { margin-left: 12px; padding: 6px 12px; font-size: 12px; }

/* ─── Petals After Dark — video vault ─────────────── */
/* .lock sets display:flex, which overrides the [hidden] attribute's
   display:none — so `el.hidden = true` wouldn't actually hide the gate.
   This higher-specificity rule restores hiding (also fixes the members lock). */
.lock[hidden] { display: none !important; }

.petals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.petal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.petal-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.petal-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}
.petal-meta { padding: 12px 14px 14px; }
.petal-cat {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-3); margin-bottom: 4px;
}
.petal-title { font-size: 15px; margin: 0; color: #fff; }
.petal-note { font-size: 12px; color: var(--fg-dim); margin: 6px 0 0; }
.petals-empty {
  margin-top: 24px; padding: 22px; text-align: center;
  border: 1px dashed var(--border); border-radius: 6px;
  color: var(--fg-dim); font-size: 13px;
}
.petals-empty code { color: #fff; }

/* ─── responsive ─────────────────────────────────── */
@media (max-width: 720px) {
  .nav { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .nav-links { gap: 14px; font-size: 11px; }
  .shell { padding: 28px 18px 60px; }
  .page-header h1 { font-size: 28px; }
  .foot { flex-direction: column; gap: 8px; padding: 20px 18px; }
  .petals-grid { grid-template-columns: 1fr; }
}
