/* Styles for home/about (app/sections/).
   Every rule is scoped to #about-us, so none of it reaches other
   parts of the page.

   A background picture fills the section, darkened so the words read
   on it, and fading into the navy of the services section above and of
   Our Work below; it sets this section apart from its navy neighbours.
   (The picture is chosen in the dashboard; without one, the standard
   assets/img/home/about-bg.jpg is used.) The picture stands tall
   on the left with the badge (the number and its words, from the
   dashboard) on a gold block over its lower corner; the heading, text
   and links are on the right. */

#about-us {
  --about-ink: #060c22;
  --about-navy: #001e53;
  --about-gold: #f1ae22;
  --about-gold-hi: #ffc94d;
  --about-cream: #f3eee2;
  --about-sans: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --about-ease: cubic-bezier(0.16, 1, 0.3, 1);

  position: relative;
  padding: clamp(64px, 9vw, 128px) clamp(20px, 6vw, 96px);
  background: var(--about-ink);
  color: var(--about-cream);
  overflow: hidden;
}

/* ---------- Background picture ---------- */
#about-us .about-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#about-us .about-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Over the picture: a dark wash, heavier on the right where the words
   are, and the neighbouring sections' navy at the top and bottom edges. */
#about-us .about-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #00153d 0%, rgba(0, 21, 61, 0) 22%, rgba(0, 30, 83, 0) 78%, #001e53 100%),
    linear-gradient(90deg, rgba(6, 12, 34, 0.46) 0%, rgba(6, 12, 34, 0.72) 46%, rgba(6, 12, 34, 0.8) 100%);
}

#about-us *,
#about-us *::before,
#about-us *::after {
  box-sizing: border-box;
}

#about-us ::selection {
  background: var(--about-gold);
  color: var(--about-navy);
}

/* ---------- Two columns ---------- */
#about-us .about-container {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(40px, 7vw, 112px);
}

/* ---------- Picture ---------- */
#about-us .about-image-wrapper {
  position: relative;
}

#about-us .about-image {
  aspect-ratio: 4 / 5;
  max-height: 660px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--about-ink);
  box-shadow: 0 30px 60px -20px rgba(6, 12, 34, 0.75);
}

#about-us .about-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.6s var(--about-ease);
}

/* The picture settles into place as the section comes into view... */
#about-us .about-image-wrapper.visible .about-image img {
  transform: scale(1);
}

/* ...and leans in a little under the mouse */
#about-us .about-image-wrapper.visible:hover .about-image img {
  transform: scale(1.04);
  transition-duration: 0.9s;
}

/* ---------- Badge: the number, with its words beside it ---------- */
#about-us .image-badge {
  position: absolute;
  right: clamp(-36px, -3vw, -16px);
  bottom: clamp(24px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 20px 26px 20px 22px;
  border-radius: 16px;
  background: var(--about-gold);
  color: var(--about-navy);
  box-shadow: 0 18px 36px -14px rgba(6, 12, 34, 0.7);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease 0.35s, transform 0.9s var(--about-ease) 0.35s;
}

#about-us .about-image-wrapper.visible .image-badge {
  opacity: 1;
  transform: none;
}

#about-us .badge-number {
  font-size: clamp(3rem, 5vw, 4.25rem);
  line-height: 0.9;
  color: var(--about-navy);
  font-variant-numeric: tabular-nums;
}

#about-us .badge-text {
  font-family: var(--about-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
}

/* ---------- Words ---------- */
#about-us .about-heading {
  margin: 0 0 clamp(20px, 2.5vw, 32px);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff;
  text-wrap: balance;
}

/* The second part of the heading (the name) in gold, as "You" is in the
   services heading above */
#about-us .about-heading span {
  color: #feca16;
}

#about-us .about-text p {
  max-width: 58ch;
  margin: 0 0 1.1em;
  font-family: var(--about-sans);
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(243, 238, 226, 0.9);
  text-wrap: pretty;
}

#about-us .button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: clamp(24px, 3vw, 36px);
}

/* The gold button, as in the hero and the services section */
#about-us .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--about-gold);
  color: var(--about-navy);
  font-size: 1.0625rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(6, 12, 34, 0.45);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.35s var(--about-ease), box-shadow 0.25s ease;
}

#about-us .btn-primary svg {
  transition: transform 0.35s var(--about-ease);
}

#about-us .btn-primary:hover {
  background: var(--about-gold-hi);
  color: var(--about-navy);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(6, 12, 34, 0.5);
}

#about-us .btn-primary:hover svg {
  transform: translateX(4px);
}

#about-us .btn-primary:active {
  transform: translateY(0);
}

#about-us .btn-secondary {
  padding: 6px 0;
  font-family: var(--about-sans);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--about-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-underline-offset 0.2s ease, text-decoration-thickness 0.2s ease;
}

#about-us .btn-secondary:hover {
  color: var(--about-gold-hi);
  text-underline-offset: 8px;
}

#about-us a:focus-visible {
  outline: 2px solid var(--about-gold-hi);
  outline-offset: 4px;
}

/* ---------- Coming into view (home-about-section.js adds .visible) ---------- */
#about-us .animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 1s var(--about-ease);
}

#about-us .about-text.animate-on-scroll {
  transition-delay: 0.15s;
}

#about-us .animate-on-scroll.visible {
  opacity: 1;
  transform: none;
}

/* Without the script nothing is hidden (base.css shows the blocks); the
   picture and badge follow. */
html:not(.js) #about-us .about-image img {
  transform: none;
}

html:not(.js) #about-us .image-badge {
  opacity: 1;
  transform: none;
}

/* ---------- Tablets: still side by side, tighter ---------- */
@media (max-width: 1023px) {
  #about-us .about-container {
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
    gap: 48px;
  }

  #about-us .image-badge {
    right: -20px;
    padding: 16px 20px 16px 18px;
    gap: 12px;
  }
}

/* ---------- Phones: the picture, then the words ---------- */
@media (max-width: 767px) {
  #about-us .about-container {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  /* the words run the full width here, so the wash is even */
  #about-us .about-bg::after {
    background:
      linear-gradient(180deg, #00153d 0%, rgba(0, 21, 61, 0) 14%, rgba(0, 30, 83, 0) 86%, #001e53 100%),
      rgba(6, 12, 34, 0.76);
  }

  #about-us .about-image {
    aspect-ratio: 5 / 4;
    border-radius: 16px;
  }

  /* the badge sits on the picture's lower edge */
  #about-us .image-badge {
    right: 16px;
    bottom: -28px;
  }

  #about-us .badge-number {
    font-size: 2.75rem;
  }

  #about-us .badge-text {
    font-size: 0.875rem;
  }

  #about-us .btn-primary {
    min-height: 50px;
    padding: 0 24px;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #about-us *,
  #about-us *::before,
  #about-us *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  #about-us .about-image img,
  #about-us .about-image-wrapper.visible:hover .about-image img {
    transform: none;
  }
}
