/* Homepage styles */

/* ===== HERO ===== */

.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media picture,
.hero__media img {
  width: 100%;
  height: 100%;
  display: block;
}
.hero__media img {
  object-fit: cover;
  object-position: center;
}

/* Scrim: the photo is bright and busy. Text needs a dark gradient behind it,
   heavier on the left where the copy sits, so white text stays readable.
   This is what makes the glass header above it read as glass, too. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.55) 38%,
    rgba(0,0,0,0.15) 68%,
    rgba(0,0,0,0.05) 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 1;
  /* Matches .svc-hero--photo .svc-hero__inner's exact pattern (extra
     space-6 beyond the bare header clearance) -- this hero is also a
     full-bleed photo hero and had been missing that same breathing room,
     leaving the eyebrow reading as flush against the glass header. */
  padding-top: calc(var(--header-height) + var(--space-6));
}

.hero__content {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.hero__eyebrow {
  color: var(--color-accent);
}

.hero__title {
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  color: #FFFFFF;
  margin: 0;
}

.hero__lead {
  font-size: var(--text-lead);
  line-height: var(--leading-snug);
  color: rgba(255,255,255,0.90);
  max-width: 42ch;
  margin: 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
}

/* The secondary button sits on a dark photo, so its default
   (transparent bg + blue border + blue text) would be low-contrast.
   Override to the on-dark treatment. */
.hero__call.btn-secondary {
  border-color: #FFFFFF;
  color: #FFFFFF;
}
.hero__call.btn-secondary:hover {
  background: #FFFFFF;
  color: var(--color-ink);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm) var(--gap-lg);
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero__badges li {
  position: relative;
  padding-left: var(--gap-lg);
  font-size: var(--text-small);
  font-weight: var(--weight-bold);
  color: #FFFFFF;
}
/* inline checkmark via ::before, no icon dependency */
.hero__badges li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background: var(--color-accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Focus ring: hero sits on a dark scrim. The global blue ring is low-contrast
   here. Use the white ring. */
.hero a:focus-visible {
  outline: 2px solid var(--focus-ring-dark);
  outline-offset: 3px;
}

/* MOBILE */
@media (max-width: 767px) {
  .hero {
    min-height: 560px;
  }
  .hero__content {
    max-width: none;
  }
  /* The technician sits in the right third of the source photo (a wide
     landscape crop). object-position:center (the desktop default) crops
     a tall mobile box down to the middle of the frame, which cuts him
     out almost entirely -- shift the crop to keep him in view. */
  .hero__media img {
    object-position: 78% 35%;
  }
  .hero__scrim {
    /* stronger, more even darkening on small screens where the copy
       overlays more of the image */
    background: linear-gradient(
      180deg,
      rgba(0,0,0,0.55) 0%,
      rgba(0,0,0,0.65) 100%
    );
  }
  .hero__actions .btn {
    width: 100%;
  }
  /* .hero__inner had no bottom padding at all (unlike .svc-hero__inner,
     which does) -- with .hero vertically centering its content, the
     trust badges (the last item) ended up sitting flush against the
     hero's bottom edge on short mobile viewports. */
  .hero__inner {
    padding-bottom: var(--space-6);
  }
}

/* ===== SECTION: TODO ===== */

.todo {
  background: var(--color-surface-tint);
  /* Top padding only -- see the shared rhythm note above for why.
     padding-bottom must be set explicitly to 0, not just omitted: this
     section also carries the .ip-section class for its container/measure
     styles, and .ip-section's own padding-block shorthand would otherwise
     leak its 128px bottom padding back in. */
  padding-top: var(--space-10);
  padding-bottom: 0;
}
@media (max-width: 767px) {
  /* .hero__inner carries its own padding-bottom on mobile (space-6=48px,
     see that comment) to clear the trust badges from the photo's edge.
     Canonical mobile section-to-section gap sitewide is 80px (space-10),
     achieved top-padding-only wherever nothing else is going on -- here
     the hero's justified 48px is the exception, so this gets the
     remainder (80-48=32px) instead of its own full 80px, so the combined
     total lands on exactly 80px like every other seam on the site. */
  .todo {
    padding-top: var(--space-4);
  }
}

/* ===== SECTION: SERVICES =====
   Ported 1:1 (geometry, shadow, grid, hover behavior) from a design spec
   the client supplied from a previous build. Brand colors (accent/brand
   instead of lime/cyan) and font-family (Roboto instead of Plus Jakarta
   Sans/Inter -- self-hosted-only is a hard rule for this theme) are swapped
   to match this site; every pixel value is kept as given. */

/* Top padding only, no bottom padding -- see note below. */
#services {
  padding-top: var(--space-10);
  background-color: #F1F5F9;
  background-image: radial-gradient(rgba(10, 10, 10, 0.08) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 1023px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--space-4);
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-2);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.service-card:hover {
  transform: translateY(-4px);
  /* Color only, same 1px width as rest -- changing width too causes a
     1px box-size jump on hover (looked like the border was "cutting off"
     against internal dividers). Translucent, not solid, for a lighter,
     less bold hover state. */
  border-color: rgba(245, 180, 26, 0.5);
  box-shadow: var(--shadow-3);
}

.service-card__ribbon {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--gap-sm);
  background: var(--color-accent);
  color: var(--color-ink);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-brand-wash);
  color: var(--color-brand);
}
.service-card__icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  margin: var(--space-3) 0 0;
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  color: var(--color-ink);
}

