/* Milkware first-look tour. Vanilla CSS, no build step. */
:root {
  --navy: #0b0f1b;
  --navy-2: #151b2c;
  --orange: #f97a29;
  --orange-dark: #e0661a;
  --ink: #161a24;
  --muted: #5d6475;
  --line: #e3e6ec;
  --bg: #f4f5f8;
  --card: #ffffff;
  --topbar-h: 60px;
  --controls-h: 68px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
button { font: inherit; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  min-height: var(--topbar-h);
  padding: env(safe-area-inset-top, 0px) 24px 0;
  background: var(--navy); color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; flex: none; }
.brand-name { font-weight: 700; font-size: 21px; letter-spacing: -0.2px; }
.brand-by { color: #aab1c2; font-size: 14px; }
.brand-logo { height: 22px; width: auto; display: block; }
.chapters { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.chapters::-webkit-scrollbar { display: none; }
.chapters button {
  flex: none; border: 0; background: transparent; color: #c9cfdb;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.chapters button:hover { color: #fff; background: var(--navy-2); }
.chapters button[aria-current="true"] { color: #fff; background: var(--navy-2); box-shadow: inset 0 -2px 0 var(--orange); }

/* ---------------------------------------------------------------- buttons */
.btn {
  border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  padding: 10px 18px; font-weight: 600; font-size: 15px; line-height: 1.2;
}
.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn:focus-visible, .chapters button:focus-visible, .hotspot:focus-visible, .notes li:focus-visible, .chapter-card:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px;
}

main { flex: 1; display: flex; min-height: 0; }
.screen { flex: 1; min-width: 0; padding: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--orange-dark); font-weight: 600; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; }

/* ---------------------------------------------------------------- intro */
.intro { display: flex; flex-direction: column; align-items: center; gap: 36px; padding-top: 6vh; padding-bottom: 40px; }
.intro-hero { max-width: 760px; text-align: center; }
.intro h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; margin: 0 0 14px; letter-spacing: -0.6px; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); margin: 0 0 26px; }
.hint { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.chapter-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 100%; max-width: 1100px; }
.chapter-card {
  text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 14px;
  padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.chapter-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(11, 15, 27, .12); }
.chapter-card .thumb { aspect-ratio: 16 / 10; background: var(--navy) center top / cover no-repeat; }
.chapter-card .thumb.phone { background-size: 46% auto; background-position: center 18px; }
.chapter-card .body { padding: 14px 16px 16px; }
.chapter-card h3 { margin: 0 0 4px; font-size: 18px; }
.chapter-card p { margin: 0; color: var(--muted); font-size: 14px; }
.chapter-card .count { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--orange-dark); }

