/* Link a tokens file (tokens.css or qon-tokens.css) before this stylesheet in the HTML <head>. */

/* ---------- layout helpers ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

section {
  padding: 28px 0;
}

#why-now, #cost-containment, #why-choose-qon, #solutions, #solutions-we-deliver {
  scroll-margin-top: 90px;
}

.eyebrow {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-brand-accent);
  margin-bottom: 12px;
}

h1, h2, h3 {
  font-family: sans-serif;
  line-height: 1.15;
  color: var(--color-text-primary);
}

h1 { font-size: 56px; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 36px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; }

p { font-size: 15px; line-height: 1.6; color: var(--color-text-secondary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-text-ink);
  color: var(--color-bg-surface);
}

.btn-primary:hover { opacity: 0.85; }

/* buttons inside dark blocks need to invert for contrast */
.payment-block .btn-primary,
.stat-block .btn-primary {
  background: var(--color-bg-surface);
  color: var(--color-brand-dark);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #eee;
  background: var(--color-bg-surface);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text-primary);
}

.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-accent-purple));
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-search {
  flex: 1;
  max-width: 640px;
  margin: 0 24px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e5e5e5;
  background: var(--color-bg-surface-alt);
}

.nav-menu {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 18px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

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

/* ---------- contact modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,28,71,0.55);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--color-bg-surface);
  border-radius: 20px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: var(--color-bg-surface-alt);
  color: var(--color-text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal h2 { font-size: 24px; margin-bottom: 20px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { margin-top: 16px; }
.form-row .field { margin-top: 0; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-bg-surface);
}

.field textarea { resize: vertical; min-height: 90px; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-brand-blue);
}

.modal .btn-primary {
  background: var(--color-brand-accent);
  color: var(--color-bg-surface);
  border: none;
  width: 100%;
  margin-top: 20px;
  cursor: pointer;
}

.modal .btn-primary:hover { opacity: 0.85; }

.form-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-accent-green);
  display: none;
}

.form-status.show { display: block; }

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding-top: 28px;
  padding-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-brand-blue-tint);
  color: var(--color-brand-blue);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 { margin-bottom: 16px; font-size: 42px; }

.hero-sub {
  max-width: 480px;
  margin: 0 auto 28px;
  font-size: 16px;
}

.hero-photo {
  max-width: 640px;
  margin: 48px auto 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(10,28,71,0.35);
}

.hero-photo img {
  width: 100%;
  display: block;
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--color-brand-blue-tint);
  color: var(--color-brand-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* ---------- invoice mockup cards ---------- */
.invoice-preview {
  position: relative;
  height: 220px;
  max-width: 520px;
  margin: 56px auto 0;
}

.invoice-card {
  position: absolute;
  top: 0;
  width: 300px;
  background: var(--color-bg-surface);
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15);
  padding: 20px;
  text-align: left;
}

.invoice-card.back {
  left: 0;
  transform: rotate(-4deg);
  opacity: 0.7;
}

.invoice-card.front {
  right: 0;
  transform: rotate(3deg);
}

.invoice-card .avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.invoice-card.back .avatar { background: var(--color-brand-blue); }
.invoice-card.front .avatar { background: var(--color-accent-green); }

.invoice-card .name { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
.invoice-card .email { font-size: 11px; color: var(--color-text-muted); margin-bottom: 12px; }
.invoice-card .row { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-text-secondary); border-top: 1px solid #f0f0f0; padding-top: 8px; margin-top: 8px; }
.invoice-card .total { font-weight: 700; color: var(--color-text-primary); }

.social-proof {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 32px;
}

/* ---------- testimonial ---------- */
.testimonial {
  background: var(--color-bg-surface-alt);
  border-radius: 16px;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
}

.stars { color: #f5a623; font-size: 16px; letter-spacing: 4px; margin-bottom: 20px; }

.testimonial blockquote {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.4;
  margin-bottom: 16px;
}

.testimonial cite {
  font-style: italic;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ---------- generic grids ---------- */
.section-head {
  max-width: 560px;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--color-bg-surface-alt);
  border-radius: 14px;
  padding: 24px;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 14px;
}

.card h3 { margin-bottom: 8px; }
.card p { font-size: 13px; }

.grid-compact .card { padding: 20px; }
.grid-compact .card-icon { width: 27px; height: 27px; margin-bottom: 14px; }

.grid-compact-30 { gap: 4px; }
.grid-compact-30 .card { padding: 17px; }
.grid-compact-30 .card-icon { width: 22px; height: 22px; margin-bottom: 11px; }

.icon-blue   { background: var(--color-brand-blue-tint);   color: var(--color-brand-blue); }
.icon-pink   { background: var(--color-accent-pink-tint);  color: var(--color-accent-pink); }
.icon-purple { background: var(--color-accent-purple-tint);color: var(--color-accent-purple); }
.icon-green  { background: var(--color-accent-green-tint); color: var(--color-accent-green); }
.icon-red    { background: var(--color-accent-red-tint);   color: var(--color-accent-red); }

/* ---------- problem cards (colored) ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.problem-card {
  border-radius: 16px;
  padding: 32px 24px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.problem-card .label { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.problem-card p { font-size: 13px; color: var(--color-text-primary); opacity: 0.75; }

.problem-card.blue   { background: var(--color-brand-blue-tint); }
.problem-card.blue .label { color: var(--color-brand-blue); }

.problem-card.pink   { background: var(--color-accent-pink-tint); }
.problem-card.pink .label { color: var(--color-accent-pink); }

.problem-card.purple { background: var(--color-accent-purple-tint); }
.problem-card.purple .label { color: var(--color-accent-purple); }

/* ---------- feature list ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #ececec;
  border: 1px solid #ececec;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 32px;
}

.feature-item {
  background: var(--color-bg-surface);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.feature-item .dot {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  background: var(--color-brand-blue-tint);
  color: var(--color-brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ---------- split content ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.split h2 { margin-bottom: 0; }

/* ---------- payment link block ---------- */
.payment-block {
  background: var(--color-text-ink);
  border-radius: 20px;
  padding: 20px;
  color: var(--color-bg-surface);
}

.payment-block h2, .payment-block p { color: var(--color-bg-surface); }
.payment-block p { opacity: 0.7; }

/* ---------- footer ---------- */
.footer {
  background: var(--color-brand-dark);
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  margin-left: 20px;
}

.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- legal / policy pages ---------- */
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-content h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 8px;
}

.legal-content > *:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 4px; }

