:root {
  --bg: #ffffff;
  --ink: #0c0d10;
  --muted: #5b6270;
  --line: #e4e8ef;
  --panel: #f7f8fb;
  --accent: #00a6a6;
  --accent-dark: #007d7d;
  --warm: #ffcf66;
  --rose: #ff6b6b;
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid rgba(228, 232, 239, 0.74);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(100% - 32px, var(--max));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  flex: 0 0 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("../assets/brand/selected/book-to-comic-bc-gold-512.png") center / contain no-repeat;
  box-shadow: none;
}

.brand-mark span {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  font-size: 0.92rem;
  font-weight: 700;
  color: #2f3440;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  transition: color 180ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-links a:hover {
  color: var(--accent-dark);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  min-height: 94svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 140px 0 78px;
  background:
    linear-gradient(135deg, rgba(0, 166, 166, 0.13), rgba(255, 207, 102, 0.15) 42%, rgba(255, 255, 255, 0.96) 72%),
    #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
}

.comic-backdrop {
  position: absolute;
  inset: 76px -36px 34px auto;
  width: min(52vw, 720px);
  min-width: 560px;
  opacity: 0.64;
  transform: rotate(-4deg);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  pointer-events: none;
}

.backdrop-page {
  min-height: 310px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(12, 13, 16, 0.9);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 10px 12px 0 rgba(12, 13, 16, 0.14);
}

.backdrop-page:nth-child(2n) {
  transform: translateY(30px);
}

.backdrop-page span {
  display: block;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(0, 166, 166, 0.18), rgba(255, 207, 102, 0.23)),
    var(--panel);
}

.backdrop-page span:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255, 107, 107, 0.17), rgba(255, 255, 255, 0.8)),
    var(--panel);
}

.hero-inner,
.section-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--accent);
}

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

h1 {
  max-width: 820px;
  font-size: clamp(3rem, 8vw, 7.7rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 4.1rem);
  font-weight: 800;
}

.hero p {
  max-width: 660px;
  margin: 26px 0 0;
  color: #303744;
  font-size: clamp(1.08rem, 2vw, 1.38rem);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  box-shadow: 6px 6px 0 var(--accent);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 var(--accent);
  background: var(--accent-dark);
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--warm);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

.metric {
  min-width: 156px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.78);
}

.metric strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

section {
  padding: clamp(68px, 9vw, 116px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.65fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading p,
.copy-block p {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.gallery-shell {
  position: relative;
}

.example-intro {
  max-width: 860px;
  margin-bottom: 18px;
}

.example-intro h3 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.04;
}

.example-intro p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.example-separator {
  height: 1px;
  margin: clamp(42px, 7vw, 72px) 0;
  background: var(--line);
}

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(214px, 254px);
  gap: 18px;
  overflow-x: auto;
  padding: 12px 4px 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.gallery::-webkit-scrollbar {
  height: 10px;
}

.gallery::-webkit-scrollbar-track {
  background: #edf0f5;
  border-radius: 99px;
}

.gallery::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 99px;
}

.comic-page {
  aspect-ratio: 720 / 1118;
  display: block;
  overflow: hidden;
  position: relative;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 8px 10px 0 rgba(12, 13, 16, 0.09);
  scroll-snap-align: start;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.comic-page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comic-page-button {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.comic-page-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -6px;
}

.comic-page:hover {
  transform: translateY(-5px);
  box-shadow: 8px 15px 0 rgba(0, 166, 166, 0.22);
}

.gallery-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.source-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin-top: 38px;
}

.source-panel {
  min-height: 100%;
  padding: clamp(20px, 3vw, 30px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 8px 10px 0 rgba(12, 13, 16, 0.08);
}

.output-panel {
  background:
    linear-gradient(135deg, rgba(0, 166, 166, 0.09), rgba(255, 207, 102, 0.12)),
    #fff;
}

.chrome-panel {
  background:
    linear-gradient(135deg, rgba(0, 166, 166, 0.08), rgba(12, 13, 16, 0.03)),
    #fff;
}

.chrome-output {
  background:
    linear-gradient(135deg, rgba(0, 166, 166, 0.14), rgba(255, 107, 107, 0.08)),
    #fff;
}

.source-kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source-panel h3 {
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  line-height: 1.08;
}

.book-source-layout {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 26px);
  align-items: start;
}

.book-cover {
  width: min(220px, 100%);
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #101419;
  box-shadow: 6px 7px 0 rgba(12, 13, 16, 0.12);
}

.book-cover img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.source-panel blockquote {
  margin: 0;
  color: #27303c;
  font-size: clamp(1.04rem, 1.5vw, 1.22rem);
  line-height: 1.66;
}

.source-panel blockquote p {
  margin: 0;
}

.source-panel blockquote p + p {
  margin-top: 14px;
}

.source-panel ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-panel li {
  padding-left: 22px;
  position: relative;
  color: #2c3340;
  font-weight: 700;
}

.source-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 9px;
  height: 9px;
  border: 2px solid var(--ink);
  background: var(--warm);
  transform: rotate(45deg);
}

.demo-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.demo-access p {
  margin: 0;
  color: #2c3340;
  font-size: 1rem;
  font-weight: 700;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.demo-actions .button {
  min-height: 48px;
  padding: 0 18px;
  box-shadow: 4px 4px 0 var(--accent);
}

.demo-actions .button.secondary {
  box-shadow: none;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--warm);
  transform: translateY(-2px);
}

