/* BHS Hackathon idea lab. One design system for the landing chat and the /s/<id> showcase.
   The metro line is the one loud element; everything else stays quiet. */
:root {
  --ink: #15171c;
  --paper: #f6f7f9;
  --red: #dc241f;
  --yellow: #ffc20e;
  --green: #3aa03a;
  --blue: #0072bc;
  --purple: #9b2c8f;

  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #5b6070;
  --surface: #eceef2;
  --edge: #d3d6de;
  --track: #c3c7d1;
  --on-red: #ffffff;
  --focus: var(--blue);

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --fg: var(--paper);
    --muted: #a3a8b6;
    --surface: #20232b;
    --edge: #343844;
    --track: #4a4f5d;
    --focus: var(--yellow);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: #a3a8b6;
  --surface: #20232b;
  --edge: #343844;
  --track: #4a4f5d;
  --focus: var(--yellow);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 18px/1.5 var(--body);
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* ---------- The metro line ---------- */
.metro-bar {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding: 14px 0 10px;
}
.metro { list-style: none; margin: 0; padding: 0; display: flex; }
.metro li {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center;
  min-width: 0;
}
/* the track segment leading into each station from the left */
.metro li + li::before {
  content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 6px;
  background: repeating-linear-gradient(90deg, var(--track) 0 8px, transparent 8px 13px);
}
.metro li.passed::before, .metro li.current::before { background: var(--seg); }
.metro .dot {
  position: relative; z-index: 1;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--track);
}
.metro li.passed .dot { background: var(--c); border-color: var(--bg); box-shadow: 0 0 0 2px var(--c); }
.metro li.current .dot { border: 7px solid var(--c); background: var(--bg); }
.metro li.current .dot::after {
  content: ""; position: absolute; inset: -11px; border-radius: 50%;
  border: 3px solid var(--c); opacity: 0;
  animation: ping 2.4s ease-out infinite;
}
/* the destination is drawn like an interchange: a white pill with a heavy rim */
.metro li.dest .dot { width: 40px; border-radius: 14px; border-color: var(--fg); border-width: 4px; }
.metro li.dest.current .dot { border-color: var(--c); border-width: 6px; }
.metro .name {
  margin-top: 6px; font-size: 13px; line-height: 1.2; font-weight: 500;
  color: var(--muted); white-space: nowrap;
}
.metro li.passed .name, .metro li.current .name { color: var(--fg); }
.metro li.current .name, .metro li.dest .name { font-weight: 700; }
@keyframes ping {
  0% { transform: scale(.7); opacity: .9; }
  80%, 100% { transform: scale(1.35); opacity: 0; }
}

