/* ==========================================================================
   PillarCue - design tokens, themes, base styles and page shell
   Class prefix: .pc-

   Themes
     The page starts in LIGHT. <html data-theme="light|dark"> is set by
     assets/js/theme.js (before first paint) and flipped by the header switch.
     Page styles use the semantic tokens below (--pc-bg, --pc-ink, --pc-text...).

     .pc-on-dark forces the dark values of those tokens inside one block. The
     product windows (hero preview, demo), the closing call to action and the
     footer use it: they keep the dark workspace skin in both themes.
   ========================================================================== */

:root {
  /* Brand palette (fixed, same in both themes) */
  --pc-navy-950: #050d1a;
  --pc-navy-900: #081527;
  --pc-navy-800: #0c1e36;
  --pc-navy-700: #12294a;
  --pc-navy-600: #1a3660;
  --pc-blue: #2563eb;
  --pc-blue-700: #1d4ed8;
  --pc-blue-400: #60a5fa;
  --pc-blue-300: #93c5fd;
  --pc-cyan: #06b6d4;
  --pc-cyan-400: #22d3ee;
  --pc-cyan-300: #67e8f9;
  --pc-teal: #14b8a6;
  --pc-teal-400: #2dd4bf;
  --pc-purple: #8b5cf6;
  --pc-purple-400: #a78bfa;
  --pc-slate: #64748b;
  --pc-slate-400: #94a3b8;
  --pc-slate-300: #cbd5e1;
  --pc-slate-200: #e2e8f0;
  --pc-white: #ffffff;
  --pc-amber-400: #fbbf24;
  --pc-rose-400: #fb7185;
  --pc-green-400: #4ade80;

  --pc-grad: linear-gradient(120deg, #2563eb 0%, #06b6d4 55%, #14b8a6 100%);
  --pc-grad-ai: linear-gradient(120deg, #8b5cf6 0%, #2563eb 50%, #06b6d4 100%);

  --pc-font-display: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pc-font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --pc-radius-sm: 8px;
  --pc-radius: 12px;
  --pc-radius-lg: 18px;
  --pc-radius-xl: 24px;

  --pc-header-h: 64px;
  --pc-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* ---- Light theme (default) ---- */
  --pc-bg: #ffffff;
  --pc-bg-alt: #f2f6fc;
  --pc-surface: #ffffff;
  --pc-ink: #0b1a30;
  --pc-text: #334155;
  --pc-text-soft: #475569;
  --pc-text-mute: #64748b;
  --pc-line: rgba(15, 23, 42, 0.1);
  --pc-line-strong: rgba(15, 23, 42, 0.2);
  --pc-accent: #1d4ed8;
  --pc-focus: #2563eb;
  --pc-grad-text: linear-gradient(100deg, #1d4ed8 0%, #0891b2 55%, #0d9488 100%);
  --pc-eyebrow-bg: rgba(37, 99, 235, 0.07);
  --pc-eyebrow-line: rgba(37, 99, 235, 0.24);
  --pc-eyebrow-dot: #2563eb;
  --pc-ghost-bg: rgba(15, 23, 42, 0.04);
  --pc-ghost-bg-hover: rgba(15, 23, 42, 0.09);

  /* Page-level only (not changed by .pc-on-dark) */
  --pc-header-bg: rgba(255, 255, 255, 0.86);
  --pc-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05), 0 14px 34px -20px rgba(15, 23, 42, 0.22);
  --pc-shadow-float: 0 44px 90px -40px rgba(15, 23, 42, 0.55), 0 14px 34px -20px rgba(15, 23, 42, 0.3);
  --pc-glow-blue: rgba(37, 99, 235, 0.13);
  --pc-glow-purple: rgba(139, 92, 246, 0.1);
  --pc-glow-cyan: rgba(6, 182, 212, 0.12);
}

[data-theme="dark"] {
  --pc-header-bg: rgba(8, 21, 39, 0.8);
  --pc-shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --pc-shadow-float: 0 50px 120px -40px rgba(2, 8, 23, 0.95);
  --pc-glow-blue: rgba(37, 99, 235, 0.3);
  --pc-glow-purple: rgba(139, 92, 246, 0.2);
  --pc-glow-cyan: rgba(6, 182, 212, 0.15);
}

[data-theme="dark"],
.pc-on-dark {
  --pc-bg: #081527;
  --pc-bg-alt: #0a1a30;
  --pc-surface: #0e2139;
  --pc-ink: #ffffff;
  --pc-text: #e6edf7;
  --pc-text-soft: #a9b8cf;
  --pc-text-mute: #8496b0;
  --pc-line: rgba(148, 163, 184, 0.16);
  --pc-line-strong: rgba(148, 163, 184, 0.28);
  --pc-accent: #67e8f9;
  --pc-focus: #67e8f9;
  --pc-grad-text: linear-gradient(100deg, #93c5fd 0%, #67e8f9 50%, #5eead4 100%);
  --pc-eyebrow-bg: rgba(6, 182, 212, 0.08);
  --pc-eyebrow-line: rgba(34, 211, 238, 0.3);
  --pc-eyebrow-dot: #22d3ee;
  --pc-ghost-bg: rgba(148, 163, 184, 0.08);
  --pc-ghost-bg-hover: rgba(148, 163, 184, 0.16);
}

.pc-on-dark {
  color: var(--pc-text);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--pc-header-h) + 16px);
}

body.pc-body {
  margin: 0;
  background: var(--pc-bg);
  color: var(--pc-text);
  font-family: var(--pc-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

.pc-body h1,
.pc-body h2,
.pc-body h3,
.pc-body h4 {
  font-family: var(--pc-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--pc-ink);
  margin: 0;
}

.pc-body :focus-visible {
  outline: 2px solid var(--pc-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.pc-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Icons (inline sprite, see partials/_icons.cfm) */
.pc-i {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pc-i--fill {
  fill: currentColor;
}

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

.pc-skip:focus {
  top: 12px;
  color: var(--pc-bg);
}

/* Show one of two versions of something, by theme (logos) */
.pc-only-dark,
[data-theme="dark"] .pc-only-light {
  display: none !important;
}

[data-theme="dark"] .pc-only-dark {
  display: block !important;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--pc-font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--pc-ease), box-shadow 0.25s var(--pc-ease), background-color 0.2s, border-color 0.2s;
}

.pc-btn--sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.pc-btn--primary {
  background: var(--pc-grad);
  color: var(--pc-white);
  box-shadow: 0 10px 26px -10px rgba(6, 132, 212, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.pc-btn--primary:hover {
  color: var(--pc-white);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(6, 132, 212, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.pc-btn--ghost {
  background: var(--pc-ghost-bg);
  border-color: var(--pc-line-strong);
  color: var(--pc-ink);
}

.pc-btn--ghost:hover {
  background: var(--pc-ghost-bg-hover);
  color: var(--pc-ink);
}

.pc-btn:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Brand lockup. Logo files live in assets/img and are cut from the supplied
   logo by tools/brand/make_logos.py; replace the files, keep the names.
   -------------------------------------------------------------------------- */
.pc-brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}

.pc-brand img {
  display: block;
  width: auto;
  height: 30px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.pc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--pc-header-h);
  background: var(--pc-header-bg);
  border-bottom: 1px solid var(--pc-line);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.pc-header__in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.pc-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.pc-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--pc-text-soft);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.pc-nav a:hover {
  background: var(--pc-ghost-bg);
  color: var(--pc-ink);
}

.pc-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.pc-theme {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--pc-line-strong);
  border-radius: 50%;
  background: var(--pc-ghost-bg);
  color: var(--pc-ink);
  font-size: 17px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.3s var(--pc-ease);
}

.pc-theme:hover {
  background: var(--pc-ghost-bg-hover);
  transform: rotate(18deg);
}

.pc-theme__sun,
[data-theme="dark"] .pc-theme__moon {
  display: none;
}

[data-theme="dark"] .pc-theme__sun {
  display: block;
}

@media (min-width: 992px) {
  .pc-nav {
    display: flex;
  }
}

@media (max-width: 419.98px) {
  .pc-brand img {
    height: 24px;
  }

  .pc-header__in {
    gap: 10px;
  }
}

/* --------------------------------------------------------------------------
   Section furniture
   -------------------------------------------------------------------------- */
.pc-section {
  position: relative;
  padding: clamp(64px, 9vw, 112px) 0;
}

.pc-section--alt {
  background: var(--pc-bg-alt);
}

.pc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid var(--pc-eyebrow-line);
  border-radius: 999px;
  background: var(--pc-eyebrow-bg);
  color: var(--pc-accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pc-eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pc-eyebrow-dot);
  box-shadow: 0 0 0 4px var(--pc-eyebrow-bg);
}

.pc-lead {
  margin: 0;
  color: var(--pc-text-soft);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
}

.pc-grad-text {
  background: var(--pc-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pc-section-head {
  max-width: 760px;
  margin: 0 auto clamp(32px, 4.5vw, 52px);
  text-align: center;
}

.pc-section-head h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.pc-section-head .pc-lead {
  margin-top: 16px;
}

/* A plain note about what exists today and what is planned */
.pc-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 760px;
  margin: clamp(28px, 4vw, 40px) auto 0;
  padding: 12px 16px;
  border: 1px dashed var(--pc-line-strong);
  border-radius: var(--pc-radius);
  color: var(--pc-text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.pc-status .pc-i {
  margin-top: 3px;
  color: var(--pc-accent);
  font-size: 16px;
}

/* Scroll reveal: site.js adds .pc-reveal-on to <html> only when it can also
   guarantee the content gets shown. */
.pc-reveal-on [data-pc-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.8s var(--pc-ease);
}

.pc-reveal-on [data-pc-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Cue type colours, shared by the hero preview and the demo.
   Put a type class on an element and use var(--cue) inside it.
   -------------------------------------------------------------------------- */
.pc-t-lesson { --cue: #60a5fa; }
.pc-t-document { --cue: #22d3ee; }
.pc-t-reference { --cue: #a78bfa; }
.pc-t-diagram { --cue: #2dd4bf; }
.pc-t-video { --cue: #fb7185; }
.pc-t-quiz { --cue: #fbbf24; }
.pc-t-notes { --cue: #4ade80; }

/* --------------------------------------------------------------------------
   Footer (dark in both themes)
   -------------------------------------------------------------------------- */
.pc-footer {
  border-top: 1px solid var(--pc-line);
  background: var(--pc-navy-950);
  padding: 36px 0 44px;
  color: var(--pc-text-mute);
  font-size: 14px;
}

.pc-footer__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.pc-footer .pc-brand img {
  height: 26px;
}

.pc-footer__tag {
  margin: 8px 0 0;
  color: var(--pc-text-soft);
}

.pc-footer__legal {
  margin: 0;
  max-width: 540px;
  line-height: 1.6;
}

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

  .pc-btn,
  .pc-theme {
    transition: none;
  }

  .pc-btn--primary:hover,
  .pc-theme:hover {
    transform: none;
  }
}