/* ---------------------------------------------------------------- step */
.step {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start;
  padding: 20px 24px;
}
.stage { display: flex; justify-content: center; min-width: 0; }
/* tour.js sizes .shot so the screenshot fits the space left on screen. */
.frame { position: relative; max-width: 100%; }
.shot { position: relative; width: 100%; aspect-ratio: var(--ar, 1.6); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* window (office) and browser (portal) frames */
.frame.window, .frame.browser {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(11,15,27,.08), 0 18px 44px rgba(11,15,27,.14);
  border: 1px solid #dfe2e8;
}
.frame-bar { display: none; }
.frame.window .frame-bar, .frame.browser .frame-bar {
  display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px;
  background: #eef0f4; border-bottom: 1px solid #dfe2e8;
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #cfd3db; display: block; }
.frame-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.frame.browser .frame-label { background: #fff; border: 1px solid #dfe2e8; border-radius: 6px; padding: 1px 12px; min-width: 40%; }

/* phone (driver) frame */
.frame.phone { padding: 12px; background: #1b1f2a; border-radius: 44px; box-shadow: 0 18px 44px rgba(11,15,27,.25); }
.frame.phone .shot { border-radius: 32px; overflow: hidden; }
.frame.phone .shot img { border-radius: 32px; }

/* document (invoice PDF) frame */
.frame.document { background: #fff; box-shadow: 0 2px 4px rgba(11,15,27,.08), 0 18px 44px rgba(11,15,27,.16); }

/* ---------------------------------------------------------------- hotspots */
.hotspots { position: absolute; inset: 0; }
.hotspot {
  position: absolute; transform: translate(-50%, -50%);
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; padding: 0;
  background: var(--orange); color: var(--navy); font-weight: 700; font-size: 13px; line-height: 24px;
  cursor: pointer; z-index: 3; box-shadow: 0 2px 8px rgba(11,15,27,.35);
}
.hotspot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--orange); animation: pulse 2s ease-out infinite; pointer-events: none;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hotspot::after { animation: none; opacity: 0; } }
.hotspot.active { background: var(--navy); color: #fff; }
.hotspot.active::after { animation: none; opacity: 0; }
.target {
  position: absolute; border: 2px solid var(--orange); border-radius: 6px; z-index: 2;
  background: rgba(249, 122, 41, .08); pointer-events: none; opacity: 0; transition: opacity .15s;
}
.target.show { opacity: 1; }
.tip {
  position: absolute; z-index: 4; width: 260px; max-width: 70%;
  background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 12px 11px;
  font-size: 14px; line-height: 1.4; box-shadow: 0 10px 28px rgba(11,15,27,.35); pointer-events: none;
}
.tip b { color: var(--orange); margin-right: 6px; }

/* ---------------------------------------------------------------- side panel */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 10px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.panel h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; letter-spacing: -0.3px; }
.caption { margin: 0 0 16px; color: var(--muted); }
.notes { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.notes li {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
  padding: 10px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; font-size: 15px;
}
.notes li:hover, .notes li.active { background: #fff4ec; }
.notes .num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: var(--navy);
  font-weight: 700; font-size: 12px; display: grid; place-items: center; margin-top: 1px;
}
.notes li.active .num { background: var(--navy); color: #fff; }

/* ---------------------------------------------------------------- outro */
.outro { display: flex; justify-content: center; align-items: flex-start; padding-top: 8vh; }
.outro-card { max-width: 640px; text-align: center; }
.outro h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.5px; }
.contact { background: var(--navy); color: #fff; border-radius: 16px; padding: 22px 26px; text-align: left; margin: 0 auto 26px; max-width: 460px; }
.contact p { margin: 0; }
.contact .who { margin-bottom: 14px; font-size: 18px; }
.contact .who span { color: #aab1c2; font-size: 15px; }
.contact .line { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid #222a3d; flex-wrap: wrap; }
.contact .k { width: 56px; color: #aab1c2; font-size: 14px; }
.contact .v { font-weight: 600; font-size: 17px; user-select: all; }
.contact .mini { color: var(--orange); font-size: 14px; }

/* ---------------------------------------------------------------- controls */
.controls {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  min-height: var(--controls-h); padding: 12px 24px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
}
.progress { flex: 1; display: flex; align-items: center; gap: 14px; max-width: 640px; }
.progress-text { font-size: 14px; color: var(--muted); white-space: nowrap; min-width: 92px; }
.progress-track { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--orange); transition: width .25s ease; }

.compare-slot { min-height: 40vh; }
.noscript { padding: 24px; text-align: center; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .step { grid-template-columns: 1fr; }
  .panel { position: static; }
}
@media (max-width: 760px) {
  :root { --topbar-h: 52px; --controls-h: 60px; }
  .topbar { flex-wrap: wrap; gap: 0 12px; padding: env(safe-area-inset-top, 0px) 16px 0; }
  .brand-name { font-size: 18px; }
  .brand-logo { height: 18px; }
  .chapters { margin-left: 0; width: 100%; padding-bottom: 6px; }
  .chapters button { padding: 6px 10px; font-size: 13px; }
  .screen { padding: 16px; }
  .step { padding: 14px 16px; gap: 16px; }
  .chapter-cards { grid-template-columns: 1fr; }
  .intro { padding-top: 24px; }
  /* Phones: the screenshot is scaled to fit, the numbers stay on it, and the
     explanations are the list below instead of tooltips over the picture. */
  .frame.window .frame-bar, .frame.browser .frame-bar { height: 26px; }
  .frame.window, .frame.browser { border-radius: 8px; }
  .frame.phone { padding: 8px; border-radius: 30px; }
  .frame.phone .shot, .frame.phone .shot img { border-radius: 24px; }
  .hotspot { width: 20px; height: 20px; font-size: 11px; line-height: 16px; border-width: 2px; }
  .hotspot::after { animation-duration: 2.6s; }
  .tip { display: none; }
  .panel { padding: 16px 16px 6px; }
  .panel h2 { font-size: 21px; }
  .controls { padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
  .controls .btn { padding: 9px 14px; }
  .progress-text { min-width: 0; font-size: 13px; }
}
