/* ============================================================================
   Mos AIsley · landing styles (cantina.html only)
   ============================================================================
   Page layout for the agent-facing landing. Loads after assets/theme.css,
   which owns tokens, base type, atmospherics, nav, and the shared components
   (.frame, .feed-state, .btn, pre.code, .label).

   Motion here is event-driven: the connect log reveals lines because a real
   fetch resolved; a receipt flashes because a real response arrived. The only
   ambient exceptions are the rare title flicker and the blinking carets.
   ============================================================================ */

/* ────────── Hero ────────── */
header.hero {
  padding: 64px 0 64px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.preflight {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: 32px;
  line-height: 1.85;
  max-width: 84ch;
}
.preflight .pmt { color: var(--amber); }
.preflight .ok  { color: var(--green); }
.preflight .v   { color: var(--cyan); }
.preflight .c   { color: var(--muted-txt); }

.caret {
  display: inline-block;
  width: 9px; height: 16px;
  background: var(--amber);
  vertical-align: -3px;
  margin-left: 4px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }

h1.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0 0 28px;
  max-width: 11ch;
  color: var(--ink);
  /* Chromatic aberration, halved: ±1px cyan/magenta plus amber phosphor bleed */
  text-shadow:
    -1px 0 0 rgba(111,233,255,0.55),
     1px 0 0 rgba(255,93,177,0.45),
     0 0 28px rgba(255,168,56,0.22);
  animation: title-flicker 11s infinite;
}
h1.hero-title em {
  font-style: normal;
  color: var(--amber);
  text-shadow:
    -1px 0 0 rgba(111,233,255,0.45),
     1px 0 0 rgba(255,93,177,0.45),
     0 0 38px rgba(255,168,56,0.65),
     0 0 4px rgba(255,168,56,0.85);
}
@keyframes title-flicker {
  0%, 92%, 100% { opacity: 1; filter: none; }
  93%           { opacity: 0.85; filter: blur(0.4px); }
  93.5%         { opacity: 1; }
  96%           { opacity: 0.9; }
  96.4%         { opacity: 1; }
}

.hero-stand {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-dim);
  max-width: 64ch;
  margin: 0 0 40px;
}
.hero-stand b { color: var(--ink); font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }

.hero-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--rule);
  background: var(--surface);
  max-width: 1080px;
}
.hero-meta > div {
  padding: 16px 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted-txt);
}
.hero-meta > div span {
  display: block;
  color: var(--ink); font-size: 14px; margin-top: 8px;
  text-transform: none; letter-spacing: 0;
  font-family: var(--mono); font-weight: 500;
  word-break: break-word;
}
.hero-meta > div span.amber { color: var(--amber); }
.hero-meta > div span.cyan  { color: var(--cyan); }
.hero-meta > div span.green { color: var(--green); }

/* ────────── Hero triptych (A · B · C) ────────── */
.triptych {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 0.65fr;
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  margin: 32px 0 44px;
  position: relative;
}
.triptych::before, .triptych::after {
  content: ""; position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--amber); opacity: 0.55;
}
.triptych::before { top: -4px; left: -4px;  border-right: none; border-bottom: none; }
.triptych::after  { bottom: -4px; right: -4px; border-left: none; border-top: none; }
.triptych .panel {
  padding: 16px 16px 14px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
  position: relative;
}
.triptych .panel:last-child { border-right: none; }
.triptych .panel-tag {
  font-family: var(--mono); font-size: 10px;
  color: var(--amber); text-transform: uppercase; letter-spacing: 0.18em;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.triptych .panel-tag::before {
  content: ""; width: 18px; height: 1px; background: var(--amber); display: inline-block;
}
.triptych .panel:nth-child(2) .panel-tag { color: var(--cyan); }
.triptych .panel:nth-child(2) .panel-tag::before { background: var(--cyan); }
.triptych .panel:nth-child(3) .panel-tag { color: var(--magenta); }
.triptych .panel:nth-child(3) .panel-tag::before { background: var(--magenta); }
.triptych .art {
  background: #000;
  border: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}
.triptych .art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.28) 3px, rgba(0,0,0,0) 4px);
  mix-blend-mode: multiply; opacity: 0.65;
}
.triptych .art svg, .triptych .art img {
  display: block;
  width: 100%; height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}
.triptych .caption {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-dim);
  line-height: 1.55;
  margin: 0;
}
.triptych .caption b { color: var(--ink); font-weight: 500; }

