
:root {
  --coral: #f15848;
  --sky: #34c3e5;
  --paper: #fff3f0;
  --ink: #060000;
  /* Sticky .nav: 12px + 65px logo + 12px padding + small buffer for borders */
  --sticky-nav-offset: 104px;
  /* Set when #promo-bar is visible (see assets/js/promo-bar.js) */
  --promo-bar-height: 0px;
}

* {
  box-sizing: border-box;
}

html {
  /* Fragment / in-page links scroll so content isn’t hidden under sticky promo + nav */
  scroll-padding-top: calc(var(--promo-bar-height) + var(--sticky-nav-offset));
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.promo-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.promo-bar[hidden] {
  display: none !important;
}

.promo-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 52px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 44px;
}

.promo-bar__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  color: rgba(255, 243, 240, 0.95);
  text-decoration: none;
  transition: color 0.15s ease;
}

.promo-bar__link:hover {
  color: var(--sky);
}

.promo-bar__link:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

.promo-bar__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
}

.promo-bar__title {
  font-weight: 600;
}

.promo-bar__cta {
  font-weight: 600;
  color: var(--sky);
  white-space: nowrap;
}

.promo-bar__link:hover .promo-bar__cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.promo-bar__close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 243, 240, 0.75);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.promo-bar__close:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
}

.promo-bar__close:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: var(--promo-bar-height);
  z-index: 10;
  background: var(--paper);
  padding: 12px 24px;
  margin: 0 -24px;
  width: calc(100% + 48px);
}

.nav-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo {
  display: block;
  height: 65px;
  width: auto;
}

.logo-mark {
  display: block;
  height: 42px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.nav-links a {
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  border-bottom-color: var(--coral);
}

.hero {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: center;
}

.hero-title {
  font-size: 42px;
  line-height: 1.1;
  margin: 18px 0 16px;
}

.hero-subtitle {
  font-size: 18px;
  margin: 0 0 24px;
  max-width: 520px;
}

.feature-tag {
  position: relative;
  border-bottom: 1px dashed var(--sky);
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
  cursor: help;
}

.feature-tag:hover {
  color: var(--sky);
  border-bottom-color: var(--coral);
}

.feature-tag::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(6, 0, 0, 0.18);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 100;
}

/* Small arrow pointing down */
.feature-tag::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 100;
}

.feature-tag:hover::after,
.feature-tag:hover::before,
.feature-tag:focus-visible::after,
.feature-tag:focus-visible::before {
  opacity: 1;
}

/* title= tooltips are unreliable on touch and for many keyboard users; show
   the same meaning inline when hover isn’t available or when focusing the term. */
.feature-tag-expansion {
  display: none;
  font-size: 0.92em;
  font-weight: 400;
  color: rgba(6, 0, 0, 0.58);
}

@media (hover: none), (pointer: coarse) {
  .feature-tag-expansion {
    display: inline;
  }
}

.feature-tag:focus-visible + .feature-tag-expansion {
  display: inline;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--coral);
  color: var(--paper);
  border-color: var(--coral);
}

.btn-secondary {
  background: transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(6, 0, 0, 0.12);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(52, 195, 229, 0.15);
  font-weight: 600;
  font-size: 14px;
}

.section {
  margin-top: 72px;
}

.section-title {
  font-size: 26px;
  margin-bottom: 16px;
}

.section-subtitle {
  margin-top: 0;
  max-width: 760px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(6, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(6, 0, 0, 0.06);
}

.card h3 {
  margin-top: 0;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(241, 88, 72, 0.15);
  margin-bottom: 10px;
  font-weight: 600;
}

.list {
  padding-left: 18px;
  margin: 0;
}

.list a,
.list-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(6, 0, 0, 0.3);
}

.list a:hover,
.list-link:hover {
  color: var(--coral);
  text-decoration-color: var(--coral);
}

.list li {
  margin-bottom: 8px;
}

.list-columns {
  columns: 2;
  column-gap: 24px;
}

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

.callout {
  border-left: 4px solid var(--sky);
  padding: 16px 20px;
  background: rgba(52, 195, 229, 0.1);
  border-radius: 12px;
}

.code {
  background: #0b0b0b;
  color: #f8f8f8;
  padding: 16px;
  border-radius: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    monospace;
  font-size: 13px;
  overflow-x: auto;
}

