:root {
  color-scheme: light;
  --ink: #142132;
  --muted: #5f6e7e;
  --line: #dce5ee;
  --panel: #ffffff;
  --blue: #1267d8;
  --teal: #12b8b4;
  --green: #27a66a;
  --amber: #c77700;
  --dark: #102033;
  --max: 1760px;
  --page-pad: clamp(28px, 4vw, 76px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef7f5 0%, #f8fbff 48%, #f4fbff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(206, 218, 230, 0.82);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, var(--max));
  min-height: 68px;
  margin: 0 auto;
  padding: 12px var(--page-pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(18, 103, 216, 0.12);
}

.brand-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  background: #eaf3f8;
  border: 1px solid rgba(193, 211, 226, 0.96);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(20, 33, 50, 0.08);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #0b7fb5, var(--teal));
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(18, 103, 216, 0.14);
}

.site-nav a:nth-child(2) {
  background: linear-gradient(135deg, var(--blue), #0e8fd4);
  box-shadow: 0 10px 22px rgba(18, 103, 216, 0.2);
}

.site-nav a:focus-visible,
.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.media-caption button:focus-visible,
.screenshot-tile:focus-visible,
.lightbox-close:focus-visible,
.back-to-top:focus-visible {
  outline: 3px solid rgba(18, 103, 216, 0.34);
  outline-offset: 3px;
}

.hero {
  padding: clamp(54px, 5.2vw, 84px) var(--page-pad) 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
  gap: clamp(42px, 4.4vw, 84px);
  align-items: center;
  width: min(100%, var(--max));
  margin: 0 auto;
}

.hero-copy {
  min-width: 0;
  max-width: 820px;
}

.hero-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  padding: 10px 16px 10px 12px;
  color: #183653;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(18, 103, 216, 0.12);
}

.brand-chip img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-chip.hero-codex-ide {
  color: #f7fbff;
  background: linear-gradient(135deg, #111827, #123242);
  border-color: rgba(53, 215, 255, 0.42);
  box-shadow: 0 18px 42px rgba(10, 23, 38, 0.22);
}

.brand-chip.hero-console {
  color: #083b64;
  background: linear-gradient(135deg, #ffffff, #e9fbff);
  border-color: rgba(18, 184, 180, 0.42);
}

.brand-bridge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: #075c62;
  background: rgba(18, 184, 180, 0.12);
  border: 1px solid rgba(18, 184, 180, 0.22);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 10px;
  color: #075c62;
  background: rgba(18, 184, 180, 0.14);
  border: 1px solid rgba(18, 184, 180, 0.28);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(46px, 4vw, 72px);
  word-break: normal;
  overflow-wrap: anywhere;
}

h1 span {
  display: block;
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
}

.lead,
.section-head p,
.download-band p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.mobile-quick-actions {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.primary-btn {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 14px 28px rgba(18, 103, 216, 0.22);
}

.secondary-btn {
  color: var(--dark);
  background: #fff;
  border: 1px solid var(--line);
}

button.secondary-btn {
  font: inherit;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-facts span,
.price-list span {
  padding: 8px 10px;
  color: var(--dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.capability-grid div {
  min-height: 96px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #cfe0f4;
  border-radius: 8px;
}

.capability-grid strong,
.capability-grid span {
  display: block;
}

.capability-grid strong {
  margin-bottom: 7px;
  color: #0e4d96;
  font-size: 15px;
}

.capability-grid span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-media {
  overflow: hidden;
  background: #101820;
  border: 1px solid #273c52;
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(15, 31, 48, 0.24);
}

.hero-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d1724;
}

.hero-media.portrait {
  max-width: 410px;
  justify-self: center;
}

.hero-media.portrait video {
  aspect-ratio: 9 / 16;
}

.promo-demo-card {
  display: grid;
  align-content: center;
  min-height: 360px;
  padding: clamp(22px, 4vw, 36px);
  color: #12304f;
  background:
    radial-gradient(circle at 18% 14%, rgba(18, 103, 216, 0.16), transparent 32%),
    linear-gradient(135deg, #f8fbff 0%, #eef7ff 48%, #effcf8 100%);
  border-color: #cbdff5;
}

.demo-step-list {
  display: grid;
  gap: 16px;
}

.demo-step-list h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.demo-kicker,
.demo-note {
  color: var(--muted);
  font-weight: 800;
}

.demo-step-list ol {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.demo-step-list li {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(203, 223, 245, 0.9);
  border-radius: 8px;
}

.demo-step-list li strong {
  color: #0e4d96;
}

.demo-step-list li span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.media-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  color: #e9f2fb;
  background: #101820;
  font-weight: 800;
}

.media-caption button {
  min-height: 34px;
  padding: 0 10px;
  color: #fff;
  background: transparent;
  border: 1px solid #4c637d;
  border-radius: 8px;
  cursor: pointer;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 var(--page-pad) 44px;
}

.step,
.logo-strip div,
.qr-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.step {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.step strong {
  color: var(--teal);
  font-size: 13px;
}

.step span {
  font-size: 16px;
  font-weight: 850;
}

.section {
  padding: clamp(44px, 6vw, 84px) var(--page-pad);
  scroll-margin-top: 88px;
}

.section > * {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.section-head {
  max-width: 820px;
  margin-bottom: 26px;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(22px, 4vw, 60px);
  align-items: center;
  background: #f4fbf7;
  border-block: 1px solid rgba(39, 166, 106, 0.14);
}

.split > * {
  width: auto;
  margin: 0;
}

.logo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.logo-strip div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  font-size: 18px;
  font-weight: 900;
}

.logo-strip .text-logo {
  justify-content: center;
  min-height: 82px;
  background: linear-gradient(135deg, #ffffff, #f1f8ff);
}

.logo-strip .text-logo span {
  color: #0e4d96;
  font-size: 18px;
  font-weight: 950;
}

.logo-strip .codex-route {
  color: #f7fbff;
  background: linear-gradient(135deg, #111827, #123242);
  border-color: rgba(53, 215, 255, 0.34);
}

.logo-strip img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.screen-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(244, 249, 255, 0.86));
}

.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.screenshot-tile {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: zoom-in;
}

.screenshot-tile img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(20, 33, 50, 0.12);
}

.screenshot-tile span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: #fff;
  background: rgba(16, 32, 51, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.download-band {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(560px, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  background:
    linear-gradient(135deg, #f6fbff 0%, #ffffff 54%, #eef9f7 100%);
  border-top: 1px solid rgba(18, 184, 180, 0.18);
}

.download-band > * {
  width: auto;
  margin: 0;
}

.download-copy {
  display: grid;
  align-content: center;
}

.purchase-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.purchase-steps div {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-height: 124px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(205, 221, 236, 0.96);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(20, 33, 50, 0.07);
}

.purchase-steps strong {
  color: var(--amber);
  font-size: 14px;
}

.purchase-steps span {
  align-self: end;
  color: var(--dark);
  font-size: 20px;
  font-weight: 900;
}

.purchase-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  grid-template-areas:
    "plans qr"
    "actions qr";
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(220, 229, 238, 0.92);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(20, 33, 50, 0.1);
}

.price-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  grid-area: plans;
}

.plan-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 142px;
  padding: 15px;
  color: var(--dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-card.featured {
  color: var(--dark);
  background: #edf7ff;
  border-color: rgba(18, 103, 216, 0.34);
  box-shadow: 0 14px 30px rgba(18, 103, 216, 0.12);
}

.plan-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.plan-card.featured .plan-label,
.plan-card.featured .plan-note,
.plan-card.featured .plan-badge {
  color: var(--dark);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: clamp(28px, 2.4vw, 38px);
  font-weight: 950;
  line-height: 1;
}

.plan-price small {
  font-size: 16px;
  font-weight: 850;
}

.plan-note {
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.plan-badge {
  align-self: end;
  width: fit-content;
  padding: 6px 9px;
  color: #075c62;
  background: rgba(18, 184, 180, 0.12);
  border: 1px solid rgba(18, 184, 180, 0.22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.plan-card.featured .plan-badge {
  color: #075c62;
  background: rgba(18, 184, 180, 0.14);
  border-color: rgba(18, 184, 180, 0.26);
}

.purchase-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  grid-area: actions;
  align-self: start;
}

.purchase-actions .primary-btn,
.purchase-actions .secondary-btn {
  min-height: 48px;
  width: 100%;
}

.purchase-actions .primary-btn {
  font-size: 16px;
}

.site-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  padding: 12px 16px;
  color: #fff;
  background: #143b68;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(20, 33, 50, 0.22);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-weight: 850;
}

.site-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.qr-panel {
  display: grid;
  grid-area: qr;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 850;
}

.qr-panel img {
  width: 112px;
  border-radius: 8px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 24, 0.82);
  backdrop-filter: blur(12px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(96vw, 1280px);
  max-height: 92svh;
}

.lightbox-dialog img {
  display: block;
  max-width: 100%;
  max-height: 82svh;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.lightbox-close {
  justify-self: end;
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.lightbox-caption {
  color: #fff;
  font-weight: 850;
  text-align: center;
}

body.lightbox-open {
  overflow: hidden;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 16px 34px rgba(18, 103, 216, 0.24);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px max(28px, calc((100vw - var(--max)) / 2 + 28px));
  color: #e7eef7;
  background: #111c29;
}

@media (max-width: 1080px) {
  .hero-inner,
  .split,
  .download-band {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
  }

  .workflow,
  .screens {
    grid-template-columns: 1fr;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }

  .purchase-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "plans"
      "actions"
      "qr";
  }

  .price-list {
    grid-template-columns: 1fr;
  }

  .purchase-actions {
    grid-template-columns: 1fr;
  }

  .qr-panel {
    grid-template-columns: 104px 1fr;
    justify-items: start;
    text-align: left;
  }
}

@media (min-width: 1081px) {
  h1 {
    max-width: 680px;
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .section {
    scroll-margin-top: 132px;
  }

  .topbar-inner {
    align-items: flex-start;
    gap: 10px;
    min-height: auto;
    padding: 14px 18px;
    width: 100%;
    max-width: 100%;
  }

  .site-nav {
    display: none;
  }

  .hero,
  .section {
    padding-inline: 18px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-inner,
  .hero-copy,
  .hero-media,
  .download-band,
  .split {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-inner {
    align-items: start;
    gap: 14px;
  }

  .hero-copy {
    display: contents;
  }

  .mobile-quick-actions {
    order: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .mobile-quick-actions .primary-btn,
  .mobile-quick-actions .secondary-btn {
    min-height: 48px;
    padding: 0 10px;
    font-size: 15px;
    white-space: nowrap;
  }

  .hero-media {
    order: 2;
    margin-top: 0;
  }

  .hero-brand-row {
    order: 3;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 10px;
  }

  .hero .eyebrow {
    order: 4;
  }

  .hero h1 {
    order: 5;
  }

  .hero .lead {
    order: 6;
  }

  .brand-chip {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 58px;
    font-size: 19px;
  }

  .brand-chip img {
    width: 40px;
    height: 40px;
  }

  .brand-bridge {
    align-self: flex-start;
  }

  .workflow {
    padding-inline: 18px;
  }

  h1 {
    max-width: 100%;
    font-size: 34px;
    line-height: 1.14;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .lead,
  .section-head p,
  .download-band p {
    font-size: 16px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    display: none;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .hero-facts {
    order: 7;
  }

  .capability-grid {
    order: 8;
  }

  .hero-facts,
  .capability-grid,
  .price-list,
  .purchase-steps {
    display: grid;
    grid-template-columns: 1fr;
  }

  .purchase-steps div,
  .plan-card {
    min-height: auto;
  }

  .media-caption {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-caption button {
    width: 100%;
  }

  .logo-strip {
    grid-template-columns: 1fr;
  }

  .screens {
    gap: 18px;
  }

  .screenshot-tile span {
    right: 10px;
    bottom: 10px;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-dialog {
    width: 100%;
  }

  .lightbox-dialog img {
    max-height: 78svh;
  }

  .back-to-top {
    right: 16px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 18px;
  }
}
