/* The branch pages of Duxels (duxels-ramas): dark ground and the Duxels colors; no external font, no image, no inline style anywhere (the CSP allows only 'self').
   The pillar's color comes from the page's data-pillar (tools/build.mjs appends one rule per pillar from src/pillars.js: --p the color, --p-ink the text ON it).
   The common header and footer come from duxels-shared (chrome.css, loaded AFTER this file: its `a { color: inherit }` is why the rules below name their container). */
:root {
  --h-bg: #0e1324;
  --h-card: #161f3d;
  --h-line: #24304f;
  --h-text: #e8ecf7;
  --h-text2: #c9d2e8;
  --h-muted: #a8b3cf;
  --h-link: #8fb4ff;
  --h-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --p: #4f8cff;
  --p-ink: #0e1324;
}
html { background: var(--h-bg); color-scheme: dark; scroll-padding-top: 88px; }
body { margin: 0; background: var(--h-bg); color: var(--h-text2); font: 16px/1.65 var(--h-font); -webkit-text-size-adjust: 100%; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 16px; border-radius: 10px; background: var(--p); color: var(--p-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.shell { max-width: 1080px; margin: 0 auto; padding: 88px 20px 64px; }
.shell section { margin-top: 56px; }

/* the hero */
.hero { padding-top: 32px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--h-text2); font-size: .95rem; font-weight: 600; letter-spacing: .02em; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.hero h1 { margin: 0 0 .3em; color: var(--h-text); font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.02em; }
.lead { max-width: 62ch; margin: 0 0 1.6em; color: var(--h-text2); font-size: 1.2rem; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.actions .btn { display: inline-flex; margin-top: 0; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: 12px; font-weight: 700; text-decoration: none; }
.actions .btn-main { background: var(--p); color: var(--p-ink); }
.actions .btn-main:hover { background: var(--p); filter: brightness(1.08); }
.actions .btn-alt { border-color: var(--h-line); background: transparent; color: var(--h-text); }
.actions .btn-alt:hover { background: transparent; border-color: var(--p); }
a:focus-visible { outline: 2px solid var(--h-link); outline-offset: 3px; border-radius: 4px; }
.actions .btn-main:focus-visible { outline-color: var(--h-text); }

/* the sections */
.shell h2 { margin: 0 0 .7em; color: var(--h-text); font-size: 1.6rem; line-height: 1.25; letter-spacing: -.01em; scroll-margin-top: 88px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; border: 1px solid var(--h-line); border-top: 3px solid var(--p); border-radius: 14px; background: var(--h-card); }
.card h3 { margin: 0; color: var(--h-text); font-size: 1.1rem; line-height: 1.3; }
.card p { margin: 0; }
.card .includes { margin-top: auto; padding-top: 6px; color: var(--h-muted); font-size: .93rem; line-height: 1.5; }
.card .includes b { color: var(--h-text2); font-weight: 700; }

/* demos and the other branches of the pillar: the whole card is the link */
.cards-link .card { padding: 0; }
.cards-link .card a { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 44px; padding: 20px 22px; border-radius: 11px; color: var(--h-text); text-decoration: none; font-weight: 700; line-height: 1.3; }
.cards-link .card a:hover { background: #1c2850; }
.cards-link .card a span { color: var(--h-link); font-size: .9rem; font-weight: 600; }

@media (max-width: 760px) {
  .shell { padding: 76px 16px 48px; }
  .shell section { margin-top: 44px; }
  .cards { grid-template-columns: 1fr; }
  .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .cards-link .card a { transition: border-color .15s, background-color .15s, filter .15s; }
}

[data-pillar="red"] { --p: #F0392F; --p-ink: #0E1324; }
[data-pillar="green"] { --p: #22B14C; --p-ink: #0E1324; }
[data-pillar="blue"] { --p: #2A86FF; --p-ink: #0E1324; }
[data-pillar="white"] { --p: #E6EAF5; --p-ink: #0E1324; }
