/* ========================================================================== 
   Ultivo Global Solutions LLP — Responsive Styles
   File: css/responsive.css
   Purpose: Laptop, tablet and mobile layout adaptations
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large laptops and compact desktops
   -------------------------------------------------------------------------- */

@media (max-width: 1199.98px) {
  :root {
    --container-width: 1080px;
    --section-space: 88px;
  }

  .site-header__inner {
    gap: 22px;
  }

  .brand__logo {
    width: 158px;
  }

  .primary-nav__link {
    padding-inline: 11px;
  }

  .hero {
    min-height: 610px;
  }

  .hero__content {
    padding-block: 82px 110px;
  }

  .split-layout {
    gap: 56px;
  }

  .industry-layout {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 48px;
  }

  .service-card {
    padding-inline: 26px;
  }

  .site-footer__grid {
    grid-template-columns: 1.25fr 0.7fr 1fr 0.9fr;
    gap: 30px;
  }
}

/* --------------------------------------------------------------------------
   Tablets and mobile navigation
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  :root {
    --header-height: 76px;
    --section-space: 78px;
    --gutter: 22px;
  }

  html {
    scroll-padding-top: calc(var(--header-height) + 18px);
  }

  .site-header,
  .site-header.is-sticky {
    min-height: var(--header-height);
  }

  .site-header__inner {
    gap: 16px;
  }

  .brand__logo {
    width: 150px;
    max-height: 56px;
  }

  .nav-toggle {
    position: relative;
    z-index: 1002;
    display: inline-flex;
    flex: 0 0 auto;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1),
  .nav-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2),
  .nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3),
  .nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .primary-nav {
    position: absolute;
    z-index: 1001;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100vh - var(--header-height));
    margin-left: 0;
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 22px 45px rgba(7, 28, 63, 0.16);
    opacity: 0;
    overscroll-behavior: contain;
    pointer-events: none;
    transform: translateY(-12px);
    visibility: hidden;
    transition:
      opacity var(--transition),
      transform var(--transition),
      visibility var(--transition);
  }

  .primary-nav.is-open,
  body.nav-open .primary-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .primary-nav__list {
    width: min(calc(100% - (var(--gutter) * 2)), var(--container-width));
    margin-inline: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
    padding-block: 16px 22px;
  }

  .primary-nav__list li {
    width: 100%;
  }

  .primary-nav__link {
    width: 100%;
    min-height: 48px;
    justify-content: space-between;
    padding: 11px 12px;
  }

  .primary-nav__link::after {
    top: 50%;
    right: 8px;
    bottom: auto;
    left: auto;
    width: 3px;
    height: 22px;
    transform: translateY(-50%) scaleY(0);
    transform-origin: bottom;
  }

  .primary-nav__link:hover::after,
  .primary-nav__link.is-active::after {
    transform: translateY(-50%) scaleY(1);
    transform-origin: top;
  }

  .primary-nav__list .button {
    width: 100%;
    margin-top: 8px;
  }

  .hero {
    min-height: 570px;
  }

  .hero__overlay {
    background:
      linear-gradient(90deg, rgba(5, 23, 54, 0.94) 0%, rgba(5, 28, 66, 0.79) 62%, rgba(5, 31, 73, 0.42) 100%),
      linear-gradient(0deg, rgba(4, 21, 49, 0.5), rgba(4, 21, 49, 0.12));
  }

  .hero__content {
    padding-block: 76px 106px;
  }

  .hero__title {
    max-width: 760px;
  }

  .hero__summary {
    max-width: 630px;
  }

  .trust-strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip__item:nth-child(2)::after {
    display: none;
  }

  .trust-strip__item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--color-border);
  }

  .split-layout,
  .split-layout--wide {
    grid-template-columns: minmax(0, 1fr);
    gap: 46px;
  }

  .content-block,
  .content-block h2 {
    max-width: none;
  }

  .media-card {
    width: min(100%, 760px);
  }

  .media-card > img {
    min-height: 380px;
  }

  .media-card--portrait > img {
    min-height: 440px;
  }

  .split-layout--reverse-mobile > :first-child {
    order: 2;
  }

  .split-layout--reverse-mobile > :last-child {
    order: 1;
  }

  .card-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card {
    min-height: 315px;
  }

  .industry-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .industry-layout .section-heading {
    position: static;
    max-width: 700px;
  }

  .process-list__item {
    min-height: 155px;
  }

  .cta-section {
    padding-block: 58px;
  }

  .cta-section__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
  }

  .cta-section__actions {
    min-width: 0;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 50px;
    padding-block: 62px 48px;
  }

  .site-footer__brand p {
    max-width: 420px;
  }
}

/* --------------------------------------------------------------------------
   Small tablets and large phones
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  :root {
    --header-height: 72px;
    --section-space: 64px;
    --gutter: 20px;
  }

  h1 {
    font-size: clamp(2.35rem, 9vw, 3.5rem);
  }

  h2 {
    font-size: clamp(1.8rem, 6.5vw, 2.5rem);
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .brand__logo {
    width: 138px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
  }

  .hero {
    min-height: 560px;
  }

  .hero__content {
    padding-block: 66px 96px;
  }

  .hero__summary {
    margin-bottom: 28px;
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero__scroll {
    bottom: 20px;
  }

  .trust-strip__item {
    min-height: 108px;
    padding: 20px 18px;
  }

  .trust-strip__number {
    font-size: 1.28rem;
  }

  .split-layout,
  .split-layout--wide {
    gap: 36px;
  }

  .media-card > img,
  .media-card--portrait > img {
    min-height: 330px;
    border-radius: var(--radius-md);
  }

  .media-card::before {
    top: -12px;
    left: -12px;
    width: 95px;
    height: 95px;
  }

  .media-card__badge {
    right: 14px;
    bottom: 18px;
    min-width: 240px;
    padding: 15px 18px;
  }

  .card-grid--three,
  .industry-grid,
  .process-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-card {
    min-height: auto;
    padding: 30px 26px 28px;
  }

  .service-card h3 {
    min-height: 0;
  }

  .industry-card {
    min-height: 185px;
  }

  .process-list__item {
    min-height: 0;
  }

  .feature-grid {
    gap: 22px;
  }

  .accordion__trigger {
    min-height: 64px;
    gap: 16px;
    padding: 17px 19px;
  }

  .accordion__panel {
    padding: 18px 19px 21px;
  }

  .cta-section h2 {
    font-size: clamp(1.85rem, 7vw, 2.5rem);
  }

  .site-footer__grid {
    gap: 38px 36px;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding-block: 22px;
  }

  .back-to-top {
    right: 18px;
    bottom: 18px;
  }
}

/* --------------------------------------------------------------------------
   Phones
   -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {
  :root {
    --section-space: 56px;
    --gutter: 16px;
  }

  body {
    line-height: 1.65;
  }

  h1 {
    font-size: clamp(2.15rem, 10.5vw, 3rem);
    line-height: 1.12;
  }

  h2 {
    margin-bottom: 16px;
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  h3 {
    font-size: 1.08rem;
  }

  .eyebrow {
    gap: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .eyebrow::before {
    width: 22px;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.7;
  }

  .section-heading--center {
    text-align: left;
  }

  .section-heading--center .eyebrow {
    justify-content: flex-start;
  }

  .brand__logo {
    width: 126px;
  }

  .primary-nav__list {
    padding-block: 12px 18px;
  }

  .hero {
    min-height: 590px;
  }

  .hero__media img {
    object-position: 58% center;
  }

  .hero__overlay {
    background:
      linear-gradient(90deg, rgba(5, 23, 54, 0.96), rgba(5, 28, 66, 0.78)),
      linear-gradient(0deg, rgba(4, 21, 49, 0.58), rgba(4, 21, 49, 0.2));
  }

  .hero__content {
    padding-block: 58px 66px;
  }

  .hero__title {
    margin-bottom: 20px;
  }

  .hero__summary {
    line-height: 1.62;
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
  }

  .hero__actions .button {
    width: 100%;
  }

  .hero__scroll {
    display: none;
  }

  .trust-strip__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .trust-strip__item {
    min-height: 92px;
  }

  .trust-strip__item:nth-child(-n + 2) {
    border-bottom: 0;
  }

  .trust-strip__item:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
  }

  .trust-strip__item::after {
    display: none;
  }

  .media-card > img,
  .media-card--portrait > img {
    min-height: 270px;
  }

  .media-card::before {
    display: none;
  }

  .media-card__badge {
    position: relative;
    right: auto;
    bottom: auto;
    width: calc(100% - 28px);
    min-width: 0;
    margin: -24px auto 0;
  }

  .check-list {
    gap: 11px;
    margin-block: 24px 26px;
  }

  .check-list li {
    padding-left: 31px;
    font-size: 0.93rem;
  }

  .service-card,
  .industry-card {
    padding: 27px 22px 25px;
  }

  .service-card__index {
    top: 20px;
    right: 21px;
    font-size: 1.55rem;
  }

  .service-card__icon {
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
  }

  .industry-card {
    min-height: 170px;
  }

  .industry-card__number {
    margin-bottom: 16px;
  }

  .process-list__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    padding: 23px 21px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 28px;
  }

  .accordion__trigger {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .accordion__trigger > span {
    width: 28px;
    height: 28px;
  }

  .cta-section {
    padding-block: 50px;
  }

  .cta-section__actions {
    width: 100%;
    flex-direction: column;
  }

  .cta-section__actions .button {
    width: 100%;
  }

  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding-block: 52px 40px;
  }

  .site-footer__heading {
    margin-bottom: 16px;
  }

  .site-footer__legal {
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
}

/* --------------------------------------------------------------------------
   Very narrow screens
   -------------------------------------------------------------------------- */

@media (max-width: 359.98px) {
  :root {
    --gutter: 13px;
  }

  .brand__logo {
    width: 116px;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  .button {
    padding-inline: 18px;
  }

  .service-card,
  .industry-card,
  .process-list__item {
    padding-inline: 19px;
  }
}

/* --------------------------------------------------------------------------
   Touch devices and short landscape screens
   -------------------------------------------------------------------------- */

@media (hover: none) {
  .button:hover,
  .service-card:hover,
  .industry-card:hover,
  .process-list__item:hover,
  .social-links a:hover,
  .back-to-top:hover {
    transform: none;
  }
}

@media (max-height: 520px) and (orientation: landscape) and (max-width: 991.98px) {
  .hero {
    min-height: 500px;
  }

  .hero__content {
    padding-block: 46px 62px;
  }

  .hero__scroll {
    display: none;
  }

  .primary-nav {
    max-height: calc(100vh - var(--header-height));
  }
}