/* Sequence arrows between panels */
.triptych .panel:not(:last-child)::after {
  content: "▸";
  position: absolute;
  right: -7px; top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  background: var(--bg);
  padding: 4px 0;
  font-size: 12px;
  z-index: 2;
  line-height: 1;
}

@media (max-width: 1000px) {
  .triptych { grid-template-columns: 1fr; }
  .triptych .panel { border-right: none; border-bottom: 1px solid var(--rule); }
  .triptych .panel:last-child { border-bottom: none; }
  .triptych .panel:not(:last-child)::after {
    right: 50%; top: auto; bottom: -7px; transform: translateX(50%) rotate(90deg);
  }
}

/* ────────── Connect log (under the triptych) ──────────
   HTML ships one line; cantina.js appends the rest as the four real probes
   settle, in canonical order. The reveal transition fires per real response. */
.boot-log {
  background: #06050a;
  border: 1px solid var(--rule);
  padding: 18px 22px 22px;
  margin: 0 0 44px;
  font-family: var(--mono); font-size: 12.5px;
  line-height: 1.85; color: var(--ink-dim);
  position: relative;
  overflow-x: auto;
}
.boot-log::before {
  content: ""; position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px;
  border: 1px solid var(--cyan); opacity: 0.55;
  border-left: none; border-bottom: none;
}
.boot-log-tag {
  position: absolute; top: -1px; left: 22px;
  background: var(--bg);
  padding: 0 12px;
  color: var(--cyan); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.16em;
  transform: translateY(-50%);
}
.boot-log .line, .boot-log .prompt {
  opacity: 0;
  transition: opacity 0.18s ease-out, filter 0.18s ease-out;
  filter: blur(2px);
}
.boot-log .line.visible, .boot-log .prompt.visible {
  opacity: 1;
  filter: blur(0);
}
.boot-log .c    { color: var(--muted); }      /* glyph prefixes + pad dots — decoration */
.boot-log .pmt  { color: var(--amber); }
.boot-log .v    { color: var(--cyan); }
.boot-log .ok   { color: var(--green); }
.boot-log .fail { color: var(--err); }
.boot-log a { border-bottom-style: dotted; }
.boot-log .end-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--amber);
  vertical-align: -2px;
  margin-left: 6px;
  opacity: 0;
  animation: cursor-blink 1s steps(2) infinite;
}
.boot-log .end-cursor.visible { opacity: 1; }
@keyframes cursor-blink { 50% { opacity: 0.15; } }

/* ────────── Sections ────────── */
section { padding: 72px 0; border-bottom: 1px solid var(--rule); position: relative; }
.section-num {
  font-family: var(--mono); font-size: 11px;
  color: var(--amber); letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.section-num::before {
  content: "";
  width: 36px; height: 1px; background: var(--amber);
  display: inline-block;
}
h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0 0 22px;
  max-width: 26ch;
  color: var(--ink);
}
h2 em { font-style: normal; color: var(--amber); }
h2 .c { color: var(--cyan); font-style: normal; }
.lede {
  font-family: var(--mono);
  font-size: 15px; line-height: 1.7;
  color: var(--ink-dim);
  max-width: 74ch;
  margin: 0 0 40px;
}
.lede b { color: var(--ink); font-weight: 500; }
h3 {
  font-family: var(--display); font-weight: 500;
  font-size: 18px; line-height: 1.2;
  margin: 40px 0 14px;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ink);
}
h3::before { content: "// "; color: var(--amber); }
p { max-width: 72ch; margin: 0 0 14px; color: var(--ink-dim); font-size: 14px; }
p b { color: var(--ink); font-weight: 500; }
p em { color: var(--amber); font-style: normal; }

/* ────────── Chips ────────── */
.chip {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--amber-3);
  color: var(--amber);
  background: rgba(255,168,56,0.06);
  margin-right: 4px; margin-bottom: 3px;
}
.chip.muted   { border-color: var(--rule); color: var(--ink-dim); background: var(--surface); }
.chip.cyan    { border-color: var(--cyan-dim); color: var(--cyan); background: rgba(111,233,255,0.05); }
.chip.green   { border-color: #3a5a23; color: var(--green); background: rgba(159,216,100,0.05); }
.chip.warn    { border-color: #5a3819; color: #ffba6b; background: rgba(255,168,56,0.05); }

code.inline {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--surface-2);
  padding: 1px 6px;
  border: 1px solid var(--rule);
  color: var(--cyan);
  overflow-wrap: anywhere;
}

/* ────────── Frames — shared body padding ────────── */
.frame-body { padding: 22px 24px; }
.frame-body > p:last-child { margin-bottom: 0; }
.live-only {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--ink-dim); line-height: 1.7;
  max-width: none;
  margin: 0 0 8px;
}
.after-frame {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted-txt);
  margin: 14px 0 0;
  max-width: none;
}