.service-card p {
  flex: 1;
  margin: var(--gap-xs) 0 0;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-body);
  max-width: none;
}

.service-card .learn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  margin-top: var(--space-3);
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}
.service-card .learn-link:hover {
  text-decoration: none;
  color: var(--color-brand-hover);
}
.service-card .learn-link .arrow {
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-out);
}
.service-card .learn-link:hover .arrow {
  transform: translateX(4px);
}
.service-card .learn-link:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.services-cta-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-8);
}
@media (max-width: 767px) {
  .services-cta-row {
    margin-top: var(--space-3);
  }
}

/* ===== SECTION: GALLERY =====
   Ported 1:1 (tile geometry, hover, and the full click-to-enlarge
   lightbox) from a gallery the client built on a previous site. Only the
   column count changes -- 3 instead of 4, since the homepage only teases
   6 photos and links out to the full gallery page. Colors/font are
   swapped to this site's brand + self-hosted Roboto. */

/* Was the exact same dotted #F1F5F9 fill as #services right above it --
   with no border or texture change between them, the two full-bleed
   sections read as one continuous block with no visible boundary. This
   reuses --color-surface-tint (already established two sections earlier
   on .todo) instead: distinct from #services without introducing a new
   color, and still a non-white backdrop so the white gallery tiles keep
   their contrast. */
/* padding-bottom added (was 0) -- background-color fills the FULL box,
   padding included, so "no bottom padding" didn't mean "no gap before
   .story", it meant the tint ran right up to the CTA button with zero
   breathing room before .story's card starts. */
#gallery {
  padding-top: var(--space-10);
  padding-bottom: var(--space-8);
  background: var(--color-surface-tint);
}
@media (max-width: 767px) {
  #gallery {
    padding-bottom: var(--space-4);
  }
}

/* .gallery-grid / .gallery-tile / .gallery-cta-row / #galleryLightbox* now
   live in global.css -- the full gallery page (inner-pages.css) needs them
   too, so they moved to the stylesheet both pages share instead of being
   duplicated. Only this section's own dotted background stays here since
   it's homepage-teaser-specific. */

/* .story / .story__* moved to global.css -- the about page (inner-pages.css)
   reuses the same founders block, so it lives in the stylesheet both pages
   share instead of being duplicated. */

/* ===== SECTION: REVIEWS =====
   Ported 1:1 (carousel mechanics, card geometry, avatar-fallback pattern)
   from a testimonial carousel the client built on a previous site. Colors
   are swapped to this site's brand (accent gold instead of lime, brand
   blue instead of teal); shadows reuse the exact values established for
   the Services cards, since the source explicitly deferred to those.
   Top padding only -- .steps is the last section now, not this one (see
   the rhythm note on .ip-section in global.css). */

#reviews {
  padding-top: var(--space-10);
  background-color: #F1F5F9;
  background-image: radial-gradient(rgba(10, 10, 10, 0.08) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
}

.tcarousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-card);
}

