/* ============================================================
   HiveMind — Skills product page (/skills)
   Owns the .skills-page landing only (hero, why, catalog, how,
   checkout, FAQ). Loads AFTER css/main.css + css/sections/chrome.css,
   so every override wins by source order; those files are never edited.
   Colors / type / spacing from css/tokens.css. Ported from
   clickt.ca/skills, re-themed to the HiveMind system.

   Accent discipline (DESIGN.md): interactive teal (--hive-500) only on
   buttons + terminal tokens; non-interactive accent text uses Sage
   (--hive-300). One mono .eyebrow on the page (hero kicker). No Ember
   (the footer lockup dot owns the single use). No glassmorphism.
   ============================================================ */

/* Heading accent: source marks key words with <em>; render as a Sage
   colour shift, not italics (the site doesn't lean on italic type). */
.skills-page :is(h1, h2, h3) em {
  font-style: normal;
  color: var(--hive-300);
}

/* Sticky-header clearance for this page's in-page anchors. */
.skills-page :is(#skills, #how, #checkout, #faq) {
  scroll-margin-top: var(--nav-h);
}

/* Inline code chips (mono, quiet raised pill). */
.sk-code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--ink-3);
  color: var(--offwhite);
}

/* ============================================================
   1 · Hero
   ============================================================ */
.sk-hero {
  position: relative;
  overflow-x: clip;
  /* Radial teal wash over the --ink ground (echoes the homepage hero). */
  background: radial-gradient(60% 60% at 68% 42%,
                rgba(31, 122, 130, 0.16),
                rgba(7, 38, 43, 0) 70%);
}

.sk-hero__grid {
  display: grid;
  /* minmax(0,1fr) (not a bare 1fr) so the terminal's long, unbreakable command
     line scrolls inside its own overflow-x box instead of forcing the column —
     and every child — wider than the mobile viewport. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: center;
}

.sk-hero__grid > * {
  min-width: 0;
}

@media (min-width: 768px) {
  .sk-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: var(--space-3xl);
  }
}

.sk-hero__title {
  margin-top: var(--space-md);
  font-size: var(--fs-display);
  font-weight: 900;
  letter-spacing: var(--tracking-display);
}

.sk-lead {
  margin-top: var(--space-lg);
  max-width: 46ch;
  color: var(--muted-dark);
}

.sk-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.sk-btn-lg {
  padding: 0.9rem 1.75rem;
}

.sk-cta-note {
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted-dark);
}

/* ---- Terminal graphic (pure HTML/CSS, mono) ---- */
.sk-terminal {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-panel);
  background: var(--ink-2);
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}

.sk-term-bar {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--line-dark);
  background: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--muted-dark);
}

.sk-term-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-dark);
}

.sk-term-bar b {
  margin-left: auto;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.sk-term-body {
  padding: var(--space-lg) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.7;
  overflow-x: auto;              /* long command lines scroll, never wrap the layout */
}

.sk-term-body .ln {
  display: block;
  white-space: pre;
}

.sk-term-body .cmd { color: var(--offwhite); }
.sk-term-body .ok  { color: var(--hive-300); }
.sk-term-body .dim { color: var(--muted-dark); }
.sk-term-body .tok { color: var(--hive-500); }

/* Blinking caret — frozen under reduced motion. */
.sk-term-body .cur {
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  margin-left: 0.15ch;
  vertical-align: -0.15em;
  background: var(--hive-300);
  animation: sk-blink 1.1s steps(1, end) infinite;
}

@keyframes sk-blink {
  50% { opacity: 0; }
}

/* ============================================================
   2 · Why
   ============================================================ */
.sk-why .container {
  max-width: 60ch;
  text-align: center;
}

.sk-why p {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--tracking-display);
  color: var(--offwhite);
}

.sk-why .sub {
  margin-top: var(--space-lg);
  font-size: var(--fs-body);
  font-weight: 400;
  letter-spacing: normal;
  color: var(--muted-dark);
}

.sk-why em {
  font-style: normal;
  color: var(--hive-300);
}

/* ============================================================
   3 · The skills (catalog)
   ============================================================ */
.sk-section-head {
  max-width: 62ch;
  margin-bottom: var(--space-2xl);
}

.sk-section-lead {
  margin-top: var(--space-md);
  color: var(--muted-dark);
}

.sk-group {
  margin-top: var(--space-2xl);
}

.sk-group:first-of-type {
  margin-top: 0;
}

/* Group label: a sans h3 + a quiet mono note, split across a hairline. */
.sk-group-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line-dark);
}

.sk-group-label h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: normal;
}

.sk-group-label .n {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--hive-300);
}

.sk-group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .sk-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Skill card — raised surface, hairline border, meta row footed. */
.sk-skill {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sk-skill:hover {
  border-color: var(--hive-300);
  transform: translateY(-2px);
}

.sk-skill-name {
  font-size: var(--fs-h4);
  font-weight: 600;
}

.sk-skill-desc {
  margin-top: var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--muted-dark);
}

