/* studio.buffered.tv, built on the BufferedTV design system, as buffered.tv is.
   Dark first: ink-950 ground, violet the one hue, lavender for accents and
   links on dark. No gradients, no drop shadows. */

@font-face { font-family: "Rubik"; src: url("../fonts/Rubik-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("../fonts/Rubik-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("../fonts/Rubik-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("../fonts/Rubik-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;

  /* Colour tokens */
  --violet: #5B4BF0;
  --violet-deep: #3E31C9;
  --lavender: #B9B2FF;
  --lavender-soft: #E3E0FF;
  --ink-950: #0B0C11;
  --ink-900: #14161F;
  --ivory: #F5F3EE;
  --white: #FFFFFF;
  --surface: #0B0C11;
  --surface-raised: #161925;
  --ink: #F5F3EE;
  --ink-muted: #A3A5B8;
  --hairline: #262A3A;
  --brand: var(--violet);
  --on-brand: var(--white);

  /* Type */
  --sans: "Rubik", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --space-7: 80px;

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 48px;
  --radius-full: 9999px;

  --gutter: 16px;
  --measure: 1200px;
}

@media (min-width: 720px) { :root { --gutter: 40px; } }

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 18px/28px var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--violet); color: var(--on-brand); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); text-decoration: none;
}
.skip:focus { top: var(--space-3); }

.wrap { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

kbd { font: 500 0.85em/1 var(--mono); color: var(--ink); white-space: nowrap; }

/* ---------- Type styles ---------- */

.display {
  font-weight: 600; letter-spacing: -0.02em;
  font-size: 40px; line-height: 44px; margin: 0;
  text-wrap: balance;
}
@media (min-width: 720px) { .display { font-size: 56px; line-height: 60px; } }

.title {
  font-weight: 600; letter-spacing: -0.01em;
  font-size: 28px; line-height: 36px; margin: 0;
  text-wrap: balance;
}
@media (min-width: 720px) { .title { font-size: 32px; line-height: 40px; } }

.heading { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0; }

.label {
  font: 400 14px/20px var(--mono); letter-spacing: 0.06em;
  color: var(--ink-muted); margin: 0;
}

.strapline {
  font: 500 16px/24px var(--mono); letter-spacing: 0.06em;
  color: var(--lavender); margin: 0;
}
@media (min-width: 720px) { .strapline { font-size: 20px; line-height: 28px; } }

.lede { color: var(--ink-muted); margin: 0; max-width: 60ch; }
.muted { color: var(--ink-muted); }
.small { font-size: 15px; line-height: 22px; }

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

.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); min-height: 72px;
}

.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lockup__mark { width: 40px; height: 40px; flex: none; }
.lockup__word { height: 30px; width: auto; }
.lockup--small .lockup__mark { width: 32px; height: 32px; }
.lockup--small .lockup__word { height: 24px; }

.site-nav { display: flex; align-items: center; gap: var(--space-4); }
.site-nav a {
  color: var(--ink-muted); text-decoration: none;
  font: 400 14px/20px var(--mono); letter-spacing: 0.06em;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .nav-extra { display: none; }
@media (min-width: 1000px) { .site-nav .nav-extra { display: inline; } }
/* The narrowest phones keep Support; Privacy is in the footer too. */
@media (max-width: 419px) { .site-nav .nav-wide { display: none; } }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 var(--space-4);
  border-radius: var(--radius-full);
  font: 600 17px/1 var(--sans); text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button svg { width: 22px; height: 22px; flex: none; }
.button--quiet { background: transparent; color: var(--ink); border-color: var(--hairline); }
.button--quiet:hover { border-color: var(--ink-muted); }

.store { display: inline-flex; flex-direction: column; gap: var(--space-1); }
.store .label { padding-left: var(--space-2); }
.store__badges { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Apple's badges, as Apple draws them: not recoloured, not restyled, just a
   link around the picture, with a quarter of its height clear around it. */
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge img { height: 52px; width: auto; }
.badge--small img { height: 44px; }

.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-4) var(--space-3); }

/* ---------- Hero ---------- */

.hero { padding: var(--space-6) 0 var(--space-7); }
.hero .wrap { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 1000px) { .hero .wrap { grid-template-columns: 1fr 1fr; gap: var(--space-6); } }

.hero__copy { display: grid; gap: var(--space-4); justify-items: start; }
.hero__copy .actions { margin-top: var(--space-2); }

/* An iPad with an iPhone stood in front of it, bottom left. */
.hero__shots { position: relative; padding: 0 0 var(--space-5) 18%; max-width: 620px; margin: 0 auto; width: 100%; }
.hero__shots .tablet { max-width: none; }
.hero__shots .phone {
  position: absolute; left: 0; bottom: 0; width: 34%; height: auto;
  border-color: var(--ink-950); outline: 2px solid var(--hairline);
}
.hero__shots .phone img { width: 100%; height: auto; }

