@import url("./snq-variables.css");

.snq-site {
  font-family: var(--snq-font-sans);
}

/* ==========================================================================
   SNQ Home Page Styles (scoped)
   Only applies when wrapped in: <div class="snq-home"> ... </div>
   ========================================================================== */

.snq-home {
  /* slider layout defaults */
  --snq-visible: 7;
  --snq-gap: 22px;

  /* slider UI */
  --snq-arrow-size: 46px;
  --snq-arrow-bg: rgba(0, 0, 0, 0.45);

  --snq-dot: 8px;
  --snq-dot-inactive: #ffffff;
  --snq-dot-active: var(--snq-green);

  /* --- Canonical band geometry (single source of truth) --- */
  --snq-band-visible: var(--snq-visible);
  --snq-band-gap: var(--snq-gap);
  --snq-band-tile: 150px;

  /* Derived snap width = EXACT width of N tiles + gaps */
  --snq-snap-width: calc(
    (var(--snq-band-visible) * var(--snq-band-tile)) +
      ((var(--snq-band-visible) - 1) * var(--snq-band-gap))
  );
}

/* (Optional but helpful for test pages) prevent default body spacing */
body {
  margin: 0;
}

/* Hide static band on home page */
.snq-imageband {
  display: none !important;
}

/* ==========================================================================
   Home slider (home page only)
   Full-bleed band, centered snapped viewport
   ========================================================================== */

/* Full-bleed band background + border */
.snq-home .snq-home-slider {
  background: var(--snq-blue);
  border-bottom: 2px solid var(--snq-border-light-blue);
  padding: 10px 0 14px; /* NO side padding on the full-bleed band */
  margin-bottom: 28px;

  /* full-bleed even if parent wrapper has gutters */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Viewport = centered clipping window (matches header/footer outer width) */
.snq-home .band-slider__viewport {
  position: relative;
  overflow: hidden;

  width: min(100%, calc(var(--snq-snap-width) + (2 * var(--snq-gutter))));
  margin: 0 auto;
  padding: 6px var(--snq-gutter);
  box-sizing: border-box;
}

/* Track = EXACT snap width */
.snq-home .band-slider__track {
  width: var(--snq-snap-width);
  margin: 0 auto;

  display: flex;
  flex-wrap: nowrap;
  gap: var(--snq-band-gap);
  align-items: center;
}

/* Tiles: FIXED SIZE */
.snq-home .band-slider__item {
  flex: 0 0 auto;
  width: var(--snq-band-tile);
  height: var(--snq-band-tile);
  aspect-ratio: 1 / 1;
  border: 2px solid var(--snq-border);
  box-sizing: border-box;
  background: #fff;
  display: block;
  overflow: hidden;
}

.snq-home .band-slider__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay arrows (superimposed on images) */
.snq-home .band-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: var(--snq-arrow-size);
  height: var(--snq-arrow-size);
  border: 0;
  border-radius: 999px;
  background: var(--snq-arrow-bg);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  user-select: none;
  backdrop-filter: blur(6px);

  opacity: 0.6;
  transition: opacity 200ms ease;
}

.snq-home .band-slider:hover .band-slider__arrow,
.snq-home .band-slider:focus-within .band-slider__arrow {
  opacity: 1;
}

.snq-home .band-slider__arrow--prev {
  left: 10px;
}
.snq-home .band-slider__arrow--next {
  right: 10px;
}

.snq-home .band-slider__arrow:focus-visible {
  outline: 3px solid var(--snq-dot-active);
  outline-offset: 2px;
}

/* Page dots */
.snq-home .band-slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
  width: 100%;
  margin: 0;
}

.snq-home .band-slider__dot {
  width: var(--snq-dot);
  height: var(--snq-dot);
  border-radius: 999px;
  border: 0;
  background: var(--snq-dot-inactive);
  cursor: pointer;
  padding: 0;
}

.snq-home .band-slider__dot[aria-current="true"] {
  background: var(--snq-dot-active);
}

/* ==========================================================================
   Responsive tile counts (these now WORK because nothing later overrides them)
   ========================================================================== */

/* Ultra-wide: show MORE tiles on large monitors */
@media (min-width: 1400px) {
  .snq-home {
    --snq-visible: 9;
  }
}
@media (min-width: 1700px) {
  .snq-home {
    --snq-visible: 10;
  }
}

