/*
  PaskalCPP™ Programming Language

  Copyright © 2026-present tinyBigGAMES™ LLC
  All Rights Reserved.

  https://paskalcpp.org

  SPDX-License-Identifier: MPL-2.0

  This Source Code Form is subject to the terms of the
  Mozilla Public License, v. 2.0. If a copy of the MPL
  was not distributed with this file, You can obtain one
  at https://mozilla.org/MPL/2.0/.

  ---

  The landing page's own layouts, on top of ds/tokens.css and ds/ds.css.
  Every class starts with pc- (the design system's are ds-); colors, sizes
  and fonts come from the tokens only.
*/

/* Hero additions: the promise under the logo and the badge row */
.pc-promise {
  margin: 0 auto var(--ds-sp-4);
  max-width: 30ch;
  font-family: var(--ds-serif);
  font-size: var(--ds-fs-3xl);
  font-weight: 800;
  line-height: var(--ds-lh-tight);
  text-wrap: balance;
}

/* The stage's floor glows under the lead: a dark halo keeps the text readable */
.ds-hero .pc-promise,
.ds-hero .ds-lead {
  text-shadow: 0 1px 2px rgba(4, 9, 32, 0.9), 0 0 18px rgba(4, 9, 32, 0.85);
}

.pc-badges {
  justify-content: center;
  margin-top: var(--ds-sp-5);
}

.ds-hero .pc-badges .ds-badge {
  background: rgba(4, 9, 32, 0.55);
}

/* Section heads */
.pc-head {
  max-width: var(--ds-max-text);
  margin-bottom: var(--ds-sp-6);
}

.pc-head h2 {
  margin-top: 0;
}

.pc-head--center {
  margin-inline: auto;
  text-align: center;
}

.pc-head--center .ds-lead {
  margin-inline: auto;
}

/* The five pillars: numbered cards in one strip, wrapping on narrow screens */
.pc-pillars {
  display: grid;
  gap: var(--ds-sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  counter-reset: pc-pillar;
}

.pc-pillars .ds-card {
  counter-increment: pc-pillar;
  padding-top: var(--ds-sp-6);
}

.pc-pillars .ds-card::before {
  content: "0" counter(pc-pillar);
  position: absolute;
  top: var(--ds-sp-3);
  right: var(--ds-sp-4);
  font-family: var(--ds-mono);
  font-size: var(--ds-fs-xs);
  letter-spacing: 0.18em;
  color: var(--ds-muted-2);
}

/* Text beside code: two columns, stacked below 960px */
.pc-split {
  display: grid;
  gap: var(--ds-sp-6);
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.pc-split > * {
  min-width: 0;
}

.pc-split .ds-code + .ds-code,
.pc-split .ds-code + .ds-tabs,
.pc-code-pair .ds-code + .ds-code {
  margin-top: var(--ds-sp-4);
}

@media (max-width: 960px) {
  .pc-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A checked list with a brand tick */
.pc-checks {
  list-style: none;
  padding: 0;
  margin: var(--ds-sp-5) 0 0;
}

.pc-checks li {
  position: relative;
  padding-left: 1.7em;
}

.pc-checks li + li {
  margin-top: var(--ds-sp-3);
}

.pc-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.8em;
  height: 0.45em;
  border-left: 2px solid var(--ds-cyan);
  border-bottom: 2px solid var(--ds-cyan);
  transform: rotate(-45deg);
}

/* The three C++ forms: a card each, its form as a code chip */
.pc-form {
  display: block;
  margin-bottom: var(--ds-sp-3);
  padding: var(--ds-sp-2) var(--ds-sp-3);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-code-bg);
  color: var(--ds-code-text);
  font-family: var(--ds-mono);
  font-size: var(--ds-fs-sm);
  overflow-x: auto;
  white-space: nowrap;
}

/* The pipeline: source to binary, one glowing step after another */
.pc-pipeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
}

.pc-pipeline li {
  position: relative;
  padding: var(--ds-sp-4) var(--ds-sp-5);
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius);
  background: var(--ds-surface);
  text-align: center;
  font-weight: 700;
}

.pc-pipeline li small {
  display: block;
  margin-top: var(--ds-sp-1);
  font-weight: 400;
  color: var(--ds-muted);
}

.pc-pipeline li + li {
  margin-top: var(--ds-sp-6);
}

/* The connector between two steps */
.pc-pipeline li + li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(-1 * var(--ds-sp-6));
  width: 2px;
  height: var(--ds-sp-6);
  transform: translateX(-50%);
  background: linear-gradient(var(--ds-cyan), var(--ds-violet));
  box-shadow: var(--ds-glow);
}