/* ---------- Devices: a phone, a tablet and a Mac, drawn flat ---------- */

/* A flat ink body with a hairline edge around the screen, as buffered.tv
   draws its telly, phone and tablet. */
.phone, .tablet, .monitor__screen { position: relative; background: var(--ink-900); border: 2px solid var(--hairline); }
.phone { padding: 7px; border-radius: 36px; }
.phone img { border-radius: 29px; }
.phone::after {
  content: ""; position: absolute; top: 15px; left: 50%;
  width: 30%; height: 10px; transform: translateX(-50%);
  border-radius: var(--radius-full); background: var(--ink-950);
}
.tablet { padding: 10px; border-radius: 26px; max-width: 380px; }
.tablet img { width: 100%; height: auto; border-radius: 16px; }

.monitor { width: 100%; max-width: 400px; }
.monitor__screen { padding: 10px; border-radius: var(--radius-md); }
.monitor__view {
  aspect-ratio: 16 / 10; border-radius: var(--radius-sm); background: var(--ink-950); overflow: hidden;
  display: grid; place-items: center; place-content: center; gap: var(--space-3); padding: var(--space-4);
}
.monitor__view img { width: 100%; height: 100%; object-fit: cover; }
/* Until there's a Mac screenshot: the lockup, as the app shows it while it starts. */
.monitor__view .monitor__mark { width: 64px; height: 64px; object-fit: contain; }
.monitor__view .monitor__word { width: 70%; height: auto; object-fit: contain; }
.monitor__neck { width: 16%; height: 34px; margin: 0 auto; background: var(--ink-900); border: 2px solid var(--hairline); border-top: 0; }
.monitor__foot { width: 40%; height: 10px; margin: 0 auto; background: var(--hairline); border-radius: var(--radius-sm) var(--radius-sm) 4px 4px; }

.devices { display: grid; gap: var(--space-6); }
@media (min-width: 900px) {
  .devices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
}
.device { display: grid; grid-template-rows: auto 1fr; gap: var(--space-4); }
/* One height for all three, each standing on the same line. */
.device__stage { height: 360px; display: flex; align-items: flex-end; justify-content: center; }
.device__stage .phone { height: 100%; }
.device__stage .phone img { height: 100%; width: auto; }
.device__stage .tablet { height: 100%; }
.device__stage .tablet img { height: 100%; width: auto; }
.device__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.device__copy p { margin: 0 0 var(--space-2); color: var(--ink-muted); }
.device__copy .badge { margin-top: auto; }
.device__copy .label { margin-top: var(--space-1); }
@media (max-width: 899px) {
  .device__stage { height: 340px; }
}

/* ---------- Sections ---------- */

.section { padding: var(--space-7) 0; border-top: 1px solid var(--hairline); }
.section__head { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); max-width: 760px; }

/* ---------- Feature rows ---------- */

.features { display: grid; gap: var(--space-7); }
.feature { display: grid; gap: var(--space-5); align-items: center; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 5fr 7fr; gap: var(--space-6); }
  .feature:nth-child(even) .feature__shot { order: 2; }
}
/* A tall phone: a fixed height, centred in its column. */
.feature__shot { margin: 0; display: flex; justify-content: center; }
.feature__shot .phone { height: 560px; max-height: 80vh; }
.feature__shot .phone img { height: 100%; width: auto; }
@media (max-width: 599px) { .feature__shot .phone { height: 480px; } }
.feature__copy { display: grid; gap: var(--space-3); max-width: 60ch; }
.feature__copy p { margin: 0; color: var(--ink-muted); }

/* ---------- Cards ---------- */

.cards { display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: grid; gap: var(--space-3); align-content: start;
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--surface-raised); border: 1px solid var(--hairline);
}
.card svg { width: 32px; height: 32px; color: var(--lavender); }
.card p { margin: 0; color: var(--ink-muted); font-size: 16px; line-height: 24px; }

/* ---------- Gallery ---------- */

/* Phones and tablets side by side: one height for all, each as wide as its
   picture needs. */
.gallery { position: relative; }
.gallery__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: max-content;
  gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: var(--space-3); scrollbar-width: thin; scrollbar-color: var(--hairline) transparent;
  list-style: none; margin: 0; padding-left: 0;
}
@media (min-width: 720px) { .gallery__track { gap: var(--space-4); } }
.gallery__track li { scroll-snap-align: start; }
.gallery figure { margin: 0; display: grid; gap: var(--space-2); }
.gallery img {
  height: 440px; width: auto; max-width: none;
  border-radius: var(--radius-lg); border: 1px solid var(--hairline);
}
@media (min-width: 720px) { .gallery img { height: 560px; } }
.gallery figcaption { max-width: 32ch; }
.gallery__controls { display: flex; gap: var(--space-2); justify-content: flex-end; margin-top: var(--space-3); }

