:root {
  --q-blue: #2563eb;
  --q-blue-dark: #061b46;
  --q-blue-soft: #eaf3ff;
  --q-green: #12815f;
  --q-green-soft: #e9f8f3;
  --q-gold: #b98519;
  --q-gold-soft: #fff7e6;
  --q-plum: #5a3d70;
  --q-plum-soft: #f5eff9;
  --q-ink: #07152f;
  --q-text: #243653;
  --q-muted: #60708a;
  --q-line: #bfd8ff;
  --q-bg: #f6f9fd;
  --q-white: #ffffff;
  --shadow: 0 18px 44px rgba(7, 21, 47, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--q-bg);
  color: var(--q-text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--q-blue-dark);
  color: var(--q-white);
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e3ebf7;
  backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner,
.hero-inner,
.section-shell,
.journey-section,
.routes-section,
.learning-section,
.final-inner,
.pillar-feed {
  width: min(1150px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-link,
.footer-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-link img {
  width: 220px;
  height: auto;
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.4rem;
  flex: 1;
}

.header-nav a {
  text-decoration: none;
  font-weight: 800;
  color: #1d2b44;
}

.header-nav a:focus,
.header-nav a:hover,
.link-grid a:focus,
.link-grid a:hover,
.text-link:focus,
.text-link:hover {
  color: var(--q-blue);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--q-blue);
  text-decoration: none;
  font-weight: 900;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.header-cta,
.button-primary {
  background: var(--q-blue);
  color: var(--q-white);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.78);
  color: var(--q-blue-dark);
}

.button:focus,
.button:hover,
.header-cta:focus,
.header-cta:hover,
button:focus-visible,
details summary:focus-visible {
  outline: 3px solid rgba(18, 129, 95, 0.28);
  outline-offset: 3px;
  transform: translateY(-1px);
}

.hero-section {
  background:
    linear-gradient(90deg, rgba(246, 249, 253, 0.98) 0%, rgba(246, 249, 253, 0.90) 54%, rgba(234, 243, 255, 0.82) 100%),
    url("/images/hero-tqp.jpg") center right / cover no-repeat,
    var(--q-bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 2rem;
  align-items: center;
  min-height: 620px;
  padding: 4.8rem 0 4.2rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--q-blue);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  color: var(--q-ink);
  font-size: 3.8rem;
  line-height: 1.04;
  letter-spacing: 0;
  margin-bottom: 1.25rem;
}

h2 {
  color: var(--q-ink);
  font-size: 2.35rem;
  line-height: 1.14;
  letter-spacing: 0;
  margin-bottom: 0.85rem;
}

h3 {
  color: var(--q-ink);
  font-size: 1.16rem;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 0.55rem;
}

.hero-copy {
  max-width: 740px;
}

.philosophy {
  max-width: 700px;
  font-size: 1.18rem;
  color: #1b2c47;
}

.signature {
  color: var(--q-blue-dark);
  font-weight: 900;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.4rem 0 1rem;
}

.reassurance {
  max-width: 720px;
  color: var(--q-muted);
  font-weight: 700;
}

.hero-snapshot {
  background: var(--q-white);
  border: 1px solid var(--q-line);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-snapshot h2 {
  font-size: 1.35rem;
}

.hero-snapshot ol {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-snapshot li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  background: #f8fbff;
  border: 1px solid #d8e7fb;
  border-radius: 8px;
}

.hero-snapshot span {
  color: var(--q-blue);
  font-weight: 900;
}

.hero-snapshot strong {
  color: var(--q-blue-dark);
}

.pillar-feed {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: -2.6rem;
}

.pillar-feed::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  height: 2px;
  background: #d5e6fb;
  z-index: -1;
}

.pillar-card,
.principle-card,
.route-card,
.ecosystem-panel,
.proof-card,
.journey-detail {
  border-radius: 8px;
}

.pillar-card {
  background: var(--q-white);
  border: 1px solid var(--q-line);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.pillar-card h2 {
  font-size: 1.18rem;
  margin-bottom: 0.25rem;
}

.pillar-card p {
  margin-bottom: 0;
}

.pillar-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  margin-bottom: 0.7rem;
}

.pillar-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
}

.trust-icon {
  background: var(--q-blue-soft);
  color: var(--q-blue);
}

.logic-icon {
  background: var(--q-green-soft);
  color: var(--q-green);
}

.people-icon {
  background: var(--q-gold-soft);
  color: var(--q-gold);
}

.solution-icon {
  background: var(--q-plum-soft);
  color: var(--q-plum);
}

.trust-icon::before {
  clip-path: polygon(50% 0, 90% 18%, 82% 78%, 50% 100%, 18% 78%, 10% 18%);
}

.logic-icon::before {
  clip-path: polygon(47% 0, 53% 0, 53% 74%, 100% 74%, 100% 86%, 0 86%, 0 74%, 47% 74%);
}

.people-icon::before {
  clip-path: circle(32% at 50% 32%);
}

.solution-icon::before {
  clip-path: polygon(50% 0, 78% 16%, 90% 45%, 73% 75%, 60% 75%, 60% 100%, 40% 100%, 40% 75%, 27% 75%, 10% 45%, 22% 16%);
}

.section-shell,
.journey-section,
.routes-section,
.learning-section,
.final-cta {
  padding: 5rem 0 0;
}

.section-heading {
  max-width: 840px;
  margin-bottom: 2rem;
}

.section-heading p:not(.eyebrow) {
  font-size: 1.08rem;
}

.ecosystem-stage {
  display: grid;
  grid-template-columns: minmax(520px, 1.05fr) minmax(320px, 0.65fr);
  gap: 1.4rem;
  align-items: stretch;
}

.ecosystem-diagram {
  position: relative;
  min-height: 610px;
  padding: 1.2rem;
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  border: 1px solid var(--q-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.platform-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 240px;
  min-height: 190px;
  padding: 1.25rem;
  transform: translate(-50%, -50%);
  background: var(--q-white);
  border: 2px solid var(--q-blue);
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.platform-core img {
  width: 180px;
  height: auto;
  display: block;
  margin-bottom: 0.7rem;
}

.platform-core strong,
.platform-core span {
  display: block;
}

.platform-core strong {
  color: var(--q-blue-dark);
  font-size: 1.1rem;
}

.platform-core span {
  color: var(--q-blue);
  font-weight: 900;
  font-size: 0.85rem;
}

.connector {
  position: absolute;
  z-index: 1;
  background: #bed9ff;
}

.connector-public,
.connector-delivery {
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
}

.connector-public {
  top: 18%;
  height: 24%;
}

.connector-delivery {
  bottom: 18%;
  height: 24%;
}

.connector-operations,
.connector-intelligence {
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}

.connector-operations {
  right: 19%;
  width: 25%;
}

.connector-intelligence {
  left: 19%;
  width: 25%;
}

.ecosystem-node {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 0.35rem;
  width: 218px;
  min-height: 122px;
  padding: 1rem;
  border: 1px solid var(--q-line);
  border-radius: 8px;
  background: var(--q-white);
  color: var(--q-blue-dark);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 30px rgba(7, 21, 47, 0.08);
}

.ecosystem-node strong,
.ecosystem-node small {
  display: block;
}

.ecosystem-node small {
  color: var(--q-muted);
  font-weight: 800;
}

.ecosystem-node.is-active,
.ecosystem-node[aria-pressed="true"] {
  border-color: var(--q-blue);
  box-shadow: var(--shadow);
}

.node-public {
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
}

.node-operations {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.node-delivery {
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
}

.node-intelligence {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-live {
  background: var(--q-green-soft);
  color: var(--q-green);
  border: 1px solid rgba(18, 129, 95, 0.24);
}

.status-dev {
  background: var(--q-gold-soft);
  color: #7a5100;
  border: 1px solid rgba(185, 133, 25, 0.28);
}

.status-future {
  background: var(--q-plum-soft);
  color: var(--q-plum);
  border: 1px solid rgba(90, 61, 112, 0.22);
}

.ecosystem-details {
  min-height: 610px;
}

.ecosystem-panel {
  display: none;
  height: 100%;
  background: var(--q-white);
  border: 1px solid var(--q-line);
  padding: 1.45rem;
  box-shadow: var(--shadow);
}

.ecosystem-panel.is-active {
  display: block;
}

.ecosystem-panel details {
  margin-top: 1.2rem;
}

details summary {
  cursor: pointer;
  color: var(--q-blue);
  font-weight: 900;
}

.ecosystem-panel ul,
.route-card ul {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
}

.ecosystem-panel li,
.route-card li {
  margin-bottom: 0.42rem;
}

.ecosystem-panel li span {
  color: var(--q-green);
  font-weight: 800;
}

.journey-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.7rem;
}

.journey-path::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--q-blue), var(--q-green), var(--q-gold), var(--q-plum));
  z-index: 0;
}

.journey-stage {
  position: relative;
  z-index: 1;
  min-height: 158px;
  padding: 0.95rem 0.7rem;
  border: 1px solid var(--q-line);
  border-radius: 8px;
  background: var(--q-white);
  color: var(--q-blue-dark);
  cursor: pointer;
  text-align: left;
}

.journey-stage span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.7rem;
  border-radius: 50%;
  background: var(--q-blue);
  color: var(--q-white);
  font-weight: 900;
}