.footer {
  margin-top: 72px;
  border-top: 1px solid rgba(6, 0, 0, 0.1);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Artwork page styles */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.artwork-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(6, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(6, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.artwork-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(6, 0, 0, 0.1);
}

.artwork-card--dark {
  background: var(--ink);
}

.artwork-preview {
  background: var(--paper);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  margin-bottom: 20px;
}

.artwork-card--dark .artwork-preview {
  background: #1a1a1a;
}

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

.artwork-info h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.artwork-card--dark .artwork-info h3 {
  color: #fff;
}

.artwork-variant {
  margin: 0 0 16px;
  font-size: 14px;
  color: rgba(6, 0, 0, 0.6);
}

.artwork-card--dark .artwork-variant {
  color: rgba(255, 255, 255, 0.7);
}

.download-buttons {
  display: flex;
  gap: 8px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid rgba(6, 0, 0, 0.2);
  color: var(--ink);
  transition: all 0.2s ease;
  text-decoration: none;
}

.artwork-card--dark .download-btn {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.download-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.artwork-card--dark .download-btn:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.download-btn svg {
  flex-shrink: 0;
}

.color-swatches {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.color-swatch {
  display: flex;
  align-items: center;
  gap: 16px;
}

.swatch {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(6, 0, 0, 0.1);
  flex-shrink: 0;
}

.swatch-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.swatch-info strong {
  font-size: 16px;
  font-weight: 600;
}

.swatch-info code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  color: rgba(6, 0, 0, 0.6);
  background: rgba(6, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.coc .coc-heading {
  font-size: 20px;
  margin: 28px 0 12px;
}

.coc .coc-heading:first-of-type {
  margin-top: 0;
}

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

.coc .coc-subheading {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 10px;
}

.coc .coc-heading .coc-anchor,
.coc .coc-subheading .coc-anchor {
  color: inherit;
  text-decoration: none;
}

.coc .coc-heading .coc-anchor:hover,
.coc .coc-subheading .coc-anchor:hover,
.coc .coc-heading .coc-anchor:focus-visible,
.coc .coc-subheading .coc-anchor:focus-visible {
  text-decoration: underline;
}

.coc code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
  background: rgba(6, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.coc ol.list {
  padding-left: 22px;
}

/* ── Docs page ─────────────────────────────────────────────────────────── */

.docs-toc {
  margin-bottom: 0;
}

.docs-toc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(6, 0, 0, 0.45);
  margin: 0 0 12px;
}

.docs-toc-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 24px;
}

.docs-toc-cols a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(6, 0, 0, 0.25);
}

.docs-toc-cols a:hover {
  color: var(--coral);
  text-decoration-color: var(--coral);
}

.docs-section {
  margin-top: 56px;
}

.docs-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(6, 0, 0, 0.4);
  margin: 0 0 20px;
}

.docs-entry {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid rgba(6, 0, 0, 0.07);
}

.docs-entry:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.docs-entry-heading {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.docs-entry-anchor {
  color: inherit;
  text-decoration: none;
}

.docs-entry-anchor:hover,
.docs-entry-anchor:focus-visible {
  text-decoration: underline;
}

.docs-entry-kind {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(52, 195, 229, 0.14);
  color: rgba(6, 0, 0, 0.55);
}

.docs-entry > p {
  margin: 0 0 16px;
  font-size: 15px;
  color: rgba(6, 0, 0, 0.72);
  max-width: 760px;
}

.docs-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(6, 0, 0, 0.09);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.docs-table th {
  background: rgba(6, 0, 0, 0.04);
  font-weight: 600;
  padding: 9px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(6, 0, 0, 0.09);
}

.docs-table td {
  padding: 8px 14px;
  vertical-align: top;
  border-bottom: 1px solid rgba(6, 0, 0, 0.06);
  line-height: 1.55;
}

.docs-table tr:last-child td {
  border-bottom: none;
}

.docs-table td:first-child {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  white-space: nowrap;
  color: var(--coral);
}

.docs-table td:nth-child(2) {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  white-space: nowrap;
  color: rgba(6, 0, 0, 0.55);
}

.docs-table--enum td:first-child {
  color: rgba(6, 0, 0, 0.55);
  font-size: 13px;
}

.docs-table--enum td:nth-child(2) {
  color: var(--coral);
}

.docs-sub-entry {
  margin-top: 24px;
}

.docs-sub-entry-heading {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  color: rgba(6, 0, 0, 0.75);
}

.docs-note {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(52, 195, 229, 0.08);
  border-left: 3px solid var(--sky);
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  color: rgba(6, 0, 0, 0.7);
}

.docs-note pre {
  margin: 8px 0 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
}

/* ── End docs page ──────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  :root {
    /* Stacked logo + nav links sit taller than the single-row header */
    --sticky-nav-offset: 148px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-columns {
    columns: 1;
  }

  .artwork-grid {
    grid-template-columns: 1fr;
  }
}
