/* ==========================================================================
   aoptradingsystem.com — site stylesheet (v1)

   One hand-written stylesheet, no build step: the site is uploaded as-is to
   shared hosting, so what is in this file is exactly what ships.

   Palette is sampled from the brand renders (night-city navy ground, wordmark
   blue, Tier-A orange, status green). The site is deliberately dark-only —
   the brand is a night desk, and a light theme would be a different brand.

   Sections, in order:
     1. Tokens          5. Hero            9. Platform showcase
     2. Base / reset    6. Tier chevrons  10. Operations + manifesto
     3. Layout helpers  7. Principles     11. Roadmap + CTA band
     4. Header / nav    8. Pipeline       12. Footer, simple pages, lightbox
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* ground: darkest is the page, lighter steps are raised panels */
  --ink-950: #010a14;
  --ink-900: #04111d;
  --ink-850: #071827;
  --ink-800: #0b1f33;
  --ink-700: #0f2940;
  --line: #16304a;
  --line-soft: rgba(98, 183, 245, 0.13);

  /* accents */
  --blue-300: #8fd3fa;
  --blue-400: #62b7f5; /* wordmark */
  --blue-500: #3aa3ef; /* icons, bars */
  --blue-700: #2f7fc4; /* Tier C node */
  --cyan-400: #5dc0e5; /* Tier B chevron */
  --orange-300: #f8b870;
  --orange-400: #f89830; /* Tier A */
  --green-400: #3fd98a; /* readiness / ok */
  --yellow-400: #f0c860; /* watch */

  /* text — 100/200 for headings/body, 300/400 for secondary. --text-500 is
     under 4.5:1 on the ground, so it is only used for decoration/large text */
  --text-100: #f0f5f9;
  --text-200: #d4e1ee;
  --text-300: #aebdce;
  --text-400: #8fa0b5;
  --text-500: #637286;

  --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, "SF Mono", Menlo, Consolas,
    monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 68px;
  --section-y: clamp(72px, 10vw, 128px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --panel-bg: linear-gradient(180deg, rgba(11, 31, 51, 0.72), rgba(4, 17, 29, 0.78));
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 24px 60px -28px rgba(0, 0, 0, 0.8);
}

/* 2. Base / reset --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* anchor jumps must clear the fixed header */
  scroll-padding-top: calc(var(--header-h) + 12px);
  /* keep the scrollbar's space reserved so locking scroll (menu, lightbox)
     doesn't shift the layout sideways on classic-scrollbar desktops */
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-950);
  color: var(--text-200);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* lock scroll behind the open mobile menu / lightbox */
body.is-locked {
  overflow: hidden;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

figure {
  margin: 0; /* UA default is 40px each side, which shrinks framed renders */
}

/* The UA's [hidden] rule loses to any author display value (e.g. the tablist's
   display:flex), so without this the attribute silently does nothing. */
[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-100);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: var(--blue-400);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-300);
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(58, 163, 239, 0.35);
  color: var(--text-100);
}

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

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 3. Layout helpers -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* hairline between sections, fading out at both ends */
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--blue-400);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4.2vw, 3rem);
}

.lead {
  margin-top: 18px;
  color: var(--text-300);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  max-width: 62ch;
}

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

.eyebrow {
  color: var(--text-400);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow .sep {
  margin-inline: 0.6em;
  color: var(--text-500);
}

.accent-rule {
  display: block;
  width: 56px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-500);
}

/* Scroll reveal. Only armed under html.js and when the visitor has not asked
   for reduced motion. html.js is set by the inline <head> snippet, which also
   reverts to no-js after 4s unless site.js reports ready — so a missing or
   broken site.js can hide content for at most a few seconds, never for good. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px; /* comfortable touch target */
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease),
    box-shadow 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--blue-300), var(--blue-500));
  color: var(--ink-950);
  box-shadow: 0 10px 30px -12px rgba(58, 163, 239, 0.7);
}

.btn--primary:hover {
  color: var(--ink-950);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -12px rgba(58, 163, 239, 0.9);
}