/* ---------- Hero ---------- */
.hero { padding: 28px 0 40px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "wdth" 75, "opsz" 96;
  font-size: clamp(46px, 13vw, 88px);
  line-height: .9;
  letter-spacing: -.02em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero .lede { font-size: 20px; margin: -12px 0 24px; color: var(--muted); max-width: 32em; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 700; margin-bottom: 6px; }
textarea, input[type="text"] {
  width: 100%; font: inherit; color: var(--fg);
  background: var(--surface);
  border: 2px solid var(--edge); border-radius: 14px;
  padding: 14px 16px; min-height: 52px;
}
textarea { min-height: 120px; resize: vertical; font-size: 20px; line-height: 1.35; }
textarea:focus, input[type="text"]:focus { border-color: var(--fg); outline: none; box-shadow: 0 0 0 3px var(--focus); }
::placeholder { color: var(--muted); opacity: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 26px;
  font: 700 19px/1 var(--body); text-decoration: none;
  border: 0; border-radius: 14px; cursor: pointer;
}
.btn-red { background: var(--red); color: var(--on-red); }
.btn-red:hover { background: #c01e1a; }
.btn-red:active { transform: translateY(1px); }
.btn-line { background: transparent; color: var(--fg); border: 2px solid var(--fg); }
.btn-line:hover { background: var(--surface); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-wide { width: 100%; }

.err {
  margin: 12px 0 0; padding: 12px 14px;
  border-left: 5px solid var(--red); background: var(--surface); border-radius: 0 10px 10px 0;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
}
.err p { margin: 0; flex: 1 1 200px; font-weight: 500; }

.resume {
  margin: 0 0 24px; padding: 14px 16px; border-radius: 14px; background: var(--surface);
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
}
.resume p { margin: 0; flex: 1 1 200px; }

/* ---------- Event facts ---------- */
.facts { padding: 36px 0 56px; border-top: 2px solid var(--edge); }
.facts h2 { font: 800 30px/1.05 var(--display); font-variation-settings: "wdth" 85; margin: 0 0 16px; }
.facts ul { list-style: none; margin: 0 0 24px; padding: 0; }
.facts li { padding: 10px 0 10px 26px; position: relative; font-size: 19px; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 17px; width: 12px; height: 12px; border-radius: 50%;
  border: 3px solid var(--fg);
}
.facts li b { font-weight: 700; }

/* ---------- Chat ---------- */
.chat { padding: 16px 0 64px; }
.log { display: flex; flex-direction: column; gap: 18px; }
.msg { max-width: 100%; scroll-margin-top: 96px; }
.chat { scroll-margin-top: 96px; }
.you {
  align-self: flex-end; max-width: 85%;
  background: var(--fg); color: var(--bg);
  padding: 12px 16px; border-radius: 20px 20px 6px 20px;
  font-weight: 500; overflow-wrap: anywhere;
}
.you .who { display: block; font-size: 14px; opacity: .7; font-weight: 400; }
.ai { border-left: 5px solid var(--c, var(--fg)); padding: 2px 0 2px 16px; }
.ai h2, .ai h3 { margin: 0; }
.research ul { margin: 0; padding: 0; list-style: none; }
.research li { margin: 0 0 8px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.links a {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 44px; padding: 8px 14px; border-radius: 12px; background: var(--surface);
  text-decoration: none; max-width: 100%;
}
.links a b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.links a span { font-size: 14px; color: var(--muted); }

.q h2 { font: 800 28px/1.08 var(--display); font-variation-settings: "wdth" 85; letter-spacing: -.01em; }
.q h2:focus { outline: none; }
.q .count { font-size: 15px; color: var(--muted); margin: 0 0 4px; }
.q .why { color: var(--muted); margin: 8px 0 16px; font-size: 17px; }
.opts { display: grid; gap: 10px; }
.opt {
  position: relative; display: block; width: 100%; text-align: left;
  font: inherit; color: var(--fg);
  background: var(--bg); border: 2px solid var(--edge); border-radius: 16px;
  padding: 14px 16px; min-height: 64px; cursor: pointer;
}
.opt:hover { border-color: var(--fg); }
.opt b { display: block; font-size: 19px; line-height: 1.25; }
.opt.rec b { padding-right: 80px; }
.opt span { display: block; color: var(--muted); font-size: 16px; margin-top: 2px; }
.opt .pick {
  position: absolute; top: 12px; right: 12px; margin: 0;
  font-size: 13px; font-weight: 700; font-style: normal; color: var(--ink);
  background: var(--yellow); border-radius: 999px; padding: 3px 10px;
}
.opt[aria-pressed="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.opts.locked .opt:not([aria-pressed="true"]) { opacity: .45; }
.opts.locked .opt { cursor: default; }
.opts.locked .opt:not([aria-pressed="true"]):hover { border-color: var(--edge); }
.own { display: flex; gap: 8px; margin-top: 12px; }
.own input { flex: 1; min-width: 0; }

.wait { display: flex; align-items: center; gap: 12px; color: var(--muted); min-height: 44px; }
.wait .dots { display: inline-flex; gap: 5px; }
.wait .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--fg)); animation: blink 1.4s infinite ease-in-out both; }
.wait .dots i:nth-child(2) { animation-delay: .18s; }
.wait .dots i:nth-child(3) { animation-delay: .36s; }
.wait .status { font-weight: 500; color: var(--fg); }
.buildlog { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }
.buildlog li { display: flex; gap: 10px; align-items: baseline; }
.buildlog li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--fg)); transform: translateY(-1px); }
.buildlog li.s-test::before { background: var(--blue); }
.buildlog li.s-done::before { background: var(--green); }
.buildlog li.s-failed { color: var(--red); }
.wait .clock { font-variant-numeric: tabular-nums; margin-left: auto; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

.build h2 { font: 800 30px/1.05 var(--display); font-variation-settings: "wdth" 80; margin: 0 0 6px; }
.build p { margin: 0 0 12px; color: var(--muted); }

/* closed state */
.closed h1 { margin-bottom: 18px; }
.closed p { font-size: 20px; max-width: 30em; }

/* ---------- Showcase ---------- */
.show { max-width: 1080px; }
.show-head { padding: 28px 0 28px; }
.show-head h1 {
  font-family: var(--display); font-weight: 800;
  font-variation-settings: "wdth" 75, "opsz" 96;
  font-size: clamp(56px, 17vw, 132px); line-height: .86; letter-spacing: -.03em;
  margin: 0 0 12px; overflow-wrap: anywhere;
}
.show-head .tagline { font-size: clamp(21px, 4.5vw, 28px); line-height: 1.25; margin: 0 0 8px; max-width: 24em; }
.show-head .by { color: var(--muted); margin: 0; }
.show-grid { display: grid; gap: 36px; padding-bottom: 40px; }
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone {
  width: 100%; height: 75vh; min-height: 520px;
  border: 3px solid var(--fg); border-radius: 28px; overflow: hidden; background: #fff;
}
.phone iframe { display: block; width: 100%; height: 100%; border: 0; }
.full { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.notes h2 { font: 800 24px/1.1 var(--display); font-variation-settings: "wdth" 85; margin: 0 0 6px; }
.notes section { margin-bottom: 28px; }
.notes p { margin: 0; max-width: 34em; }

/* the weekend plan is a real sequence, so it is drawn as a short line with numbered stops */
.stops { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: stop; }
.stops li { position: relative; padding: 0 0 18px 46px; min-height: 30px; counter-increment: stop; }
.stops li::before {
  content: counter(stop); position: absolute; left: 0; top: -2px; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 4px solid var(--blue); font-weight: 700; font-size: 14px;
}
.stops li:not(:last-child)::after {
  content: ""; position: absolute; left: 12px; top: 26px; bottom: -2px; width: 6px; background: var(--blue);
}
.stops li:last-child { padding-bottom: 0; }

.cta {
  background: var(--fg); color: var(--bg);
  border-radius: 24px; padding: 28px 22px; margin: 8px 0 32px;
}
.cta h2 {
  font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 75;
  font-size: clamp(34px, 8vw, 54px); line-height: .95; margin: 0 0 18px; text-wrap: balance;
}
.cta .row { display: flex; flex-wrap: wrap; gap: 10px; }
.cta .btn-line { color: var(--bg); border-color: var(--bg); }
.cta .btn-line:hover { background: transparent; opacity: .85; }
.cta p { margin: 14px 0 0; opacity: .8; }
.keep { display: grid; gap: 8px; margin-top: 16px; }
.keep span { opacity: .85; }
.keep input { font: 500 16px/1.2 var(--body); color: var(--bg); background: transparent; border: 2px solid currentColor; border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%; }
.keep input:focus { border-color: currentColor; box-shadow: none; outline: 3px solid var(--yellow); outline-offset: 2px; }
.try {
  border-left: 6px solid var(--green); padding: 4px 0 4px 20px; margin: 0 0 36px;
}
.try h2 {
  font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 75;
  font-size: clamp(28px, 6vw, 40px); line-height: 1; margin: 0 0 10px;
}
.try p { margin: 0 0 16px; color: var(--muted); max-width: 46ch; }
.foot { color: var(--muted); font-size: 15px; padding: 0 0 40px; margin: 0; }

@media (min-width: 900px) {
  .show-grid { grid-template-columns: 420px 1fr; align-items: start; gap: 56px; }
  .phone-col { position: sticky; top: 76px; }
  .phone { width: 414px; height: 804px; max-height: calc(100vh - 150px); border-radius: 46px; border-width: 12px; border-color: var(--ink); }
  .cta { padding: 36px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .metro li.current .dot::after { opacity: .5; transform: scale(1.2); }
}

/* /examples */
.examples { max-width: 960px; }
.ex-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 20px; }
.ex { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; }
.ex-shot { display: block; border-radius: 16px; overflow: hidden; border: 4px solid var(--fg); aspect-ratio: 390 / 600; background: var(--line, #e3e5ea); }
.ex-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ex-noshot { display: grid; place-items: center; height: 100%; font-family: var(--display); font-weight: 800; font-size: 40px; color: var(--muted); }
.ex-body h2 { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 80; font-size: 28px; line-height: 1; margin: 2px 0 6px; }
.ex-body h2 a { color: inherit; text-decoration: none; }
.ex-body h2 a:hover { text-decoration: underline; }
.ex-tag { margin: 0 0 6px; font-weight: 500; }
.ex-idea { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.ex-links { margin: 0; display: flex; flex-wrap: wrap; gap: 0 18px; font-weight: 500; }
.ex-links a, .show-head .by a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 760px) {
  .ex-list { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
  .ex { grid-template-columns: 140px 1fr; }
}
.hint { margin: 14px 0 0; color: var(--muted); }
.hint a { display: inline-block; padding: 10px 0; }