.tcarousel-track {
  display: flex;
  gap: var(--space-3);
  transition: transform var(--dur-slow) var(--ease-out);
  will-change: transform;
}

.t-card {
  flex: 0 0 calc((100% - 48px) / 3);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  padding: var(--space-5);
  min-height: 320px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-2);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.t-card:hover {
  box-shadow: var(--shadow-3);
  transform: translateY(-4px);
  /* Color only, same 1px width as rest -- see .service-card:hover note. */
  border-color: rgba(245, 180, 26, 0.5);
}

.t-card__quote-mark {
  position: absolute;
  top: 24px;
  left: 24px;
  color: var(--color-brand);
  opacity: 0.4;
}

.t-card .stars {
  font-size: var(--text-body);
  margin-top: var(--gap-md);
}

.t-card blockquote {
  flex: 1;
  margin: 0;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-body);
  font-style: italic;
}

.t-card__author {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  margin-top: auto;
  padding-top: var(--gap-md);
  border-top: var(--border-hairline) solid var(--color-border-soft);
}
.t-card__author img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}
.t-card__author strong {
  display: block;
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
  color: var(--color-ink);
}
.t-card__author span:not(.t-card__initials) {
  display: block;
  margin-top: 2px; /* optical */
  font-size: var(--text-small);
  color: var(--color-muted);
}

.t-card__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-ink);
  font-weight: var(--weight-bold);
  font-size: var(--text-body);
}

/* Read more / show less toggle -- not triggered by the current review set
   (none are long enough to need truncating), kept so a future long review
   can opt in via .review-short/.review-full without any new CSS/JS. */
.review-toggle {
  display: inline-block;
  margin-top: var(--gap-xs);
  padding: 0;
  background: none;
  border: none;
  color: var(--color-brand);
  font-weight: var(--weight-bold);
  font-size: var(--text-small);
  cursor: pointer;
}
.review-toggle:hover {
  text-decoration: underline;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-md);
  margin-top: var(--space-3);
}
.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-surface);
  border: var(--border-hairline) solid var(--color-border-soft);
  border-radius: var(--radius-full);
  color: var(--color-brand);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.carousel-btn:hover {
  box-shadow: var(--shadow-2);
  border-color: var(--color-accent);
}
.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
}
/* position:relative so the ::before hit-area extension below can anchor
   to this element without affecting its own visible box. */
.carousel-dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  background: var(--color-border-soft);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
}
.carousel-dot.is-active {
  width: 24px;
  background: var(--color-accent);
}

/* Previous attempt used box-sizing:content-box + background-clip to grow
   the tap target while keeping the dot visually small -- border-radius
   doesn't rescale to the clipped content-box the way that assumed, so
   the "dot" rendered as a large, badly-shaped blob instead. A transparent
   ::before extending past the button's own edges is the standard,
   well-supported way to enlarge a tap target without altering what's
   actually painted. */
@media (max-width: 767px) {
  .carousel-dot::before {
    content: "";
    position: absolute;
    inset: -12px;
  }
}

@media (max-width: 1023px) {
  .t-card {
    flex: 0 0 calc((100% - 24px) / 2);
    padding: var(--space-4);
  }
}
@media (max-width: 767px) {
  .tcarousel-track {
    gap: 0;
  }
  .t-card {
    flex: 0 0 100%;
    padding: var(--space-3);
    min-height: auto;
  }
}

/* ===== SECTION: STEPS (getting started, circled numerals + arrows) =====
   Sits between #reviews and .cta -- LIGHT background required: story
   (above) is dark and .cta (below) is dark, so this section must stay
   light or three dark blocks in a row would kill the page's tonal
   alternation. Top padding only, no bottom: .cta is the last section
   (see the rhythm note on .ip-section in global.css). Set explicitly
   rather than relying on .ip-section's own padding-block default
   (128px), which doesn't match the site's established 80px rhythm. */
.steps {
  padding-top: var(--space-10);
  padding-bottom: 0;
  background: var(--color-surface-soft);
}

.steps__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4);
}

.steps__item {
  flex: 1 1 0;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--gap-md);
}

/* CIRCLED NUMERAL -- a hand-drawn-looking ring (SVG path, not a CSS
   border-radius circle: the sketched imperfection is the whole point). */