.btn--ghost {
  border-color: var(--line);
  background: rgba(4, 17, 29, 0.55);
  color: var(--text-100);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: var(--blue-500);
  color: var(--text-100);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill--soon {
  color: var(--orange-400);
}

/* 4. Header / nav ----------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

/* transparent over the hero, frosted once the page scrolls (JS toggles) */
.site-header.is-scrolled,
.no-js .site-header {
  background: rgba(1, 10, 20, 0.82);
  border-bottom-color: var(--line-soft);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

/* Open menu: solid ground and NO backdrop-filter. A backdrop-filter on the
   header makes it the containing block for the position:fixed sheet inside
   it, and the hero was bleeding through the sheet in Chrome. */
.site-header.is-open {
  background: var(--ink-950);
  border-bottom-color: var(--line-soft);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-100);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--text-100);
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.wm-aop,
.wm-tld {
  color: var(--blue-400);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
}

.site-nav__list {
  display: flex;
  gap: clamp(14px, 2.2vw, 28px);
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding-block: 8px;
  color: var(--text-300);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav__link:hover,
.site-nav__link[aria-current="true"],
.site-nav__link[aria-current="page"] {
  color: var(--text-100);
}

.site-nav__link[aria-current="true"]::after,
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-cta {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.86rem;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-100);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -7px;
}

.nav-toggle__bars::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Phones + small tablets: nav collapses into a sheet under the header.
   Gated on .js so that without JavaScript the links simply wrap and stay
   reachable instead of hiding behind a button that cannot open. */
@media (max-width: 900px) {
  .js .nav-toggle {
    display: grid;
  }

  .js .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    max-height: calc(100vh - var(--header-h)); /* fallback: no dvh before iOS 15.4 */
    max-height: calc(100dvh - var(--header-h));
    padding: 20px var(--gutter) 28px;
    overflow-y: auto;
    overscroll-behavior: contain; /* reaching the end must not scroll the page */
    background: var(--ink-950);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0s 0.25s;
  }

  .js .site-header.is-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.25s, transform 0.25s var(--ease);
  }

  /* Dim the page under the sheet. It is the header's own ::after, so a tap on
     it targets the header element — site.js closes the menu on that. */
  .js .site-header.is-open::after {
    content: "";
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: -1;
    background: rgba(1, 10, 20, 0.72);
  }

  .js .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .js .site-nav__link {
    display: block;
    padding: 14px 2px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 1.05rem;
  }

  .js .site-nav__link::after {
    display: none;
  }

  .js .nav-cta {
    min-height: 48px;
    font-size: 0.95rem;
  }

  .no-js .site-header {
    position: absolute;
    height: auto;
    padding-block: 12px;
  }

  .no-js .site-header__inner {
    flex-wrap: wrap;
  }

  .no-js .site-nav,
  .no-js .site-nav__list {
    flex-wrap: wrap;
  }
}

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh; /* ignores the mobile URL bar so the fold is stable */
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: clamp(56px, 8vw, 96px);
  isolation: isolate;
  overflow: hidden;
}

.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__media {
  z-index: -2;
}

.hero__media img {
  object-fit: cover;
  object-position: 70% 40%;
}

/* scrims: dark on the text side, fade to page ground at the bottom so the
   render never ends in a hard edge */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(1, 10, 20, 0.94) 0%, rgba(1, 10, 20, 0.78) 38%, rgba(1, 10, 20, 0.2) 72%, rgba(1, 10, 20, 0.35) 100%),
    linear-gradient(180deg, rgba(1, 10, 20, 0.55) 0%, transparent 22%, transparent 70%, var(--ink-950) 100%);
}

@media (max-width: 760px) {
  .hero {
    align-items: flex-end;
  }

  .hero__media img {
    object-position: 50% 20%;
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(1, 10, 20, 0.55) 0%, rgba(1, 10, 20, 0.62) 30%, rgba(1, 10, 20, 0.9) 58%, var(--ink-950) 100%);
  }
}

