/* The artboard canvas: a quiet working surface. Frames carry the design; the chrome stays out of the way. */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --table: #C9CED3;
  --ink: #2B2F33;
  --ink-2: #454B52;
  --deep: #1B1E21;
  --paper: #FFFFFF;
  --line: #8C9398;
  --accent: #F26A21;
  --z: 1;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: var(--table); color: var(--ink);
  font: 400 15px/1.45 "Archivo", system-ui, sans-serif;
  font-synthesis: none; -webkit-font-smoothing: antialiased;
  /* the canvas is a surface to drag: a mouse drag that starts between the frames must move the board,
     not select every card and frame it crosses. A page in use is its own document and stays selectable. */
  -webkit-user-select: none; user-select: none;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--deep); }

/* ---------- top bar ---------- */

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10; height: 52px;
  display: flex; align-items: center; gap: 20px; padding: 0 14px 0 16px;
  background: var(--deep); color: #E3E6E8;
}
.bar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bar-title h1 { font-size: 15px; font-weight: 700; font-stretch: 112%; white-space: nowrap; }
.bar-title h1 span { margin-left: 8px; font-weight: 400; font-stretch: 100%; color: #B8BEC4; }
.jump { display: flex; gap: 2px; margin-left: auto; }
.jump button, .zoom button {
  height: 34px; padding: 0 12px; background: none; border: 1px solid transparent; border-radius: 0; cursor: pointer;
  font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background 0.15s, border-color 0.15s;
}
.jump button:hover, .zoom button:hover { background: #2B2F33; border-color: #454B52; }
.zoom { display: flex; align-items: center; border: 1px solid #454B52; }
.zoom button { width: 34px; padding: 0; display: grid; place-items: center; }
.zoom svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.zoom output { min-width: 54px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- canvas ---------- */

.viewport { position: fixed; inset: 52px 0 0 0; overflow: hidden; cursor: grab; touch-action: none; outline-offset: -2px; }
.viewport.dragging { cursor: grabbing; }
.board { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }

.frame { position: absolute; }
.frame-name {
  position: absolute; left: 0; bottom: 100%; white-space: nowrap;
  display: flex; align-items: baseline; gap: calc(12px / var(--z));
  padding-bottom: calc(9px / var(--z));
  font-size: calc(13.5px / var(--z)); font-weight: 700; line-height: 1.2; color: var(--ink);
}
.frame-name span { font-weight: 400; color: var(--ink-2); }
.board.far .frame-name span, .board.far .frame-name a, .board.far .frame-name button { display: none; }
.frame-name a, .frame-name button {
  font-size: calc(12.5px / var(--z)); font-weight: 600; color: var(--ink); text-decoration: none;
  background: none; border: calc(1px / var(--z)) solid var(--ink); border-radius: 0; cursor: pointer;
  padding: calc(1px / var(--z)) calc(8px / var(--z));
}
.frame-name a:hover, .frame-name button:hover, .frame-name button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.page { background: var(--paper); box-shadow: 0 2px 5px rgba(27, 30, 33, 0.14), 0 22px 50px -18px rgba(27, 30, 33, 0.35); }
.page iframe { display: block; border: 0; pointer-events: none; background: var(--paper); }
.page.in-use { outline: calc(3px / var(--z)) solid var(--accent); outline-offset: calc(3px / var(--z)); }
.page.in-use iframe { pointer-events: auto; }

/* ---------- cards on the board ---------- */

.card { background: var(--paper); box-shadow: 0 2px 5px rgba(27, 30, 33, 0.14), 0 22px 50px -18px rgba(27, 30, 33, 0.35); }
.card-body { padding: 44px 44px 40px; font-size: 19px; line-height: 1.45; }
.card-body p + p { margin-top: 14px; }
.card h3 { margin: 30px 0 10px; font-size: 15px; font-weight: 800; font-stretch: 75%; letter-spacing: 0.07em; text-transform: uppercase; }
.intro-lead { font-size: 34px; line-height: 1.1; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; text-wrap: balance; }
.intro .intro-lead + p { margin-top: 18px; }
.facts { margin-top: 26px; display: grid; gap: 14px; }
.facts div { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.facts dt { display: grid; place-items: center; height: 44px; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 22px; font-stretch: 62%; }
.list { display: grid; gap: 7px; }
.list li { padding-left: 18px; position: relative; }
.list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 2px; background: var(--ink); }
.stamp { margin-top: 32px !important; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 15px; color: var(--ink-2); }

.swap { margin-top: 22px; display: grid; }
.swap li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 13px 0 12px; border-top: 1px solid rgba(43, 47, 51, 0.3); font-size: 17px; }
.swap b { font-weight: 700; }

.dir-name { font-size: 52px; line-height: 1; font-weight: 900; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.012em; }
.dir-thesis { margin-top: 18px !important; font-size: 22px; line-height: 1.35; }
.spec { margin-top: 30px; display: grid; }
.spec div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 13px 0 12px; border-top: 1px solid currentColor; font-size: 17px; }
.spec dt { font-weight: 800; font-size: 14px; font-stretch: 75%; letter-spacing: 0.07em; text-transform: uppercase; padding-top: 3px; }
.chips { display: flex; gap: 0; margin-bottom: 8px; }
.chips i { display: block; width: 44px; height: 30px; border: 1px solid rgba(140, 147, 152, 0.7); margin-right: -1px; }
.dir-a, .dir-b, .dir-c { background: none; }
.dir-a .card-body { background: #E3E6E8; }
.dir-b .card-body { background: var(--deep); color: #E3E6E8; }
.dir-b .spec div { border-top-color: rgba(184, 190, 196, 0.5); }
.dir-c .card-body { background: var(--paper); }
.dir-c .spec div { border-top-color: var(--line); }

.notes { counter-reset: n; display: grid; gap: 14px; font-size: 17px; }
.notes li { counter-increment: n; display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; }
.notes li::before { content: counter(n); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 700; }

/* ---------- phones: a list of the pages in place of the canvas ---------- */

.is-phone .viewport, .is-phone .jump, .is-phone .zoom { display: none; }
.phone { position: fixed; inset: 52px 0 0 0; overflow-y: auto; overscroll-behavior: contain; }
.phone-in { max-width: 560px; margin: 0 auto; padding: 26px 16px 44px; display: grid; gap: 14px; }
.phone h2 { font-size: 25px; line-height: 1.15; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; text-wrap: balance; }
.phone-lead { margin-bottom: 6px !important; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.phone-item, .phone-dir { display: grid; gap: 6px; padding: 18px 18px 18px; background: var(--paper); color: var(--ink); text-decoration: none; box-shadow: 0 2px 5px rgba(27, 30, 33, 0.14); }
.phone-item b { font-size: 19px; font-weight: 800; font-stretch: 112%; }
.phone-item span, .phone-dir-line { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.phone-dir-name { display: flex; align-items: center; gap: 12px; font-size: 21px; line-height: 1.2; font-weight: 800; font-stretch: 112%; }
.phone-dir-name i { display: grid; place-items: center; flex: none; width: 36px; height: 36px; background: var(--ink); color: var(--paper); font-style: normal; font-size: 20px; font-stretch: 62%; }
.phone-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.phone-links a { display: flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid var(--ink); color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.phone-links a:first-child { background: var(--ink); color: var(--paper); }
.phone-note { margin-top: 12px !important; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.phone-canvas { justify-self: start; min-height: 44px; padding: 0 16px; background: none; border: 1px solid var(--ink-2); border-radius: 0; cursor: pointer; font-size: 14px; font-weight: 600; }

@media (max-width: 760px) {
  .bar { gap: 8px; padding: 0 8px; }
  .bar-title h1 span, .zoom output { display: none; }
  .is-phone .bar-title h1 span { display: inline; }
  /* on the canvas the jump buttons need the room the title takes */
  body:not(.is-phone) .bar-title h1 { display: none; }
  .jump { overflow-x: auto; }
  .jump button { padding: 0 8px; font-size: 12.5px; }
}