.journey-stage strong,
.journey-stage em {
  display: block;
}

.journey-stage em {
  margin-top: 0.35rem;
  color: var(--q-green);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.journey-stage.is-active {
  border-color: var(--q-blue);
  box-shadow: var(--shadow);
}

.journey-detail {
  margin-top: 1rem;
  background: var(--q-blue-dark);
  color: var(--q-white);
  padding: 1.3rem;
}

.journey-detail strong {
  font-size: 1.2rem;
}

.journey-detail p {
  color: #dbe9ff;
  margin: 0.35rem 0 0;
}

.journey-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.journey-rules span {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: var(--q-blue-soft);
  border: 1px solid var(--q-line);
  border-radius: 8px;
  color: var(--q-blue-dark);
  font-weight: 900;
}

.routes-section {
  background: linear-gradient(180deg, transparent 0%, #eef6ff 100%);
}

.route-grid,
.principle-grid,
.proof-grid,
.link-grid {
  display: grid;
  gap: 1rem;
}

.route-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.route-card,
.principle-card,
.proof-card {
  background: var(--q-white);
  border: 1px solid var(--q-line);
  padding: 1.45rem;
  box-shadow: 0 10px 30px rgba(7, 21, 47, 0.06);
}

.route-card {
  box-shadow: var(--shadow);
}

.route-diy {
  border-top: 6px solid var(--q-green);
}

.route-qcms {
  border-top: 6px solid var(--q-blue);
}

.principle-grid,
.proof-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.learning-loop {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
}

.learning-loop div {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--q-white);
  border: 1px solid var(--q-line);
  border-radius: 8px;
  color: var(--q-blue-dark);
  font-weight: 900;
  text-align: center;
}

.text-link {
  display: inline-flex;
  margin-top: 1.2rem;
  color: var(--q-blue);
  font-weight: 900;
  text-decoration: none;
}

.link-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.link-grid a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0.9rem 1rem;
  background: var(--q-white);
  border: 1px solid var(--q-line);
  border-radius: 8px;
  color: var(--q-blue);
  font-weight: 900;
  text-decoration: none;
}