.pc-pipeline li:first-child,
.pc-pipeline li:last-child {
  border-color: transparent;
  background: var(--ds-brand-soft), var(--ds-surface);
  box-shadow: var(--ds-glow);
}

/* "No CMake, no Makefiles ...": struck-through chips */
.pc-nos {
  list-style: none;
  padding: 0;
  margin: var(--ds-sp-5) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-sp-2);
}

.pc-nos li {
  padding: var(--ds-sp-1) var(--ds-sp-3);
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  color: var(--ds-muted);
  text-decoration: line-through;
  text-decoration-color: var(--ds-err);
  font-size: var(--ds-fs-sm);
}

/* Report codes: the part of the compiler each prefix names */
.pc-codes {
  display: grid;
  gap: var(--ds-sp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  margin-top: var(--ds-sp-5);
}

.pc-codes div {
  padding: var(--ds-sp-3) var(--ds-sp-4);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
  background: var(--ds-surface);
}

.pc-codes b {
  display: block;
  font-family: var(--ds-mono);
  font-size: var(--ds-fs-lg);
  color: var(--ds-cyan);
}

.pc-codes span {
  color: var(--ds-muted);
  font-size: var(--ds-fs-sm);
}

/* Media: one frame per tab; video and image keep their shape */
.pc-media-frame {
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius-lg);
  background: #000000;
  overflow: hidden;
  box-shadow: var(--ds-shadow);
}

.pc-media-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* A video frame keeps its shape (16:9, a Short 9:16) before the video's size is known, and
   the video fills it: the zoom scales the frame, the picture follows */
.pc-media-frame--video {
  aspect-ratio: 16 / 9;
}

.pc-media-frame--video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

/* Zoom is for a mouse: a touch screen gets no zoom cursor and its own hint (the page script
   asks the same media query) */
@media (hover: hover) and (pointer: fine) {
  .pc-media-frame--video video,
  .pc-zoom {
    cursor: zoom-in;
  }
}

.pc-hint-touch {
  display: none;
}

/* The exact opposite of (hover: hover) and (pointer: fine), in syntax every browser reads */
@media (hover: none), (pointer: coarse), (pointer: none) {
  .pc-hint-mouse {
    display: none;
  }

  .pc-hint-touch {
    display: block;
  }
}

.pc-media-frame--portrait {
  aspect-ratio: 9 / 16;
  width: min(100%, 400px);
  margin-inline: auto;
}

/* Video zoom (the frame itself flies to fit the window and back; the video element never
   moves, so it keeps playing). Curves from the old page's lightbox. */
/* Zoom layers sit above everything on the page: the sticky nav (100), the skip link (200) */
.pc-media-frame.is-zoomed {
  position: fixed;
  z-index: 301;
  margin: 0;
  max-width: none;
  transform-origin: 0 0;
  transition: transform 0.42s cubic-bezier(0.18, 0.89, 0.32, 1.12);
  will-change: transform;
}

.pc-media-frame.is-zoomed video {
  cursor: zoom-out;
}

.pc-media-frame.is-zoom-out {
  transition: transform 0.26s cubic-bezier(0.55, 0, 0.85, 0.35);
}

.pc-zoom-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(4, 9, 32, 0);
  cursor: zoom-out;
  pointer-events: none;
  transition: background-color 0.32s ease;
}

.pc-zoom-backdrop.is-in {
  background: rgba(4, 9, 32, 0.96);
  pointer-events: auto;
}

/* The close button, shared by the video zoom and the lightbox */
.pc-zoom-close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 302;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.pc-zoom-close.is-in,
.pc-lightbox.is-in .pc-zoom-close {
  opacity: 1;
  pointer-events: auto;
}

/* Lightbox (ported from the old page): the infographic flies from its thumbnail to full
   size; fitted to the window on wide screens, real size and pannable on narrow ones */
.pc-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 9, 32, 0);
  overflow: auto;
  cursor: zoom-out;
  transition: background-color 0.32s ease;
}

.pc-lightbox.is-in {
  background: rgba(4, 9, 32, 0.96);
}

.pc-lightbox::backdrop {
  background: transparent;
}

.pc-lightbox[open] {
  display: grid;
}

.pc-lightbox img {
  display: block;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100vh;
  transform-origin: 0 0;
  transition: transform 0.42s cubic-bezier(0.18, 0.89, 0.32, 1.12);
  will-change: transform;
}

.pc-lightbox.is-out img {
  transition: transform 0.26s cubic-bezier(0.55, 0, 0.85, 0.35);
}

@media (max-width: 760px) {
  .pc-lightbox img {
    max-width: none;
    max-height: none;
  }
}


.pc-media-frame--audio {
  display: grid;
  gap: var(--ds-sp-5);
  justify-items: center;
  padding: var(--ds-sp-7) var(--ds-sp-5);
  background: var(--ds-stage-bg);
}