/* ---------- hero stat row ---------- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 44px;
}

.hero-stats .stat-value {
  font-size: 34px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.hero-stats .stat-label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.hero-stats .stat-value.blue { color: var(--color-brand-blue); }
.hero-stats .stat-value.green { color: var(--color-accent-green); }

/* ---------- dark stat tiles ---------- */
.stat-block {
  background: var(--color-text-ink);
  border-radius: 20px;
  padding: 20px;
}

.stat-block .section-head h2,
.stat-block .section-head p { color: var(--color-bg-surface); }
.stat-block .section-head p { opacity: 0.65; }

.stat-block .section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  max-width: none;
}

.stat-photo {
  width: 140px;
  height: 100px;
  min-width: 140px;
  border-radius: 12px;
  overflow: hidden;
}

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

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-tile {
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 24px;
}

.stat-tile .value {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-accent-green);
  margin-bottom: 8px;
}

.stat-tile .label {
  font-size: 13px;
  color: var(--color-bg-surface);
  opacity: 0.65;
}

/* ---------- process diagram ---------- */
.diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--color-bg-surface-alt);
  border-radius: 16px;
  padding: 24px 24px;
}

#solutions { padding-bottom: 14px; }
#solutions + section { padding-top: 14px; }

.diagram-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diagram-chip {
  background: var(--color-bg-surface);
  border: 1px solid #eee;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-align: center;
}

.diagram-arrow {
  font-size: 22px;
  color: var(--color-text-muted);
}

.diagram-engine {
  background: var(--color-brand-blue-tint);
  color: var(--color-brand-blue);
  border-radius: 14px;
  padding: 24px 28px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  min-width: 160px;
}

.diagram-engine-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.diagram-weighting {
  background: var(--color-accent-purple-tint);
  color: var(--color-accent-purple);
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  min-width: 160px;
}

.diagram-arrow-down {
  font-size: 18px;
  color: var(--color-text-muted);
  line-height: 1;
}

.diagram-result {
  background: var(--color-text-ink);
  color: var(--color-bg-surface);
  border-radius: 14px;
  padding: 24px 28px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  max-width: 200px;
}

/* ---------- comparison table ---------- */
.compare-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #ececec;
  border: 1px solid #ececec;
  border-radius: 14px;
  overflow: hidden;
}

.compare-table .col-head {
  padding: 18px 24px;
  font-weight: 700;
  font-size: 17px;
  background: var(--color-bg-surface);
  color: var(--color-accent-purple);
}

.compare-table .cell {
  padding: 18px 24px;
  background: var(--color-bg-surface);
  font-size: 14px;
  color: var(--color-text-secondary);
}

.compare-table .cell.qon {
  color: var(--color-text-primary);
  font-weight: 600;
  background: var(--color-accent-purple-tint);
}

/* ---------- checklist ---------- */
.check-list {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.check-list li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.check-list .mark {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--color-accent-green-tint);
  color: var(--color-accent-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ---------- split content with a photo ---------- */
.split-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split-media img {
  width: 100%;
  display: block;
  border-radius: 20px;
  box-shadow: 0 24px 48px -24px rgba(10,28,71,0.3);
}

.split-media img.img-75 {
  width: 75%;
  margin: 0 auto;
}

.split-media img.img-short {
  aspect-ratio: 0.97;
  object-fit: cover;
}

.split-media.reverse { direction: rtl; }
.split-media.reverse > * { direction: ltr; }

.split-media.stretch { align-items: stretch; }
.split-media.stretch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .grid, .problem-grid, .feature-grid { grid-template-columns: 1fr; }
  .split, .split-media { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .invoice-card { width: 240px; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .compare-table { grid-template-columns: 1fr; }
  .diagram { flex-direction: column; }
  .stat-block .section-head { flex-direction: column; }
  .stat-photo { width: 100%; height: 160px; }
  .nav-inner { flex-wrap: wrap; row-gap: 10px; }
  .nav-links { margin-left: 0; gap: 16px; flex-wrap: wrap; }
}

@media (max-width: 1300px) {
  #why-now, #cost-containment, #why-choose-qon, #solutions, #solutions-we-deliver {
    scroll-margin-top: 130px;
  }
}