/* Responsive: fewer visible as browser narrows */
@media (max-width: 1100px) {
  .snq-home {
    --snq-visible: 5;
    --snq-gap: 18px;
  }
}
@media (max-width: 900px) {
  .snq-home {
    --snq-visible: 4;
    --snq-gap: 16px;
  }
}
@media (max-width: 720px) {
  .snq-home {
    --snq-visible: 3;
    --snq-gap: 14px;
  }
}
@media (max-width: 520px) {
  .snq-home {
    --snq-visible: 2;
    --snq-gap: 12px;
  }
}
@media (max-width: 360px) {
  .snq-home {
    --snq-visible: 1;
    --snq-gap: 10px;
  }
}

/* ==========================================================================
   HARD CLAMP (beats slider JS / inline widths that cause partial extra tiles)
   Keep this at the bottom of home.css.
   ========================================================================== */

.snq-home .band-slider__viewport {
  width: min(
    100%,
    calc(var(--snq-snap-width) + (2 * var(--snq-gutter)))
  ) !important;
  padding-left: var(--snq-gutter) !important;
  padding-right: var(--snq-gutter) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.snq-home .band-slider__track {
  width: var(--snq-snap-width) !important;
  max-width: var(--snq-snap-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;

  display: flex !important;
  flex-wrap: nowrap !important;
  gap: var(--snq-band-gap) !important;
  align-items: center !important;
}

/* Apply fixed sizing to whatever the track children are */
.snq-home .band-slider__track > * {
  flex: 0 0 auto !important;
  width: var(--snq-band-tile) !important;
  height: var(--snq-band-tile) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Images fill the tile */
.snq-home .band-slider__track img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Optional: keep your existing page styles intact.
     You can add more home-only redesign styles below this line safely. */

/* ==========================================================================
   Home page content (scoped)
   Below slider / above footer
   ========================================================================== */

/* Overall content area */
.snq-home .snq-home-content {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 4.8rem 2rem 9.6rem; /* spacing under slider + above footer */
  box-sizing: border-box;
  text-align: center;
}

/* Intro section wrapper (NOT the blue box) */
.snq-home .snq-home-intro {
  margin: 0 auto 4.8rem;
  text-align: center;
}

/* Eyebrow */
.snq-home .snq-home-eyebrow {
  color: var(--snq-h2-light-blue);
  font-weight: var(--snq-font-semibold);
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 8px;
}

/* H1 */
.snq-home .snq-home-title {
  font-size: 3.6rem; /* smaller, controlled */
  color: var(--snq-blue);
  font-weight: var(--snq-font-bold);
  line-height: 1.1;
  margin: 0 0 3rem;
}

/* The actual blue info box */
.snq-home .snq-home-intro-box {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 2.4rem 3.6rem 3rem;
  background: var(--snq-blue-extra-lite);
  border: 1px solid var(--snq-border-lighter-blue);
  border-radius: 8px;
  text-align: left;
  box-sizing: border-box;
}

.snq-home .snq-home-intro-box p {
  margin: 0 0 10px;
  color: #3b3b3b;
  line-height: 1.55;
}

.snq-home .snq-home-intro-box p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Steps section
   ========================================================================== */

.snq-home .snq-steps-grid {
  /* right column width + background circle size */
  --photo-bg: 300px;

  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) var(--photo-bg);
  column-gap: 52px;
  row-gap: 34px;
  align-items: start;
}

/* Left steps list */
.snq-home .snq-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 32px; /* more vertical space between items */
}

/* Step “bubble” (circle behind text) */
.snq-home .snq-step {
  position: relative;
  min-height: 148px;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  box-sizing: border-box;
  text-align: center;
}

/* Smaller background circle, centered behind text */
.snq-home .snq-step::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 148px; /* smaller diameter */
  height: 148px; /* smaller diameter */
  transform: translate(-50%, -50%);
  border-radius: 999px;
  z-index: 0;
}

/* Per-step circle colors */
.snq-home .snq-step--teal::before {
  background: #bfeff6;
}
.snq-home .snq-step--mint::before {
  background: #d6f3c7;
}
.snq-home .snq-step--ice::before {
  background: #e7f6ff;
}

/* Text sits above the circle */
.snq-home .snq-step-text {
  position: relative;
  z-index: 1;
  max-width: 200px; /* was 170px */
  margin: 0 auto;
}

/* Each line gets translucent white backing (NO border radius) */
.snq-home .snq-step-title span,
.snq-home .snq-step-sub span {
  display: inline-block;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px 10px;
  border-radius: 0; /* per your request */
}

.snq-home .snq-step-title {
  font-weight: var(--snq-font-bold);
  color: #111;
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
}

/* Subtext: ALWAYS exactly 2 lines (clamped) */
.snq-home .snq-step-sub {
  margin: 8px 0 0;
  color: #4a4a4a;
  line-height: 1.3;
}