.pc-media-frame--audio img {
  width: min(260px, 70%);
}

.pc-media-frame--audio audio {
  width: min(520px, 100%);
}

.pc-zoom {
  position: relative;
  display: block;
}

.pc-zoom span {
  position: absolute;
  right: var(--ds-sp-3);
  bottom: var(--ds-sp-3);
  padding: var(--ds-sp-1) var(--ds-sp-3);
  border-radius: 999px;
  background: rgba(4, 9, 32, 0.75);
  color: #eef3ff;
  font-size: var(--ds-fs-xs);
}

/* Get started: numbered steps */
.pc-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: pc-step;
}

.pc-steps > li {
  position: relative;
  counter-increment: pc-step;
  padding-left: 3.2rem;
}

.pc-steps > li + li {
  margin-top: var(--ds-sp-5);
}

.pc-steps > li::before {
  content: counter(pc-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ds-brand);
  color: #ffffff;
  font-weight: 800;
  box-shadow: var(--ds-glow);
}

.pc-steps h3 {
  margin: 0.2rem 0 var(--ds-sp-2);
}

.pc-steps .ds-code {
  margin-top: var(--ds-sp-3);
}

/* The closing call: the promise again, centered on the brand wash */
.pc-closing {
  text-align: center;
  background: var(--ds-brand-soft), var(--ds-bg);
  border-top: 1px solid var(--ds-line);
}

.pc-closing .ds-lead {
  margin-inline: auto;
}

.pc-closing .ds-row {
  justify-content: center;
  margin-top: var(--ds-sp-5);
}

/* Small helpers */
.pc-after {
  margin-top: var(--ds-sp-6);
}

.pc-form + .pc-form {
  margin-top: calc(-1 * var(--ds-sp-2));
}

.pc-footer-mark {
  font-size: 1.4rem;
}

/* Starfield (ported from the old page, recolored from the tokens): one fixed canvas behind
   everything. The banded sections let it show through; the hero keeps its own stage. */
.pc-stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

:root[data-theme-now="light"] .pc-stars {
  opacity: 0.55;
}

.ds-band {
  background: color-mix(in srgb, var(--ds-bg-2) 82%, transparent);
}

/* At a glance: a strip of numbers under the hero */
.pc-glance {
  border-bottom: 1px solid var(--ds-line);
  background: color-mix(in srgb, var(--ds-bg) 70%, transparent);
}

.pc-glance ul {
  list-style: none;
  margin: 0 auto;
  padding: var(--ds-sp-5) 0;
  display: grid;
  gap: var(--ds-sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  text-align: center;
}

.pc-glance b {
  display: block;
  font-family: var(--ds-serif);
  font-size: var(--ds-fs-3xl);
  line-height: 1;
  background: var(--ds-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pc-glance span {
  display: block;
  margin-top: var(--ds-sp-2);
  color: var(--ds-muted);
  font-size: var(--ds-fs-sm);
}

/* A code block drawn as a window: three dots before the file name (the old page's screen) */
.pc-window .ds-code:not(.ds-code--output) .ds-code-bar::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 46px;
  border-radius: 50%;
  background: var(--ds-out-err);
  box-shadow: 16px 0 0 var(--ds-warn), 32px 0 0 var(--ds-out-ok);
}

/* A long sample scrolls inside its window */
.pc-window .ds-code:not(.ds-code--output) pre {
  max-height: 520px;
}

/* Showcase: the notes beside each sample */
.pc-notes h3 {
  margin-top: 0;
}

.pc-notes .pc-checks {
  margin-top: var(--ds-sp-4);
}

/* Editor shortcuts: one row per key */
.pc-keys {
  margin-top: var(--ds-sp-6);
  display: grid;
  gap: var(--ds-sp-2);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.pc-keys div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-sp-3);
  padding: var(--ds-sp-3) var(--ds-sp-4);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
  background: var(--ds-surface);
}

.pc-keys span {
  color: var(--ds-muted);
}

.pc-keys kbd + kbd {
  margin-left: var(--ds-sp-1);
}

/* The showcase gives the sample the wide column: its notes are short, its code and output long */
.pc-split--code {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

@media (max-width: 960px) {
  .pc-split--code {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Community: one centered panel on the brand wash */
.pc-community {
  max-width: 1000px;
  margin-inline: auto;
  padding: var(--ds-sp-7) var(--ds-sp-5);
  text-align: center;
}

.pc-community h2 {
  margin-top: 0;
}

.pc-community .ds-lead {
  margin-inline: auto;
}

.pc-community .ds-row {
  justify-content: center;
  margin-top: var(--ds-sp-5);
}
