/* Ostinato website, from the brand guidelines (Engraved on Black): a dark rack panel, wide engraved
   capitals in Archivo, aluminium for the quiet parts and one Signal orange for what's live. Follows the light
   or dark system setting. Colour values come from the kit's tokens.css. */

:root {
  --accent: #f19737;            /* Signal */
  --accent-text: #965706;       /* Signal, darkened for text on light (4.6:1) */
  --on-accent: #000;
  --bg: #e4e6e9;                /* Ground */
  --card: #ffffff;              /* Surface */
  --card-shade: #f7f7f8;
  --text: #191c20;
  --text-2: rgba(25, 28, 32, 0.68);
  --text-3: rgba(25, 28, 32, 0.5);
  --hairline: rgba(25, 28, 32, 0.12);
  --panel: rgba(25, 28, 32, 0.04);
  --glow: transparent;
  --card-glow: transparent;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius-card: 14px;
  --radius-key: 10px;
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display-wdth: 125;
  --page: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-text: #f19737;
    --bg: #121417;              /* Panel, darkest */
    --card: #191c20;
    --card-shade: #16181c;      /* Panel */
    --text: #f2f3f5;
    --text-2: rgba(201, 204, 209, 0.86);   /* Aluminium */
    --text-3: rgba(201, 204, 209, 0.6);
    --hairline: rgba(201, 204, 209, 0.13);
    --panel: rgba(201, 204, 209, 0.04);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0 0 0.5em;
  font-variation-settings: "wdth" 112;
}

/* The engraved voice: wide capitals, as in the wordmark. */
h1,
h2 {
  font-variation-settings: "wdth" var(--display-wdth);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 20px;
}

/* Small capital label, as above the app's readouts and cards. */
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variation-settings: "wdth" var(--display-wdth);
  color: var(--text-2);
}

.label.accent {
  color: var(--accent-text);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.lead {
  font-size: 1.2rem;
  color: var(--text-2);
  max-width: 40em;
}

.muted {
  color: var(--text-2);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand .lockup {
  height: 18px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--panel);
}

.site-header .nav-toggle {
  display: none;
}

@media (max-width: 720px) {
  .site-header .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
  }
}

/* ---------- Keys (buttons) ---------- */

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-key);
  border: 1px solid var(--hairline);
  background: linear-gradient(var(--card), var(--card-shade));
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.key:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration: none;
}

.key.prominent {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
  box-shadow: none;
}

.key.prominent:hover {
  background: #f5a650;
}

.key.small {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  box-shadow: none;
}

.key svg {
  width: 18px;
  height: 18px;
}

/* ---------- Surfaces ---------- */

