/*
 * ZCJ Matrix AI website · interaction and responsive polish.
 * Keeps the established dark editorial direction while aligning controls
 * and interaction states with the desktop product.
 */

:root {
  --brand-green: #42c6a1;
  --brand-green-soft: rgba(66, 198, 161, .11);
  --brand-line: rgba(255, 255, 255, .14);
  --brand-line-strong: rgba(255, 255, 255, .26);
}

body {
  font-variant-numeric: tabular-nums;
}

.site-header {
  border-bottom-color: rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(7, 7, 8, .82), rgba(7, 7, 8, .5));
  backdrop-filter: blur(16px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--brand-line);
  background: rgba(7, 7, 8, .94);
}

.header-inner {
  min-width: 0;
}

.brand,
.site-nav,
.header-cta {
  min-width: 0;
}

.brand img {
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}

.site-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding-inline: 3px;
  font-weight: 590;
}

.site-nav a::after {
  background: var(--brand-green);
}

.header-cta,
.button,
.mode-tabs button,
.menu-toggle {
  border-radius: 10px;
}

.header-cta {
  min-height: 42px;
  border-color: var(--brand-line-strong);
  background: rgba(255, 255, 255, .055);
}

.header-cta:hover,
.header-cta:focus-visible {
  border-color: rgba(66, 198, 161, .48);
  background: var(--brand-green-soft);
}

.button {
  min-height: 50px;
  border-color: var(--brand-line-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .24);
  font-weight: 680;
}

.button-primary {
  border-color: #f1f3ee;
  background: #f1f3ee;
  color: #121714;
}

.button-primary:hover,
.button-primary:focus-visible {
  border-color: #d9efe6;
  background: #d9efe6;
}

.button-quiet:hover,
.button-quiet:focus-visible {
  border-color: rgba(66, 198, 161, .4);
  background: var(--brand-green-soft);
}

.eyebrow,
.kicker {
  color: #83d7bd;
}

.live-dot {
  background: var(--brand-green);
  box-shadow: 0 0 0 5px rgba(66, 198, 161, .09);
}

.hero-title-line {
  white-space: normal;
}

.hero-lede {
  max-width: 540px;
  color: #c1c4c0;
}

.product-frame {
  border-color: rgba(255, 255, 255, .22);
  box-shadow:
    0 26px 90px rgba(0, 0, 0, .44),
    0 0 0 1px rgba(255, 255, 255, .045);
}

