/* ANRISTA — coming soon. Light, brutalist CLI. */
:root {
  --paper: #f3f0e8;
  --card: #fbfaf6;
  --ink: #15171b;
  --ink-2: #4a5666;   /* logo grey */
  --muted: #8a8f98;
  --line: #15171b;
  --navy: #2b4d7a;    /* logo blue */
  --navy-soft: #e3e9f2;
  --ok: #2f7d4f;
  --wip: #b7791f;
  --todo: #9aa0a8;
  --grid: rgba(21, 23, 27, .07);
  --b: 2px;
  --shadow: 6px 6px 0 var(--ink);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font: 400 15px/1.55 var(--mono);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 32px 40px;
  display: grid;
  gap: 20px;
}

/* ---------- top bar ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: var(--b) solid var(--line);
  font-size: 13px;
}
.bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.led {
  width: 9px; height: 9px; background: var(--wip);
  box-shadow: 0 0 0 3px rgba(183, 121, 31, .18);
  animation: blink 1.4s steps(2, jump-none) infinite;
}
.chip {
  padding: 1px 7px;
  border: 1px solid var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
.lang { display: flex; border: 1px solid var(--ink); }
.lang button {
  background: none; border: 0; padding: 3px 9px; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.lang button + button { border-left: 1px solid var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- main frame ---------- */
.frame {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  background: var(--card);
  border: var(--b) solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  padding: 40px 40px 36px;
  border-right: var(--b) solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.tag {
  margin: 0;
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pulse { color: var(--wip); animation: blink 1.4s steps(2, jump-none) infinite; }

h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.2rem, 5.4vw, 5rem);
  line-height: .95;
  letter-spacing: -.045em;
}
.h1b { color: var(--navy); white-space: nowrap; }

.caret {
  display: inline-block;
  width: .52em; height: .82em;
  margin-left: .08em;
  vertical-align: -.06em;
  background: var(--ink);
  animation: blink 1s steps(2, jump-none) infinite;
}
.caret.sm { width: .55em; height: 1.05em; vertical-align: -.2em; margin-left: .12em; background: var(--navy); }

.brand {
  display: inline-flex;
  flex-direction: column;
  align-self: flex-start;
  line-height: 1;
  padding-left: 12px;
  border-left: 4px solid var(--navy);
}
.brand-name { font-weight: 800; font-size: 22px; letter-spacing: .14em; color: var(--navy); }
.brand-sub { margin-top: 5px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }

.lead { margin: 0; max-width: 46ch; color: var(--ink-2); }

