/* Beamit v2 — shared foundation for the three candidate compositions.
 *
 * The visual world is not open here: it is the product's. Every token below is
 * lifted verbatim from src/dashboard-style.js, so a dashboard drawn on this page
 * is the same object a customer looks at all day rather than a picture of it.
 * Change a colour in the app and this file is where it has to follow.
 *
 * Fonts are the three site/index.html already loads. No fourth face, no second
 * source.
 */

/* ---------- tokens, from the app ---------- */

:root {
  --paper:#0B1519; --card:#132229; --ink:#E4EDEF; --muted:#8CA0A8;
  --wire:#263B44; --teal:#4FB3C4; --teal-soft:#17323A; --amber:#D89A4A;
  --live:#56B983; --sheet:#0E1C22; --chip:#17272E; --dim:#3E5560;
  --teal-deep:#6FC9D8; --live-ring:rgba(86,185,131,.18);
  --shadow:0 1px 0 rgba(0,0,0,.3), 0 10px 30px -20px rgba(0,0,0,.8);
  --glow:rgba(79,179,196,.10); --glow-out:rgba(11,21,25,0);
  color-scheme: dark;

  --display: Archivo, "Segoe UI Variable Display", system-ui, sans-serif;
  --text: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 72rem;
}

/* The light theme is the app's too. Dark is the default here because the scene
   is a developer's screen at the end of an afternoon, not a brochure. */
:root[data-theme="light"] {
  --paper:#E4E9EA; --card:#FBFDFD; --ink:#0F1E27; --muted:#5A6C75;
  --wire:#C6D1D3; --teal:#0A6C7A; --teal-soft:#D6E7EA; --amber:#8A5510;
  --live:#1B6B45; --sheet:#F2F6F7; --chip:#EAF0F1; --dim:#9AAAB0;
  --teal-deep:#085862; --live-ring:rgba(27,107,69,.14);
  --shadow:0 1px 0 rgba(15,30,39,.04), 0 10px 30px -22px rgba(15,30,39,.5);
  --glow:rgba(10,108,122,.07); --glow-out:rgba(228,233,234,0);
  color-scheme: light;
}

* { box-sizing: border-box; }

/* The hidden attribute is how os.js puts one of the two download blocks away,
   and the browser's own rule for it is a plain display:none that any inline or
   class display beats. Both blocks showed at once until this existed, which on
   a marketing page is two competing primary actions. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  /* clip, not hidden, and the difference is load-bearing. overflow-x:hidden
     makes the body a scroll container, and position:sticky inside a scroll
     container that never scrolls never sticks, so a pinned composition simply
     scrolled away with nothing in the console to say why. clip stops the
     sideways overflow without creating the container. Safari before 16 does not
     know the keyword and falls back to visible, which costs a pinned panel
     there and nothing anywhere else. */
  overflow-x: clip;
}

/* The same wash the dashboard has behind it, so the page and the app share a
   light source. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 50% -10%, var(--glow), var(--glow-out) 70%);
}

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; line-height: 1.04; }
h1 { font-weight: 700; font-size: clamp(2.6rem, 7vw, 5.4rem); letter-spacing: -.025em; }
h2 { font-weight: 700; font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.02em; }
h3 { font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0; }

.kicker {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.mono { font-family: var(--mono); }
.tealing { color: var(--teal); }

a { color: var(--teal); text-underline-offset: 3px; }

/* ---------- layout ---------- */

.wrap { width: min(var(--measure), 100% - var(--gutter) * 2); margin-inline: auto; position: relative; z-index: 1; }
section { padding-block: clamp(4rem, 11vh, 8.5rem); }
.rule { height: 1px; background: var(--wire); border: 0; margin: 0; opacity: .7; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: 10px; border: 1px solid transparent;
  background: var(--teal); color: #04171C; text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 10px 30px -14px rgba(79,179,196,.8);
}
.btn:hover { transform: translateY(-1px); background: var(--teal-deep); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: none; color: var(--ink); border-color: var(--wire); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--teal); color: var(--teal); background: none; }
.btn-note { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- product chrome: a window ---------- */

.win {
  background: var(--card); border: 1px solid var(--wire); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
}
.win-bar {
  display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem;
  background: var(--sheet); border-bottom: 1px solid var(--wire);
}
.win-bar .dots { display: flex; gap: 6px; }
.win-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--dim); display: block; }
.win-title { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-inline: auto; }
/* Windows and Linux do not have traffic lights; os.js flips this. */
:root[data-os="win"] .win-bar .dots, :root[data-os="linux"] .win-bar .dots { display: none; }
.win-bar .winbtns { display: none; margin-left: auto; gap: .9rem; color: var(--muted); font-size: .7rem; }
:root[data-os="win"] .win-bar .winbtns, :root[data-os="linux"] .win-bar .winbtns { display: flex; }

/* ---------- the dashboard, as the app draws it ---------- */

.dash { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .9rem; }
.dash-head { display: flex; align-items: baseline; gap: .7rem; }
.dash-head .wm { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; }
.dash-head .wm b { color: var(--teal); font-weight: 700; }
.dash-head .machine { font-family: var(--mono); font-size: .7rem; color: var(--muted); }

