/* =========================================================================
   Squark Box — pages under /squarkbox
   The instrument's own look: a dark bench, brushed-aluminium panels with
   screws, blue section heads between rules, the stencil name plate, and the
   black readout with amber text. Fonts are the ones bundled in the app.
   ========================================================================= */

/* ---- Fonts (SIL Open Font License, see fonts/OFL.txt) ------------------ */
@font-face {
  font-family: "Big Shoulders Stencil Display";
  src: url("/squarkbox/fonts/BigShouldersStencil-800.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Big Shoulders Text";
  src: url("/squarkbox/fonts/BigShouldersText-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Share Tech Mono";
  src: url("/squarkbox/fonts/ShareTechMono.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

/* ---- Variables (colours taken from the faceplate) ---------------------- */
:root {
  --desk: #17191a;
  --desk-2: #202325;
  --desk-ink: #c9ccc6;
  --desk-dim: #7d827c;
  --alu: #a9aaa4;
  --ink: #2b2b28;
  --head: #274d9e;
  --amber: #ff9a3c;
  --cyan: #4fc3dc;
  --led: #ff4a2a;

  --f-logo: "Big Shoulders Stencil Display", Impact, "Arial Narrow", sans-serif;
  --f-label: "Big Shoulders Text", "Arial Narrow", Arial, sans-serif;
  --f-mono: "Share Tech Mono", ui-monospace, Menlo, monospace;

  /* one screw head, placed in each corner of a panel */
  --screw: radial-gradient(circle, #e2e2dc 0 1.5px, #8a8b86 2px 4px, rgba(0, 0, 0, .45) 4.6px, transparent 5.4px);

  color-scheme: dark;
}

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 70% at 50% 0%, var(--desk-2), var(--desk) 70%) var(--desk);
  color: var(--desk-ink);
  font-family: var(--f-mono);
  font-size: 15px;
  line-height: 1.7;
}

img { display: block; max-width: 100%; }

a { color: var(--cyan); }
a:hover { color: #fff; }

::selection { background: var(--amber); color: #111; }

.sb-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.sb-narrow { max-width: 820px; margin-left: auto; margin-right: auto; }

/* ---- Top bar ------------------------------------------------------------ */
.sb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.sb-logo {
  font-family: var(--f-logo);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .14em;
  color: var(--desk-ink);
  text-decoration: none;
}

.sb-nav { display: flex; gap: 22px; }

.sb-nav a, .sb-footer a {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--desk-dim);
  text-decoration: none;
}

.sb-nav a:hover, .sb-footer a:hover { color: var(--desk-ink); }

/* ---- Hero: icon, name plate, readout ------------------------------------ */
.sb-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 32px;
}

.sb-icon {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .55);
  margin-bottom: 32px;
}

/* The engraved name plate, as on the faceplate */
.sb-plate {
  display: inline-grid;
  gap: 4px;
  padding: 20px 44px 18px;
  border-radius: 3px;
  background: linear-gradient(170deg, #cfcdc3, #a3a197 60%, #8b897f);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(0, 0, 0, .25);
  color: #141211;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55), 0 -1px 0 rgba(0, 0, 0, .35);
  text-align: center;
}

.sb-plate b, .sb-plate h1 {
  margin: 0;
  font-family: var(--f-logo);
  font-weight: 800;
  font-size: 54px;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sb-plate span {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.sb-plate--small b, .sb-plate--small h1 { font-size: 36px; }

/* The black readout with amber text */
.sb-readout {
  position: relative;
  background: #0b0c0b;
  border-radius: 4px;
  padding: 18px 22px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, .06), inset 0 2px 8px rgba(0, 0, 0, .9), 0 8px 20px rgba(0, 0, 0, .45);
  color: var(--amber);
  text-shadow: 0 0 8px rgba(255, 154, 60, .55);
  font-family: var(--f-mono);
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
}

.sb-readout::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), transparent 40%);
  pointer-events: none;
}

.sb-readout p { margin: 0; }
.sb-readout p + p { margin-top: 10px; }
.sb-readout a { color: var(--amber); }
.sb-readout .dim { color: rgba(255, 154, 60, .6); text-shadow: 0 0 5px rgba(255, 154, 60, .35); }

.sb-hero .sb-readout { max-width: 620px; margin-top: 36px; }

/* The red POWER lamp, lit */
.sb-lamp {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 10px;
  background: radial-gradient(circle at 38% 32%, #ffd9cf 0 10%, var(--led) 40%, #9a1d0c 100%);
  box-shadow: 0 0 10px rgba(255, 74, 42, .8), 0 0 0 2px #2a2b2a;
}

/* ---- The faceplate picture --------------------------------------------- */
.sb-shot {
  margin: 64px auto 0;
  max-width: 1000px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}

/* ---- Aluminium panels --------------------------------------------------- */
.sb-panel {
  position: relative;
  color: var(--ink);
  border-radius: 10px;
  padding: 38px 44px;
  background-color: var(--alu);
  background-image:
    var(--screw), var(--screw), var(--screw), var(--screw),
    linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)),
    url("/squarkbox/images/metal.jpg");
  background-size: 12px 12px, 12px 12px, 12px 12px, 12px 12px, auto, cover;
  background-position: left 10px top 10px, right 10px top 10px, left 10px bottom 10px, right 10px bottom 10px, center, center;
  background-repeat: no-repeat;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 0, 0, .3);
}