/* No max-width here: the one-line wordmark needs ~870px at its desktop cap.
   Readable measures are set on the paragraphs/tracks individually instead. */
.hero__content {
  max-width: 100%;
}

.hero .eyebrow {
  margin-bottom: clamp(20px, 3vw, 30px);
}

/* The wordmark must stay on ONE line — "aoptradingsystem" + ".com" split
   across lines reads as two words. Measured in Inter 700: rendered width is
   10.66x the font size. Dividing the content width by 11.2 leaves ~5% slack
   for the system fallback font (Segoe UI / Roboto run slightly wider). */
.wordmark {
  font-size: clamp(1.5rem, calc((100vw - 2 * var(--gutter)) / 11.2), 5.1rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere; /* never force horizontal scroll on narrow phones */
}

.wordmark .wm-aop,
.wordmark .wm-tld {
  background: linear-gradient(180deg, var(--blue-300) 0%, var(--blue-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  margin-top: 10px;
  color: var(--text-300);
  font-size: clamp(1.25rem, 3.1vw, 2.1rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.hero .accent-rule {
  margin-block: clamp(22px, 3vw, 30px);
  background: var(--text-500);
  width: 44px;
  height: 1px;
}

.hero__pitch {
  max-width: 54ch;
  color: var(--text-300);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
}

/* build > test > trade > improve > repeat — JS walks the .is-on class across
   the words; without JS every word just sits in the calm default colour */
.loop {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2em 0.55em;
  margin-top: 22px;
  color: var(--text-400);
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.9vw, 1.1rem);
  letter-spacing: 0.02em;
  list-style: none;
}

.loop li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
}

.loop li + li::before {
  content: ">";
  content: ">" / ""; /* empty alt text: decorative, not read as "greater-than" */
  color: var(--text-500);
}

.loop span {
  transition: color 0.4s, text-shadow 0.4s;
}

.loop span.is-on {
  color: var(--blue-300);
  text-shadow: 0 0 18px rgba(98, 183, 245, 0.55);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 40px);
}

@media (max-width: 420px) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--text-500);
  border-radius: 12px;
  transform: translateX(-50%);
}

.hero__scroll::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--blue-400);
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__scroll::after {
    animation: scroll-cue 2.2s var(--ease) 3; /* finite: WCAG 2.2.2, no endless motion */
  }
}

@keyframes scroll-cue {
  0% { opacity: 0; transform: translate(-50%, 0); }
  30% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translate(-50%, 12px); }
}

@media (max-width: 760px), (max-height: 700px) {
  .hero__scroll {
    display: none;
  }
}

/* 6. Tier chevrons (hero) --------------------------------------------------- */
/* Each chevron is two stacked clip-paths: the element paints the 1.5px edge
   colour, ::before paints the fill inset by the edge width. Borders cannot
   follow a clip-path, so this is how the outlined arrow shape is drawn. */
.tier-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 560px;
  margin-top: clamp(28px, 4vw, 40px);
  list-style: none;
}

.chev {
  --edge: rgba(174, 189, 206, 0.45);
  --fill: rgba(4, 17, 29, 0.82);
  --title: var(--text-100);
  --notch: 16px;
  position: relative;
  min-height: 92px;
  padding: 14px calc(var(--notch) + 12px) 14px calc(var(--notch) + 10px);
  background: var(--edge);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%, var(--notch) 50%);
}

.chev:first-child {
  padding-left: 16px;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%);
}

.chev::before {
  content: "";
  position: absolute;
  inset: 1.5px 2.2px;
  z-index: 0;
  background: var(--fill);
  clip-path: inherit;
}

.chev > * {
  position: relative;
  z-index: 1;
}

.chev--b {
  --edge: rgba(93, 192, 229, 0.75);
  --fill: linear-gradient(180deg, rgba(10, 44, 72, 0.9), rgba(4, 22, 38, 0.9));
}

.chev--a {
  --edge: rgba(248, 152, 48, 0.85);
  --fill: linear-gradient(180deg, rgba(40, 24, 10, 0.88), rgba(10, 12, 16, 0.9));
  --title: var(--orange-400);
}

