/* =========================================================
   HORIZON OOH — Responsive rules
   ========================================================= */

/* ---------- Laptop ---------- */
@media (max-width: 1100px) {
  .site-card {
    grid-column: span 6;
  }

  .about-grid {
    gap: 48px;
  }

  .ceo-card {
    grid-template-columns: 1fr;
  }

  .ceo-photo-wrap {
    aspect-ratio: 16 / 10;
  }

  .ceo-photo-wrap img {
    object-position: center 25%;
  }

  .contact-card {
    padding: 48px;
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  :root {
    --header-h: 68px;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100svh - var(--header-h));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px;
    background: rgba(2, 10, 25, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
  }

  .main-nav.is-open {
    transform: none;
  }

  .main-nav > a:not(.btn) {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 600;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }

  .main-nav > a:not(.btn)::after {
    display: none;
  }

  .main-nav .nav-cta {
    margin-top: 28px;
    padding: 16px;
    font-size: 1rem;
  }

  .site-header.menu-open {
    background: var(--navy-950);
    border-color: var(--line);
  }

  .section {
    padding: 90px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 40px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(2, 10, 25, 0.55) 0%, rgba(2, 10, 25, 0.75) 45%, rgba(2, 10, 25, 0.97) 100%);
  }

  .hero-img {
    width: 100%;
    object-position: 58% center;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .ceo-card {
    grid-template-columns: 200px 1fr;
  }

  .ceo-photo-wrap {
    aspect-ratio: 4 / 5;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 22px;
    padding: 30px;
  }

  .why-card > i {
    grid-row: span 2;
    margin: 0;
  }

  .contact-card {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .modal {
    padding: 0;
    align-items: stretch;
  }

  .modal-box {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    max-height: 100svh;
    height: 100svh;
    border-radius: 0;
    border: 0;
  }

  .modal-media {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .modal-info {
    padding: 28px 24px 24px;
  }

  .modal-info h2 {
    font-size: 1.6rem;
    margin-bottom: 14px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .container {
    width: calc(100% - 36px);
  }

  .brand img {
    height: 34px;
  }

  .brand-text {
    font-size: 1.02rem;
  }

  .hero {
    align-items: flex-end;
    padding-bottom: 72px;
  }

  .hero-img {
    height: 52%;
    object-position: 50% 35%;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(2, 10, 25, 0.35) 0%, rgba(2, 10, 25, 0.7) 30%, var(--navy-950) 52%);
  }

  .hero-content {
    padding-top: 30vh;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-stats {
    margin-top: 44px;
  }

  .hero-stats > div {
    padding-right: 12px;
  }

  .hero-stats > div + div {
    padding-left: 14px;
  }

  .hero-stats dd {
    font-size: 1.3rem;
    white-space: nowrap;
  }

  .hero-stats dt {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .scroll-cue {
    display: none;
  }

  .sites-grid {
    gap: 16px;
  }

  .site-card,
  .site-card.is-featured {
    grid-column: 1 / -1;
    aspect-ratio: 4 / 3.6;
  }

  .site-card-body {
    padding: 20px;
  }

  .site-card .site-arrow {
    width: 40px;
    height: 40px;
  }

  .ceo-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .ceo-photo-wrap {
    aspect-ratio: 1 / 1;
  }

  .why-card {
    grid-template-columns: 1fr;
  }

  .why-card > i {
    grid-row: auto;
    margin-bottom: 20px;
  }

  .contact-card {
    padding: 30px 12px 12px;
    border-radius: 24px;
  }

  .contact-copy {
    padding: 0 10px;
  }

  .contact-list a,
  .contact-list div {
    padding: 14px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
    padding-right: 0;
    padding-bottom: 64px; /* room for the floating WhatsApp button */
  }

  .fab-whatsapp {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }

  .media-nav {
    width: 40px;
    height: 40px;
  }

  .modal-site-nav button {
    font-size: 0.82rem;
  }
}

/* ---------- Large screens ---------- */
@media (min-width: 1600px) {
  .container {
    width: min(1360px, 100% - 96px);
  }
}

/* =========================================================
   v2 components — responsive
   ========================================================= */
@media (max-width: 900px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .steps-grid::before {
    top: 34px;
    bottom: 34px;
    left: 33px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, transparent, rgba(234, 148, 63, 0.5), transparent);
  }

  .step {
    display: grid;
    grid-template-columns: 68px 1fr;
    column-gap: 20px;
    text-align: left;
    padding: 0 0 30px;
  }

  .step-no {
    grid-row: span 2;
    margin: 0;
  }

  .step h3 {
    margin: 10px 0 6px;
  }

  .step p {
    margin: 0;
    max-width: none;
  }
}

@media (max-width: 640px) {
  /* Leave room for the bottom action bar */
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .fab-whatsapp {
    display: none;
  }

  .footer-bottom {
    padding-bottom: 0;
  }

  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(2, 10, 25, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    transform: translateY(110%);
    transition: transform 0.4s var(--ease);
  }

  .mobile-bar.is-visible {
    transform: none;
  }

  .mobile-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: 14px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
  }

  .mobile-bar a i {
    color: var(--gold-light);
  }

  .mobile-bar a.is-primary {
    background: #25d366;
    border-color: #25d366;
    color: #06240f;
  }

  .mobile-bar a.is-primary i {
    color: #06240f;
    font-size: 1.15rem;
  }

  /* Sites become a swipeable carousel */
  .sites-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 18px;
    margin-inline: -18px;
    padding: 4px 18px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .sites-grid::-webkit-scrollbar {
    display: none;
  }

  .site-card,
  .site-card.is-featured,
  .site-card.coming-soon {
    flex: 0 0 86%;
    aspect-ratio: 4 / 5;
    scroll-snap-align: start;
    grid-column: auto;
  }

  .site-card:hover {
    transform: none;
  }

  .site-card h3 {
    font-size: 1.4rem;
  }

  .carousel-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
  }

  .carousel-progress {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
  }

  .carousel-progress span {
    display: block;
    height: 100%;
    width: 10%;
    border-radius: 3px;
    background: var(--gold);
    transition: width 0.3s var(--ease);
  }

  .carousel-count {
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    min-width: 52px;
    text-align: right;
  }

  .steps {
    padding-top: 20px;
  }

  .enquiry {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .contact-copy .hero-actions {
    display: none; /* the form + mobile bar cover these */
  }

  .contact-copy .contact-list {
    margin-top: 24px;
  }

  .media-dots button.thumb {
    width: 48px;
    height: 34px;
  }

  .media-dots button.thumb.is-active {
    width: 48px;
  }
}
