/*
 * QC Devworks — Precision Workshop editorial system.
 * A concept-led layer that turns the homepage into one continuous engineering
 * story while preserving the existing routes, content, and working controls.
 */

:root {
  --qe-workshop-navy: #04152d;
  --qe-workshop-navy-2: #08213f;
  --qe-workshop-blue: #1463ff;
  --qe-workshop-orange: #ff6b35;
  --qe-workshop-paper: #f7f7f4;
  --qe-workshop-rule: #d7dde5;
  --qe-workshop-ink: #071a35;
  --qe-workshop-muted: #526176;
  --qe-workshop-gutter: clamp(24px, 5.8vw, 96px);
  --qe-workshop-rail: clamp(20px, 3.25vw, 54px);
  --qe-workshop-radius: 3px;
  --qe-blue: var(--qe-workshop-blue);
  --qe-blue-dark: #084fd6;
  --qe-navy: var(--qe-workshop-navy);
  --qe-text: var(--qe-workshop-ink);
  --qe-muted: var(--qe-workshop-muted);
  --qe-line: var(--qe-workshop-rule);
  --qe-wrap: min(1344px, calc(100vw - (var(--qe-workshop-gutter) * 2)));
}

body {
  text-rendering: geometricPrecision;
}

::selection {
  background: var(--qe-workshop-blue);
  color: #fff;
}

.qe-header {
  background: rgb(255 255 255 / 97%);
  border-bottom-color: #e0e5eb;
}

.qe-header__inner {
  height: 94px;
}

.qe-brand__mark {
  height: 44px;
  width: 44px;
}

.qe-brand__name {
  font-size: 18px;
}

.qe-nav a {
  color: var(--qe-workshop-ink);
  font-size: 15px;
  font-weight: 560;
}

.qe-button {
  border-radius: var(--qe-workshop-radius);
  min-height: 54px;
  padding-inline: 26px;
}

.qe-button:focus-visible,
.qe-link:focus-visible,
.qe-nav a:focus-visible,
.qe-footer a:focus-visible {
  outline: 3px solid rgb(20 99 255 / 24%);
  outline-offset: 4px;
}

/* Shared blueprint scaffold. */
.qe-blueprint-section {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  scroll-margin-top: 94px;
}