/* terminal */
.term { border: var(--b) solid var(--line); background: var(--paper); margin-top: auto; }
.term-head {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 12px;
  border-bottom: var(--b) solid var(--line);
  background: var(--card);
  font-size: 12px;
}
.term-head #clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border: 1.5px solid var(--ink); border-radius: 50%; }
.dots i:first-child { background: var(--ink); }
.term-body {
  margin: 0;
  padding: 14px 14px 16px;
  min-height: 15.5em;
  font: 500 13px/1.7 var(--mono);
  white-space: pre;
  overflow-x: auto;
}
.term-body .p { color: var(--navy); font-weight: 700; }
.term-body .ok { color: var(--ok); font-weight: 700; }
.term-body .wip { color: var(--wip); font-weight: 700; }
.term-body .todo { color: var(--todo); }
.term-body .bar-fill { color: var(--navy); }
.term-body .bar-empty { color: #c9c6bd; }

/* ---------- dev / avatar ---------- */
.dev {
  --av: clamp(128px, 40%, 176px);   /* avatar size; the bubble tail centres on it */
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}
.bubble {
  position: relative;
  border: var(--b) solid var(--line);
  background: #fff;
  box-shadow: 4px 4px 0 var(--navy);
  margin-bottom: 14px;
}
/* solid triangle tail pointing down at the avatar (vertical edge on the left) */
.bubble::before {
  content: ""; position: absolute;
  top: 100%;
  right: calc(var(--av) / 2 - 18px);
  width: 22px; height: 20px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.bubble-head {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px dashed var(--ink);
  font-size: 12px;
  color: var(--navy);
  font-weight: 700;
}
.count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.say {
  margin: 0;
  padding: 12px 14px 14px;
  min-height: 5.4em;
  font-size: 15px;
  line-height: 1.55;
}

.dev-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

/* code editor panel */
.code {
  flex: 1 1 auto;
  min-width: 0;
  contain: size;            /* height follows the avatar, not the code */
  display: flex;
  flex-direction: column;
  border: var(--b) solid var(--line);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}
.code-head {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  border-bottom: var(--b) solid var(--line);
  background: var(--card);
  font-size: 11.5px;
  white-space: nowrap; overflow: hidden;
}
.code-head .dots i { width: 8px; height: 8px; }
.code-body {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 10px 10px 10px 0;
  display: flex;
  overflow: hidden;
  font: 500 11.5px/1.65 var(--mono);
  white-space: pre;
}
.gutter {
  flex: none;
  padding: 0 8px 0 8px;
  margin-right: 8px;
  border-right: 1px dashed #c9c6bd;
  color: #b4b1a8;
  text-align: right;
  user-select: none;
}
.code-body code { font: inherit; min-width: 0; }
.code-body .k { color: var(--navy); font-weight: 700; }
.code-body .s { color: var(--ok); }
.code-body .c { color: var(--muted); font-style: italic; }
.code-body .f { color: var(--wip); }
.code-cursor {
  display: inline-block; width: .6em; height: 1.15em; vertical-align: -.22em;
  background: var(--navy);
  animation: blink 1s steps(2, jump-none) infinite;
}

.stage {
  position: relative;
  display: block;
  flex: 0 0 var(--av);
  align-self: flex-start;
  width: var(--av);
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border: var(--b) solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, rgba(43, 77, 122, .22) 1px, transparent 1.5px) 0 0 / 12px 12px,
    var(--navy-soft);
  cursor: pointer;
  overflow: hidden;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 4px 4px 0 var(--ink);
}
.stage:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.stage:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.stage:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
.stage img {
  position: absolute; left: 50%; bottom: 0;
  width: 92%; height: auto;
  transform: translateX(-50%);
  animation: bob 1.6s steps(2, jump-none) infinite;
  user-select: none; -webkit-user-drag: none;
}
.dev-meta {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px;
  font-size: 12px;
  margin-top: 4px;
}
.dev-meta b { color: var(--navy); }
.hint { color: var(--muted); }

/* ---------- coming soon strip ---------- */
.soon h2 { margin: 6px 0 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); letter-spacing: .04em; }
.soon-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: var(--b) solid var(--line);
  background: var(--card);
}
.soon-grid li { padding: 18px 20px 20px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.soon-grid li + li { border-left: var(--b) solid var(--line); }
.soon-grid b { color: var(--ink); font-size: 16px; }
.soon-grid .n { color: var(--navy); font-weight: 800; font-size: 12px; }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--ink-2);
  padding-top: 4px;
}
.foot a { color: var(--navy); }

/* ---------- motion ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-4px); } }
.swap { animation: none !important; transform: translateX(-50%) translateY(3px) !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .frame { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.2rem, 10vw, 4.6rem); }
  .hero { border-right: 0; border-bottom: var(--b) solid var(--line); padding: 28px 22px; }
  .dev { padding: 26px 22px 22px; }
  .soon-grid { grid-template-columns: 1fr; }
  .soon-grid li + li { border-left: 0; border-top: var(--b) solid var(--line); }
}
@media (max-width: 560px) {
  .wrap { padding: 12px 16px 28px; gap: 16px; }
  .hide-sm { display: none; }
  .frame { box-shadow: 4px 4px 0 var(--ink); }
  .hero { padding: 24px 16px; gap: 18px; }
  .dev { padding: 22px 16px 18px; --av: 124px; }
  .dev-row { gap: 10px; }
  .code-body { font-size: 10px; }
  .gutter { padding: 0 5px; margin-right: 6px; }
  .term-body { font-size: 11.5px; padding: 12px 10px; }
  .say { font-size: 14px; }
}