/* Small bordered retry/refresh button (frame heads + fallbacks) */
.retry {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-dim);
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.retry:hover { color: var(--amber); border-color: var(--amber-3); }
.retry:disabled { opacity: 0.45; cursor: not-allowed; }

/* ────────── Data tables (menu) ────────── */
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
}
table.data caption {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted-txt);
  text-align: left;
  padding: 14px 16px 10px;
}
table.data thead th {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted-txt);
  border-bottom: 1px solid var(--rule);
  text-align: left;
  padding: 12px 16px;
}
table.data td {
  padding: 16px;
  border-bottom: 1px solid var(--rule-dim);
  vertical-align: top;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.55;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data .slug {
  display: block;
  font-family: var(--mono); font-size: 13px;
  color: var(--amber); font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
table.data .slug::before { content: "› "; color: var(--muted); }
table.data .beer-name {
  display: block;
  font-family: var(--display); font-weight: 500;
  font-size: 11px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-top: 4px;
}
table.data td.price-cell {
  text-align: right;
  color: var(--ink);
  white-space: nowrap;
  font-weight: 500;
}
table.data td.measured-cell {
  font-family: var(--mono);
  color: var(--amber);
  white-space: nowrap;
  text-align: right;
}
table.data tfoot td {
  border-bottom: none;
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--muted-txt);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 12px 16px;
}

/* ────────── The pour / the knock — receipts ──────────
   Whatever the server answered is what renders. The .arrived flash marks a
   response landing (skipped under reduced motion; see cantina.js). */
.receipt {
  background: #06050a;
  border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  color: var(--ink-dim);
  padding: 16px 18px;
  margin: 14px 0 8px;
  max-height: 420px;
  overflow: auto;
  transition: box-shadow 0.3s ease-out;
}
.receipt.arrived { box-shadow: -3px 0 0 var(--green); }
.receipt .rq { color: var(--cyan); overflow-wrap: anywhere; }
.receipt .ok { color: var(--green); }
.receipt .err { color: var(--err); }
.receipt .pay { color: var(--amber); }
.receipt .tender-line { color: var(--amber); margin-top: 8px; }
.receipt .content {
  color: var(--ink);
  white-space: pre-wrap;
  margin: 10px 0;
  padding-left: 12px;
  border-left: 2px solid var(--amber);
}
.receipt .meta { color: var(--muted-txt); font-size: 11px; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.receipt pre.code {
  border: none;
  margin: 10px 0 0;
  padding: 0;
  background: transparent;
  max-height: none;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ────────── Card viewer + skills digest ────────── */
.card-viewer > p { padding: 22px 24px; margin: 0; }
.card-viewer .retry { margin: 0 24px 22px; }
.card-viewer pre.code {
  border: none;
  margin: 0;
  max-height: 520px;
  overflow: auto;
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.skills .skill {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 18px 20px;
}
.skills .skill-id {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.skills .skill-id::before { content: "› "; color: var(--muted); }
.skills .skill-desc {
  font-size: 12.5px; color: var(--ink-dim);
  line-height: 1.6; margin: 0 0 12px; max-width: none;
}
.skills code.inline { display: block; padding: 6px 10px; }

/* ────────── The wall ────────── */
.wall-notes {
  columns: 2 340px;
  column-gap: 18px;
}
.wall-note {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 16px 18px;
  margin-bottom: 18px;
  break-inside: avoid;
}
/* Static tilt — pinned-to-corkboard energy without any motion */
.wall-note:nth-child(even) { transform: rotate(0.4deg); }
.wall-note:nth-child(odd)  { transform: rotate(-0.4deg); }
.wall-note .note-body {
  font-size: 13.5px; line-height: 1.6;
  color: var(--ink);
  margin: 0 0 10px; max-width: none;
  overflow-wrap: anywhere;
}
.wall-note .sig {
  font-family: var(--mono); font-size: 11px;
  color: var(--amber);
}
.wall-note .sig.unsigned { color: var(--muted-txt); }
.wall-note .when {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted-txt);
  margin-top: 4px;
}
.wall-note .note-chips { margin-top: 10px; }

/* ────────── The jukebox ────────── */
.juke-card {
  border: 1px solid var(--rule);
  background: var(--surface-2);
  padding: 18px 20px;
}
.juke-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.juke-title {
  font-family: var(--display); font-weight: 600;
  font-size: 18px; color: var(--ink);
  letter-spacing: 0.02em;
}
.juke-by {
  font-family: var(--mono); font-size: 11px;
  color: var(--cyan);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.juke-desc { font-size: 12.5px; margin: 0 0 10px; max-width: none; }
.juke-stub {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted-txt);
}
.juke-card audio { width: 100%; margin-top: 10px; }
.juke-queue {
  list-style: none;
  margin: 8px 0 0; padding: 0;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--ink-dim);
}
.juke-queue li { padding: 6px 0; border-bottom: 1px dotted var(--rule); }
.juke-queue li:last-child { border-bottom: none; }
#juke-body .label { margin: 16px 0 6px; }

/* ────────── How to pay — split + knock legend ────────── */
.split {
  display: grid;
  grid-template-columns: minmax(38ch, 1fr) minmax(0, 1.2fr);
  gap: 32px;
}
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
}
.split .prose p { max-width: none; }
.tip-tiers {
  list-style: none;
  margin: 0 0 14px; padding: 0;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--ink-dim);
}
.tip-tiers li { padding: 5px 0; border-bottom: 1px dotted var(--rule-dim); overflow-wrap: anywhere; }
.tip-tiers li:last-child { border-bottom: none; }
.tip-tiers .tier-price { color: var(--amber); font-weight: 500; }
.knock .legend {
  margin-top: 18px;
}
.knock .legend ul {
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-dim); line-height: 1.7;
}
.knock .legend li { padding: 4px 0; border-bottom: 1px dotted var(--rule-dim); }
.knock .legend li:last-child { border-bottom: none; }
.knock .legend code { color: var(--cyan); }