.qe-blueprint-section::after {
  background-image:
    linear-gradient(90deg, transparent calc(100% - 1px), rgb(7 26 53 / 7%) 0),
    linear-gradient(transparent calc(100% - 1px), rgb(7 26 53 / 5%) 0),
    radial-gradient(circle at 100% 0, transparent 0 240px, rgb(7 26 53 / 8%) 241px 242px, transparent 243px);
  background-size: 270px 100%, 100% 160px, 620px 620px;
  content: "";
  inset: 0;
  opacity: .7;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.qe-stage-rail {
  align-items: center;
  color: #8793a4;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  gap: 10px;
  left: var(--qe-workshop-rail);
  line-height: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

.qe-stage-rail span:first-child {
  color: var(--qe-workshop-blue);
  font-weight: 700;
}

.qe-stage-rail i {
  background: #aab4c1;
  display: block;
  height: 44px;
  transform: scaleY(.22);
  transform-origin: top;
  transition: transform .7s var(--qe-ease);
  width: 1px;
}

.qe-blueprint-section.is-workshop-visible .qe-stage-rail i,
.qe-cinema-home.is-cinema-visible .qe-stage-rail i {
  transform: scaleY(1);
}

/* Homepage hero — a single, decisive engineering field and documentary image. */
.qe-cinema-home {
  background: var(--qe-workshop-navy);
}

.qe-home-hero__stage {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  min-height: clamp(720px, calc(100vh - 94px), 880px);
}

.qe-cinema-home .qe-home-hero__copy {
  align-self: stretch;
  background-image:
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
    radial-gradient(circle at 0 100%, transparent 0 110px, rgb(255 255 255 / 9%) 111px 112px, transparent 113px);
  background-position: 0 0, 0 0, 30px calc(100% - 24px);
  background-size: 270px 100%, 100% 160px, 320px 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
  padding: 104px clamp(58px, 7vw, 118px) 170px clamp(126px, 11.5vw, 198px);
}

.qe-cinema-home .qe-home-hero__copy::before {
  background: var(--qe-workshop-blue);
  left: clamp(126px, 11.5vw, 198px);
  top: clamp(72px, 9vh, 112px);
  width: 66px;
}

.qe-cinema-home .qe-home-hero__copy::after {
  bottom: 48px;
  color: #8595aa;
  content: "// SOFTWARE + AI AGENTS\A// CONNECTED SYSTEMS\A// QC DEVWORKS";
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  left: clamp(126px, 11.5vw, 198px);
  letter-spacing: .08em;
  line-height: 1.7;
  position: absolute;
  white-space: pre;
}

.qe-cinema-home .qe-home-hero h1 {
  font-size: clamp(64px, 5.6vw, 88px);
  font-weight: 690;
  letter-spacing: -.07em;
  line-height: .97;
  max-width: 790px;
}

.qe-cinema-home .qe-home-hero__copy > p {
  color: #c4cfdd;
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.48;
  margin-top: 34px;
  max-width: 620px;
}

.qe-cinema-home .qe-actions {
  margin-top: 38px;
}

.qe-cinema-home .qe-home-hero__media {
  clip-path: polygon(13% 0, 100% 0, 100% 100%, 0 100%);
}

.qe-cinema-home .qe-home-hero__media::after {
  background: none;
}

.qe-cinema-home .qe-home-hero__media::before {
  background: var(--qe-workshop-orange);
  bottom: 68px;
  content: "";
  height: 2px;
  left: 12%;
  position: absolute;
  width: 50px;
  z-index: 4;
}

.qe-cinema-home .qe-home-hero__media figcaption {
  bottom: 38px;
  left: 52%;
  right: 32px;
}

/* Proof + feature — giant open statement, then one embedded product frame. */
.qe-proof {
  border-top: 0;
  padding: clamp(104px, 10vw, 168px) 0 0;
}

.qe-proof__intro {
  align-items: end;
  gap: clamp(54px, 9vw, 154px);
  grid-template-columns: 1.08fr .72fr;
  margin-bottom: clamp(72px, 8vw, 116px);
  padding-left: clamp(26px, 4vw, 64px);
}

.qe-proof__intro h2 {
  font-size: clamp(58px, 6.4vw, 94px);
  font-weight: 690;
  letter-spacing: -.066em;
  line-height: .95;
}

.qe-featured-work {
  clip-path: polygon(0 0, 45% 0, 47.5% 7%, 100% 7%, 100% 100%, 0 100%);
  grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr);
  margin-inline: calc(var(--qe-workshop-gutter) * -1);
  min-height: 620px;
  position: relative;
}

.qe-featured-work::before {
  background-image:
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px);
  background-size: 270px 100%, 100% 160px;
  content: "";
  inset: 0 55% 0 0;
  pointer-events: none;
  position: absolute;
}

.qe-featured-work__copy {
  padding: clamp(68px, 8vw, 116px) clamp(54px, 7vw, 108px);
  position: relative;
  z-index: 2;
}

.qe-featured-work__copy > span {
  color: var(--qe-workshop-orange);
}

.qe-featured-work h3 {
  font-size: clamp(38px, 3.8vw, 58px);
  max-width: 11ch;
}

.qe-featured-work figure {
  clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%);
  min-height: 620px;
}

.qe-featured-work figure img {
  transform: scale(1.025);
  transition: transform .9s var(--qe-ease), filter .5s var(--qe-ease);
}

.qe-featured-work:hover figure img {
  transform: scale(1.055) translate3d(var(--qe-feature-x, 0), var(--qe-feature-y, 0), 0);
}

/* Capabilities — an editorial index, never a stack of cards. */
.qe-services {
  padding-block: clamp(110px, 10vw, 168px);
}

.qe-services__grid {
  gap: clamp(70px, 9vw, 152px);
  grid-template-columns: .78fr 1.22fr;
  padding-left: clamp(26px, 4vw, 64px);
}

.qe-services header h2 {
  font-size: clamp(50px, 5.2vw, 78px);
  font-weight: 680;
  letter-spacing: -.062em;
  line-height: .98;
}

.qe-services li {
  gap: clamp(18px, 3vw, 48px);
  grid-template-columns: 48px minmax(190px, .72fr) minmax(220px, 1fr) auto;
  min-height: 126px;
  padding-inline: 14px;
  transition: background .25s var(--qe-ease), padding .25s var(--qe-ease);
}

.qe-services li:hover,
.qe-services li:focus-within {
  background: #f2f6ff;
  padding-inline: 24px;
}

.qe-services li > div {
  display: contents;
}

