/* ==========================================================================
   TechAbbot – homepage hero
   Markup: partials/home-hero.html (generated by tools/build-hero.js)

   The background is three layers, top to bottom:
     1. a deep navy fade: near solid behind the text, lighter over the photo
     2. a blue-to-green brand tint over the whole photo
     3. the photo

   The background-image rule that stacks them is generated into the page
   <head> by the build, so the image paths live only in data/home-hero.js.

   below 768px  text on top, photo revealed in a band along the bottom
   768px and up text on the left, photo revealed on the right
   ========================================================================== */

.hero {
  /* Height of the strip at the bottom where the photo shows through. */
  --hero-reveal: clamp(170px, 46vw, 300px);
  --hero-tint: linear-gradient(90deg, rgba(11, 109, 145, 0.35), rgba(38, 150, 94, 0.3));
  --hero-fade: linear-gradient(
    180deg,
    rgba(8, 24, 36, 0.96) 0,
    rgba(8, 24, 36, 0.96) calc(100% - var(--hero-reveal) - 16px),
    rgba(8, 24, 36, 0.4) calc(100% - var(--hero-reveal) * 0.5)
  );

  padding-block: 40px calc(var(--hero-reveal) + 24px);
  background-color: var(--c-dark);
  color: var(--c-on-dark);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
}

.hero :focus-visible { outline-color: #fff; }

.hero__tagline,
.hero__title,
.hero__text,
.hero__highlights { margin: 0; }

.hero__tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-blue-bright);
  font-size: clamp(0.8125rem, 0.76rem + 0.25vw, 0.9375rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__tagline::before {
  content: "";
  flex: none;
  width: 32px;
  height: 2px;
  background: var(--gradient-logo-bright);
}

.hero__title {
  margin-top: 16px;
  font-size: clamp(1.875rem, 1.2rem + 2.9vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Same green-to-blue sweep as the TechAbbot logo emblem, clipped to the text.
   Lighter tints are used so it reads on the dark background. The solid
   colour stays as the fallback where text clipping is unsupported. */
.hero__accent { color: var(--c-blue-bright); }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__accent {
    background: var(--gradient-logo-bright);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    -webkit-text-fill-color: transparent;
  }
}

.hero__text {
  margin-top: 20px;
  color: var(--c-on-dark-muted);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Outline button on the dark background. */
.hero .btn--secondary {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.75);
}

.hero .btn--secondary:hover { background: rgba(255, 255, 255, 0.14); }

.hero .btn--primary { box-shadow: 0 10px 24px -12px rgba(86, 193, 234, 0.7); }

/* Narrow phones: full-width, stacked buttons. */
@media (max-width: 479.98px) {
  .hero__actions .btn { flex: 1 1 100%; }
}

.hero__highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

.hero__highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Check mark in the brand green. */
.hero__highlights li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 11px;
  margin: -3px 4px 0;
  border: solid var(--c-green-bright);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Side-by-side layout ----------------------------------------------------- */

@media (min-width: 768px) {
  .hero {
    --hero-fade: linear-gradient(
      90deg,
      rgba(8, 24, 36, 0.95) 0,
      rgba(8, 24, 36, 0.95) 60%,
      rgba(8, 24, 36, 0.6) 82%,
      rgba(8, 24, 36, 0.4) 100%
    );

    display: flex;
    align-items: center;
    padding-block: clamp(40px, 5vw, 72px);
    background-position: right center;
  }

  .hero__content { max-width: 62%; }

  .hero__highlights {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 28px;
  }
}

@media (min-width: 1100px) {
  .hero {
    --hero-fade: linear-gradient(
      90deg,
      rgba(8, 24, 36, 0.95) 0,
      rgba(8, 24, 36, 0.95) 46%,
      rgba(8, 24, 36, 0.6) 66%,
      rgba(8, 24, 36, 0.38) 100%
    );

    /* Fill the first screen under the 77px header, within sensible limits. */
    min-height: clamp(520px, calc(100vh - 77px), 720px);
  }

  .hero__content { max-width: min(700px, 56%); }

  .hero__highlights {
    gap: 10px 22px;
    font-size: 0.875rem;
  }
}

/* Short laptop screens: tighten the spacing so the whole hero fits the first view. */
@media (min-width: 1100px) and (max-height: 760px) {
  .hero { padding-block: 28px; }
  .hero__title { margin-top: 12px; font-size: 2.875rem; }
  .hero__text { margin-top: 16px; font-size: 1.0625rem; }
  .hero__actions { margin-top: 22px; }
  .hero__highlights { margin-top: 22px; padding-top: 16px; }
}
