/* spatialboards.com: the app's own colours and type (web/src/styles.css),
   light or dark with the visitor's system, laid out phone first. */

:root {
  --canvas: #eef0f2;
  --panel: #ffffff;
  --line: #dfe3e7;
  --ink: #1f2428;
  --muted: #6b7480;
  --accent: #c96b4f;
  --accent-ink: #ffffff;
  --dot: #c9ced4;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 12px 40px rgb(31 36 40 / 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #1b1e22;
    --panel: #24282d;
    --line: #33383f;
    --ink: #e7eaee;
    --muted: #9aa3ad;
    --dot: #3a4048;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 48px rgb(0 0 0 / 0.45);
  }
}

*,
*::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(--canvas);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 28px;
  }
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.skip:focus {
  top: 12px;
}

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

/* --- buttons ------------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition:
    filter 0.15s,
    background 0.15s,
    border-color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-quiet {
  border: 1px solid var(--line);
  background: var(--panel);
}

.btn-quiet:hover {
  border-color: var(--muted);
}

/* --- the bar at the top -------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--panel) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 18px;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: none;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  background: color-mix(in oklab, var(--line) 70%, transparent);
  color: var(--ink);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav .btn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.nav-signin {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav-signin:hover {
  background: color-mix(in oklab, var(--line) 70%, transparent);
  color: var(--ink);
}

@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }

  .nav-end {
    margin-left: 8px;
  }
}

/* --- the opening ---------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 56px 0 32px;
  text-align: center;
  /* The app's dotted board. */
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: center top;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to bottom, transparent, var(--canvas));
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

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

.hero h1 {
  max-width: 20ch;
  margin: 22px auto 0;
  font-size: clamp(2.5rem, 7vw, 4.4rem);
}

.lede {
  max-width: 40rem;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.facts .icon {
  color: var(--accent);
  width: 1.1em;
  height: 1.1em;
}

.shot {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero .shot {
  margin-top: 44px;
}

/* --- sections ------------------------------------------------------------------------------- */

section {
  padding: 64px 0;
}

@media (min-width: 820px) {
  section {
    padding: 96px 0;
  }
}

.section-head {
  max-width: 44rem;
  margin: 0 auto 36px;
  text-align: center;
}

.section-head h2,
.feature h2,
.section-title {
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Every kind of card, as a grid of tiles. */
.kinds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kinds li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-size: 15px;
  font-weight: 550;
}

.kinds .icon {
  color: var(--accent);
}

/* A grid's columns may not grow past the screen for a long line inside them. */
.feature > *,
.devices > *,
.grid > * {
  min-width: 0;
}

/* Pictures beside words, taking turns on wide screens. */
.feature {
  display: grid;
  gap: 28px;
  align-items: center;
}

.feature p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.08rem;
}

.ticks {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-wrap: pretty;
}

.ticks .icon {
  margin-top: 3px;
  color: var(--accent);
}

@media (min-width: 920px) {
  .feature {
    grid-template-columns: 5fr 8fr;
    gap: 56px;
  }

  .feature.flip {
    grid-template-columns: 8fr 5fr;
  }

  .feature.flip .words {
    order: 2;
  }
}

.band {
  border-block: 1px solid var(--line);
  background: var(--panel);
}

/* The rest, briefly. */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

.grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--canvas);
}

.grid h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.28rem;
}

.grid h3 .badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  color: var(--accent);
}

.grid p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
}

/* What comes in and what goes out, side by side on wide screens. */
.pair {
  display: grid;
  gap: 14px;
}

@media (min-width: 760px) {
  .pair {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

.pair > * {
  min-width: 0;
}

.pair article {
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.pair h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.45rem;
}

.pair .ticks {
  gap: 12px;
  color: var(--muted);
}

/* Light, dark, and two phones: the board, and the same kind of board as a list. */
.devices {
  display: grid;
  gap: 24px;
  align-items: end;
}

.phones {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.devices .phone {
  flex: 1 1 0;
  max-width: 220px;
  border-radius: 30px;
  border: 7px solid #111417;
  background: #111417;
}

.devices .phone img {
  border-radius: 23px;
}

@media (min-width: 900px) {
  .devices {
    grid-template-columns: 1fr auto;
    gap: 36px;
  }

  .phones {
    gap: 20px;
  }

  .devices .phone {
    flex: none;
    width: clamp(150px, 15vw, 196px);
  }
}

/* The close: an invitation to open the app. */
.closing {
  text-align: center;
}

.closing .section-head {
  margin-bottom: 0;
}

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

footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}
