/* SCOWNA Bridge Console — light techy marketing shell (Idea A mock) */

:root {
  /* Soft steel — techy, not paper-white */
  --bg-deep: #1a222c;
  --bg-panel: rgba(36, 46, 58, 0.88);
  --bg-rail: rgba(32, 41, 52, 0.94);
  --ink: #d7dde6;
  --ink-muted: #8b97a8;
  --line: rgba(180, 198, 214, 0.12);
  --line-strong: rgba(180, 198, 214, 0.22);
  --gold: #c5a059;
  --gold-soft: rgba(197, 160, 89, 0.4);
  --slate: #e8eef4;
  --silver: #9aa6b5;
  --accent: #7aa3c4;
  --accent-soft: rgba(122, 163, 196, 0.14);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --radius: 4px;
  --font-display: "Exo 2", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --rail-w: min(280px, 22vw);
  --top-h: 72px;
  --bottom-h: 40px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg-deep);
}

/* Soft steel field — muted, not bright white */
.space-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 35%, rgba(70, 92, 118, 0.28), transparent 65%),
    radial-gradient(ellipse 45% 40% at 12% 85%, rgba(197, 160, 89, 0.07), transparent 50%),
    radial-gradient(ellipse 40% 45% at 88% 15%, rgba(80, 120, 155, 0.12), transparent 55%),
    linear-gradient(165deg, #222c38 0%, #1a222c 45%, #151c26 100%);
}

.space-field::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(220, 230, 240, 0.45), transparent),
    radial-gradient(1px 1px at 28% 62%, rgba(220, 230, 240, 0.28), transparent),
    radial-gradient(1.5px 1.5px at 44% 28%, rgba(197, 160, 89, 0.55), transparent),
    radial-gradient(1px 1px at 61% 74%, rgba(220, 230, 240, 0.32), transparent),
    radial-gradient(1px 1px at 78% 22%, rgba(220, 230, 240, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 91% 58%, rgba(122, 163, 196, 0.45), transparent),
    radial-gradient(1px 1px at 8% 88%, rgba(220, 230, 240, 0.22), transparent),
    radial-gradient(1px 1px at 52% 48%, rgba(220, 230, 240, 0.2), transparent);
  animation: drift 48s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-2%, -1.5%, 0); }
}

/* Five-panel grid — fills viewport, no page scroll */
.bridge {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 12px;
  gap: 8px;
  grid-template-columns: var(--rail-w) 1fr var(--rail-w);
  grid-template-rows: var(--top-h) 1fr var(--bottom-h);
  grid-template-areas:
    "top top top"
    "left center right"
    "bottom bottom bottom";
}

.bridge-top {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  /* Logo art sits on black — soften into light chrome */
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--gold-soft), 0 4px 16px rgba(26, 35, 48, 0.12);
}

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: var(--slate);
}

.brand-tag {
  margin: 2px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.top-meta {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.meta-chip {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-soft);
  color: #e8e0cc;
  background: rgba(197, 160, 89, 0.12);
}

.meta-chip--soft {
  border-color: var(--line);
  background: var(--accent-soft);
  color: var(--ink-muted);
}

/* Rails */
.rail {
  display: flex;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-rail);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rail--left {
  grid-area: left;
  flex-direction: row;
}

.rail--right {
  grid-area: right;
  flex-direction: row-reverse;
}

.rail-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 6px;
  border-color: var(--line);
  background: rgba(12, 16, 22, 0.35);
}

.rail--left .rail-tabs {
  border-right: 1px solid var(--line);
}

.rail--right .rail-tabs {
  border-left: 1px solid var(--line);
}

.rail-tab {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  min-height: 88px;
  padding: 10px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.rail-tab:hover {
  color: var(--ink);
  background: rgba(70, 88, 108, 0.35);
}

.rail-tab.is-active {
  color: var(--slate);
  border-color: var(--gold);
  background: rgba(48, 58, 72, 0.95);
  box-shadow: 0 0 0 1px var(--gold-soft), 0 2px 10px rgba(197, 160, 89, 0.22);
}

.rail-body {
  flex: 1;
  min-width: 0;
  padding: 16px 14px;
  overflow: auto;
}

.rail-panel[hidden] {
  display: none;
}

.rail-heading {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
}

.rail-copy {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.rail-copy--tight {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 0.78rem;
}

.rail-subhead {
  margin: 16px 0 8px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.rail-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink);
}

.rail-list--stations {
  list-style: none;
  padding: 0;
}

.rail-list--stations li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.rail-action {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #d4b56e 0%, var(--gold) 100%);
  color: var(--slate);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.25);
}