.mode-tabs {
  border-color: var(--brand-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  padding: 4px;
}

.mode-tabs button {
  min-height: 42px;
  border: 0;
  color: #aeb2ae;
}

.mode-tabs button[aria-selected="true"] {
  background: #f1f3ee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .24);
  color: #151a17;
}

.mode-tabs button:focus-visible {
  box-shadow: 0 0 0 3px rgba(66, 198, 161, .25);
}

.faq-list {
  border-top-color: var(--brand-line);
}

.faq-list details {
  border-bottom-color: var(--brand-line);
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.faq-list details[open] {
  border-color: rgba(66, 198, 161, .33);
  background: linear-gradient(90deg, rgba(66, 198, 161, .06), transparent 66%);
}

.faq-list summary {
  min-height: 88px;
  border-radius: 10px;
  padding: 0 12px 0 4px;
  line-height: 1.45;
}

.faq-list summary:hover {
  color: #fff;
}

.faq-list summary:focus-visible {
  outline: 0;
  box-shadow: inset 3px 0 0 var(--brand-green);
}

.faq-list summary span::before,
.faq-list summary span::after {
  background: #aeb7b2;
}

.faq-list details[open] summary span::before,
.faq-list details[open] summary span::after {
  background: var(--brand-green);
}

.faq-list details[open] summary {
  margin-bottom: 10px;
}

.faq-list details p {
  max-width: 690px;
  margin: 0 46px 30px 4px;
  padding-top: 2px;
  color: #aeb5b0;
  font-size: 14px;
  line-height: 1.8;
}

.download-section {
  background:
    radial-gradient(circle at 50% 45%, rgba(66, 198, 161, .08), transparent 28%),
    var(--black);
}

.button-light {
  border-color: #f1f3ee;
  background: #f1f3ee;
  color: #121714;
}

.button-light:hover,
.button-light:focus-visible {
  border-color: #d9efe6;
  background: #d9efe6;
}

:focus-visible {
  outline-color: var(--brand-green);
}

@media (max-width: 1100px) {
  .hero-grid {
    gap: 64px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-product {
    justify-self: center;
  }
}

@media (max-width: 900px) {
  .site-nav {
    top: 76px;
    border-bottom-color: var(--brand-line);
    background: rgba(7, 7, 8, .98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
    padding: 16px 24px 28px;
  }

  .site-nav a {
    min-height: 54px;
    border-bottom-color: var(--brand-line);
    padding: 0;
  }

  .menu-toggle {
    border-color: var(--brand-line-strong);
    background: rgba(255, 255, 255, .035);
  }

  .menu-toggle[aria-expanded="true"] {
    border-color: rgba(66, 198, 161, .42);
    background: var(--brand-green-soft);
  }

  .faq-grid {
    gap: 42px;
  }

  .faq-heading {
    max-width: 620px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    top: 68px;
    padding-inline: 14px;
  }

  .hero {
    padding-top: 116px;
  }

  .hero h1 {
    font-size: clamp(36px, 10vw, 48px);
    line-height: 1.04;
  }

  .hero-lede {
    margin-top: 24px;
    line-height: 1.72;
  }

  .hero-actions {
    margin-top: 30px;
  }

  .button {
    width: 100%;
    min-height: 50px;
  }

  .proof-strip {
    margin-top: 64px;
  }

  .mode-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-list summary {
    min-height: 76px;
    padding-inline: 2px 4px;
    font-size: 14px;
  }

  .faq-list details p {
    margin: -2px 30px 24px 2px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-nav,
  .button,
  .faq-list details {
    transition: none;
  }
}

/*
 * Responsive system 4
 * One continuous layout system for the full marketing site.
 */

:root {
  --max-width: 1320px;
  --page-gutter: clamp(24px, 3.4vw, 56px);
  --section-space: clamp(96px, 8vw, 136px);
  --section-title: clamp(38px, 3.65vw, 58px);
  --card-radius: 14px;
}

html,
body {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.shell {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--max-width));
}

.header-inner {
  width: min(calc(100% - (var(--page-gutter) * 2)), 1400px);
}

.site-header,
.header-inner,
.site-nav,
.hero,
.hero-grid,
.hero-copy,
.hero-product,
.product-frame,
.frame-canvas,
.section,
.section-heading,
.system-intro,
.bento,
.bento-panel,
.assistant-grid,
.assistant-copy,
.mode-switcher,
.principles-header,
.principles-list,
.faq-grid,
.faq-list,
.download-inner,
.footer-inner {
  min-width: 0;
}

.hero {
  min-height: 0;
  padding: clamp(126px, 12vh, 158px) 0 46px;
}

.hero::before {
  top: 76px;
  height: min(72vh, 690px);
}

.hero::after {
  top: clamp(370px, 45vh, 430px);
}

.hero-grid {
  grid-template-columns: minmax(410px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(48px, 4.4vw, 76px);
  align-items: center;
}

.hero-copy {
  width: 100%;
  max-width: 610px;
  padding-bottom: 0;
}

.eyebrow,
.kicker {
  margin-bottom: 22px;
  line-height: 1.45;
}

.hero h1 {
  width: 100%;
  max-width: 610px;
  font-size: clamp(48px, 3.7vw, 64px);
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.hero-title-line {
  white-space: nowrap;
}

.hero-lede {
  max-width: 530px;
  margin-top: 28px;
  font-size: clamp(15px, 1.08vw, 17px);
  line-height: 1.75;
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 32px;
}

.hero-meta {
  margin-top: 16px;
}

.hero-product {
  width: 100%;
  max-width: 760px;
  justify-self: end;
  transform: none;
}

.product-frame {
  transform: none;
}

.hero-product:hover .product-frame {
  transform: translateY(-5px);
}

.product-label-left {
  left: -18px;
}

.product-label-right {
  right: -14px;
}

.proof-strip {
  margin-top: clamp(72px, 8vh, 94px);
  border-bottom: 1px solid var(--line);
}

.proof-strip > div {
  min-height: 108px;
  padding: 23px 26px;
}

.section {
  padding: var(--section-space) 0;
}

.section-heading {
  max-width: 800px;
}

.section-heading h2,
.system-intro h2,
.assistant-copy h2,
.principles-header h2,
.faq-heading h2,
.download-inner h2 {
  font-size: var(--section-title);
  letter-spacing: -0.045em;
  line-height: 1.14;
  text-wrap: balance;
}

.section-heading > p:last-child,
.system-intro > p,
.assistant-copy > p:not(.kicker),
.principles-list p,
.faq-list details p {
  text-wrap: pretty;
}

.section-heading > p:last-child {
  margin-top: 24px;
  line-height: 1.75;
}

.process-line {
  margin-top: clamp(64px, 6vw, 82px);
}

.process-line li {
  padding-right: clamp(24px, 3vw, 40px);
}

.system-intro {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(48px, 6vw, 84px);
}

.bento {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(62px, 6vw, 82px);
}

.bento-panel {
  min-height: 390px;
  padding: clamp(26px, 2.5vw, 34px);
  border-radius: var(--card-radius);
}

.account-panel {
  padding-bottom: 222px;
}

.account-table {
  inset: auto clamp(26px, 2.5vw, 34px) clamp(26px, 2.5vw, 34px);
}

.output-panel {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  padding: 0;
}

.output-copy {
  min-width: 0;
  padding: clamp(26px, 2.5vw, 34px);
}

.output-copy h3 {
  margin-top: clamp(46px, 6vw, 72px);
}

.assistant-section {
  border-color: var(--line);
  background: #0c0d0e;
  color: var(--white);
}

.assistant-grid {
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  gap: clamp(62px, 7vw, 104px);
}

.assistant-copy .kicker {
  color: #83d7bd;
}

.assistant-copy > p:not(.kicker) {
  color: #abb1ad;
  line-height: 1.78;
}

.assistant-note {
  border-top-color: var(--line);
  color: #8f9792;
}

.assistant-note b {
  color: var(--white);
}

.mode-switcher {
  min-height: 460px;
  border-color: var(--brand-line);
  background: #141617;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .035);
}

.mode-tabs {
  border-color: var(--brand-line);
  background: #0c0d0e;
}

.mode-tabs button {
  color: #9aa19d;
}

.mode-tabs button[aria-selected="true"] {
  background: #eef2ed;
  color: #131815;
}

.mode-panel h3,
.composer-mini b {
  color: var(--white);
}

.mode-label {
  border-color: var(--brand-line-strong);
  color: #aeb6b1;
}

.mode-panel ul,
.composer-mini div {
  color: #929a95;
}

.mode-panel li::before {
  background: var(--brand-green);
}

.composer-mini {
  border-color: var(--brand-line);
  background: #0c0d0e;
}

.composer-line {
  border-color: var(--brand-line-strong);
}

.composer-line::after {
  background: #e8ece8;
}

.composer-line-smart::after {
  background: var(--brand-green);
}

.composer-result {
  background: #eef2ed;
  color: #131815;
}

.principles-header {
  max-width: 860px;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.principles-header .kicker {
  margin: 0;
}

.principles-list {
  margin-top: clamp(60px, 6vw, 82px);
}

.principles-list article {
  grid-template-columns: minmax(52px, 0.22fr) minmax(180px, 0.5fr) minmax(0, 1.28fr);
  gap: clamp(24px, 3vw, 42px);
}

.faq-grid {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(64px, 8vw, 110px);
}

.download-section {
  padding: clamp(120px, 11vw, 158px) 0 clamp(108px, 10vw, 144px);
}

.download-inner > p:not(.kicker) {
  max-width: 560px;
  line-height: 1.75;
}

.footer-inner {
  grid-template-columns: minmax(180px, 0.7fr) minmax(320px, 1.3fr) auto;
}

@media (max-width: 1220px) {
  :root {
    --page-gutter: 24px;
  }

  .hero-grid {
    grid-template-columns: minmax(360px, 0.84fr) minmax(0, 1.16fr);
    gap: clamp(38px, 4vw, 54px);
  }

  .hero h1 {
    font-size: clamp(46px, 4.3vw, 54px);
  }

  .product-label {
    min-width: 164px;
    padding: 9px 12px;
  }

  .assistant-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
    gap: 56px;
  }
}

@media (max-width: 980px) {
  :root {
    --section-space: clamp(86px, 11vw, 112px);
    --section-title: clamp(36px, 6vw, 50px);
  }

  .hero {
    padding-top: 128px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 58px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero h1 {
    max-width: 680px;
    font-size: clamp(46px, 6.5vw, 54px);
  }

  .hero-lede {
    max-width: 590px;
  }

  .hero-product {
    width: min(94%, 840px);
    max-width: none;
    justify-self: center;
  }

  .product-label-left {
    left: -8px;
  }

  .product-label-right {
    right: -8px;
  }

  .proof-strip {
    margin-top: 70px;
  }

  .process-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 46px 0;
  }

  .process-line::before {
    display: none;
  }

  .process-line li {
    min-height: 170px;
  }

  .process-line li:nth-child(3) {
    padding-left: 0;
  }

  .process-line li:nth-child(3) .process-number {
    left: 0;
  }

  .system-intro,
  .assistant-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-intro,
  .assistant-grid {
    gap: 46px;
  }

  .system-intro > p,
  .assistant-copy {
    max-width: 720px;
  }

  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .assistant-grid {
    gap: 52px;
  }

  .mode-switcher {
    width: min(100%, 760px);
  }

  .faq-grid {
    gap: 50px;
  }

  .faq-heading {
    position: static;
    max-width: 700px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 40px 0;
  }
}

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

  .site-nav {
    top: 76px;
  }
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 16px;
    --section-space: 82px;
    --section-title: clamp(33px, 9vw, 40px);
  }

  .header-inner {
    height: 68px;
  }

  .brand {
    font-size: 14px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .site-nav {
    top: 68px;
    padding-inline: 16px;
  }

  .hero {
    padding: 108px 0 32px;
  }

  .hero-grid {
    gap: 46px;
  }

  .hero h1 {
    font-size: clamp(36px, 10.5vw, 46px);
    line-height: 1.08;
  }

  .hero-title-line {
    white-space: normal;
  }

  .hero-lede {
    max-width: 100%;
    margin-top: 23px;
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .hero-product {
    width: 100%;
  }

  .product-label {
    display: none;
  }

  .frame-canvas {
    aspect-ratio: 16 / 9.2;
  }

  .proof-strip {
    margin-top: 52px;
  }

  .proof-strip > div {
    min-height: 94px;
    padding: 18px;
  }

  .section-heading > p:last-child {
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.7;
  }

  .process-line {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 52px;
    gap: 0;
  }

  .process-line li,
  .process-line li:not(:first-child):not(:last-child),
  .process-line li:last-child {
    min-height: auto;
    padding: 27px 0 27px 54px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .process-line li .process-number,
  .process-line li:not(:first-child) .process-number,
  .process-line li:nth-child(3) .process-number {
    top: 25px;
    left: 0;
  }

  .bento {
    margin-top: 52px;
    gap: 14px;
  }

  .bento-panel {
    min-height: 390px;
    padding: 24px;
  }

  .account-panel {
    padding-bottom: 208px;
  }

  .account-table {
    inset: auto 24px 24px;
  }

  .output-panel {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }

  .output-copy {
    padding: 24px;
  }

  .output-copy h3 {
    margin-top: 34px;
  }

  .mode-switcher {
    min-height: 0;
  }

  .mode-panel {
    padding: 30px 12px 14px;
  }

  .composer-mini {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  .principles-list {
    margin-top: 50px;
  }

  .principles-list article {
    min-height: 0;
    padding: 26px 0;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px 14px;
  }

  .principles-list p {
    grid-column: 2;
  }

  .faq-grid {
    gap: 38px;
  }

  .faq-list summary {
    min-height: 78px;
    gap: 14px;
    font-size: 14px;
  }

  .faq-list details p {
    margin: 0 30px 24px 2px;
  }

  .download-section {
    padding: 100px 0 94px;
  }

  .download-meta {
    gap: 14px;
  }
}

@media (min-width: 981px) and (max-height: 800px) {
  .hero {
    padding-top: 112px;
  }

  .hero h1 {
    font-size: clamp(46px, 3.5vw, 58px);
  }

  .hero-lede {
    margin-top: 24px;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .proof-strip {
    margin-top: 58px;
  }
}