.chev__title {
  display: block;
  color: var(--title);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.2;
}

.chev__role {
  display: block;
  margin-top: 6px;
  color: var(--text-300);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .chev {
    --notch: 11px;
    min-height: 84px;
    padding: 12px calc(var(--notch) + 6px) 12px calc(var(--notch) + 7px);
  }

  .chev:first-child {
    padding-left: 11px;
  }

  .chev__role {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }
}

/* 7. Principles strip ------------------------------------------------------- */
.principles {
  position: relative;
  margin-top: -1px;
  padding-block: clamp(36px, 5vw, 56px);
  border-block: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--ink-950), var(--ink-900));
}

.principles__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
}

.principle {
  display: flex;
  align-items: center;
  gap: 16px;
}

.principle svg {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--blue-500);
}

.principle__label {
  color: var(--text-100);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.principle__label small {
  display: block;
  margin-top: 3px;
  color: var(--text-400);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 900px) {
  .principles__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }
}

@media (max-width: 420px) {
  .principle {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* 8. Pipeline (Tier C -> B -> A) -------------------------------------------- */
.pipeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  list-style: none;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.tier-card {
  --accent: var(--blue-500);
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 30px);
  overflow: hidden;
}

/* accent bar along the top edge, coloured per tier */
.tier-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.tier-card--c { --accent: var(--blue-500); }
.tier-card--b { --accent: var(--cyan-400); }
.tier-card--a { --accent: var(--orange-400); border-color: rgba(248, 152, 48, 0.35); }

.tier-card__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.tier-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.tier-card__icon svg {
  width: 26px;
  height: 26px;
}

.tier-card__tier {
  display: block;
  color: var(--text-100);
  font-size: 1.45rem;
  font-weight: 650;
  line-height: 1.1;
}

.tier-card--a .tier-card__tier {
  color: var(--orange-400);
}

.tier-card__name {
  display: block;
  margin-top: 3px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tier-card h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.tier-card p {
  color: var(--text-300);
  font-size: 0.95rem;
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  color: var(--text-200);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* green check disc, drawn in CSS so the list needs no extra markup */
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--green-400)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.3l2.4 2.4 5-5.2' fill='none' stroke='%23010a14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 13px no-repeat;
}

.pipeline__arrow {
  display: grid;
  place-items: center;
  color: var(--blue-500);
}

.pipeline__arrow svg {
  width: 26px;
  height: 44px;
}

.pipeline__arrow--to-a {
  color: var(--orange-400);
}

@media (max-width: 980px) {
  .pipeline {
    grid-template-columns: minmax(0, 1fr);
    max-width: 620px;
    margin-inline: auto;
  }

  .pipeline__arrow svg {
    transform: rotate(90deg);
    height: 36px;
  }
}

/* Discover / Validate / Execute */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(40px, 6vw, 64px);
  counter-reset: step;
  list-style: none;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step__num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-500);
  color: var(--ink-950);
  font-family: var(--font-mono);
  font-weight: 700;
}

.step:last-child .step__num {
  background: var(--orange-400);
}

.step h3 {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step p {
  margin-top: 4px;
  color: var(--text-400);
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    max-width: 620px;
    margin-inline: auto;
  }
}

/* 9. Platform showcase ------------------------------------------------------ */
.showcase__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 4px;
  overflow-x: auto; /* tabs scroll sideways on phones instead of wrapping */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.showcase__tabs::-webkit-scrollbar {
  display: none;
}

/* When tabs overflow, fade the right edge so it reads as "scrolls sideways"
   rather than "clipped by mistake". site.js sets .has-more only while there is
   still content to the right, so a fully visible or scrolled-to-end last tab
   is never faded. */
.showcase__tabs.has-more {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}

.tab {
  flex: none;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 17, 29, 0.6);
  color: var(--text-300);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.tab:hover {
  color: var(--text-100);
  border-color: var(--blue-700);
}