.rail-mail {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.rail-mail:hover {
  text-decoration: underline;
  color: var(--ink);
}

.rail-action:hover {
  filter: brightness(1.04);
}

.rail-action--ghost {
  background: rgba(48, 58, 72, 0.9);
  box-shadow: none;
  border-color: var(--line-strong);
  color: var(--ink);
}

/* Center viewport */
.bridge-center {
  grid-area: center;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.viewport-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: #0e1520;
  box-shadow: inset 0 0 0 1px rgba(197, 160, 89, 0.15);
}

.viewport-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(61, 106, 143, 0.35), transparent 65%),
    linear-gradient(180deg, #152030 0%, #0a1018 100%);
}

.placeholder-stars {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 65% 25%, #fff, transparent),
    radial-gradient(1px 1px at 80% 60%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(197, 160, 89, 0.8), transparent),
    radial-gradient(1px 1px at 55% 80%, #fff, transparent);
  animation: pulse-stars 6s ease-in-out infinite alternate;
}

@keyframes pulse-stars {
  from { opacity: 0.45; }
  to { opacity: 0.85; }
}

.play-btn {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  color: #f2f5f8;
  cursor: pointer;
}

.play-btn__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(197, 160, 89, 0.85);
  background: rgba(14, 21, 32, 0.55);
  box-shadow: 0 0 0 6px rgba(197, 160, 89, 0.12), 0 8px 28px rgba(0, 0, 0, 0.35);
  position: relative;
}

.play-btn__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #f5edd8;
}

.play-btn:hover .play-btn__icon {
  border-color: #e0c48a;
  box-shadow: 0 0 0 8px rgba(197, 160, 89, 0.18), 0 10px 32px rgba(0, 0, 0, 0.4);
}

.play-btn__label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.placeholder-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(242, 245, 248, 0.55);
}

.promo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Bottom — sim-style link + TBA commission */
.bridge-bottom {
  grid-area: bottom;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  min-height: var(--bottom-h);
}

.bottom-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.02em;
}

.conn-status-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.2rem 2.35rem 0.2rem 0.5rem;
  min-width: 6.5rem;
  font-family: Consolas, "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(144, 202, 249, 0.9);
  border: 1px solid rgba(100, 181, 246, 0.28);
  border-radius: var(--radius);
  background: rgba(100, 181, 246, 0.08);
}

.conn-heartbeat-ecg {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 18px;
  opacity: 0;
  pointer-events: none;
  color: rgba(100, 181, 246, 0.95);
}

.conn-status-wrap.conn-heartbeat-active .conn-heartbeat-ecg {
  animation: conn-ecg-pulse 0.4s ease-out forwards;
}

.conn-heartbeat-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.conn-status-wrap.conn-heartbeat-active .conn-heartbeat-path {
  animation: conn-ecg-draw 0.35s ease-out forwards;
}

@keyframes conn-ecg-pulse {
  0% { opacity: 0; transform: translateY(-50%) scaleX(0.8); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-50%) scaleX(1); }
}

@keyframes conn-ecg-draw {
  to { stroke-dashoffset: 0; }
}

.bottom-vessel {
  font-family: Consolas, "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(200, 210, 230, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-center {
  text-align: center;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.bottom-right {
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Narrow / short viewports: keep one screen, tighten rails */
@media (max-width: 1100px) {
  :root {
    --rail-w: min(220px, 26vw);
  }

  .top-meta {
    display: none;
  }

  .brand-tag {
    display: none;
  }
}

@media (max-width: 780px) {
  .bridge {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "top"
      "center"
      "left"
      "right"
      "bottom";
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  html,
  body {
    overflow: auto;
  }

  .rail--left,
  .rail--right {
    flex-direction: column;
    max-height: 200px;
  }

  .rail-tabs {
    flex-direction: row;
    border: none;
    border-bottom: 1px solid var(--line);
  }

  .rail--left .rail-tabs,
  .rail--right .rail-tabs {
    border-left: none;
    border-right: none;
  }

  .rail-tab {
    writing-mode: horizontal-tb;
    transform: none;
    min-height: 0;
    flex: 1;
  }

  .bridge-center {
    min-height: 42vh;
  }
}
