/* ========================================================================
   PrimePeak Corporate Website
   Responsive and print styles — v2.0.0
   ======================================================================== */

/* Wide desktop refinements ---------------------------------------------- */
@media (max-width: 1600px) and (min-width: 1401px) {
  .header-inner {
    width: calc(100% - 32px);
    grid-template-columns: 178px minmax(0, 1fr) max-content;
    column-gap: 16px;
  }

  .brand {
    width: 178px;
    height: 66px;
  }

  .desktop-nav {
    gap: 1px;
  }

  .desktop-nav a {
    padding-inline: 7px;
    font-size: 0.7rem;
  }

  .is-rtl .desktop-nav a {
    font-size: 0.76rem;
  }

  .header-actions {
    gap: 6px;
    padding-inline-start: 12px;
  }

  .language-link {
    padding-inline: 10px;
  }

  .header-cta {
    padding-inline: 15px;
    font-size: 0.78rem;
  }

  .profile-download {
    padding-inline: 12px;
    font-size: 0.69rem;
  }
}

/* Switch to navigation drawer before collisions can occur --------------- */
@media (max-width: 1400px) {
  .header-inner {
    width: min(100% - 36px, 1240px);
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
  }

  .desktop-nav,
  .header-cta,
  .profile-download {
    display: none;
  }

  .header-actions {
    padding-inline-start: 0;
  }

  .header-actions::before {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.52fr);
  }

  .hero-mark {
    width: min(330px, 100%);
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 42px;
  }

  .process-track::before {
    display: none;
  }
}

