/* ============================================
   Global responsive fixes — included last
   on every public page
   ============================================ */

html {
  -webkit-text-size-adjust: 100%;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* --- Nav bar --- */
@media (max-width: 900px) {
  nav {
    padding: 1em 1.25em;
    gap: 0.75em;
  }

  nav .logo img {
    width: 64px !important;
  }

  nav .clock {
    /* keep the time visible on small screens, just smaller */
    flex: 0 0 auto;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  nav .ctas {
    gap: 0.75em;
  }
}

@media (max-width: 480px) {
  nav .contact a {
    font-size: 12px;
  }
}

/* --- Menu overlay items --- */
@media (max-width: 700px) {
  .menu-items .menu-item span:last-child {
    /* the panel now carries 6 items plus 12 service links, so the
       labels must stay compact or the rows collide */
    font-size: 15px;
  }
}

/* --- Footer --- */
@media (max-width: 700px) {
  .footer-header h1 {
    font-size: clamp(48px, 16vw, 96px) !important;
  }

  .footer-sub-header {
    flex-wrap: wrap;
    gap: 0.4em;
  }

  .footer-sub-header h2 {
    font-size: clamp(14px, 4vw, 20px) !important;
  }

  .footer-ctas {
    flex-wrap: wrap;
    gap: 1em;
  }

  .footer-copyright {
    flex-direction: column;
    gap: 0.4em;
    text-align: center;
  }
}

/* --- Generic content sections --- */
@media (max-width: 700px) {
  .hero-header,
  .about-header,
  .services,
  .prices,
  .features-content {
    flex-direction: column !important;
  }

  .hero-header h1 {
    font-size: clamp(36px, 11vw, 64px) !important;
  }

  section {
    padding-left: 1.25em;
    padding-right: 1.25em;
  }
}

/* --- Forms (contact) --- */
@media (max-width: 700px) {
  .form-row {
    flex-direction: column !important;
    gap: 0.75em;
  }

  .form-container {
    padding: 1.25em !important;
  }

  .progress-step-label {
    font-size: 10px !important;
  }
}

/* --- Work scroller --- */
@media (max-width: 700px) {
  .work-card {
    flex: 0 0 82vw;
  }

  .scroller-arrow {
    display: none;
  }
}

/* --- Tables & long words --- */
@media (max-width: 700px) {
  h1, h2, h3 {
    overflow-wrap: break-word;
  }
}

/* ============================================
   Nav bar — consistent sizing on all pages
   ============================================ */
nav {
  gap: 1em;
}

nav .logo img {
  width: 72px;
}

@media (max-width: 900px) {
  nav .logo img { width: 56px; }
  nav .clock { font-size: 11px; }
}

@media (max-width: 480px) {
  nav .logo img { width: 48px; }
  nav { padding: 1em; }
}


/* ============================================
   Clock — visible at every screen size
   ============================================ */
nav .clock {
  white-space: nowrap;
}

@media (max-width: 600px) {
  nav .clock {
    font-size: 10px;
  }
  /* The nav CTAs move to a fixed bottom bar under 900px, so the
     clock has the top bar to itself and will not collide. */
  nav .clock p {
    margin: 0;
  }
}

@media (max-width: 380px) {
  nav .clock {
    font-size: 9px;
  }
}


/* ===============================================================
   FIX: features — image ABOVE, words BELOW (no overlap)
   The original absolutely-positions the title over the image,
   which collides on every screen size.
   =============================================================== */
.features-item {
  aspect-ratio: auto;               /* let content decide the height */
  justify-content: flex-start;
  padding: 2.5em 2em;
  gap: 1.5em;
  overflow: hidden;
}

.features-icon {
  position: static;                 /* was top: -10% */
  top: auto;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.features-icon img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.features-title {
  position: static;                 /* was absolute bottom: 0 */
  bottom: auto;
  padding: 0;
  width: 100%;
  text-align: left;
}

.features-title h2 {
  width: 100%;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.2;
  margin-bottom: 0.6em;
}

.features-title p {
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .features-item {
    padding: 2em 1.5em;
    gap: 1.25em;
  }

  .features-icon {
    transform: none;                /* was scale(0.75) with top: -25% */
    max-width: 260px;
  }

  .features-title h2 { font-size: 20px; }
  .features-title p  { font-size: 14px; }
}

/* ===============================================================
   FIX: "we work with" — icon ABOVE, label BELOW
   The label was absolutely positioned over the icon and
   overflowed its box on narrow screens.
   =============================================================== */
.service-item {
  aspect-ratio: 1;
  justify-content: center;
  gap: 0.9em;
  padding: 1.25em 0.75em;
  overflow: hidden;
}

.service-icon {
  position: static;                 /* was top: -10% */
  top: auto;
  font-size: 32px;
  line-height: 1;
}

.service-title {
  position: static;                 /* was absolute bottom: 15% */
  bottom: auto;
  width: 100%;
  text-align: center;
}

.service-title p {
  font-size: 12px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  word-break: break-word;
  hyphens: auto;
}

@media (max-width: 900px) {
  /* two per row instead of four squeezed across the screen */
  .services-row {
    flex-wrap: wrap;
  }

  .service-item {
    width: calc(50% - 0.25em);
    aspect-ratio: 1.35;
    padding: 1.1em 0.6em;
  }

  .service-icon { font-size: 28px; }
  .service-title p { font-size: 11.5px; }
}

@media (max-width: 420px) {
  .service-title p { font-size: 10.5px; }
  .service-icon { font-size: 25px; }
}

/* ===============================================================
   FIX: footer gradient removed — it was sitting on top of
   the footer text and buttons
   =============================================================== */
.footer-bg {
  display: none;
}

/* ===============================================================
   FIX: contact form — stop the page jumping between steps
   Steps have different heights; a minimum height keeps the
   layout stable so the view never lands on the footer.
   =============================================================== */
#lead-form {
  min-height: 420px;
}

@media (max-width: 700px) {
  #lead-form { min-height: 480px; }
}

.progress-container {
  scroll-margin-top: 90px;
}

/* ---------------------------------------------------------------
   Footer polish — the two words were touching, and the sub-header
   wrapped awkwardly once the form was removed
   --------------------------------------------------------------- */
.footer-header {
  gap: 0.25em;
  flex-wrap: wrap;
  padding-top: 12em;          /* the gradient used to fill this space */
}

.footer-sub-header {
  gap: 1em;
  flex-wrap: wrap;
  margin-bottom: 6em;
}

@media (max-width: 900px) {
  .footer-header {
    padding: 8em 1.5em 0 1.5em;
    justify-content: flex-start;
    gap: 0.15em;
  }

  .footer-header h1 {
    font-size: clamp(52px, 17vw, 110px);
  }

  .footer-sub-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15em;
    margin-bottom: 4em;
    padding-bottom: 1.25em;
  }

  .footer-sub-header h2 {
    font-size: 14px;
    letter-spacing: 0.04em;
  }
}