.tab[aria-selected="true"] {
  border-color: var(--blue-500);
  background: rgba(58, 163, 239, 0.14);
  color: var(--text-100);
}

/* The scrolling tablist clips anything painted outside it, so the global
   outside-offset focus ring would be cut off; draw it inside the pill. */
.tab:focus-visible {
  outline-offset: -4px;
}

.showcase__panel + .showcase__panel {
  margin-top: 28px; /* only matters without JS, when every panel is shown */
}

.js .showcase__panel + .showcase__panel {
  margin-top: 0;
}

.frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-900);
  box-shadow: 0 40px 90px -40px rgba(58, 163, 239, 0.35), var(--panel-shadow);
  cursor: zoom-in;
}

.frame img {
  width: 100%;
  transition: transform 0.8s var(--ease);
}

.frame:hover img {
  transform: scale(1.015);
}

.frame__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(1, 10, 20, 0.78);
  color: var(--text-100);
  font-size: 0.78rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.frame__zoom svg {
  width: 15px;
  height: 15px;
}

.figure-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  color: var(--text-400);
  font-size: 0.84rem;
  line-height: 1.5;
}

.figure-note svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--text-500);
}

.figure-note strong {
  color: var(--text-200);
  font-weight: 600;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(40px, 6vw, 64px);
  list-style: none;
}

.feature {
  padding: 24px;
}

.feature svg {
  width: 28px;
  height: 28px;
  margin-bottom: 16px;
  color: var(--blue-500);
}

.feature h3 {
  font-size: 1.05rem;
}

.feature p {
  margin-top: 8px;
  color: var(--text-300);
  font-size: 0.94rem;
}

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

@media (min-width: 560px) and (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 10. Operations + manifesto ------------------------------------------------ */
.ops-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--text-400);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  list-style: none;
}

.ops-flow li + li::before {
  content: "\203A"; /* single right-pointing angle quote */
  content: "\203A" / ""; /* decorative: empty alt text for screen readers */
  margin-right: 16px;
  color: var(--text-500);
}

.ops-flow li:nth-child(2) {
  color: var(--blue-400);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
}

.ops-card {
  padding: clamp(22px, 3vw, 30px);
}

.ops-card__label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--blue-400);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ops-card h3 {
  font-size: 1.15rem;
}

.ops-card p {
  margin-top: 10px;
  color: var(--text-300);
  font-size: 0.95rem;
}

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

.manifesto {
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 85% 20%, rgba(58, 163, 239, 0.12), transparent 70%),
    radial-gradient(40% 60% at 10% 90%, rgba(248, 152, 48, 0.07), transparent 70%),
    var(--ink-950);
}

.manifesto__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}

.manifesto__quote {
  margin: 0;
  color: var(--text-100);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.manifesto__quote em {
  font-style: normal;
  color: var(--blue-400);
}

.manifesto__body {
  margin-top: 24px;
  max-width: 50ch;
  color: var(--text-300);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
}

/* hand-ticked checklist, echoing the notebook on the desk renders */
.tick-list {
  display: grid;
  gap: 2px;
  padding: clamp(22px, 3vw, 32px);
  list-style: none;
}

.tick-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-100);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tick-list li:last-child {
  border-bottom: 0;
}

.tick-list svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--blue-400);
}

.tick-list small {
  display: block;
  margin-top: 2px;
  color: var(--text-400);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

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

/* 11. Roadmap + CTA band ---------------------------------------------------- */
.roadmap {
  position: relative;
  display: grid;
  gap: 14px;
  max-width: 880px;
  list-style: none;
}

.roadmap__item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 22px 24px;
}

.roadmap__item h3 {
  font-size: 1.08rem;
}

.roadmap__item p {
  margin-top: 6px;
  color: var(--text-300);
  font-size: 0.94rem;
}

.status {
  justify-self: start;
  margin-top: 3px;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status--done { color: var(--green-400); }
.status--progress { color: var(--blue-400); }
.status--next { color: var(--orange-400); }
.status--planned { color: var(--text-400); }

@media (max-width: 560px) {
  .roadmap__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 20px;
  }
}