.card {
  position: relative;
  background: linear-gradient(var(--card), var(--card-shade));
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* A hairline edge, like a panel seam. */
.card {
  border: 1px solid var(--hairline);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 22px;
}

.lrc {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 5px;
  padding: 0 5px;
  line-height: 1.5;
  vertical-align: 0.15em;
}

/* ---------- Home page ---------- */

.hero {
  padding: 72px 0 40px;
  text-align: center;
}

.hero-icon {
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  border-radius: 23px;
  box-shadow: var(--shadow);
}

.hero-lockup {
  margin: 0 auto 22px;
  color: var(--text);
  line-height: 0;
}

.hero-lockup .lockup {
  width: min(520px, 86vw);
  height: auto;
}

.hero .lead {
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.availability {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-3);
}

.hero-shots {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 28px;
  margin-top: 56px;
}

.device {
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  background: var(--card);
}

.device.phone {
  width: min(300px, 72vw);
  border-radius: 42px;
}

.device.phone-land {
  width: min(600px, 100%);
  border-radius: 34px;
}

.device.tablet {
  width: min(680px, 100%);
  border-radius: 28px;
}

.device.watch {
  width: 170px;
  border-radius: 44px;
}

/* Mac windows on the product page. */
.mac-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.mac-shots .device.mac {
  width: 100%;
}

/* A Mac window, shown with a slim frame. */
.device.mac {
  width: min(860px, 100%);
  border-radius: 14px;
}

@media (max-width: 820px) {
  .hero-shots .device.tablet {
    display: none;
  }
}

section {
  padding: 72px 0;
}

.section-head {
  max-width: 44em;
  margin-bottom: 36px;
}

.section-link {
  margin-top: 24px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature .icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  margin-bottom: 16px;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.feature .icon svg {
  width: 26px;
  height: 26px;
}

.feature.featured .icon {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}

.feature p {
  color: var(--text-2);
  margin: 0;
}

.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.showcase.flip .showcase-media {
  order: -1;
}

.showcase-media {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  min-width: 0;
}

.showcase ul {
  padding-left: 1.2em;
  color: var(--text-2);
}

.showcase li {
  margin-bottom: 0.5em;
}

@media (max-width: 860px) {
  .showcase {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .showcase.flip .showcase-media {
    order: 0;
  }
}

.cta {
  text-align: center;
  padding: 48px 24px;
}

.cta p {
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0 48px;
  color: var(--text-3);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  gap: 16px 32px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.site-footer a {
  color: var(--text-2);
}

.site-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- Manual ---------- */

.manual {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  padding: 40px 20px 80px;
  max-width: var(--page);
  margin: 0 auto;
}

.manual-nav {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.manual-nav ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.manual-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.manual-nav a:hover {
  color: var(--text);
  background: var(--panel);
}

.manual-nav a[aria-current="page"] {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

@media (max-width: 860px) {
  .manual {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 24px;
  }

  .manual-nav {
    position: static;
    max-height: none;
  }

  .manual-nav ol {
    position: relative;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .manual-nav a {
    white-space: nowrap;
    background: var(--panel);
  }
}

.doc {
  max-width: 46em;
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.doc h2 {
  font-size: 1.6rem;
  margin-top: 2.2em;
  padding-top: 0.2em;
}

.doc h3 {
  margin-top: 1.8em;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
}

.doc li {
  margin-bottom: 0.45em;
}

.doc li::marker {
  color: var(--accent-text);
}

.doc .lead {
  margin-bottom: 1.6em;
}

.doc figure {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.doc figure .device.phone {
  width: min(280px, 80%);
}

.doc figure .device.tablet,
.doc figure .device.mac {
  width: 100%;
}

/* Why you'd use a feature, shown under its heading. */
.why {
  margin: 12px 0 20px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent);
  color: var(--text-2);
}

.why strong {
  color: var(--text);
}

.doc figcaption {
  font-size: 0.9rem;
  color: var(--text-2);
  text-align: center;
  max-width: 34em;
}

.figure-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 0.95rem;
}

.table-scroll {
  overflow-x: auto;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}

.doc th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}

.doc td:first-child {
  font-weight: 700;
  white-space: nowrap;
}

/* A named control in the app, shown like a key. */
.ui {
  display: inline-block;
  font-weight: 700;
  font-size: 0.92em;
  padding: 0 7px;
  border-radius: 7px;
  border: 1px solid var(--hairline);
  background: var(--panel);
  white-space: nowrap;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.callout .label {
  display: flex;
  margin-bottom: 6px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0 !important;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin-bottom: 18px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.toc-cards {
  margin-top: 32px;
}

.toc-cards a.card {
  display: block;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.toc-cards a.card:hover {
  box-shadow: var(--shadow);
}

.toc-cards .card p {
  color: var(--text-2);
  margin: 6px 0 0;
  font-size: 0.95rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.pager a {
  text-decoration: none;
  font-weight: 700;
}

.pager .label {
  display: block;
}

.pager .next {
  text-align: right;
  margin-left: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
  z-index: 20;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: 10px;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  font-size: 0.9rem;
  line-height: 1.6;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.showcase-media .device.phone {
  width: min(280px, 44vw);
}

.showcase-media .device.watch {
  width: min(170px, 28vw);
}

.figure-row .device.phone {
  width: min(280px, 42vw);
}

.figure-row .device.watch {
  width: min(170px, 28vw);
}

.figure-row figure {
  margin: 12px 0;
}

/* ---------- Manual extras ---------- */

/* The stage's transport keys, drawn with their names under them. */
.keys-diagram ol {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keys-diagram li {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.keys-diagram li.wide {
  flex-grow: 2.2;
}

.keys-diagram .key {
  width: 100%;
  padding: 0;
  min-height: 56px;
  font-size: 1.3rem;
  cursor: default;
}

.keys-diagram .key.auto {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.keys-diagram .key-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-2);
  line-height: 1.25;
}

@media (max-width: 520px) {
  .keys-diagram ol {
    gap: 5px;
  }

  .keys-diagram .key {
    min-height: 46px;
    font-size: 1.05rem;
  }

  .keys-diagram .key-name {
    font-size: 0.68rem;
  }
}

/* A list to tick through, such as the gig-day checklist. */
.checklist {
  padding-left: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 34px;
  margin: 12px 0;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid var(--accent);
}

/* Terms and what they mean. */
.glossary dt {
  margin-top: 18px;
  font-weight: 700;
}

.glossary dd {
  margin: 4px 0 0;
}
