/* Caxess visual refinement · 2026-09-08
   Load after style.css. Logo assets/styles, hero background, page order and
   content grid columns remain unchanged. The existing compact navigation
   also covers tablet widths where the original links overlap the actions. */

.sales-hero,
.caxess-gpt-search,
.category-strip,
.library-head,
.doc-grid,
.featured-downloads,
.support-strip,
.footer {
  --cx-ink: #0b110f;
  --cx-muted: #53625b;
  --cx-rule: #cbd4ce;
  --cx-paper: #fcfdf9;
  --cx-canvas: #f4f6f1;
  --cx-raised: #121a17;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

/* Canvas is scoped below navigation so inherited header styles stay intact. */
main:has(.caxess-gpt-search) {
  background: #f4f6f1;
}

.sales-copy h1,
.caxess-gpt-search h2,
.featured-downloads-intro h2,
.library-head h1,
.doc-card h3,
.support-strip h2 {
  font-family: Archivo, "Trebuchet MS", sans-serif;
  font-weight: 800;
  letter-spacing: -.035em;
  text-wrap: pretty;
}

.sales-copy h1 {
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.02;
  color: #fcfdf9;
  background: none;
  text-shadow: none;
  letter-spacing: -.045em;
}

.sales-copy > .eyebrow {
  color: #bed5c8;
  font-size: 12px;
  letter-spacing: .12em;
  margin-bottom: 16px;
}

.sales-copy > p:not(.eyebrow) {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: #c7d5d1;
}

.sales-copy > p.sales-lead {
  color: #edf3ed;
  font-weight: 600;
}

.sales-copy .hero-actions {
  margin-top: 22px;
}

.sales-copy .button {
  min-height: 46px;
  border-radius: 9px;
  padding-inline: 18px;
  background: #15231f;
  border-color: #50655c;
  color: #fcfdf9;
  box-shadow: none;
}

.sales-copy .button.primary {
  background: linear-gradient(112deg, #8bd63d, #62cb7a 55%, #28a8bd);
  color: #07100b;
  border: 1px solid rgba(218, 248, 227, .25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.sales-copy .seller-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-color: #3a5046;
  border-radius: 10px;
  background: #101d18;
  box-shadow: none;
  gap: 4px;
}

.seller-note strong { font-size: 18px; }
.seller-note span { color: #c7d5cb; }

.sales-copy .doc-count-badge {
  margin-top: 14px;
  border-color: #40584c;
  background: #17261e;
  border-radius: 8px;
  padding: 9px 12px;
}

.doc-count-badge strong { font-variant-numeric: tabular-nums; }
.doc-count-badge span { color: #d4e0d7; font-weight: 600; }

.sales-hero .funnel-card {
  border-color: #40524a;
  border-radius: 14px;
  background: #101a17;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

.funnel-card .funnel-head { border-bottom-color: #34463c; }
.funnel-card .funnel-head span { color: #bed5c8; letter-spacing: .1em; }
.funnel-card .funnel-head strong { color: #f0f4ed; }

.funnel-card .funnel-steps article {
  background: #18251f;
  border-color: #2c3d33;
  border-radius: 9px;
}

.funnel-card .funnel-steps b {
  background: #2b4233;
  color: #d7ebd3;
  border: 1px solid #466049;
  font-variant-numeric: tabular-nums;
}

.funnel-card .funnel-steps span { color: #e7eee6; font-weight: 600; }
.funnel-card .buyer-box { background: #1c2d28; border-color: #40594c; }
.funnel-card .buyer-box span { color: #cedcd2; }

/* The existing finder and category strip retain their exact placement. */
.caxess-gpt-search {
  color: #eef4ee;
  background: #14211b;
  border-color: #40594b;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(11, 17, 15, .1);
}

.caxess-gpt-search h2 { font-size: 30px; line-height: 1.08; }
.caxess-gpt-search p { color: #c6d4ca; }
.caxess-gpt-search .eyebrow { color: #afc8b8; letter-spacing: .1em; }
.caxess-gpt-search label { font-size: 14px; font-weight: 700; }
.caxess-gpt-search form { min-width: 0; }

.caxess-gpt-search input {
  color: var(--cx-ink);
  background: var(--cx-paper);
  border-color: #b6c9bc;
  border-radius: 9px;
}

.caxess-gpt-search input::placeholder { color: #607064; opacity: 1; }

.caxess-gpt-search .button.primary {
  border-color: #8ca996;
  border-radius: 9px;
  background: #e2ecdf;
  color: #102017;
  box-shadow: none;
}

.caxess-gpt-search .gpt-search-scopes a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  background: #21362b;
  border-color: #4e6858;
  color: #dfebdf;
  border-radius: 6px;
}

.category-strip {
  background: var(--cx-paper);
  border-color: var(--cx-rule);
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(11, 17, 15, .04);
}

.category-strip .category-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--cx-muted);
  background: var(--cx-paper);
  border-color: #d3ddd2;
  font-weight: 600;
}

.category-strip .category-pill.active,
.category-strip .category-pill.featured-pill.active {
  color: var(--cx-paper);
  background: #223c2c;
  border-color: #223c2c;
  box-shadow: none;
  font-weight: 700;
}

.featured-downloads-intro,
.featured-downloads-footer {
  color: var(--cx-ink);
  background: var(--cx-paper);
  border-color: var(--cx-rule);
  border-radius: 14px;
  box-shadow: none;
}

.featured-downloads-intro h2 { color: var(--cx-ink); line-height: 1.06; }
.featured-downloads-intro .eyebrow { color: #506d43; font-size: 12px; letter-spacing: .1em; }
.featured-downloads-lead { color: #26382b; font-weight: 600; }
.featured-downloads-licence,
.featured-downloads-footer span,
.library-head p { color: var(--cx-muted); }

.featured-downloads .currency-switcher,
.library-head .currency-switcher {
  color: var(--cx-ink);
  background: #f3f6ef;
  border-color: var(--cx-rule);
  box-shadow: none;
}

.currency-switcher span { color: #53625b; }
.currency-switcher button { min-height: 34px; color: #26382b; }
.currency-switcher button[aria-pressed="true"] { background: #253b2d; color: #fcfdf9; }

.featured-downloads-footer .button.primary {
  min-height: 46px;
  background: #1f3427;
  border-color: #1f3427;
  border-radius: 9px;
  color: #fcfdf9;
  box-shadow: none;
}

/* Real catalogue assets are mounted on warm paper, with the same card grid. */
.doc-grid .doc-card {
  color: var(--cx-ink);
  background: var(--cx-paper);
  border-color: #cbd4c8;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(11, 17, 15, .035);
  min-width: 0;
}

.doc-grid .doc-thumb {
  background: #ebe8de;
  border-bottom-color: #d4d8cc;
}

.doc-grid .doc-thumb.rendered-thumb { background: #ebe8de; }
.doc-grid .doc-thumb.image-thumb { background: #15201a; }

.doc-grid .thumb-page {
  border-color: #c7d0c2;
  border-radius: 5px;
  box-shadow: 0 10px 22px rgba(37, 42, 31, .12);
}

.doc-grid .thumb-page-preview {
  width: min(250px, 100%);
  min-width: 0;
  max-width: 250px;
  height: 100%;
  padding: 10px;
  gap: 6px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.doc-grid .thumb-page-preview .thumb-media {
  height: auto;
  border-color: #e1e6dc;
  background: #f7f8f2;
}

.doc-grid .thumb-page-preview .thumb-media img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
}

.doc-grid .thumb-page-preview strong { font-size: 11px; line-height: 1.15; }
.doc-grid .thumb-page::before { height: 3px; background: #415748; }
.doc-grid .thumb-ext { background: #edf2e7; color: #3f5b3d; border-radius: 4px; }
.doc-grid .meta { color: #53624f; line-height: 1.5; font-size: 13px; }
.doc-grid .meta .price { color: #1e3a28; font-weight: 800; }
.doc-grid .doc-card h3 { color: var(--cx-ink); font-size: 21px; line-height: 1.18; letter-spacing: -.025em; }
.doc-grid .doc-card p:not(.meta) { color: var(--cx-muted); line-height: 1.5; }
.doc-grid .card-foot { color: #5b6658; border-top-color: #d4ddd0; align-items: center; }
.doc-grid .card-foot > span { min-width: 0; overflow-wrap: anywhere; }

.doc-grid .card-foot a.card-details-action,
.featured-downloads-grid .card-foot a.card-details-action {
  flex-shrink: 0;
  min-height: 44px;
  background: #f4f6ef;
  border: 1px solid #9eae98;
  border-radius: 8px;
  color: #1d3422;
  font-weight: 700;
  box-shadow: none;
}

/* Support and footer keep their existing content, order, and destinations. */
.support-strip {
  color: var(--cx-ink);
  background: #e9eee2;
  border-color: #c4d0ba;
  border-radius: 14px;
  box-shadow: none;
}

.support-strip .eyebrow { color: #4f6a3f; }
.support-strip h2 { font-size: 28px; line-height: 1.14; }
.support-strip p:not(.eyebrow) { color: #52634b; }
.footer { background: #e9eee5; border-top-color: #c8d1c3; color: #52614d; }
.footer .footer-section { background: #f7f9f2; border-color: #cad4c4; border-radius: 10px; }
.footer .footer-section-title { color: #223420; }
.footer .footer-brand a { color: #31593d; }
.footer .footer-link-list a { color: #304b35; background: #eef2e8; border-color: #cbd6c4; }

/* Focus styles avoid the header and cover both dark and light surfaces. */
.sales-copy a:focus-visible,
.caxess-gpt-search :is(a, button, input):focus-visible {
  outline: 3px solid #92dece;
  outline-offset: 4px;
}

.category-strip a:focus-visible,
.doc-grid a:focus-visible,
.featured-downloads :is(a, button):focus-visible,
.library-head :is(a, button, input, select):focus-visible,
.support-strip a:focus-visible,
.footer a:focus-visible {
  outline: 3px solid #247060;
  outline-offset: 3px;
}

.doc-grid .doc-thumb:focus-visible { outline-offset: -4px; }

@media (hover: hover) and (pointer: fine) {
  .sales-copy .button,
  .doc-grid .doc-card,
  .doc-grid .doc-thumb .thumb-page,
  .doc-grid .card-foot a.card-details-action {
    transition: transform .22s ease;
  }

  .sales-copy .button:hover { transform: translateY(-2px); }
  .sales-copy .button:not(.primary):hover { background: #263c31; border-color: #8da993; }
  .doc-grid .doc-card:hover { transform: translateY(-3px); border-color: #94a78a; box-shadow: 0 14px 30px rgba(11, 17, 15, .08); }
  .doc-grid .doc-thumb:hover .thumb-page { transform: translateY(-2px); }
  .doc-grid .card-foot a.card-details-action:hover { background: #e7eedf; color: #19331f; border-color: #648357; box-shadow: none; filter: none; transform: translateY(-1px); }
  .caxess-gpt-search .button.primary:hover { background: #f2f7ee; color: #102017; border-color: #cbdcc8; box-shadow: none; filter: none; }
  .category-strip .category-pill:not(.active):hover { background: #ecf1e6; color: #243d27; border-color: #98ac8d; }
  .category-strip .category-pill.active:hover { background: #304d36; box-shadow: none; filter: none; }
  .featured-downloads-footer .button.primary:hover { background: #304d36; box-shadow: none; filter: none; }
  .footer .footer-link-list a:hover { color: #183923; background: #e2ebd9; border-color: #829a72; }
}

@media (max-width: 760px) {
  .caxess-gpt-search .gpt-search-scopes a,
  .category-strip .category-pill,
  .currency-switcher button,
  .footer .footer-link-list a { min-height: 44px; }
  .featured-downloads .currency-switcher { flex-wrap: wrap; gap: 6px; }
  .featured-downloads-intro h2 { font-size: clamp(32px, 7.5vw, 45px); }
}

@media (max-width: 620px) {
  .sales-copy h1 { font-size: clamp(38px, 10.5vw, 52px); line-height: 1.02; }
  .sales-copy > p:not(.eyebrow) { font-size: 17px; line-height: 1.5; }
  .sales-copy .button { padding-inline: 14px; }
  .sales-copy .seller-note { padding: 14px; }
  .seller-note strong { font-size: 17px; }
  .doc-count-badge span { font-size: 15px; }
  .caxess-gpt-search h2 { font-size: 28px; }
  .doc-grid .doc-thumb { padding-inline: 24px; }
  .doc-grid .doc-thumb.image-thumb { padding: 0; }
  .doc-grid .doc-card h3 { font-size: 21px; }
  .doc-grid .approved-funnel-card .card-foot { align-items: stretch; }
  .footer .footer-link-list { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sales-copy .button,
  .doc-grid .doc-card,
  .doc-grid .doc-thumb .thumb-page,
  .doc-grid .card-foot a,
  .caxess-gpt-search .button,
  .category-strip .category-pill,
  .featured-downloads-footer .button {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* Reuse the existing menu and its handlers; preserve desktop logo geometry. */
@media (min-width: 901px) and (max-width: 1399px) {
  .site-header.caxess-compact-navigation > .menu-toggle {
    position: relative;
    z-index: 42;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    flex: 0 0 44px;
    flex-direction: column;
    justify-content: center;
    padding: 0;
  }
  .site-header.caxess-compact-navigation > .menu-toggle b {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
  }
  .site-header.caxess-compact-navigation.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.caxess-compact-navigation.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.caxess-compact-navigation.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header.caxess-compact-navigation > .header-actions { margin-left: auto; }
  .site-header.caxess-compact-navigation > .nav {
    position: absolute; top: calc(100% + 8px); left: 233px; z-index: 41;
    width: 380px; max-height: calc(100dvh - 100px);
    display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid rgba(102,216,255,.3); border-radius: 9px;
    background: rgba(4,14,22,.99); box-shadow: 0 24px 54px rgba(0,0,0,.42);
    opacity: 0; visibility: hidden; pointer-events: none;
  }
  .site-header.caxess-compact-navigation.menu-open > .nav { opacity: 1; visibility: visible; pointer-events: auto; }
  .site-header.caxess-compact-navigation > .nav a,
  .site-header.caxess-compact-navigation > .nav .nav-dropdown summary {
    width: 100%; min-height: 44px; justify-content: flex-start;
  }
  .site-header.caxess-compact-navigation > .nav .nav-dropdown { width: 100%; }
  .site-header.caxess-compact-navigation > .nav .nav-submenu { position: static; width: 100%; margin-top: 7px; transform: none; }
}

@media (min-width: 901px) and (max-width: 1399px) and (prefers-reduced-motion: reduce) {
  .site-header.caxess-compact-navigation > .menu-toggle span { transition: none; }
}