.qe-services h3 {
  font-size: clamp(20px, 1.8vw, 27px);
  margin: 0;
}

.qe-services li p {
  font-size: 15px;
}

/* Process — one live signal, four points on the same system. */
.qe-process {
  background: var(--qe-workshop-navy);
  padding: clamp(100px, 9vw, 152px) 0 clamp(110px, 10vw, 166px);
}

.qe-process::after {
  background-image:
    radial-gradient(circle, rgb(255 255 255 / 10%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px);
  background-size: 18px 18px, 270px 100%;
  opacity: .46;
}

.qe-process > .qe-wrap {
  padding-left: clamp(26px, 4vw, 64px);
}

.qe-process header {
  align-items: start;
  display: grid;
  gap: 24px;
  justify-content: start;
  margin-bottom: 54px;
}

.qe-process h2 {
  font-size: clamp(52px, 5.6vw, 84px);
  font-weight: 640;
  max-width: 780px;
}

.qe-process ol {
  gap: 0;
  padding-top: 70px;
  position: relative;
}

.qe-process ol::before,
.qe-process ol::after {
  content: "";
  height: 1px;
  left: 20px;
  position: absolute;
  right: 20px;
  top: 46px;
}

.qe-process ol::before {
  background: #4b617b;
}

.qe-process ol::after {
  background: var(--qe-workshop-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.25s .15s var(--qe-ease);
}

.qe-process.is-workshop-visible ol::after {
  transform: scaleX(1);
}

.qe-process li {
  border-top: 0;
  padding: 26px clamp(22px, 2.6vw, 42px) 0 20px;
  position: relative;
}

.qe-process li::before,
.qe-process li::after {
  border-radius: 50%;
  content: "";
  left: 13px;
  position: absolute;
  top: -31px;
}

.qe-process li::before {
  border: 1px solid #6b7c92;
  height: 15px;
  width: 15px;
}

.qe-process li::after {
  background: var(--qe-workshop-orange);
  height: 7px;
  opacity: 0;
  transform: scale(.2);
  transition: opacity .35s var(--qe-ease), transform .35s var(--qe-ease);
  width: 7px;
}

.qe-process li.is-signal-active::after {
  opacity: 1;
  transform: scale(1);
}

.qe-process li > span {
  color: var(--qe-workshop-blue);
  font-size: 15px;
  font-weight: 700;
}

.qe-process h3 {
  font-size: 24px;
  margin: 12px 0 10px;
}

/* Studio — place and people without putting the story in a box. */
.qe-studio {
  background: #fff;
  padding: 0;
}

.qe-studio__grid {
  grid-template-columns: .95fr 1.05fr;
  min-height: 600px;
  width: calc(100% - (var(--qe-workshop-gutter) * 2));
}

.qe-studio figure {
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%);
  grid-column: 2;
  grid-row: 1;
  min-height: 600px;
}

.qe-studio figure img {
  transform: scale(1.02);
  transition: transform 1s var(--qe-ease);
}

.qe-studio.is-workshop-visible figure img {
  transform: scale(1);
}

.qe-studio__grid > div {
  grid-column: 1;
  grid-row: 1;
  padding: clamp(72px, 8vw, 128px) clamp(28px, 3vw, 48px) clamp(72px, 8vw, 128px) clamp(54px, 5vw, 82px);
}

.qe-studio h2 {
  font-size: clamp(48px, 4.35vw, 66px);
  font-weight: 670;
  white-space: nowrap;
}

/* Insights — a magazine rail with one row per idea. */
.qe-insights {
  padding-block: clamp(90px, 8vw, 132px);
}

.qe-insights > .qe-wrap {
  display: grid;
  gap: clamp(64px, 9vw, 142px);
  grid-template-columns: .72fr 1.28fr;
  padding-left: clamp(26px, 4vw, 64px);
}

.qe-insights header {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin: 0;
}

.qe-insights h2 {
  font-size: clamp(48px, 4.9vw, 74px);
  font-weight: 670;
}

.qe-insights header .qe-link {
  margin-top: 34px;
}

.qe-insights__rail {
  display: block;
  border-bottom: 0;
}

.qe-insights__rail article,
.qe-insights__rail article + article {
  align-items: center;
  border-bottom: 1px solid var(--qe-workshop-rule);
  border-right: 0;
  display: grid;
  gap: 28px;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  min-height: 110px;
  padding: 18px 0;
}

.qe-insights__rail article > span {
  color: var(--qe-workshop-blue);
}

.qe-insights h3 {
  font-size: clamp(19px, 1.65vw, 25px);
  margin: 0;
}

.qe-insights .qe-link {
  margin-top: 0;
  white-space: nowrap;
}

/* Contact — the working form is the finale, not a floating form card. */
.qe-contact {
  background: var(--qe-workshop-navy);
  padding-block: clamp(92px, 9vw, 150px);
}

.qe-contact::after {
  background-image:
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px);
  background-size: 270px 100%, 100% 160px;
  opacity: .7;
}

