/* A4 print / PDF portfolio styles */

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  html, body {
    background: #fff !important;
    color: #101828 !important;
    font-size: 10.5pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .skip-link,
  .site-header,
  .nav-toggle,
  .whatsapp-float,
  .back-top,
  .lightbox,
  .hero-cta,
  .contact-actions .btn-secondary,
  .btn,
  header,
  .header-actions,
  .site-footer,
  .hero-orb,
  .hero-bg::before {
    display: none !important;
  }

  .contact-actions .btn-primary {
    display: inline-flex !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    color: #3b5ba5 !important;
    padding: 0 !important;
    font-size: 13pt !important;
  }

  .print-only { display: block !important; }

  .print-cover {
    break-after: page;
    page-break-after: always;
    min-height: 250mm;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #070b14 !important;
    color: #fff !important;
    margin: -12mm;
    padding: 24mm 16mm;
  }

  .print-cover img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 18px;
    background: #000;
    margin-bottom: 24px;
  }

  .print-cover h1 {
    font-size: 26pt;
    color: #fff !important;
    max-width: 14ch;
    margin: 10px auto 16px;
  }

  .print-cover .eyebrow { color: #2da884 !important; }
  .print-product-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
  }
  .print-product-chips span {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 8.5pt;
  }

  .hero { display: none !important; }

  .section,
  .product-block {
    padding: 10mm 0 !important;
    background: #fff !important;
    color: #101828 !important;
    box-shadow: none !important;
  }

  .section-dark,
  .section-techvalue,
  .section-muted,
  .product-dark,
  .product-light,
  .contact-section {
    background: #fff !important;
    color: #101828 !important;
  }

  .section-lead,
  .section-lead.light,
  .product-dark .product-desc,
  .life-kicker,
  .service-card p,
  .why-card p,
  .step-card p,
  .value-node span,
  .value-outcomes span {
    color: #5b6577 !important;
  }

  h1, h2, h3, h4, strong { color: #101828 !important; }

  .eyebrow,
  .eyebrow.dark,
  .product-number,
  .product-benefit,
  .product-dark .product-benefit,
  .service-icon,
  .step-card span {
    color: #3b5ba5 !important;
  }

  .container {
    width: 100% !important;
    max-width: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .services-grid,
  .why-grid,
  .steps-grid,
  .value-outcomes {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .service-card,
  .why-card,
  .step-card,
  .value-node,
  .value-outcomes article,
  .shot {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
  }

  .product-layout,
  .product-layout.reverse {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .product-layout.reverse .product-copy,
  .product-layout.reverse .product-media { order: initial !important; }

  /* Intentional page structure — avoid trailing blank page */
  #about { break-before: page; page-break-before: always; }
  #solutions { break-before: page; page-break-before: always; }
  #modern-apps { break-before: page; page-break-before: always; }
  #custom { break-before: avoid; page-break-before: avoid; }
  #products { display: none !important; }
  .product-block { break-before: page; page-break-before: always; }
  #why { break-before: page; page-break-before: always; }
  #process { break-before: page; page-break-before: always; }
  #contact {
    break-before: page;
    page-break-before: always;
    break-after: avoid;
    page-break-after: avoid;
    min-height: auto !important;
    padding-bottom: 0 !important;
  }

  h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  img, figure {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .shot { min-height: 55mm !important; }
  .shot img {
    min-height: 55mm !important;
    object-fit: cover !important;
  }
  .shot-secondary { min-height: 40mm !important; }
  .shot-secondary img { min-height: 40mm !important; }

  .process-flow { grid-template-columns: 1fr 1fr !important; }
  .process-flow .flow-arrow { display: none !important; }

  .flow-shell,
  .flow-detail,
  .flow-node {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .life-controls { display: none !important; }
  .flow-shell {
    background: #fff !important;
    border-color: #e6eaf2 !important;
  }
  .flow-node {
    background: #fff !important;
    border-color: #e6eaf2 !important;
    color: #101828 !important;
  }
  .flow-node small,
  .flow-copy #life-copy,
  .life-points li { color: #5b6577 !important; }
  .flow-copy h3,
  .flow-node.is-active { color: #101828 !important; }

  .contact-section {
    text-align: center;
  }
  .contact-section a[href^="mailto:"] {
    color: #3b5ba5 !important;
    font-weight: 700;
    font-size: 13pt;
    display: inline-block;
    margin-top: 8px;
  }
  a[href^="mailto:"]::after { content: none !important; }

  /* Prevent Chrome from generating an empty trailing sheet */
  body::after {
    content: none !important;
    display: none !important;
  }
}