.final-cta {
  padding-bottom: 5rem;
}

.final-inner {
  padding: 3rem;
  background: linear-gradient(135deg, var(--q-blue-dark), #123a83);
  color: var(--q-white);
  border-radius: 8px;
  text-align: center;
}

.final-inner h2 {
  color: var(--q-white);
}

.final-inner p {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  color: #dbe9ff;
}

.final-inner .hero-actions {
  justify-content: center;
}

.final-inner .button-secondary {
  background: transparent;
  color: var(--q-white);
  border-color: rgba(255, 255, 255, 0.72);
}

.closing-line {
  margin-top: 1.4rem;
  font-weight: 900;
}

.site-footer {
  background: #eef4fb;
  border-top: 1px solid #d9e7fb;
  padding: 2.5rem 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 1.6rem;
}

.footer-logo img {
  width: 190px;
  height: auto;
  display: block;
}

.site-footer h2 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.site-footer a {
  display: block;
  color: var(--q-blue);
  font-weight: 800;
  text-decoration: none;
  margin: 0.2rem 0;
}

.site-footer p {
  margin-bottom: 0.35rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .button,
  .header-cta,
  .ecosystem-node {
    transition: none;
  }
}

@media (max-width: 1120px) {
  .ecosystem-stage {
    grid-template-columns: 1fr;
  }

  .ecosystem-details {
    min-height: 0;
  }

  .principle-grid,
  .proof-grid,
  .journey-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  h1 {
    font-size: 3.15rem;
  }

  .pillar-feed,
  .journey-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pillar-feed::before,
  .journey-path::before {
    display: none;
  }

  .learning-loop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.8rem 0;
  }

  .brand-link img {
    width: 190px;
  }

  .header-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .pillar-feed,
  .route-grid,
  .link-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .pillar-feed {
    margin-top: 0;
    padding-top: 1rem;
  }

  .ecosystem-diagram {
    min-height: 0;
    display: grid;
    gap: 0.75rem;
  }

  .platform-core,
  .ecosystem-node {
    position: static;
    width: 100%;
    min-height: auto;
    transform: none;
  }

  .platform-core {
    min-height: 170px;
    order: -1;
  }

  .connector {
    display: none;
  }
}

@media (max-width: 540px) {
  .header-inner,
  .footer-inner,
  .hero-inner,
  .section-shell,
  .journey-section,
  .routes-section,
  .learning-section,
  .final-inner,
  .pillar-feed {
    width: min(100% - 24px, 1150px);
  }

  .hero-inner {
    padding: 3rem 0;
  }

  h1 {
    font-size: 2.05rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .philosophy {
    font-size: 1.05rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button,
  .header-cta {
    width: 100%;
  }

  .hero-snapshot li {
    grid-template-columns: 1fr;
  }

  .journey-path,
  .journey-rules,
  .principle-grid,
  .proof-grid,
  .learning-loop {
    grid-template-columns: 1fr;
  }

  .journey-stage {
    min-height: auto;
  }

  .final-inner {
    padding: 2rem 1rem;
  }
}