.qe-contact__grid {
  gap: clamp(64px, 10vw, 164px);
  grid-template-columns: .82fr 1.18fr;
  padding-left: clamp(26px, 4vw, 64px);
}

.qe-contact h2 {
  font-size: clamp(50px, 5.2vw, 80px);
  font-weight: 650;
}

.qe-contact .qcdw-contact-form form {
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
}

.qe-contact .qcdw-form-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 1fr;
}

.qe-contact .qcdw-contact-form label {
  color: #d2dbe6;
  font-size: 13px;
  font-weight: 560;
}

.qe-contact .qcdw-contact-form input,
.qe-contact .qcdw-contact-form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #71849d;
  border-radius: 0;
  color: #fff;
  padding: 12px 0;
}

.qe-contact .qcdw-contact-form input::placeholder,
.qe-contact .qcdw-contact-form textarea::placeholder {
  color: #8090a4;
}

.qe-contact .qcdw-contact-form input:focus,
.qe-contact .qcdw-contact-form textarea:focus {
  border-color: #78a7ff;
  box-shadow: 0 2px 0 #78a7ff;
}

.qe-contact .qcdw-contact-form textarea {
  min-height: 118px;
}

.qe-contact .qcdw-contact-form button {
  justify-self: start;
  min-width: 190px;
  padding-inline: 26px;
}

/* Footer recedes so the contact finale remains the closing moment. */
.qe-footer {
  background: #fff;
  color: var(--qe-workshop-ink);
  padding-top: 56px;
}

.qe-brand--footer .qe-brand__name {
  color: var(--qe-workshop-ink);
}

.qe-footer__top,
.qe-footer__bottom {
  border-color: var(--qe-workshop-rule);
}

.qe-footer__top {
  padding-bottom: 38px;
}

.qe-footer__top p,
.qe-footer__nav a,
.qe-footer__contact span,
.qe-footer__bottom {
  color: var(--qe-workshop-muted);
}

.qe-footer__nav {
  padding-block: 42px;
}

.qe-footer__nav strong {
  color: var(--qe-workshop-blue);
}

.qe-footer__nav a:hover {
  color: var(--qe-workshop-blue);
}

@media (max-width: 1160px) {
  .qe-home-hero__stage {
    grid-template-columns: minmax(0, 1fr) minmax(450px, .9fr);
  }

  .qe-cinema-home .qe-home-hero__copy {
    padding-left: 110px;
    padding-right: 52px;
  }

  .qe-cinema-home .qe-home-hero__copy::before,
  .qe-cinema-home .qe-home-hero__copy::after {
    left: 110px;
  }

  .qe-cinema-home .qe-home-hero h1 {
    font-size: clamp(55px, 5.4vw, 70px);
  }

  .qe-services li {
    grid-template-columns: 42px minmax(165px, .68fr) minmax(190px, 1fr) auto;
  }
}