/* ────────── House — rules ────────── */
.rules {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  margin: 30px 0;
}
.rule {
  padding: 24px 26px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.rule::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--amber);
}
.rule.green::before   { background: var(--green); }
.rule.cyan::before    { background: var(--cyan); }
.rule.magenta::before { background: var(--magenta); }
.rule h3 {
  font-size: 15px;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin: 0 0 12px;
}
.rule h3::before { content: none; }
.rule p {
  font-size: 12.5px; color: var(--ink-dim);
  margin: 0; line-height: 1.65; max-width: none;
}
.rule .small {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted-txt); text-transform: uppercase; letter-spacing: 0.12em;
  margin-top: 14px; display: block;
}
.rule .small::before { content: "↳ "; color: var(--amber); }
.rule .chip { margin-top: 14px; }

/* ────────── For machines — entry-point list ────────── */
.machine-list {
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 10px 26px;
  max-width: 900px;
}
.machine-list dt {
  font-family: var(--mono); font-size: 13px;
  margin-top: 16px;
}
.machine-list dd {
  margin: 4px 0 16px;
  font-size: 12.5px; color: var(--ink-dim);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* ────────── Grounding — lineage block ────────── */
.lineage-block {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 32px 36px;
  margin: 28px 0 0;
  position: relative;
}
.lineage-block::before {
  content: "// grounding";
  position: absolute; top: -1px; left: 24px;
  background: var(--bg);
  padding: 0 12px;
  color: var(--amber);
  font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.16em;
  transform: translateY(-50%);
}
.lineage-block p { max-width: none; font-size: 13.5px; line-height: 1.7; }
.pullquote {
  font-family: var(--display); font-weight: 400;
  font-size: 22px; line-height: 1.4;
  max-width: 56ch; color: var(--ink);
  margin-top: 36px;
  padding: 20px 0;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
}
.pullquote em { font-style: italic; color: var(--amber); }

/* ────────── Footer ────────── */
footer.foot {
  padding: 56px 0 80px;
  background: var(--bg-warm);
  color: var(--ink-dim);
  font-size: 12px;
}
footer.foot .cols {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
@media (max-width: 760px) { footer.foot .cols { grid-template-columns: 1fr; } }
footer.foot .label { margin-bottom: 14px; display: block; }
footer.foot ul { list-style: none; margin: 0; padding: 0; }
footer.foot li { margin-bottom: 6px; }
footer.foot a {
  color: var(--ink-dim); border: none;
  font-family: var(--mono); font-size: 12.5px;
}
footer.foot a:hover { color: var(--amber); }
footer.foot .legal {
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted-txt);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
