/*
 * OpenBoard site: plain CSS, light and dark from the system setting.
 * Brand: the red of the store icon (#c01f2e). Corner radii match the extension UI:
 * 6px for surfaces (panels, cards, screenshots, code) and 4px for controls (buttons, chips, inputs).
 */
:root {
  --brand: #c01f2e;
  --brand-hover: #a51a27;
  --brand-fg: #ffffff;
  --link: #b01b29;
  --bg: #ffffff;
  --bg-alt: #faf7f7;
  --fg: #1c1617;
  --muted: #625a5b;
  --border: #ebe4e4;
  --card: #ffffff;
  --tint: #fbeaec;
  --code-bg: #1d1416;
  --code-fg: #f3e9ea;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(40, 10, 14, 0.06), 0 8px 24px -12px rgba(40, 10, 14, 0.2);
  --shadow-lg: 0 2px 6px rgba(40, 10, 14, 0.08), 0 32px 64px -24px rgba(40, 10, 14, 0.35);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --link: #ff7a85;
    --bg: #110d0e;
    --bg-alt: #181213;
    --fg: #f6efef;
    --muted: #b3a7a8;
    --border: #2f2426;
    --card: #1d1617;
    --tint: #2a1215;
    --code-bg: #0b0809;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 32px 64px -24px rgba(0, 0, 0, 0.8);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: var(--link);
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

.wrap {
  width: min(1160px, 100% - 48px);
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--card);
}

/* --- header -------------------------------------------------------------------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}
.brand img {
  border-radius: var(--radius-sm);
}
.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-left: auto;
}
.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.top nav a:hover {
  color: var(--fg);
}
.top .button {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

/* --- buttons ------------------------------------------------------------------------------- */
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  background: var(--card);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.button:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
}
.button.primary {
  border-color: transparent;
  color: var(--brand-fg);
  background: var(--brand);
}
.button.primary:hover {
  background: var(--brand-hover);
}

/* --- hero ---------------------------------------------------------------------------------- */
.hero {
  padding: 88px 0 0;
  text-align: center;
  background: radial-gradient(70% 60% at 50% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  border-radius: var(--radius-sm);
  color: var(--fg);
  background: var(--tint);
  font-size: 13px;
  font-weight: 600;
}
h1 {
  max-width: 900px;
  margin: 0 auto 20px;
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
h1 em {
  font-style: normal;
  color: var(--brand);
}
@media (prefers-color-scheme: dark) {
  h1 em {
    color: var(--link);
  }
}
.lede {
  max-width: 720px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 19px;
}
.hero .cta {
  justify-content: center;
}
.note,
.small {
  color: var(--muted);
  font-size: 14px;
}
.hero .note {
  margin: 16px 0 56px;
}

/* Product shot: the editor in a simple window frame, as a real screenshot. */
.shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg-alt);
  font-size: 13px;
}
.shot-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--fg);
  background: var(--card);
}
.shot-tab img {
  border-radius: 2px;
}
.shot img.frame {
  display: block;
  width: 100%;
}
.shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.hero .shot {
  margin-bottom: -96px;
  position: relative;
  z-index: 1;
}

/* --- logos / works with -------------------------------------------------------------------- */
.works {
  padding: 152px 0 56px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  text-align: center;
}
.works p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.works ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.works li {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-weight: 600;
  font-size: 15px;
}

/* --- sections ------------------------------------------------------------------------------ */
.section {
  padding: 96px 0;
}
.section.alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}
.kicker {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (prefers-color-scheme: dark) {
  .kicker {
    color: var(--link);
  }
}
h2 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-lede {
  max-width: 680px;
  margin: 0 0 40px;
  color: var(--muted);
  font-size: 18px;
}
h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

/* Feature grid: a wide card with a screenshot, then smaller cards. */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card,
.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.card p,
.panel p {
  margin: 0;
  color: var(--muted);
}
.panel p + p {
  margin-top: 12px;
}
.card.wide {
  grid-column: span 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
  align-items: center;
}
.card.wide .shot {
  box-shadow: var(--shadow);
}
.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  color: var(--brand);
  background: var(--tint);
}
@media (prefers-color-scheme: dark) {
  .icon-tile {
    color: var(--link);
  }
}
.icon-tile svg {
  width: 20px;
  height: 20px;
}

/* Use cases: two columns of product shots with a caption each. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.gallery .shot {
  box-shadow: var(--shadow);
}
.gallery figcaption strong {
  color: var(--fg);
}

.two {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;
}
.ticks,
.steps {
  padding-left: 20px;
}
.ticks li,
.steps li {
  margin-bottom: 8px;
}
.ticks li::marker {
  color: var(--brand);
}

.code {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  border-radius: var(--radius);
  color: var(--code-fg);
  background: var(--code-bg);
  font-size: 14px;
  line-height: 1.55;
  box-shadow: var(--shadow);
}
.code code {
  padding: 0;
  background: none;
}
.code .add {
  color: #86efac;
}
.code .del {
  color: #fca5a5;
}
.code .dim {
  color: #a8999b;
}
.code-title {
  display: block;
  margin: -8px 0 12px;
  color: #a8999b;
  font-size: 13px;
}

/* Free, open source, in your repo. */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Closing call to action in the brand color. */
.closing {
  padding: 88px 0;
  color: #ffffff;
  background: var(--brand);
  text-align: center;
}
.closing h2 {
  margin: 0 auto 12px;
}
.closing p {
  margin: 0 auto 28px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}
.closing .cta {
  justify-content: center;
}
.closing .button {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: transparent;
  box-shadow: none;
}
.closing .button.primary {
  color: var(--brand);
  background: #ffffff;
}
.closing .button.primary:hover {
  background: #fbeaec;
}
.closing code {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.18);
}
.closing .small {
  margin: 20px auto 0;
  color: rgba(255, 255, 255, 0.85);
}
.closing :focus-visible {
  outline-color: #ffffff;
}

/* --- footer -------------------------------------------------------------------------------- */
.foot {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}
.foot p {
  margin: 4px 0;
}

/* Grid items may shrink below their content (code blocks scroll instead of widening the page). */
.bento > *,
.pillars > *,
.two > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .bento,
  .pillars,
  .gallery,
  .two {
    grid-template-columns: minmax(0, 1fr);
  }
  .card.wide {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-top: 56px;
  }
  .top nav a:not(.keep) {
    display: none;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .top-inner {
    gap: 12px;
  }
  .top nav {
    display: none;
  }
  .top .button {
    margin-left: auto;
  }
  .chips li {
    font-size: 12px;
  }
  .lede {
    font-size: 17px;
  }
}

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