@media (max-width: 900px) {
  .qe-header__inner {
    height: 76px;
  }

  .qe-stage-rail {
    left: 22px;
  }

  .qe-home-hero__stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .qe-cinema-home .qe-home-hero__copy {
    min-height: 620px;
    padding: 98px 56px 138px 72px;
  }

  .qe-cinema-home .qe-home-hero__copy::before,
  .qe-cinema-home .qe-home-hero__copy::after {
    left: 72px;
  }

  .qe-cinema-home .qe-home-hero__media {
    clip-path: polygon(0 9%, 100% 0, 100% 100%, 0 100%);
    min-height: 560px;
  }

  .qe-proof__intro,
  .qe-services__grid,
  .qe-insights > .qe-wrap,
  .qe-contact__grid {
    grid-template-columns: 1fr;
  }

  .qe-featured-work {
    clip-path: none;
    grid-template-columns: 1fr;
    margin-inline: 0;
  }

  .qe-featured-work figure {
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
    min-height: 520px;
  }

  .qe-services li {
    grid-template-columns: 42px minmax(180px, .72fr) minmax(0, 1fr);
  }

  .qe-services li .qe-link {
    grid-column: 2 / -1;
    margin-bottom: 22px;
  }

  .qe-process ol {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 64px;
  }

  .qe-process ol::before,
  .qe-process ol::after {
    display: none;
  }

  .qe-process li {
    border-top: 1px solid #4b617b;
  }

  .qe-process li::before,
  .qe-process li::after {
    top: -8px;
  }

  .qe-studio__grid {
    grid-template-columns: 1fr;
    width: calc(100% - 48px);
  }

  .qe-studio figure,
  .qe-studio__grid > div {
    grid-column: 1;
  }

  .qe-studio figure {
    clip-path: polygon(0 7%, 100% 0, 100% 100%, 0 100%);
    grid-row: 2;
    min-height: 480px;
  }

  .qe-studio__grid > div {
    grid-row: 1;
  }

  .qe-studio h2 {
    white-space: normal;
  }
}

@media (max-width: 620px) {
  :root {
    --qe-workshop-gutter: 18px;
  }

  .qe-header__inner {
    height: 68px;
  }

  .qe-brand__mark {
    height: 38px;
    width: 38px;
  }

  .qe-brand__name {
    font-size: 16px;
  }

  .qe-stage-rail {
    display: none;
  }

  .qe-cinema-home .qe-home-hero__copy {
    min-height: 520px;
    padding: 78px 22px 122px;
  }

  .qe-cinema-home .qe-home-hero__copy::before,
  .qe-cinema-home .qe-home-hero__copy::after {
    left: 22px;
  }

  .qe-cinema-home .qe-home-hero__copy::before {
    top: 44px;
  }

  .qe-cinema-home .qe-home-hero__copy::after {
    bottom: 34px;
  }

  .qe-cinema-home .qe-home-hero h1 {
    font-size: clamp(42px, 12.2vw, 54px);
  }

  .qe-cinema-home .qe-home-hero h1 span {
    white-space: normal;
  }

  .qe-cinema-home .qe-home-hero__media {
    min-height: 390px;
  }

  .qe-cinema-home .qe-home-hero__media figcaption {
    left: 24px;
    right: 24px;
  }

  .qe-proof,
  .qe-services,
  .qe-insights,
  .qe-contact {
    padding-block: 76px;
  }

  .qe-proof {
    padding-bottom: 0;
  }

  .qe-proof__intro,
  .qe-services__grid,
  .qe-process > .qe-wrap,
  .qe-insights > .qe-wrap,
  .qe-contact__grid {
    padding-left: 0;
  }

  .qe-proof__intro h2,
  .qe-services header h2,
  .qe-process h2,
  .qe-studio h2,
  .qe-insights h2,
  .qe-contact h2 {
    font-size: clamp(40px, 12vw, 54px);
  }

  .qe-featured-work__copy {
    padding: 58px 26px 44px;
  }

  .qe-featured-work figure {
    min-height: 360px;
  }

  .qe-services li {
    align-items: start;
    gap: 12px 18px;
    grid-template-columns: 34px 1fr;
    padding: 24px 0;
  }

  .qe-services li > div {
    display: block;
  }

  .qe-services li p {
    margin-top: 8px;
  }

  .qe-services li .qe-link {
    grid-column: 2;
    margin: 4px 0 0;
  }

  .qe-process ol {
    grid-template-columns: 1fr;
    padding-top: 26px;
  }

  .qe-process li {
    padding-inline: 18px 0;
  }

  .qe-studio__grid {
    width: calc(100% - 36px);
  }

  .qe-studio__grid > div {
    padding: 76px 22px 64px;
  }

  .qe-studio figure {
    min-height: 340px;
  }

  .qe-insights__rail article,
  .qe-insights__rail article + article {
    align-items: start;
    gap: 10px;
    grid-template-columns: 1fr auto;
    padding: 24px 0;
  }

  .qe-insights__rail article > span,
  .qe-insights h3 {
    grid-column: 1 / -1;
  }

  .qe-contact .qcdw-form-grid {
    grid-template-columns: 1fr;
  }

  .qe-footer__top,
  .qe-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .qe-footer__top p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qe-stage-rail i,
  .qe-process ol::after,
  .qe-featured-work figure img,
  .qe-studio figure img {
    transform: none !important;
    transition: none !important;
  }
}