.sk-skill-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line-dark);
}

.sk-io {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4ch;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--muted-dark);
}

.sk-io .a { color: var(--offwhite); }
.sk-io .arw { color: var(--hive-300); }
.sk-io .b { color: var(--hive-300); }

.sk-count {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  color: var(--offwhite);
  white-space: nowrap;
}

.sk-catalog-foot {
  margin-top: var(--space-2xl);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted-dark);
}

/* ============================================================
   4 · How it works — raised full-bleed band
   ============================================================ */
.sk-how {
  background: var(--ink-2);
}

.sk-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* code block scrolls, never widens the track */
  gap: var(--space-xl);
  margin-top: var(--space-md);
}

@media (min-width: 768px) {
  .sk-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2xl);
  }
}

.sk-step {
  display: flex;
  gap: var(--space-lg);
  min-width: 0;                 /* grid item can shrink; its code block scrolls internally */
}

.sk-step-n {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1;
  color: var(--hive-300);
}

.sk-step-body {
  min-width: 0;                 /* let the code block's overflow-x scroll, not spill into col 2 */
  color: var(--offwhite);
}

/* Mono command block inside a step — darker inset against the ink-2 band. */
.sk-cmds {
  display: block;
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-button);
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--offwhite);
  overflow-x: auto;
}

.sk-cmds .ln { display: block; white-space: pre; }
.sk-cmds .tok { color: var(--hive-500); }

.sk-proof {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--line-dark);
}

.sk-proof .big {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  color: var(--offwhite);
}

.sk-proof .big b {
  color: var(--hive-300);
  font-weight: 600;
}

.sk-proof .src {
  margin-top: var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--muted-dark);
}

/* ============================================================
   5 · Checkout
   ============================================================ */
.sk-checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (min-width: 768px) {
  .sk-checkout-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-3xl);
  }
}

.sk-included {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sk-included li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  color: var(--offwhite);
}

.sk-included svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15em;
  color: var(--hive-300);
}

/* Buy card — the one raised panel that carries the price + CTA. */
.sk-buy {
  padding: var(--space-xl);
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-panel);
  text-align: center;
}

.sk-price {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1;
  letter-spacing: var(--tracking-display);
}

.sk-price-cur {
  font-size: var(--fs-h4);
  font-weight: 600;
  color: var(--muted-dark);
  letter-spacing: normal;
}

.sk-price-note {
  margin-top: var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--muted-dark);
}

.sk-buy-btn {
  width: 100%;
  margin-top: var(--space-lg);
}

.sk-buy-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  font-size: var(--fs-eyebrow);
  color: var(--muted-dark);
}

.sk-buy-secure svg {
  flex: none;
  color: var(--hive-300);
}

/* ============================================================
   6 · FAQ — native <details>/<summary> (works with no JS)
   ============================================================ */
.sk-faq {
  max-width: var(--prose);
  border-top: 1px solid var(--line-dark);
}

.sk-faq details {
  border-bottom: 1px solid var(--line-dark);
}

.sk-faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-block: var(--space-lg);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: var(--lh-heading);
  color: var(--offwhite);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.sk-faq summary::-webkit-details-marker { display: none; }

.sk-faq summary:hover { color: var(--white); }

.sk-faq summary:focus-visible {
  outline-offset: -3px;
  border-radius: var(--radius-button);
}

/* Chevron via the .pl span — points right, rotates down when open. */
.sk-faq .pl {
  flex: none;
  position: relative;
  width: 1rem;
  height: 1rem;
  margin-top: 0.35em;
  transition: transform 0.2s ease-out;
}

.sk-faq .pl::before,
.sk-faq .pl::after {
  content: "";
  position: absolute;
  background: var(--hive-300);
  border-radius: 2px;
}

/* horizontal bar */
.sk-faq .pl::before { top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); }
/* vertical bar (hidden when open → "+" becomes "−") */
.sk-faq .pl::after { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }

.sk-faq details[open] .pl::after { opacity: 0; }

.sk-faq .ans {
  padding-bottom: var(--space-lg);
  max-width: 62ch;
  color: var(--muted-dark);
}

.sk-flag {
  color: var(--hive-300);
  font-style: italic;
}

/* ============================================================
   Scroll-reveal — enhancement only. Hidden state is gated on .js so
   no-JS shows everything; reduced motion shows everything instantly.
   ============================================================ */
.js [data-reveal],
.js [data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js [data-reveal].is-revealed,
.js [data-reveal-stagger].is-revealed > * {
  opacity: 1;
  transform: none;
}

.js [data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.08s; }
.js [data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.16s; }
.js [data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: 0.24s; }
.js [data-reveal-stagger].is-revealed > *:nth-child(5) { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js [data-reveal-stagger] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sk-term-body .cur { animation: none; }
}