.tabs { display: flex; gap: .4rem; }
.tab {
  font-family: var(--text); font-size: .78rem; padding: .25rem .7rem; border-radius: 999px;
  border: 1px solid var(--wire); color: var(--muted); background: none; display: flex; gap: .4rem; align-items: center;
}
.tab[aria-selected="true"] { background: var(--teal-soft); color: var(--ink); border-color: transparent; }
.tab .n { font-family: var(--mono); font-size: .7rem; opacity: .8; }

.proj { border: 1px solid var(--wire); border-radius: 10px; background: var(--sheet); padding: .85rem .95rem; display: grid; gap: .65rem; }
.proj-name { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 var(--live-ring); }
.breathing { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { box-shadow: 0 0 0 0 var(--live-ring); } 50% { box-shadow: 0 0 0 6px var(--live-ring); } }

.addr { display: grid; gap: .2rem; }
.addr-label { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.addr-val { font-family: var(--mono); font-size: .92rem; color: var(--teal); word-break: break-all; }
.addr-who { font-size: .78rem; color: var(--muted); }

.switch { display: flex; align-items: flex-start; gap: .6rem; border: 1px solid var(--wire); border-radius: 8px; padding: .55rem .7rem; }
.switch.on { border-color: var(--teal); background: var(--teal-soft); }
.switch .box {
  width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--dim);
  flex: none; margin-top: .18rem; display: grid; place-items: center;
}
.switch.on .box { background: var(--teal); border-color: var(--teal); }
.switch.on .box::after { content: ""; width: 7px; height: 4px; border-left: 2px solid #04171C; border-bottom: 2px solid #04171C; transform: rotate(-45deg) translate(0, -1px); }
.switch b { display: block; font-weight: 600; font-size: .85rem; }
.switch span { font-size: .76rem; color: var(--muted); }

/* The action strip, lifted from src/dashboard-style.js so the preview's buttons
   are the app's buttons. On the website they do nothing, which is said on the
   strip itself rather than discovered by clicking. */
.acts { display: flex; align-items: center; gap: .1rem; flex-wrap: wrap;
  margin-top: .3rem; padding-top: .55rem; border-top: 1px solid var(--wire); }
.acts button { font: inherit; font-size: .78rem; font-family: var(--text); color: var(--muted);
  background: none; border: 0; border-radius: 5px; padding: .2rem .5rem; cursor: pointer; }
.acts button:hover { background: var(--teal-soft); color: var(--ink); }
.acts button:disabled { opacity: .6; cursor: default; }
.acts button:disabled:hover { background: none; color: var(--muted); }
.acts .sep { color: var(--wire); font-size: .75rem; }
.acts .why { font-size: .74rem; color: var(--muted); margin-left: .35rem; }
.acts .who { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-left: auto; padding-left: .6rem; }

/* ---------- a phone ---------- */

.phone {
  width: 190px; border-radius: 26px; border: 1px solid var(--wire); background: var(--card);
  padding: 8px; box-shadow: var(--shadow); flex: none;
}
.phone .screen { border-radius: 19px; background: var(--sheet); overflow: hidden; aspect-ratio: 9/18; display: grid; grid-template-rows: auto 1fr; }
.phone .bar { font-family: var(--mono); font-size: .56rem; color: var(--muted); text-align: center; padding: .45rem 0; border-bottom: 1px solid var(--wire); }

/* ---------- a QR code, drawn rather than fetched ---------- */

.qr { width: 108px; height: 108px; background: #fff; border-radius: 8px; padding: 7px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- the macOS menu bar panel / the Windows tray flyout ---------- */

.menubar { border-radius: 12px; border: 1px solid var(--wire); background: var(--card); box-shadow: var(--shadow); width: 280px; overflow: hidden; }
.menubar .mb-head { padding: .6rem .8rem; border-bottom: 1px solid var(--wire); font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.menubar .mb-row { display: flex; align-items: center; gap: .55rem; padding: .5rem .8rem; border-bottom: 1px solid var(--wire); font-size: .85rem; }
.menubar .mb-row:last-child { border-bottom: 0; }
.menubar .mb-row .port { margin-left: auto; font-family: var(--mono); font-size: .72rem; color: var(--muted); }

/* ---------- motion ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

.caret::after {
  content: ""; display: inline-block; width: .5ch; height: 1em; background: var(--teal);
  vertical-align: -.14em; margin-left: .1ch; animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .breathing, .caret::after { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- the candidate switcher, not part of any design ---------- */

.pick {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 50;
  display: flex; gap: .3rem; padding: .35rem; border-radius: 999px;
  background: rgba(8,18,22,.82); border: 1px solid var(--wire); backdrop-filter: blur(10px);
  font-family: var(--mono); font-size: .72rem;
}
.pick a { padding: .35rem .8rem; border-radius: 999px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.pick a[aria-current="page"] { background: var(--teal); color: #04171C; }
@media (max-width: 560px) { .pick { font-size: .64rem; } .pick a { padding: .3rem .55rem; } }
