/* hub.garryhall.me — page-specific styles.
   Everything reusable (base, .card, .btn, .tag, header/footer, scrollbars)
   lives in app.css. This file only adds what the directory listing and
   boot sequence need on top of that. */

/* reserve the status-bar's footprint from first paint so its fade-in
   never causes a reflow */
body {
  padding-bottom: 24px;
}

/* ── header mark ── */

.mark {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
}

/* ── header title ──
   app.css's h1 letter-spacing (0.55em) is wide by design, but that means
   the full "GARRYHALL // DIRECTORY" string needs ~24px+ just to avoid
   clipping — well above what fits one line on a 360px screen. Rather
   than shrink the type past legibility to force one line, break it at a
   fixed point ("GARRYHALL //" / "DIRECTORY") so it never wraps
   unpredictably, and scale each line down together on narrow viewports.
   letter-spacing/text-indent/color/glow are inherited from app.css
   unchanged — only font-size is overridden here. */
.app-header h1 {
  font-size: clamp(1rem, 5.6vw, 26px);
}

.app-header h1 .title-line {
  display: block;
  white-space: nowrap;
}

/* ── boot overlay ── */

#boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.35s ease;
}

#boot-overlay.is-collapsed {
  opacity: 0;
  pointer-events: none;
}

.boot-log-wrap {
  width: 100%;
  max-width: 460px;
}

.boot-log {
  font-size: 13px;
  line-height: 1.8;
}

.boot-log .line {
  display: flex;
  gap: 10px;
  color: var(--ink-dim);
  white-space: pre;
}

.boot-log .line.is-indent {
  padding-left: 1.5em;
}

.boot-log .line .path {
  flex: 1;
}

.boot-log .line .status {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  opacity: 0;
  transition: opacity 0.15s;
}

.boot-log .line .status.is-shown {
  opacity: 1;
}

.boot-log .line.is-ready .path {
  color: var(--ink);
}

.boot-cursor {
  display: inline-block;
  width: 0.55em;
  margin-left: 2px;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  animation: caretBlink 0.9s step-end infinite;
}

.boot-hint {
  margin-top: 18px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(125, 138, 165, 0.5);
  text-align: center;
}

@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── ambient status bar ── */

#status-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(10, 14, 23, 0.85);
  border-top: 1px solid rgba(0, 240, 255, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#status-bar.is-active {
  opacity: 1;
}

.status-track {
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(125, 138, 165, 0.55);
  padding-left: 100%;
  animation: statusScroll 26s linear infinite;
}

.status-track.is-static {
  padding-left: 12px;
  animation: none;
}

@keyframes statusScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ── directory listing ── */

.dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dir-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  column-gap: 14px;
  padding: 13px 12px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
  text-decoration: none;
  color: var(--ink);
  border-radius: 8px;
  transition: background 0.15s, box-shadow 0.15s;
}

.dir-list li:last-child .dir-row {
  border-bottom: none;
}

.dir-row-root {
  margin-top: 6px;
  border-top: 1px solid rgba(0, 240, 255, 0.16);
  padding-top: 16px;
}

.dir-row:hover,
.dir-row:focus-visible {
  background: rgba(0, 240, 255, 0.05);
  outline: none;
}

.dir-row:focus-visible {
  box-shadow: var(--glow-cyan);
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

/* left zone: name, tag, description — wraps freely at full column width
   and never affects the badge column's position */
.row-main {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
  min-width: 0;
}

.row-name {
  flex: 0 0 auto;
  min-width: 116px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.tag {
  flex-shrink: 0;
}

.caret {
  display: inline-block;
  width: 0.7em;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  opacity: 0;
  transition: opacity 0.1s;
}

.dir-row:hover .caret,
.dir-row:focus-visible .caret {
  opacity: 1;
}

.row-desc-wrap {
  flex: 1 1 170px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-dim);
}

/* right zone: status badge (+ meta, on wider viewports) — pinned to a
   fixed grid column and top-aligned, so it never drifts regardless of
   how many lines the description in the left zone wraps to */
.row-side {
  grid-column: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.row-meta {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  font-size: 10.5px;
  color: var(--ink-dim);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-live {
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 0.15em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
  white-space: nowrap;
}

/* new tag-cat variants, consistent with app.css's existing convention */
.tag-cat-reference { color: var(--ink-dim); border-color: rgba(125, 138, 165, 0.4); }
.tag-cat-audio { color: var(--magenta); border-color: rgba(255, 45, 149, 0.35); }
.tag-cat-finance { color: var(--cyan); border-color: rgba(0, 240, 255, 0.35); }
.tag-cat-root { color: var(--ink-dim); border-color: rgba(125, 138, 165, 0.4); }

/* narrow viewports: drop size/date, keep name/tag/description/status.
   The left/right zone split above already keeps the badge pinned no
   matter how tall the left zone gets, at every width — this only needs
   to drop the meta text and shrink the row's outer spacing. */
@media (max-width: 560px) {
  .row-meta {
    display: none;
  }

  .dir-row {
    column-gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #boot-overlay {
    display: none;
    transition: none;
  }
  .boot-cursor {
    animation: none;
  }
  .status-track {
    animation: none;
  }
  #status-bar {
    transition: none;
  }
}
