/* The Dashboard page in the site's look: theme colours from theme.css
   (generated from theme/tokens.json, light and dark), the site's fonts,
   square corners, mono labels and the hard amber shadow. */

@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-mono-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
}

:root {
  --mono: 'Geist Mono Variable', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Geist Variable', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --grid: color-mix(in srgb, var(--accent) 9%, transparent);
  --pad: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--fg);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--red); color: var(--on-primary); }

/* ---------- the bar ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 600 15px/1 var(--sans);
  letter-spacing: -0.01em;
}
.brand b { font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.mark { position: relative; width: 18px; height: 18px; flex: none; }
.mark i { position: absolute; width: 15px; height: 15px; }
.mark i:first-child { right: 0; bottom: 0; background: var(--accent); }
.mark i:last-child { left: 0; top: 0; background: var(--red); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.email { font: 500 11px/1.2 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }

/* ---------- the page ---------- */

.page {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--pad);
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}
.sheet { min-width: 0; }
.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font: 500 9.5px/1.45 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.kicker::before { content: ''; width: 6px; height: 6px; flex: none; background: var(--red); }
.kicker b { color: var(--fg); font-weight: 500; }

h1 {
  margin: 0 0 16px;
  font: 400 clamp(40px, 7vw, 64px)/1 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 em { color: var(--red); }
.lead { margin: 0 0 24px; max-width: 58ch; color: var(--muted); font-size: 17px; text-wrap: pretty; }
.fine { margin: 18px 0 0; max-width: 58ch; color: var(--dim); font-size: 13.5px; }
.note {
  margin: 0 0 22px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 14.5px;
  max-width: 62ch;
}
.note.warn { border-left-color: var(--red); background: var(--red-soft); }
.wait { display: inline-flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font: 500 12px/1.4 var(--mono); letter-spacing: 0.06em; }
.dots { width: 10px; height: 10px; background: var(--red); box-shadow: 3px 3px 0 var(--accent); animation: hop 0.9s ease-in-out infinite; }
.gis { min-height: 44px; display: flex; align-items: center; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; max-width: 58ch; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 0 12px 44px;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 11px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font: 500 11px/1 var(--mono);
  color: var(--on-primary);
  background: var(--red);
  box-shadow: 2px 2px 0 var(--accent);
}

/* ---------- phones ---------- */

.phones {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}
.phone {
  padding: 18px 18px 20px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--accent);
  min-width: 0;
}
.phone .tag { font: 500 9px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.phone h2 { margin: 12px 0 2px; font: 400 30px/1.05 var(--serif); overflow-wrap: anywhere; }
.phone .model { margin: 0; color: var(--muted); font-size: 14px; }
.phone .seen { margin: 10px 0 0; font: 500 11px/1.5 var(--mono); color: var(--dim); }
.phone .row { margin-top: 16px; }
.phone.sleepy { box-shadow: 4px 4px 0 var(--line-2); }
.phone.sleepy .zz { color: var(--faint); }

/* ---------- buttons (the site's language) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 0;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--accent);
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--accent); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--accent); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--on-primary); }
.btn-primary:hover { background: var(--red-hi); border-color: var(--red-hi); }
.btn-ghost { border-color: var(--line-2); background: var(--bg); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent-ink); }
.btn-small { height: 32px; padding: 0 12px; font-size: 9.5px; }

/* ---------- A-01 at the desk ---------- */

.desk { position: sticky; top: 24px; text-align: center; }
.desk svg { display: block; margin: 0 auto; overflow: visible; }
.desk .back { fill: var(--accent); }
.desk .front { fill: var(--red); }
.desk .eye { fill: var(--on-primary); transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.desk .floor { fill: var(--line-2); }
.desk .unit { transform-box: fill-box; transform-origin: 50% 100%; }
.desk .serial { margin: 10px 0 0; font: 500 8.5px/1.4 var(--mono); letter-spacing: 0.15em; text-transform: uppercase; color: var(--dim); }
.desk[data-mood='busy'] .unit { animation: hop 0.9s ease-in-out infinite; }
.desk[data-mood='busy'] .eyes { animation: look 1.8s ease-in-out infinite; }
.desk[data-mood='happy'] .eye { animation: blink 5s infinite; transform: scaleY(0.55); }
.desk[data-mood='puzzled'] .unit { transform: rotate(-6deg); }
.desk[data-mood='puzzled'] .eye:last-child { transform: scaleY(0.5); }

@keyframes blink { 0%, 94%, 100% { scale: 1 1; } 97% { scale: 1 0.1; } }
@keyframes hop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes look { 0%, 100% { translate: -4px 0; } 50% { translate: 4px 0; } }

/* ---------- the foot ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px var(--pad);
  border-top: 1px solid var(--line);
  font: 500 10.5px/1.5 var(--mono);
  color: var(--dim);
}

/* ---------- phone width ---------- */

@media (max-width: 640px) {
  .page { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .desk { position: static; display: flex; align-items: center; gap: 12px; text-align: left; }
  .desk svg { width: 64px; height: 58px; margin: 0; }
  .desk .serial { margin: 0; }
  .email { max-width: 52vw; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
  .desk *, .dots { animation: none !important; }
}