/* Laptop and tablet landscape ------------------------------------------- */
@media (max-width: 1120px) {
  :root {
    --pp-container: min(100% - 40px, 980px);
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-mark {
    display: none;
  }

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

  .proof-strip > div:nth-child(2) {
    border-inline-end: 0;
  }

  .proof-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .split-layout,
  .principle-grid,
  .qhse-block,
  .qhse-block.reverse,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .qhse-block.reverse .qhse-copy {
    order: initial;
  }

  .image-feature-panel {
    width: 100%;
    max-width: 820px;
    min-height: 480px;
    margin-inline: auto;
  }

  .card-grid,
  .why-grid,
  .value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .check-grid,
  .dark-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .department-panel {
    position: static;
  }

  .footer-grid {
    grid-template-columns: minmax(280px, 1.3fr) repeat(2, minmax(150px, 1fr));
  }

  .footer-column:last-child {
    grid-column: 2 / 4;
  }
}

/* Tablet portrait -------------------------------------------------------- */
@media (max-width: 820px) {
  :root {
    --pp-container: min(100% - 30px, 720px);
    --pp-header-height: 76px;
  }

  html {
    scroll-padding-top: calc(var(--pp-header-height) + 16px);
  }

  .site-header,
  .site-header.is-scrolled {
    height: var(--pp-header-height);
  }

  .header-inner {
    width: min(100% - 28px, 720px);
  }

  .brand {
    width: 180px;
    height: 60px;
  }

  .language-link {
    min-height: 42px;
    padding-inline: 11px;
  }

  .section {
    padding-block: 76px;
  }

  h1 {
    font-size: clamp(2.55rem, 10vw, 4.8rem);
  }

  h2 {
    font-size: clamp(2rem, 8vw, 3.4rem);
  }

  .home-hero {
    min-height: auto;
    padding-top: calc(var(--pp-header-height) + 68px);
  }

  .home-hero::before {
    background:
      linear-gradient(180deg, rgba(3, 20, 38, 0.94) 0%, rgba(3, 20, 38, 0.78) 56%, rgba(14, 39, 70, 0.72) 100%),
      url("../img/heroes/home-hero.jpg") 68% center / cover no-repeat;
  }

  .hero-content {
    padding-bottom: 52px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-peak {
    opacity: 0.45;
  }

  .page-hero {
    min-height: 500px;
  }

  .page-hero::before,
  .is-rtl .page-hero::before {
    background:
      linear-gradient(180deg, rgba(3, 20, 38, 0.93) 0%, rgba(3, 20, 38, 0.76) 52%, rgba(14, 39, 70, 0.68) 100%),
      var(--hero-image, url("../img/peak-pattern.svg")) 64% center / cover no-repeat;
  }

  .page-hero-inner {
    padding-bottom: 58px;
  }

  .page-hero-art {
    display: none;
  }

  .section-heading,
  .partnership-inner,
  .final-cta-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 205px;
  }

  .service-full-grid,
  .sector-card-grid,
  .vision-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vision-card {
    min-height: 300px;
  }

  .sector-row {
    grid-template-columns: 48px 46px minmax(0, 1fr) 26px;
    gap: 14px;
  }

  .sector-row > span:nth-of-type(3) {
    display: none;
  }

  .process-large::before {
    inset-inline-start: 37px;
  }

  .process-step {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 20px;
  }

  .process-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-diagram,
  .sector-orbit {
    min-height: 380px;
  }

  .market-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .market-ring {
    margin-inline: auto;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-column:last-child {
    grid-column: auto;
  }
}

/* Large mobile ----------------------------------------------------------- */
@media (max-width: 640px) {
  :root {
    --pp-container: min(100% - 26px, 560px);
  }

  body {
    font-size: 15.5px;
  }

  .header-inner {
    width: calc(100% - 24px);
    column-gap: 10px;
  }

  .brand {
    width: 154px;
    height: 54px;
  }

  .header-actions {
    gap: 7px;
  }

  .language-link {
    min-width: 48px;
    padding-inline: 10px;
    font-size: 0.72rem;
  }

  .language-link .icon {
    display: none;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .mobile-menu-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero {
    padding-top: calc(var(--pp-header-height) + 48px);
  }

  .hero-copy h1 {
    margin-bottom: 22px;
    font-size: clamp(2.55rem, 14vw, 4.35rem);
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

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

  .proof-strip > div {
    padding: 19px 14px;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .image-feature-panel {
    min-height: 390px;
    border-radius: 24px;
  }

  .stats-grid,
  .card-grid,
  .why-grid,
  .value-grid,
  .service-full-grid,
  .sector-card-grid,
  .vision-grid,
  .check-grid,
  .dark-check-grid,
  .check-grid.compact,
  .dark-check-grid.compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-card {
    min-height: 190px;
  }

  .feature-card,
  .service-full-card,
  .sector-card,
  .value-card,
  .vision-card {
    padding: 28px;
  }

  .feature-card {
    min-height: 310px;
  }

  .service-full-card {
    min-height: 350px;
  }

  .sector-row {
    grid-template-columns: 42px minmax(0, 1fr) 24px;
  }

  .sector-icon {
    display: none;
  }

  .process-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 14px;
  }

  .process-mini > div {
    width: 68px;
    height: 68px;
  }

  .delivery-diagram::before {
    width: 270px;
    height: 270px;
  }

  .delivery-diagram::after {
    width: 195px;
    height: 195px;
  }

  .delivery-diagram strong {
    width: 120px;
    height: 120px;
  }

  .sector-orbit::before {
    width: 300px;
    height: 300px;
  }

  .sector-orbit::after {
    width: 220px;
    height: 220px;
  }

  .sector-orbit strong {
    width: 128px;
    height: 128px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid .full {
    grid-column: auto;
  }

  .route-preview {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-preview span {
    grid-row: auto;
  }

  .contact-form-card,
  .department-panel {
    padding: 26px;
  }

  .commitment-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 32px;
  }

  .policy-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }

  .footer-brand,
  .footer-column:last-child {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }

  .is-rtl .back-to-top {
    right: auto;
    left: 16px;
  }
}

/* Small mobile ----------------------------------------------------------- */
@media (max-width: 420px) {
  .brand {
    width: 142px;
  }

  .language-link {
    min-width: 42px;
    padding-inline: 8px;
  }

  .proof-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof-strip > div {
    border-inline-end: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .proof-strip > div:last-child {
    border-bottom: 0;
  }

  .process-track {
    grid-template-columns: minmax(0, 1fr);
  }

  .delivery-diagram,
  .sector-orbit {
    transform: scale(0.9);
    margin-inline: -20px;
  }
}

/* Short landscape screens ------------------------------------------------ */
@media (max-height: 560px) and (orientation: landscape) {
  .mobile-menu-inner {
    padding-top: 14px;
  }

  .mobile-menu nav a {
    padding: 10px 0;
    font-size: 1.05rem;
  }

  .mobile-menu-actions {
    margin-top: 18px;
  }

  .mobile-meta {
    margin-top: 18px;
  }

  .home-hero {
    min-height: auto;
    padding-bottom: 32px;
  }
}

/* Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Print ------------------------------------------------------------------ */
@media print {
  .site-header,
  .site-loader,
  .mobile-menu,
  .back-to-top,
  .hero-actions,
  .final-cta,
  .partnership-banner,
  .footer-profile-link {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  main {
    padding-top: 0;
  }

  .section,
  .page-hero {
    padding-block: 32px;
  }

  .page-hero,
  .home-hero,
  .section-dark,
  .primepeak-stats,
  .site-footer {
    color: #000;
    background: #fff !important;
  }

  .page-hero h1,
  .home-hero h1,
  .section-dark h2,
  .section-dark h3,
  .section-dark p,
  .site-footer h2,
  .site-footer p,
  .site-footer a {
    color: #000 !important;
  }
}


/* V2.0.2 capability grids ------------------------------------------------ */
@media (max-width: 1120px) {
  .discipline-grid,
  .service-portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .discipline-grid,
  .service-portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .discipline-card {
    min-height: 0;
  }

  .service-portfolio-card {
    min-height: 0;
  }

  .delivery-diagram-five {
    min-height: 470px;
  }

  .delivery-diagram-five span {
    max-width: 145px;
    padding: 8px 11px;
    font-size: 0.72rem;
  }

  .delivery-diagram-five span:nth-child(2) { right: -4px; }
  .delivery-diagram-five span:nth-child(5) { left: -4px; }
  .delivery-diagram-five span:nth-child(3) { right: 1%; bottom: 30px; }
  .delivery-diagram-five span:nth-child(4) { left: 1%; bottom: 30px; }

  .model-brand-fix {
    top: 13%;
    left: 2.8%;
    width: 34%;
    padding: 8px 10px;
  }
}