.steps__badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.steps__badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.steps__num {
  position: relative;
  z-index: 1;
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--color-ink);
}

.steps__title {
  margin: 0;
  font-size: var(--text-h4);
  color: var(--color-ink);
}
.steps__text {
  margin: 0;
  font-size: var(--text-small);
  line-height: var(--leading-body);
  color: var(--color-body);
  max-width: none;
}

/* CONNECTING ARROWS -- decorative, aria-hidden, hidden on mobile */
.steps__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  width: 110px;
  margin-top: 34px; /* optical */
  color: var(--color-border);
}
.steps__arrow svg {
  width: 100%;
  height: auto;
}
/* the second arrow mirrors vertically so the two curves alternate.
   A modifier class, not :nth-of-type(2) -- .steps__list's children
   alternate .steps__item/.steps__arrow but both are <li>, so
   :nth-of-type counts position among ALL <li> siblings and would have
   selected the FIRST arrow (2nd <li> overall), not the second. */
.steps__arrow--flip svg {
  transform: scaleY(-1);
}

@media (max-width: 1023px) {
  .steps__list {
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
  }
  .steps__item {
    max-width: 420px;
  }
  .steps__arrow {
    display: none;
  }
}

/* The badge is the one decorative element on this page with no mobile
   size step-down at all (glows/watermarks elsewhere all shrink at 767px)
   -- it reads oversized next to the numeral/heading beside it, which do
   shrink via the token scale. */
@media (max-width: 767px) {
  .steps__badge {
    width: 64px;
    height: 64px;
  }
}

/* ===== SECTION: GUARANTEE (100% Happy or We'll Make It Right) =====
   Contained/rounded block, same treatment as .story/.cta (inset, glows
   clipped by overflow:hidden) -- an earlier full-bleed edge-to-edge
   version read as too wide/odd against those two. Icon sits small and
   centered above the heading like an eyebrow, not a large icon beside
   the copy, and everything is center-aligned. Top padding only, no
   bottom -- .cta supplies its own top padding for the gap beneath it,
   same rhythm rule as .story and every other section. */
.guarantee {
  padding-top: var(--space-10);
  padding-inline: var(--space-3);
}
@media (max-width: 767px) {
  .guarantee {
    padding-inline: var(--space-2);
  }
}

/* Same base wash as .story__block/.cta__block -- see the note there. */
.guarantee__block {
  position: relative;
  max-width: 1360px;
  margin-inline: auto;
  /* Blue straight into amber (near-complementary hues) reads as a muddy
     gray band where they meet -- an explicit white midpoint keeps both
     tints clean and gives the blend a natural third color instead. */
  background: linear-gradient(135deg, #CCDBEF 0%, #FFFFFF 50%, #FDF0D1 100%);
  border: var(--border-hairline) solid var(--color-border-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
}

.guarantee__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
}
.guarantee__glow--a {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -120px;
  background: rgba(0, 74, 173, 0.30);
}
.guarantee__glow--b {
  width: 520px;
  height: 520px;
  bottom: -200px;
  right: -140px;
  background: rgba(245, 180, 26, 0.46);
}
@media (max-width: 767px) {
  .guarantee__glow--a {
    width: 320px;
    height: 320px;
  }
  .guarantee__glow--b {
    width: 320px;
    height: 320px;
  }
}

.guarantee__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--gap-sm);
  max-width: 700px;
  margin-inline: auto;
  padding-block: var(--space-12);
}
@media (max-width: 767px) {
  .guarantee__inner {
    padding-block: var(--space-8);
  }
}

/* Small and centered above the heading -- functions like an eyebrow,
   not a large icon beside the copy. */
.guarantee__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--gap-xs);
  border-radius: 50%;
  background: var(--color-brand-wash);
  color: var(--color-brand);
}
.guarantee__icon svg {
  width: 28px;
  height: 28px;
}

.guarantee__title {
  margin: 0;
  font-size: var(--text-h1);
  line-height: var(--leading-tight);
  color: var(--color-ink);
}

.guarantee__text {
  margin: 0;
  font-size: var(--text-lead);
  line-height: var(--leading-body);
  color: var(--color-body);
  max-width: none;
}

