/* ============================================================
   LAYOUT — page shells, heroes, containers (new multi-page site)
   ============================================================ */

/* links.css sets a global width/height:100%; rescope for the new site */
main a, footer a, .page-hero a {
  display: inline-block;
  width: auto;
  height: auto;
}

.page {
  min-height: 100vh;
}

/* offset fixed header: pages paint their own top clearance */
.header + .page {
  padding-top: 0;
}
@media (max-width: 768px) {
  .header + .page { padding-top: 0; }
}

/* readability veil over the engineering grid: grid stays visible but
   content sits on a dimmed, slightly frosted surface (neutral grays) */
.page {
  background: linear-gradient(180deg,
    rgba(16,16,18,0.30) 0%,
    rgba(17,17,19,0.84) 14%,
    rgba(17,17,19,0.88) 100%);
}
.engineering-grid { background-color: #141416; }

/* container */
.wrap {
  max-width: 76em;
  margin: 0 auto;
  padding: 0.5em 1em 2.5em;
}
.wrap-narrow {
  max-width: 60em;
  margin: 0 auto;
  padding: 0.5em 1em 2.5em;
}

/* ── page hero (subpages) ─────────────────────────────────── */
.page-hero {
  padding: clamp(5.2em, 10vw, 7.6em) 1em clamp(1.4rem, 3vw, 2.4rem);
  text-align: center;
  border-bottom: 1px solid rgba(138,108,255,0.28);
  background: linear-gradient(180deg,
    rgba(30,30,33,0.94) 0%,
    rgba(22,22,24,0.60) 62%,
    transparent 100%);
}
.page-hero h1 {
  margin: 0 0 0.35em;
  text-wrap: balance;
}
.page-hero .lede {
  max-width: 52em;
  margin: 0 auto;
  font-size: var(--fs-lg);
  color: #c9c9d4;
}

/* ── home hero (full-bleed art, legacy .hero pattern) ─────── */
.hero h1 { margin: 0.2em 0 0.3em; text-wrap: balance; }
.hero-content { padding-top: clamp(5.2em, 10vw, 7.6em); }
.hero .lede {
  max-width: 46em;
  margin: 0 auto;
  font-size: var(--fs-lg);
  color: #d6d6e0;
}

/* ── section rhythm inside a page ─────────────────────────── */
.section-block {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}
.section-top { text-align: center; }
.section-top h2 { margin: 0 0 0.4em; }
.section-top .normal { max-width: 52em; margin: 0 auto; }

/* license tier ladder */
.license-ladder { max-width: 62em; margin: 0 auto; }
.ladder-tier {
  display: grid;
  grid-template-columns: minmax(14em, auto) 1fr;
  gap: 0.5em 1.4em;
  align-items: center;
  padding: 1em 1.2em;
  border: 1px solid rgba(138,108,255,0.22);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
}
.ladder-tier .chip-row { grid-column: 1 / -1; }
.ladder-cost {
  margin: 0.45em 0 0;
  font-size: var(--fs-sm);
  color: #9a9aab;
}
.ladder-cost strong { color: #cfcfe0; font-weight: 600; }
.ladder-arrow {
  text-align: center;
  color: #777;
  font-size: var(--fs-sm);
  padding: 0.25em 0;
  line-height: 1;
}
@media (max-width: 720px) {
  .ladder-tier { grid-template-columns: 1fr; }
}

/* call-to-action row */
.cta-row {
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
  margin-top: 1.6em;
}
.cta-row .button {
  width: auto;
  height: auto;
  padding: 0.6em 1.4em;
  font-size: var(--fs-base);
  border-radius: 6px;
}
.button--primary { background-color: rgba(90,108,255,0.5); color: #fff; }
.button--accent  { background-color: rgba(138,92,255,0.5); color: #fff; }
.button--ghost   { background-color: rgba(90,108,255,0.12); color: #E6E6EB; border: 1px solid rgba(138,108,255,0.4); }

/* contact band */
.contact-band {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem) 1em;
  border-top: 1px solid rgba(153,153,153,0.35);
}
.contact-band .email-big {
  font-size: var(--fs-xl);
  color: #dcfff1;
  border: 1px solid rgba(110,231,183,0.6);
  background: rgba(52,211,153,0.18);
  padding: 0.4em 1em;
  border-radius: 8px;
  display: inline-block;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* media */
.media-box { display: block; }
.media-box video,
.media-box img {
  width: 100%;
  display: block;
}
.media-box video { aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.media-box--wide video { aspect-ratio: 21 / 9; }

/* misc helpers */
.muted { color: #9a9aab; }
.mt1 { margin-top: 1em; }
.mb0 { margin-bottom: 0; }
.balance { text-wrap: balance; }

/* crumbs + quotes + article media sizing */
.crumbs {
  max-width: 76em;
  margin: 0 auto;
  padding: 1.1em 1em 0;
  font-size: var(--fs-xs);
  color: #9a9aab;
}
.crumbs a { color: #cfcfe0; }
.quote {
  border-left: 3px solid var(--c-violet);
  background: rgba(138,92,255,0.10);
  padding: 0.8em 1em;
  margin: 1.2em 0;
  font-style: italic;
  color: #d8d8e2;
}
.quote cite { display: block; margin-top: 0.5em; font-style: normal; color: #9a9aab; font-size: var(--fs-sm); }
.article .box video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; display: block; }
.article .box img { max-width: 100%; }

/* demo canvases keep a reserved area */
.demos-page .canvas-shell { min-height: 0; }

/* ============================================================
   2026-09-09 — brand palette (blues & purples, from the logo)
   ============================================================ */
:root {
  --c-blue:   #5a6cff;
  --c-violet: #8a5cff;
  --c-blue-soft:  rgba(90, 108, 255, 0.16);
  --c-violet-soft: rgba(138, 92, 255, 0.14);
}

/* ── hero: gradient art instead of the photo ────────────────── */
.hero--gradient {
  background:
    radial-gradient(1100px 520px at 88% -12%, rgba(255,255,255,0.07), transparent 62%),
    radial-gradient(950px 520px at 6% 112%, rgba(255,255,255,0.05), transparent 60%),
    linear-gradient(180deg, #232327 0%, #17171a 55%, #0e0e11 100%);
  border-bottom: 1px solid rgba(138, 108, 255, 0.35);
}
.hero--gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 88%);
          mask-image: radial-gradient(ellipse at center, black 30%, transparent 88%);
  pointer-events: none;
}
.hero--gradient .hero-content { position: relative; z-index: 1; }

/* ── buttons: translucent gradient + colored border ─────────── */
.button {
  background: linear-gradient(135deg, rgba(90,108,255,0.30), rgba(138,92,255,0.16));
  border: 1px solid rgba(138,108,255,0.55);
  border-radius: 8px;
  color: #eceeff;
  padding: 0.55em 1.25em;
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
  transition: filter 0.15s ease, border-color 0.15s ease;
}
.button:hover { filter: brightness(1.18); border-color: rgba(160,140,255,0.95); }
.button--primary {
  background: linear-gradient(135deg, rgba(90,108,255,0.5), rgba(138,92,255,0.32));
  border-color: rgba(128,112,255,0.85);
  color: #fff;
}
.button--accent {
  background: linear-gradient(135deg, rgba(138,92,255,0.5), rgba(90,108,255,0.30));
  border-color: rgba(150,120,255,0.85);
  color: #fff;
}
.button--ghost {
  background: linear-gradient(135deg, rgba(90,108,255,0.14), rgba(138,92,255,0.10));
  border-color: rgba(138,108,255,0.42);
  color: #e6e8ff;
}

/* contact band + email pill — bottom fades into the footer */
.contact-band {
  background: linear-gradient(180deg, transparent 0%, rgba(22,22,24,0.80) 55%, rgba(16,16,18,0.95) 100%);
  border-top: none;
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.site-footer { margin-top: 0; }
.contact-band .email-big {
  border: 1px solid rgba(110,231,183,0.6);
  background: linear-gradient(135deg, rgba(52,211,153,0.26), rgba(20,184,166,0.14));
  color: #dcfff1;
}

/* quotes */
.quote {
  border-left: 3px solid var(--c-violet);
  background: rgba(138, 92, 255, 0.10);
}

/* ── button color variants (harmonious blue/purple/green family) ── */
.button--blue-light {
  background: linear-gradient(135deg, rgba(125,196,255,0.42), rgba(90,108,255,0.22));
  border-color: rgba(147,197,253,0.65);
  color: #eaf4ff;
}
.button--blue {
  background: linear-gradient(135deg, rgba(59,130,246,0.5), rgba(29,78,216,0.34));
  border-color: rgba(96,165,250,0.8);
  color: #fff;
}
.button--purple {
  background: linear-gradient(135deg, rgba(168,85,247,0.5), rgba(138,92,255,0.3));
  border-color: rgba(192,132,252,0.75);
  color: #fff;
}
.button--green {
  background: linear-gradient(135deg, rgba(52,211,153,0.42), rgba(20,184,166,0.18));
  border-color: rgba(110,231,183,0.55);
  color: #dcfff1;
}

/* neutral surfaces (override legacy blue-tinted #10101a) */
.article-content, .pcard, .info-card, .pb-item { background-color: #16161a; }

/* sections ending a page sit close to the footer (no trailing gap);
   contact bands keep their own breathing room + fade (below) */
.page > .wrap:last-child,
.page > .wrap-narrow:last-child {
  padding-bottom: 0.6em;
  margin-bottom: 0;
}