/* Clamp the sub text to exactly 2 lines and reserve space for 2 lines */
.snq-home .snq-step-sub span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;

  /* Reserve exactly 2 lines of height */
  line-height: 1.3;
  min-height: calc(2 * 1.3em);
}

/* Middle copy column */
.snq-home .snq-steps-copy {
  align-self: start;
  text-align: left;
}

.snq-home .snq-steps-copy h2 {
  margin: 3rem 0 1rem;
  font-size: 26px;
  line-height: 1.15;
  color: var(--snq-green-forest); /* matches mockup green-ish header */
  font-weight: var(--snq-font-bold);
}

.snq-home .snq-steps-copy p {
  margin: 0 0 18px;
  color: #4a4a4a;
  line-height: 1.55;
  max-width: 520px;
}

/* START SURVEY button (same shape/weight as Contact, but different colors) */
.snq-home .snq-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  padding: 1.4rem 2rem;
  margin-top: 1.6rem;
  border: 2px solid var(--snq-blue);
  background: var(--snq-green-accent);
  color: var(--snq-blue);
  font-weight: var(--snq-font-bold);
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: var(--snq-border-radius-sm);
  transition: all 180ms ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.snq-home .snq-start-btn:hover,
.snq-home .snq-start-btn:focus-visible,
.snq-home .snq-start-btn:active {
  border-color: var(--snq-green-accent);
  background: var(--snq-blue);
  color: var(--snq-green-accent);
}

/* Right image column (desktop) */
.snq-home .snq-steps-figure {
  align-self: start;
  justify-self: end;
  display: grid;
  place-items: center;
  box-sizing: border-box;

  /* remove these if you still have them on desktop */
  padding-right: 0;
  min-width: 0;
  margin-top: 3.6rem;
}

/* Photo */
.snq-home .snq-steps-photo {
  grid-area: 1 / 1;
  z-index: 1;

  /* KEY: keep the image from forcing overflow */
  width: min(200px, 100%);
  height: auto;
  display: block;
}

/* Background circle */
.snq-home .snq-steps-photo-bg {
  width: var(--photo-bg);
  height: var(--photo-bg);
  border-radius: 999px;
  background: #d6f3c7;
  grid-area: 1 / 1;
  z-index: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1120px) and (min-width: 981px) {
  .snq-home .snq-steps-grid {
    /* give you more breathing room between middle + right if you want */
    column-gap: 64px;

    /* keep the same structure, but allow the right col to shrink if needed */
    grid-template-columns: 270px minmax(0, 1fr) minmax(240px, 300px);
  }

  /* optional: pull the photo/circle slightly inward from the right edge */
  .snq-home .snq-steps-figure {
    padding-right: 24px;
  }
}

@media (max-width: 980px) {
  .snq-home .snq-steps-grid {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas:
      "steps copy"
      "figure figure";
    column-gap: 34px;
    row-gap: 26px;
    align-items: start;
  }

  .snq-home .snq-steps-list {
    grid-area: steps;
  }
  .snq-home .snq-steps-copy {
    grid-area: copy;
  }

  .snq-home .snq-start-btn {
    margin-bottom: 3.6rem;
  }

  .snq-home .snq-steps-figure {
    grid-area: figure;
    justify-self: center; /* centers the whole figure */
    padding-right: 0;
    min-width: 0;
    display: grid;
    place-items: center;
    margin-top: 20px;
  }

  .snq-home .snq-steps-photo {
    width: 200px; /* keep desktop size */
    height: auto;
  }
}

@media (max-width: 720px) {
  .snq-home .snq-home-content {
    padding-top: 34px;
  }

  .snq-home .snq-home-eyebrow {
    font-size: 18px;
  }

  .snq-home .snq-home-title {
    font-size: 28px;
  }

  /* FORCE single-column stacking */
  .snq-home .snq-steps-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "steps"
      "copy"
      "figure";
    gap: 26px;
    text-align: center;
  }

  /* Explicitly reset areas */
  .snq-home .snq-steps-list {
    grid-area: steps;
    justify-items: center;
  }

  .snq-home .snq-steps-copy {
    grid-area: copy;
    text-align: center;
  }

  .snq-home .snq-steps-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .snq-home .snq-steps-figure {
    grid-area: figure;
    justify-self: center; /* center the figure */
    min-width: 0; /* keep it from forcing width */
    padding-right: 0; /* ensure no right shove */
    place-items: center; /* center circle + image */
    margin-top: 18px; /* optional */
  }
}

/* HOME: force sticky header (something on home is overriding it to position: relative) */
.snq-home .snq-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: var(--snq-blue) !important;
}

.snq-home .snq-header-main {
  background: var(--snq-blue) !important;
}
