/* Brand assets layer — loads after the built Astro stylesheets so these win.
   Covers the header lockup, the hero logo watermark, and the owner section
   on /about. Cache-busted by scripts/stamp-assets.mjs. */

/* ---------- Header lockup: badge mark + typeset wordmark ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.brand img {
  height: 54px;
  width: auto;
  display: block;
  flex: none;
}
.brand__word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.015em;
  color: var(--navy);
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 5px;
}

/* The wordmark is wider than the old flat logo, so keep nav items on one line. */
.nav__list > li > a { white-space: nowrap; }

@media (max-width: 620px) {
  .brand img { height: 46px; }
  .brand__name { font-size: 1.02rem; }
  .brand__sub { font-size: 0.62rem; letter-spacing: 0.2em; margin-top: 4px; }
}
@media (max-width: 420px) {
  .brand__word { display: none; }
}

/* ---------- Hero: heavier scrim on the copy side + logo watermark ---------- */
.hero__bg {
  background:
    linear-gradient(
      100deg,
      #061729 0%,
      #071b31 34%,
      rgba(9, 30, 58, 0.9) 56%,
      rgba(10, 34, 64, 0.62) 100%
    ),
    /* hero.jpg is portrait, so `cover` scales it to the box width and leaves no
       horizontal slack — a percentage position would be a no-op. The explicit
       offset pushes the photo's two figures out from behind the headline and
       into the right half; the gap it opens on the left falls under the opaque
       end of the scrim, with the flat navy behind it as a backstop. */
      url(/images/hero.jpg) 17vw center / cover no-repeat #0a2240;
}

/* .hero__inner's `padding` shorthand zeroes out .container's padding-inline, so
   the hero copy sits 22px off from the header at 1440 and runs flush into the
   viewport edge below 1200. Put the gutter back. */
.hero__inner { padding-inline: 22px; }

.hero__copy { position: relative; }
.hero__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  /* Anchored to the left edge of the copy column and pulled further left so the
     badge sits in the outer third and bleeds off the viewport. */
  left: 0;
  transform: translate(-45%, -50%);
  width: clamp(320px, 118%, 680px);
  aspect-ratio: 824 / 963;
  background: url(/images/logo.png) no-repeat center / contain;
  /* Desaturated so the badge's gold doesn't compete with the gold accent type. */
  filter: grayscale(0.45);
  opacity: 0.08;
  pointer-events: none;
}

@media (max-width: 940px) {
  /* Single-column layout: the photo no longer sits to the right, so keep the
     scrim even across the whole hero. */
  .hero__bg {
    background:
      linear-gradient(160deg, #061729 0%, #071b31 45%, rgba(10, 34, 64, 0.86) 100%),
      url(/images/hero.jpg) center / cover no-repeat;
  }
  .hero__copy::before {
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.07;
    width: clamp(280px, 90%, 460px);
  }
}

/* ---------- Stock photo attribution ---------- */
/* The water-heater spotlight photo is CC BY-SA 3.0, which requires a visible
   credit. Kept small and muted so it reads as a caption, not as body copy.
   The badge overhangs the image's bottom-left corner, so the credit is aligned
   right to stay clear of it. */
.photo-credit {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: right;
}
.photo-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.photo-credit a:hover { color: var(--ink); }

/* Matches the 860px breakpoint in index.B5UaDGaE.css where .spotlight goes
   single-column and the badge moves inside the image. */
@media (max-width: 860px) {
  .photo-credit { text-align: center; }
}

/* ---------- About: owner section ---------- */
.story--reverse { grid-template-columns: 1.1fr 0.9fr; }
.story--reverse .story__media { order: 2; }
.story--reverse .story__copy { order: 1; }
.story--reverse .story__badge { right: auto; left: -18px; }

.owner-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 14px;
}
.owner-name strong {
  display: block;
  font-size: 1.12rem;
  color: var(--ink);
}

@media (max-width: 860px) {
  .story--reverse { grid-template-columns: 1fr; }
  .story--reverse .story__media { order: 1; }
  .story--reverse .story__copy { order: 2; }
  .story--reverse .story__badge { left: 16px; }
}
