/* ==========================================================================
   AWOOGA — Berkeley Engineering memorial archive ("The Mothership")
   A time-periscope page: radio-room terminal, brass-framed Wayback viewer,
   chart-room directory. Reuses the shared system (.section, .on-navy, .card).
   ========================================================================== */

/* ---------- Hero: signal lost -------------------------------------------- */
.bk-hero {
  background:
    radial-gradient(1100px 500px at 50% -180px, rgba(29, 77, 120, 0.55), transparent 70%),
    var(--navy-900);
  color: var(--cream);
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
/* faint drifting radar rings behind the hero copy */
.bk-hero::before {
  content: "";
  position: absolute; inset: -40% -20%;
  background:
    repeating-radial-gradient(circle at 50% 30%,
      transparent 0 120px,
      rgba(247, 241, 227, 0.035) 120px 122px);
  pointer-events: none;
}
.bk-hero h1 { color: var(--cream); font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
.bk-hero h1 em { color: var(--brass-lt); font-style: italic; }
.bk-hero__eyebrow { color: var(--brass-lt); }
.bk-hero__lead { color: rgba(247, 241, 227, 0.85); margin-inline: auto; max-width: 70ch; }

/* ---------- Radio-room terminal ------------------------------------------ */
.bk-terminal {
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  max-width: 760px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #081724;
  border: 1px solid rgba(247, 241, 227, 0.14);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
.bk-terminal__bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  background: rgba(247, 241, 227, 0.06);
  border-bottom: 1px solid rgba(247, 241, 227, 0.1);
}
.bk-terminal__dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(247, 241, 227, 0.22); }
.bk-terminal__dot:first-child { background: var(--red); }
.bk-terminal__title {
  margin-left: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem; letter-spacing: 0.14em;
  color: rgba(247, 241, 227, 0.55);
}
.bk-terminal__status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem; letter-spacing: 0.14em; font-weight: 600;
  color: #e88;
}
.bk-blink {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(184, 71, 63, 0.9);
  animation: bk-blink 1.1s steps(2, start) infinite;
}
@keyframes bk-blink { to { visibility: hidden; } }
.bk-terminal__body {
  padding: 1.1rem 1.2rem 1.3rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(0.72rem, 1.7vw, 0.86rem);
  line-height: 1.9;
  color: #9fd8a8;
  text-align: left;
  min-height: 10.5em;
}
.bk-terminal__body p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.bk-terminal__body .bk-line--dim { color: rgba(159, 216, 168, 0.55); }
.bk-terminal__body .bk-line--alert { color: #e8a1a1; }
.bk-terminal__body .bk-line--gold { color: var(--brass-lt); }
.bk-caret {
  display: inline-block; width: 0.55em; height: 1em;
  background: #9fd8a8; vertical-align: text-bottom;
  animation: bk-blink 0.9s steps(2, start) infinite;
}

/* ---------- Loud disclaimer ---------------------------------------------- */
.bk-disclaimer {
  display: flex; gap: 1.4rem; align-items: flex-start;
  background: var(--surface);
  border: 2px solid var(--brass);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
  position: relative;
}
.bk-disclaimer::before {
  content: "NOT THE AWOOGA SITE BEYOND THIS POINT";
  position: absolute; top: -0.8em; left: 50%; transform: translateX(-50%);
  background: var(--brass); color: var(--navy-900);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em;
  padding: 0.25em 1em; border-radius: 999px; white-space: nowrap;
  max-width: calc(100% - 2rem); overflow: hidden; text-overflow: ellipsis;
}
.bk-disclaimer__flag { font-size: 2rem; line-height: 1; flex: none; margin-top: 0.2rem; }
.bk-disclaimer__body h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.bk-disclaimer__body ul { margin: 0 0 1em; padding-left: 1.1em; display: grid; gap: 0.55em; }
.bk-disclaimer__body li { color: var(--text-soft); }
.bk-disclaimer__body li strong { color: var(--text); }
.bk-disclaimer__ps { margin: 0; font-size: 0.92rem; color: var(--text-soft); font-style: italic; }
@media (max-width: 560px) {
  .bk-disclaimer { flex-direction: column; gap: 0.8rem; }
}

/* ---------- Periscope section --------------------------------------------- */
.bk-periscope-section {
  background:
    radial-gradient(900px 420px at 50% 0, rgba(29, 77, 120, 0.5), transparent 72%),
    var(--navy-900);
  color: var(--cream);
}
.bk-periscope-section .section-title { color: var(--cream); }
.bk-periscope-section .lead { color: rgba(247, 241, 227, 0.82); }
.bk-periscope-section .eyebrow { color: var(--brass-lt); }

/* Console housing */
.bk-console {
  margin-top: clamp(1.8rem, 3.5vw, 2.8rem);
  background: linear-gradient(180deg, var(--navy-800), #0a1c2e);
  border: 1px solid rgba(247, 241, 227, 0.16);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.4vw, 1.8rem);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(247, 241, 227, 0.08);
}

/* Controls row */
.bk-console__controls {
  display: flex; flex-wrap: wrap; gap: 1.2rem 2rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.bk-control { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.bk-control__label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--brass-lt);
}
.bk-years { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.bk-year {
  border: 1px solid rgba(247, 241, 227, 0.3);
  background: transparent;
  color: rgba(247, 241, 227, 0.85);
  font-size: 0.85rem; font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.bk-year:hover { transform: translateY(-1px); border-color: var(--brass-lt); color: var(--brass-lt); }
.bk-year.is-active {
  background: var(--brass); border-color: var(--brass);
  color: var(--navy-900);
  box-shadow: 0 6px 16px rgba(201, 162, 39, 0.4);
}
.bk-select {
  appearance: none;
  font: inherit; font-size: 0.92rem; font-weight: 500;
  color: var(--cream);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e3c35a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.9rem center,
    rgba(247, 241, 227, 0.08);
  border: 1px solid rgba(247, 241, 227, 0.3);
  border-radius: 12px;
  padding: 0.55rem 2.4rem 0.55rem 0.9rem;
  max-width: min(100%, 34rem);
  cursor: pointer;
}
.bk-select:focus-visible { outline: 2px solid var(--brass-lt); outline-offset: 2px; }
.bk-select option { color: var(--ink); background: var(--paper); }

/* Readout strip */
.bk-console__readout {
  display: flex; align-items: center; gap: 0.6rem;
  background: #06121e;
  border: 1px solid rgba(247, 241, 227, 0.12);
  border-radius: 12px;
  padding: 0.5rem 0.85rem;
  margin-bottom: 0.9rem;
  overflow: hidden;
}
.bk-readout__light {
  flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: #58c470;
  box-shadow: 0 0 8px rgba(88, 196, 112, 0.9);
  animation: bk-blink 1.6s steps(2, start) infinite;
}
.bk-readout__label {
  flex: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em;
  color: var(--brass-lt);
}
.bk-readout__url {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  color: rgba(247, 241, 227, 0.72);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}

/* Porthole viewer */
.bk-porthole {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  /* brass bezel */
  border: 6px solid var(--brass);
  box-shadow:
    0 0 0 1px rgba(12, 32, 52, 0.6),
    inset 0 0 0 1px rgba(12, 32, 52, 0.4),
    var(--shadow-lg);
  background: #fff;
}
.bk-porthole__frame {
  display: block; width: 100%;
  height: clamp(420px, 68vh, 720px);
  border: 0; background: #fff;
}
/* glass vignette — sits above the iframe but lets clicks through */
.bk-porthole__glass {
  position: absolute; inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(12, 32, 52, 0.18);
  border-radius: inherit;
}
/* tuning static, shown briefly while a new snapshot loads */
.bk-porthole__static {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background:
    repeating-linear-gradient(0deg, rgba(12, 32, 52, 0.12) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, rgba(247, 241, 227, 0.65), rgba(247, 241, 227, 0.85));
}
.bk-porthole__static::after {
  content: "⟳ retuning the periscope…";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85rem; letter-spacing: 0.12em;
  color: var(--navy-800);
}
.bk-console.is-tuning .bk-porthole__static { opacity: 1; }

/* Console actions */
.bk-console__actions { margin-top: 1rem; }
.bk-console__hint {
  font-size: 0.85rem; color: rgba(247, 241, 227, 0.65);
  margin: 0 0 0.7rem;
}
.bk-console__buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Chart room ---------------------------------------------------- */
.bk-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}
.bk-chart {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.bk-chart:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.bk-chart__icon { font-size: 1.7rem; line-height: 1; margin-bottom: 0.4rem; }
.bk-chart h3 { font-size: 1.18rem; margin: 0 0 0.2rem; }
.bk-chart p { margin: 0; color: var(--text-soft); font-size: 0.93rem; flex: 1; }
.bk-chart p a { color: var(--red); font-weight: 600; }
.bk-chart__badge {
  position: absolute; top: -0.75em; right: 1rem;
  background: var(--brass); color: var(--navy-900);
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.3em 0.9em; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.bk-chart__badge--caution { background: var(--red); color: #fff; }
.bk-chart--star { border: 2px solid var(--brass); }
.bk-chart--caution { border: 2px dashed rgba(184, 71, 63, 0.55); }
.bk-chart__actions {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  margin-top: 0.9rem; padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
  font-size: 0.86rem;
}
.bk-chart__load {
  background: none; border: 0; padding: 0;
  color: var(--red); font-weight: 700; font-size: 0.86rem;
  transition: color 0.2s;
}
.bk-chart__load:hover { color: var(--red-dk); text-decoration: underline; }
.bk-chart__actions > a { color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.bk-chart__actions > a:hover { color: var(--navy-800); text-decoration: underline; }

/* ---------- Why section ---------------------------------------------------- */
.bk-why__cols {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 1.6rem;
}
.bk-why__cols p { color: rgba(247, 241, 227, 0.85); }
.bk-why__cols a { color: var(--brass-lt); }
.bk-why__cols a:hover { text-decoration: underline; }
@media (max-width: 760px) { .bk-why__cols { grid-template-columns: 1fr; } }

/* ---------- SOS card -------------------------------------------------------- */
.bk-sos {
  display: flex; align-items: center; gap: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--brass);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.bk-sos__emoji { font-size: 2.2rem; line-height: 1; flex: none; }
.bk-sos__body { flex: 1; }
.bk-sos__body h3 { margin-bottom: 0.3rem; }
.bk-sos__body p { margin: 0; color: var(--text-soft); }
.bk-sos .btn { flex: none; }
.bk-sos--plans { border-left-color: var(--red); }
@media (max-width: 760px) {
  .bk-sos { flex-direction: column; align-items: flex-start; }
}

/* ---------- Next links (mirrors lineage.css) ------------------------------- */
.next-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.next-link { padding: 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.3rem; }
.next-link h3 { font-size: 1.15rem; margin: 0; }
.next-link p { margin: 0; color: var(--text-soft); font-size: 0.92rem; }
.next-link .xcard__arrow { color: var(--red); font-weight: 700; font-size: 0.9rem; margin-top: 0.6rem; }

/* ---------- Reduced motion -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bk-blink, .bk-readout__light, .bk-caret { animation: none; }
  .bk-porthole__static { transition: none; }
}