.cta-band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: clamp(32px, 6vw, 64px);
  border-radius: var(--radius-lg);
  isolation: isolate;
}

.cta-band__media,
.cta-band__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cta-band__media {
  z-index: -2;
}

.cta-band__media img {
  object-fit: cover;
  object-position: 80% 30%;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(1, 10, 20, 0.95) 0%, rgba(1, 10, 20, 0.8) 50%, rgba(1, 10, 20, 0.35) 100%);
}

.cta-band h2 {
  max-width: 20ch;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.cta-band p {
  max-width: 52ch;
  margin-top: 14px;
  color: var(--text-300);
}

.cta-band .hero__actions {
  margin-top: 28px;
}

@media (max-width: 640px) {
  .cta-band::before {
    background: linear-gradient(180deg, rgba(1, 10, 20, 0.88), rgba(1, 10, 20, 0.95));
  }
}

/* 12. Footer, simple pages, lightbox ---------------------------------------- */
.site-footer {
  padding-block: clamp(48px, 7vw, 80px) 32px;
  border-top: 1px solid var(--line-soft);
  background: var(--ink-900);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.site-footer__tagline {
  margin-top: 16px;
  max-width: 36ch;
  color: var(--text-400);
  font-size: 0.92rem;
}

.site-footer h2 {
  margin-bottom: 14px;
  color: var(--text-400);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 4px;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 6px; /* keeps stacked links at a tappable height */
  color: var(--text-300);
  font-size: 0.92rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-100);
}

.footer-legal {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-400);
  font-size: 0.8rem;
  line-height: 1.6;
}

.footer-legal p + p {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* disclosures / workspace placeholder / 404 */
.page-simple {
  min-height: 72vh;
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px));
  padding-bottom: var(--section-y);
  background:
    radial-gradient(50% 50% at 80% 0%, rgba(58, 163, 239, 0.1), transparent 70%),
    var(--ink-950);
}

.prose {
  max-width: 72ch;
}

.prose h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.prose h2 {
  margin-top: 40px;
  font-size: 1.3rem;
}

.prose p,
.prose ul {
  margin-top: 16px;
  color: var(--text-300);
}

.prose ul {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 8px;
}

.prose .lead {
  margin-top: 18px;
}

.prose .meta {
  margin-top: 12px;
  color: var(--text-400);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.center-stage {
  display: grid;
  place-items: center;
  text-align: center;
}

.center-stage .brand__mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 28px;
}

.center-stage .lead {
  margin-inline: auto;
}

.center-stage h1 {
  font-size: clamp(2rem, 6vw, 3.6rem);
}

/* Utility classes instead of style="" attributes: the CSP in .htaccess has no
   'unsafe-inline' for styles, so inline style attributes would be dropped. */
.footer-legal--flush {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.center-stage .hero__actions {
  justify-content: center;
}

.workspace-note {
  justify-content: center;
  margin-top: 36px;
}

.big-code {
  color: var(--blue-400);
  font-family: var(--font-mono);
  font-size: clamp(4rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Lightbox (native <dialog>, so focus trapping + Esc come from the browser) */
/* Browsers without <dialog> (Safari < 15.4) have no UA rule hiding a closed
   dialog, so it would render as an empty box after the footer. */
.lightbox:not([open]) {
  display: none;
}

.lightbox {
  width: min(1480px, 100vw - 24px);
  max-width: none;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-900);
  color: var(--text-200);
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(1, 10, 20, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox__img {
  width: 100%;
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  object-fit: contain;
  background: var(--ink-950);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
}

.lightbox__caption {
  color: var(--text-400);
  font-size: 0.84rem;
  line-height: 1.4;
}

.lightbox__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.lightbox__close:hover {
  border-color: var(--blue-500);
}

.lightbox__close svg {
  width: 18px;
  height: 18px;
}

@media print {
  .site-header,
  .hero__media,
  .hero__scroll,
  .cta-band__media {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
