/* home.css — homepage: hero, category tiles, rails, owner CTA.
   Tokens come from theme.css. */

/* ==========================================================================
   Hero
   ==========================================================================
   The old hero was a flat Google-blue gradient, which matched nothing in the
   brand. This one is built from the logo: deep navy ground, the gold rosette
   redrawn as a tiled interlocking-circle motif at low opacity, and a warm
   radial lift behind the headline so the type never sits on dead flat colour.
   The motif is an inline SVG data URI — no extra request, scales to any DPI. */
.home-hero {
  position: relative; isolation: isolate;
  background: var(--bm-navy-800);
  color: #fff;
  padding: clamp(48px, 8vw, 92px) var(--bm-pad) 0;
  overflow: hidden;
}
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23C79A1E' stroke-width='1'%3E%3Ccircle cx='0' cy='0' r='44'/%3E%3Ccircle cx='88' cy='0' r='44'/%3E%3Ccircle cx='0' cy='88' r='44'/%3E%3Ccircle cx='88' cy='88' r='44'/%3E%3Ccircle cx='44' cy='44' r='44'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 88px 88px;
  opacity: .14;
}
.home-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 460px at 50% -8%, rgba(42,167,189,.30), transparent 62%),
    linear-gradient(180deg, rgba(11,39,57,.10) 0%, rgba(11,39,57,.72) 78%, var(--bm-navy-900) 100%);
}

.home-hero-inner { max-width: 760px; margin: 0 auto; text-align: center; }

.home-kicker {
  font-size: var(--bm-text-xs); font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--bm-gold-400); margin: 0 0 var(--bm-4);
}
.home-hero h1 {
  font-size: var(--bm-text-4xl); color: #fff; margin: 0 0 var(--bm-4);
  line-height: 1.08; letter-spacing: -.022em; font-weight: 600;
  text-shadow: 0 2px 20px rgba(11,39,57,.4);
}
.home-sub {
  font-size: clamp(1rem, .95rem + .35vw, 1.15rem); line-height: 1.6;
  color: rgba(255,255,255,.86); margin: 0 auto var(--bm-8); max-width: 620px;
}

.home-search {
  max-width: 620px; margin: 0 auto var(--bm-5);
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: var(--bm-r-pill);
  padding-left: 20px; overflow: hidden;
  box-shadow: 0 18px 44px rgba(11,39,57,.34), 0 2px 8px rgba(11,39,57,.2);
}
.home-search svg { flex: none; color: var(--bm-faint); }
.home-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 17px 0; font: inherit; font-size: var(--bm-text-md); color: var(--bm-ink);
}
.home-search input::placeholder { color: var(--bm-faint); }
.home-search button {
  flex: none; align-self: stretch; border: 0; cursor: pointer;
  background: var(--bm-navy-700); color: #fff; padding: 0 28px;
  font: inherit; font-weight: 700; font-size: var(--bm-text-base);
  transition: background var(--bm-fast);
}
.home-search button:hover { background: var(--bm-teal-700); }

.home-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.home-chips-label {
  font-size: var(--bm-text-xs); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.5); margin-right: 2px;
}
.home-chips a {
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  padding: 7px 15px; border-radius: var(--bm-r-pill);
  text-decoration: none; font-size: var(--bm-text-base); font-weight: 500;
  backdrop-filter: blur(6px);
  transition: background var(--bm-fast), border-color var(--bm-fast);
}
.home-chips a:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.42); color: #fff; }

/* Stat strip sits on the hero's bottom edge — the credibility line. */
.home-stats {
  position: relative; z-index: 1;
  max-width: var(--bm-container); margin: clamp(40px, 6vw, 68px) auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.14);
}
.home-stats div {
  padding: var(--bm-5) var(--bm-3); text-align: center;
  border-right: 1px solid rgba(255,255,255,.14);
}
.home-stats div:last-child { border-right: 0; }
.home-stats b {
  display: block; font-family: var(--bm-font-display); font-size: 1.65rem;
  font-weight: 600; color: var(--bm-gold-400); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.home-stats span { display: block; font-size: var(--bm-text-sm); color: rgba(255,255,255,.62); margin-top: 3px; }
@media (max-width: 720px) {
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .home-stats div:nth-child(2) { border-right: 0; }
  .home-stats div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.14); }
  .home-stats b { font-size: 1.35rem; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.home-section {
  max-width: var(--bm-container); margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--bm-pad);
}
/* Alternating full-bleed tint gives the long homepage rhythm instead of one
   undifferentiated scroll of white. */