.sb-panel p, .sb-panel li { margin: 0; }
.sb-panel p + p { margin-top: 12px; }
.sb-panel a { color: var(--head); }
.sb-panel a:hover { color: #11285a; }
.sb-panel ul, .sb-panel ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }

/* Blue section head between two rules, as on the faceplate */
.sb-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--head);
  text-align: center;
}

.sb-head::before, .sb-head::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: var(--head);
  opacity: .8;
}

/* A head on the dark bench */
.sb-section-head { margin: 80px 0 24px; color: #5f86d6; }
.sb-section-head::before, .sb-section-head::after { background: #5f86d6; opacity: .6; }

/* Blocks within one panel */
.sb-blocks { display: grid; gap: 34px; }

/* ---- Description -------------------------------------------------------- */
.sb-description { margin-top: 64px; }
.sb-description p { font-size: 17px; line-height: 1.75; color: var(--desk-ink); margin: 0; }
.sb-description p + p { margin-top: 18px; }

/* ---- Video -------------------------------------------------------------- */
.sb-video {
  margin: 64px auto 0;
  max-width: 860px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #0b0c0b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}

.sb-video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---- Features ----------------------------------------------------------- */
.sb-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.sb-features .sb-panel { padding: 28px 24px 26px; }
.sb-features .sb-head { font-size: 18px; gap: 12px; }
.sb-features p { font-size: 14px; line-height: 1.6; }

/* ---- Specs, as readout lines ------------------------------------------- */
.sb-specs { padding: 8px 22px; }

.sb-spec {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 154, 60, .14);
}

.sb-spec:last-child { border-bottom: 0; }
.sb-spec span:last-child { text-align: right; }

/* ---- Closing line ------------------------------------------------------- */
.sb-cta { margin: 80px auto 0; max-width: 620px; text-align: center; }
.sb-cta .sb-readout { text-align: center; text-transform: uppercase; letter-spacing: .06em; }

.sb-badge { display: inline-block; }
.sb-badge img { display: block; height: 40px; width: auto; }
.sb-cta .sb-badge { margin-top: 22px; }

/* ---- Content pages (support, privacy) ----------------------------------- */
.sb-page-title { display: flex; justify-content: center; padding-top: 24px; margin-bottom: 40px; }
.sb-page-date { text-align: center; color: var(--desk-dim); margin: -24px 0 32px; }
.sb-page .sb-readout { margin-bottom: 28px; }

/* ---- Footer ------------------------------------------------------------- */
.sb-footer {
  margin-top: 96px;
  padding-top: 26px;
  padding-bottom: 32px;
  border-top: 1px solid rgba(201, 204, 198, .1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: var(--desk-dim);
  font-size: 13px;
}

.sb-footer p { margin: 0; }
.sb-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---- Phones and small tablets ------------------------------------------ */
@media (max-width: 900px) {
  .sb-features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .sb-wrap { padding: 0 16px; }
  .sb-features { grid-template-columns: 1fr; }
  .sb-panel { padding: 30px 22px; }
  .sb-plate { padding: 16px 24px 14px; }
  .sb-plate b, .sb-plate h1 { font-size: 38px; }
  .sb-plate--small b, .sb-plate--small h1 { font-size: 30px; }
  .sb-plate span { font-size: 11px; letter-spacing: .18em; }
  .sb-readout { font-size: 15px; padding: 16px 18px; }
  .sb-spec { flex-direction: column; gap: 2px; }
  .sb-spec span:last-child { text-align: left; }
  .sb-section-head { margin-top: 64px; }
  .sb-footer { justify-content: center; text-align: center; }
  .sb-footer nav { justify-content: center; }
}