.icon-button {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 2px solid var(--hairline); background: transparent;
  color: var(--ink); cursor: pointer; padding: 0;
}
.icon-button:hover { border-color: var(--ink-muted); }
.icon-button svg { width: 18px; height: 18px; }

/* ---------- Questions ---------- */

.faq { display: grid; gap: var(--space-3); max-width: 860px; }
.faq details {
  background: var(--surface-raised); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 0 var(--space-4);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0;
  display: flex; justify-content: space-between; gap: var(--space-3);
  font-weight: 500; font-size: 19px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-top: 7px;
  border-right: 2px solid var(--lavender); border-bottom: 2px solid var(--lavender);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: 12px; }
.faq details p { margin: 0 0 20px; color: var(--ink-muted); }

/* ---------- Support, and the closing call ---------- */

.split { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.cta {
  background: var(--violet); color: var(--white);
  border-radius: var(--radius-xl); padding: var(--space-6) var(--space-4);
  display: grid; gap: var(--space-4); justify-items: center; text-align: center;
}
@media (min-width: 720px) { .cta { padding: var(--space-7) var(--space-6); } }
.cta p { margin: 0; max-width: 52ch; }
.cta a:not(.badge) { color: var(--white); }
.cta .label { color: var(--white); }
.cta .store { align-items: center; }
.cta .store .label { padding-left: 0; text-align: center; }
.cta__badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: var(--space-3); margin-top: var(--space-1); }

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

.site-footer { border-top: 1px solid var(--hairline); padding: var(--space-6) 0 var(--space-5); }
.site-footer .wrap { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
.footer-brand { display: grid; gap: var(--space-3); justify-items: start; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--lavender); }
.legal { grid-column: 1 / -1; border-top: 1px solid var(--hairline); padding-top: var(--space-4); display: grid; gap: var(--space-2); }
.legal p { margin: 0; }

/* "Built with love, supported by" and the SquareCows logo, on one line. */
.made-by a { display: inline-block; vertical-align: middle; margin-left: 2px; }
.made-by img { width: 89px; height: 28px; }

/* ---------- The privacy policy ---------- */

.doc { padding: var(--space-6) 0 var(--space-7); }
.doc .wrap { max-width: calc(820px + 2 * var(--gutter)); }
.doc header { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.doc h2 { font-size: 24px; line-height: 32px; font-weight: 600; margin: var(--space-6) 0 var(--space-3); }
.doc h3 { font-size: 19px; line-height: 28px; font-weight: 600; margin: var(--space-5) 0 var(--space-2); }
.doc p, .doc li { color: var(--ink-muted); }
.doc p { margin: 0 0 var(--space-3); }
.doc strong { color: var(--ink); font-weight: 500; }
.doc ul { padding-left: 1.2em; margin: 0 0 var(--space-3); }
.doc li { margin-bottom: var(--space-2); }
.doc li::marker { color: var(--lavender); }
.summary {
  background: var(--surface-raised); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: var(--space-4);
}
.summary p { margin: 0; }
.summary p + p { margin-top: var(--space-3); }
.summary .heading { margin: 0 0 var(--space-3); }
.table-wrap { overflow-x: auto; margin: 0 0 var(--space-3); border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 24px; min-width: 560px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 14px var(--space-3); border-bottom: 1px solid var(--hairline); }
.doc tr:last-child td { border-bottom: 0; }
.doc th { font: 400 13px/20px var(--mono); letter-spacing: 0.06em; color: var(--ink-muted); background: var(--surface-raised); }
.doc td { color: var(--ink-muted); }
.doc td:first-child { color: var(--ink); }

/* ---------- Small modifiers ---------- */

.cards--after { margin-top: var(--space-7); }
.cards--stack { grid-template-columns: 1fr !important; }
.card--link { text-decoration: none; color: inherit; transition: border-color .15s ease; }
.card--link:hover { border-color: var(--violet); }
.section__head--flush { margin-bottom: 0; }
.section--flush { border-top: 0; padding-top: 0; }
[hidden] { display: none !important; }

/* Grid items may shrink below their content's intrinsic width. */
.hero .wrap > *, .feature > *, .split > *, .site-footer .wrap > *, .cards > *, .devices > * { min-width: 0; }

/* Phones: the smaller lockup, so the header's links keep their distance. */
@media (max-width: 480px) {
  .site-header .lockup__mark { width: 32px; height: 32px; }
  .site-header .lockup__word { height: 22px; }
  .site-nav { gap: var(--space-3); }
}