.home-section--alt {
  max-width: none; background: var(--bm-surface-3);
  border-block: 1px solid var(--bm-line);
}
.home-section--alt > * { max-width: var(--bm-container); margin-inline: auto; }

/* ==========================================================================
   Category tiles
   ========================================================================== */
.cat-grid {
  display: grid; gap: var(--bm-4);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.cat-tile {
  display: flex; align-items: stretch; gap: 0;
  background: var(--bm-surface); border: 1px solid var(--bm-line);
  border-radius: var(--bm-r-lg); overflow: hidden; text-decoration: none;
  box-shadow: var(--bm-shadow-xs);
  transition: box-shadow var(--bm-med), transform var(--bm-med), border-color var(--bm-med);
}
.cat-tile:hover { box-shadow: var(--bm-shadow); transform: translateY(-2px); border-color: #D8D2C7; }
.cat-tile-img { flex: none; width: 86px; position: relative; overflow: hidden; background: var(--bm-surface-3); }
.cat-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--bm-ease); }
.cat-tile:hover .cat-tile-img img { transform: scale(1.07); }
.cat-tile-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(18,59,94,.18), rgba(18,59,94,0));
}
.cat-tile-body { flex: 1; min-width: 0; padding: var(--bm-3) var(--bm-4); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.cat-tile-name {
  font-family: var(--bm-font-display); font-size: 1.02rem; font-weight: 600;
  color: var(--bm-navy-900); line-height: 1.2;
}
.cat-tile:hover .cat-tile-name { color: var(--bm-teal-700); }
.cat-tile-blurb {
  font-size: var(--bm-text-sm); color: var(--bm-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-tile-count {
  font-size: var(--bm-text-xs); font-weight: 700; color: var(--bm-gold-700);
  letter-spacing: .02em; margin-top: 3px; font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Owner CTA band
   ========================================================================== */
.home-owner {
  background: var(--bm-navy-800); color: #fff;
  padding: clamp(44px, 6vw, 72px) var(--bm-pad);
  position: relative; overflow: hidden; isolation: isolate;
}
.home-owner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23C79A1E' stroke-width='1'%3E%3Ccircle cx='0' cy='0' r='44'/%3E%3Ccircle cx='88' cy='0' r='44'/%3E%3Ccircle cx='0' cy='88' r='44'/%3E%3Ccircle cx='88' cy='88' r='44'/%3E%3Ccircle cx='44' cy='44' r='44'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 88px 88px; opacity: .1;
}
.home-owner-inner {
  max-width: var(--bm-container); margin: 0 auto;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
}
.home-owner h2 { color: #fff; margin: 0 0 var(--bm-3); font-size: var(--bm-text-2xl); }
.home-owner p { color: rgba(255,255,255,.82); margin: 0 0 var(--bm-6); max-width: 52ch; }
.home-owner-actions { display: flex; gap: var(--bm-3); flex-wrap: wrap; }
.home-owner-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.32); }
.home-owner-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); color: #fff; }
.home-owner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--bm-3); }
.home-owner-list li {
  position: relative; padding-left: 30px;
  font-size: var(--bm-text-base); color: rgba(255,255,255,.9); line-height: 1.5;
}
.home-owner-list li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bm-gold-500);
  /* Tick drawn with a mask so it inherits the gold and needs no extra markup. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
}
@media (max-width: 820px) {
  .home-owner-inner { grid-template-columns: 1fr; }
}

/* On a phone the eleven category tiles otherwise stack into ~1,360px of
   scrolling before any content. Dropping the blurb and tightening the row
   keeps the whole set to roughly one screen and a half. */
@media (max-width: 560px) {
  .cat-grid { gap: 10px; }
  .cat-tile-img { width: 64px; }
  .cat-tile-body { padding: 10px var(--bm-3); }
  .cat-tile-blurb { display: none; }
  .cat-tile-name { font-size: .97rem; }
}