.tool {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(247, 248, 251, 0.86), #fff);
}

.copy-block {
  max-width: 900px;
}

.copy-block p {
  color: #2c3340;
  font-size: clamp(1.18rem, 2vw, 1.65rem);
  line-height: 1.52;
}

.special-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}

.feature-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: #252b35;
  font-size: 1.06rem;
  font-weight: 700;
}

.check {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.98rem;
  line-height: 1;
}

.pipeline-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.pipeline-step {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 5px 5px 0 rgba(12, 13, 16, 0.1);
}

.pipeline-step b {
  font-size: 1.42rem;
  line-height: 1;
}

.pipeline-step span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.is-lightbox-open {
  overflow: hidden;
}

.comic-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 36px);
  background: rgba(12, 13, 16, 0.82);
}

.comic-lightbox[hidden] {
  display: none;
}

.comic-lightbox-panel {
  position: relative;
  width: min(100%, 940px);
  max-height: calc(100svh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: clamp(14px, 2vw, 22px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 10px 12px 0 rgba(0, 166, 166, 0.34);
}

.comic-lightbox-panel h2 {
  margin: 0;
  padding-right: 56px;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.12;
}

.comic-lightbox-panel img {
  max-width: 100%;
  max-height: calc(100svh - 170px);
  justify-self: center;
  object-fit: contain;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #101419;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--warm);
}

.lightbox-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.sister-tech {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(0, 166, 166, 0.1), rgba(255, 207, 102, 0.13)),
    #fff;
}

.technology-chain {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.technology-node {
  min-height: 100%;
  padding: clamp(22px, 3vw, 34px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 8px 10px 0 rgba(12, 13, 16, 0.08);
}

.technology-node img {
  width: 74px;
  height: 74px;
  display: block;
  margin-bottom: 22px;
  object-fit: contain;
}

.technology-node h3 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.04;
}

.technology-node p:last-child {
  margin: 0;
  color: #2c3340;
  font-size: 1.06rem;
  line-height: 1.62;
}

.chain-arrow {
  align-self: center;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--warm);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
}

.combined-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(12, 13, 16, 0.16);
}

.combined-result p {
  margin: 0;
  color: #252b35;
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  font-weight: 700;
  line-height: 1.54;
}

.client-services {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.client-services-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}

.client-services-copy {
  padding: clamp(22px, 3vw, 34px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 207, 102, 0.14), rgba(0, 166, 166, 0.08)),
    #fff;
  box-shadow: 8px 10px 0 rgba(12, 13, 16, 0.08);
}

.client-services-copy p {
  margin: 0 0 22px;
  color: #252b35;
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  font-weight: 700;
  line-height: 1.56;
}

.contact {
  background: var(--ink);
  color: #fff;
}

.page-contact {
  min-height: calc(100svh - 80px);
  padding-top: 150px;
}

.contact .section-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}

.contact-note {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
  padding: 15px 16px;
  transition: border-color 180ms ease, background 180ms ease;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
}

.contact .button {
  width: fit-content;
  background: var(--warm);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--accent);
}

.contact .button:hover,
.contact .button:focus-visible {
  background: #fff;
}

.status {
  min-height: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 600;
}

.status.success {
  color: #adffdf;
}

.status.error,
.field-error,
.validation-summary {
  color: #ffb8b8;
}

.validation-summary ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.62);
  padding: 24px 0;
  font-size: 0.9rem;
}

.footer-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.mobile-layout .hero {
  min-height: auto;
  padding-top: 146px;
}

.mobile-layout h1 {
  font-size: clamp(2.65rem, 15vw, 4.2rem);
}

@media (max-width: 820px) {
  .nav {
    height: auto;
    min-height: 68px;
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 18px;
  }

  .hero {
    min-height: auto;
    padding-top: 152px;
  }

  .comic-backdrop {
    inset: 110px -170px auto auto;
    width: 620px;
    min-width: 620px;
    opacity: 0.22;
  }

  .section-heading,
  .source-comparison,
  .demo-access,
  .special-grid,
  .client-services-grid,
  .technology-chain,
  .combined-result,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .chain-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .section-heading {
    align-items: start;
  }

  .demo-actions {
    justify-content: flex-start;
  }

  .pipeline-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .hero-inner,
  .section-inner,
  .nav,
  .footer-inner {
    width: min(100% - 24px, var(--max));
  }

  h1 {
    font-size: clamp(2.65rem, 15vw, 4.2rem);
  }

  .hero-actions,
  .hero-actions .button,
  .demo-actions,
  .demo-actions .button,
  .contact .button {
    width: 100%;
  }

  .metric {
    flex: 1 1 100%;
  }

  .gallery {
    grid-auto-columns: minmax(190px, 78vw);
  }

  .book-source-layout {
    grid-template-columns: 1fr;
  }

  .book-cover {
    max-width: 220px;
  }

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

  .comic-lightbox {
    padding: 10px;
  }

  .comic-lightbox-panel {
    max-height: calc(100svh - 20px);
  }

  .comic-lightbox-panel img {
    max-height: calc(100svh - 150px);
  }

  .feature-list li {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
