/* Cristolab's verified light palette, shared by Cristal and its blog. */
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/geist-latin.woff2') format('woff2');
}

:root {
  --paper: #f7f4ef;
  --ink: #241e1a;
  --muted: #6c6057;
  --accent: #ad3f0d;
  --accent-fill: #ff7939;
  --accent-ink: #13110f;
  --accent-hover: #f56b29;
  --soft: #f1e8dd;
  --line: #d9cfc5;
  --surface: #fff;
  --font-body: Geist, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.cristal-theme { background: var(--paper); color: var(--ink); font-family: var(--font-body); }
.cristal-theme ::selection { color: var(--ink); background: #ffd5bd; }
.cristal-theme :is(input, select, textarea) { caret-color: var(--accent); }
.cristal-theme :is(button, a, summary, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.cristal-theme button { -webkit-user-select: none; user-select: none; }
.cristal-theme .wordmark span { color: var(--muted); }
.cristal-theme .navlinks { color: var(--muted); }
.cristal-theme .navlinks a { display: inline-flex; align-items: center; min-height: 44px; }
.cristal-theme .btn,
.cristal-theme .nav-demo,
.cristal-theme .na-dialog .na-primary {
  background: var(--accent-fill);
  border: 1px solid transparent;
  color: var(--accent-ink);
  box-shadow: none;
  font-weight: 600;
}
.cristal-theme .btn { min-height: 50px; padding: 12px 24px; }
.cristal-theme .btn.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
.cristal-theme .nav-demo { min-height: 44px; padding: 10px 18px; }
.cristal-theme :is(.text-btn, .text-link, .capture-caption a, .cristal-gallery-source a) { color: var(--accent); }
.cristal-theme .na-bar::before {
  background: rgb(247 244 239 / .94);
  border-color: rgb(217 207 197 / .8);
  box-shadow: 0 6px 20px rgb(36 30 26 / .07);
}
.cristal-theme .na-dialog {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
  font-family: var(--font-body);
}
.cristal-theme .na-dialog h2 { font-size: 30px; line-height: 1.18; letter-spacing: -.025em; }
.cristal-theme .na-dialog :is(p, small, .na-note) { color: var(--muted); }
.cristal-theme .na-dialog .na-close { color: var(--ink); border-color: var(--line); }
.cristal-theme .na-dialog select { color: var(--ink); border-color: var(--line); font-size: 16px; }
.cristal-theme .na-dialog .na-result { background: var(--soft); color: var(--ink); }
.cristal-theme .na-dialog .na-result + a { display: inline-flex; align-items: center; min-height: 44px; }
.cristal-theme .na-dialog::backdrop { background: rgb(36 30 26 / .55); }
.cristal-theme .cristal-gallery { background: var(--surface); }
.cristal-theme .cristal-gallery-heading h2 {
  max-width: 800px;
  font-size: clamp(30px, 3.3vw, 44px);
  line-height: 1.18;
  letter-spacing: -.025em;
}
.cristal-theme :is(.cristal-gallery-source, .cristal-gallery-hint) { color: var(--muted); }
.cristal-theme .cristal-gallery-track { scrollbar-color: var(--line) transparent; }
.cristal-theme .device-story[data-cristal-story] { --cristal-line: var(--line); --cristal-soft-ink: var(--muted); }
.cristal-theme .device-heading p,
.cristal-theme :is(.cristal-feature-step, .device-caption) { color: var(--muted); }
.cristal-theme :is(.cristal-feature-copy h3, .cristal-feature-note strong) { color: var(--ink); letter-spacing: -.025em; }
.cristal-theme :is(.cristal-feature-copy, .cristal-feature-note)::before { background: var(--accent); }
.cristal-theme :is(.cristal-feature-copy, .cristal-feature-note)::after { background: var(--line); }
.cristal-theme .device-story[data-cristal-story] .device-heading h2 { letter-spacing: -.03em; }
.cristal-theme .quiet-cta { background: var(--soft); border-color: var(--line); }
.cristal-theme .quiet-cta h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.2; letter-spacing: -.025em; }
.cristal-theme :is(.blog-intro h1, .article-header h1) {
  font-size: clamp(34px, 3.7vw, 52px);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.025em;
}
.cristal-theme .article-body blockquote { color: var(--ink); border-color: var(--line); }
.cristal-theme .article-end .category { background: var(--soft); }
.cristal-theme .search { border-color: var(--line); }
.cristal-theme .search input { font-size: 16px; }
.cristal-theme .menu-toggle { border-color: var(--line); }

@media (hover: hover) and (pointer: fine) {
  .cristal-theme .btn:hover,
  .cristal-theme .nav-demo:hover,
  .cristal-theme .na-dialog .na-primary:hover { background: var(--accent-hover); filter: none; box-shadow: none; }
  .cristal-theme .btn.secondary:hover { background: var(--soft); }
  .cristal-theme .navlinks a:hover,
  .cristal-theme .text-btn:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
}
@media (max-width: 800px) {
  .cristal-theme:has([data-cristal-story]) .navlinks a { display: none; }
  .cristal-theme .navlinks .nav-secondary { display: none; }
}
@media (max-width: 600px) {
  .cristal-theme .nav-demo { padding-inline: 12px; font-size: 12px; }
  .cristal-theme .navlinks.is-open a { display: flex; }
  .cristal-theme .navlinks.is-open { background: var(--paper); border-color: var(--line); }
  .cristal-theme .cristal-gallery-heading h2 { font-size: 32px; }
}
@media (prefers-reduced-transparency: reduce) {
  .cristal-theme .na-bar::before { background: var(--paper); }
}
@media (prefers-contrast: more) {
  .cristal-theme { --muted: #4c4037; --line: #8b7768; }
  .cristal-theme .na-bar::before { background: var(--paper); border-color: var(--line); }
}
