/* Services page: the four service categories (Brand Development, Website
   Development, Social Media Marketing, Performance Marketing).
   - Each category title sits on one line on every device, shrinking only
     when the width needs it (all four use the same size).
   - The six service cards sit in a single row: all six side by side on
     laptops, a swipeable single row on smaller screens.
   - The heading block -> cards gap follows the site rhythm (48px).
   Loaded on services.html after the bundled stylesheets. */

.svc-detail .svc__wrap { container-type: inline-size; }

/* ---- one service at a time ----
   Each category fills the screen below the header, its content centred, so
   only one service is on show and there is clear space before the next one.
   On laptops the categories also stack (each sticks below the header while
   the next slides over it), and at this height the next one covers the
   previous one completely. A category taller than the screen just grows. */
.svc-detail {
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* the wrapper centres itself with auto margins, which in a flex column means
   "shrink to fit", and as the size container for the title it would shrink
   to nothing: keep it full width (its max-width still applies) */
.svc-detail > .svc__wrap { width: 100%; }

/* laptops (where the categories stack): a "hold" after each one. Without it
   the next category starts sliding over the moment the current one fills the
   screen, so two were on show for almost the whole scroll. The extra scroll
   distance keeps each service alone on screen for a while before the next
   one slides in. (The space itself is never seen: the current category stays
   stuck over it.) */
@media (min-width: 1024px) {
  .svc-detail[data-stack]:not(:last-child) { margin-bottom: 75svh; }
  /* the same hold after the last category. It can't be a margin on the last
     one (a sticky box must keep its own margin inside its container, so it
     would unstick at once and the margin would show as a blank gap): an
     invisible spacer at the end of the stack instead. The last category stays
     stuck while the spacer scrolls by underneath it, exactly as the others do,
     then leaves with the footer right behind it. */
  .svc-stack::after {
    content: "";
    display: block;
    height: 75svh;
  }
}

/* ---- category titles: one line ----
   Each title sits full width above its supporting copy on every device (the
   long "Social Media Marketing & Influencer Marketing" can't sit beside the
   copy on one line). A title keeps the normal size unless its line wouldn't
   fit, then shrinks just enough: font size = min(normal, width / --title-em),
   where --title-em is that title's width in em (measured, plus a little). */
.svc-detail__title {
  --title-em: 10.7;
  white-space: nowrap;
  max-width: none;
  font-size: min(clamp(2.25rem, 1.4rem + 2.3vw, 4rem), 100cqi / var(--title-em));
}
#brand-development .svc-detail__title { --title-em: 9; }
#website-development .svc-detail__title { --title-em: 9.8; }
#social-media-marketing .svc-detail__title { --title-em: 20.5; }
#performance-marketing .svc-detail__title { --title-em: 10.7; }

.svc-detail__head {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
/* tablets and laptops: heading -> supporting copy is the original 16px plus
   24px (range syntax, so no fractional width falls between breakpoints) */
@media (width >= 621px) {
  .svc-detail__head { gap: 40px; }
}

/* heading block -> cards */
.svc-detail__head { margin-bottom: 48px; }

/* ---- service cards: a single row ---- */

/* laptops: all six side by side, compact */
@media (min-width: 1200px) {
  .svc-cards {
    max-width: none;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(.75rem, .9vw, 1rem);
  }
  .svc-card {
    min-height: 0;
    padding: 1rem 1rem .9rem;
  }
  .svc-card__num { font-size: 1.6rem; margin-bottom: .75rem; }
  .svc-card__name { font-size: 1.0625rem; margin-bottom: .5rem; }
  .svc-card__text { font-size: .875rem; line-height: 1.4; margin-bottom: .75rem; }
  .svc-card__go { width: 30px; height: 30px; }
  .svc-card__go svg { width: 14px; height: 14px; }
}

/* tablets and phones: one swipeable row (the next card peeks in) */
@media (max-width: 1199px) {
  .svc-cards {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 260px;
    max-width: none;
    gap: .85rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* room for the hover lift inside the scroll area */
    padding-block: 8px;
    margin-block: -8px;
  }
  .svc-cards::-webkit-scrollbar { display: none; }
  .svc-card {
    min-height: 0;
    scroll-snap-align: start;
    padding: 1.1rem 1.1rem 1rem;
  }
  .svc-card__num { font-size: 1.75rem; margin-bottom: .8rem; }
  .svc-card__name { font-size: 18px; margin-bottom: .5rem; }
  .svc-card__text { font-size: 16px; line-height: 1.4; margin-bottom: .8rem; }
}
@media (max-width: 620px) {
  .svc-cards {
    grid-template-columns: none;
    grid-auto-columns: 210px;
    gap: .7rem;
  }
  .svc-card { padding: .9rem .9rem .85rem; }
  .svc-card__num { font-size: 1.5rem; margin-bottom: .6rem; }
  .svc-card__name { font-size: 15px; margin-bottom: .4rem; }
  .svc-card__text { font-size: 12px; line-height: 1.45; margin-bottom: .6rem; }
}
