/* ==========================================================================
   INSTACAN — HOME
   The homepage hero and the brand marquee. Loads after css/style.css and only
   adds; the header, buttons and every token come from there, so the blog and
   the homepage cannot drift apart.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens the hero panel needs.

   These live here rather than in style.css because nothing else on the site
   uses them — they describe one dark card on one page. They were lost once
   already, when hero B was promoted out of its own stylesheet and the rules
   came across without the :root block that defined them; an undefined custom
   property silently resolves to nothing, so the panel simply lost its
   background and the white text was left on a white page with no error
   anywhere. Keeping them beside the only rules that read them is what stops
   that happening again.
   -------------------------------------------------------------------------- */
:root {
  --b-panel:      #12100C;              /* the dark hero panel */
  --b-glass:      rgba(255,255,255,.07);/* the proof card sitting on it */
  --b-glass-line: rgba(255,255,255,.13);
}

/* ==========================================================================
   HERO B
   Two panels of equal height: a dark card on the left, a photograph on the
   right. The left panel is a flex column so the proof card is pushed to its
   bottom edge however tall the headline runs.
   ========================================================================== */

/* The bar is fixed, so it is out of flow: giving the hero the remaining
   viewport height makes the two together fill exactly one screen. min-height
   rather than height, so a short window or long content can still push down
   instead of clipping. --gap-b is the breathing room under the bar and below
   the panels; both use it so the hero sits optically centred in the gap. */
.bhero {
  --gap-b: var(--top-gap);
  max-width: var(--container); margin-inline: auto;
  padding: calc(var(--bar-h) + var(--top-gap)) var(--page-pad) var(--top-gap);
  min-height: 100svh;
  display: flex;
}
.bhero__grid {
  flex: 1; display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr);
  gap: var(--gap-b); align-items: stretch;
}

/* --- left: the dark panel --- */
.bhero__panel {
  position: relative; overflow: hidden;
  border-radius: var(--r-md);
  background: var(--b-panel, #12100C);
  padding: clamp(1.75rem, 2.8vw, 3rem) clamp(1.5rem, 2vw, 1.9rem) clamp(1.25rem, 1.8vw, 1.9rem) clamp(1.75rem, 2.8vw, 2.75rem);
  min-height: clamp(440px, 38vw, 550px);   /* a floor, not a height — the grid stretches it */
  isolation: isolate;
}
/* The crest, blown up and dimmed to an emboss. Non-figurative, so it reads as
   texture rather than a second photograph competing with the one on the right. */
.bhero__panel-bg {
  position: absolute; z-index: -1;
  right: -12%; bottom: -14%;
  width: min(78%, 620px); height: auto;
  opacity: .09;
  filter: grayscale(1) brightness(2.6);
  pointer-events: none;
}
/* A warm lift out of the top-left corner keeps the flat black from going dead. */
.bhero__panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 90% at 0% 0%, rgba(192,146,39,.16), transparent 58%);
}
.bhero__inner {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between; gap: clamp(1.75rem, 3.5vw, 2.75rem);
}

.bhero__eyebrow {
  font-size: var(--fs-label); font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold-lift);
  margin-bottom: .85rem;
}
.bhero__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 1.3rem + 2.3vw, 3.15rem);
  line-height: 1.12; letter-spacing: -.015em;
  color: #fff; max-width: 17ch;
}
/* The rotating word keeps the treatment it has on version A. */
.bhero__title .rotator__item { color: var(--gold-lift); }

.bhero__row {
  margin-top: clamp(1rem, 1.6vw, 1.4rem);
  display: flex; flex-direction: column; align-items: flex-start; gap: clamp(1.1rem, 1.8vw, 1.5rem);
}
.bhero__lede {
  max-width: 48ch;
  font-size: var(--fs-sm); line-height: 1.7;
  color: rgba(255,255,255,.72);
}

/* --- the proof card on the panel's bottom edge --- */
.bcard {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: var(--r-md);
  background: var(--b-glass, rgba(255,255,255,.07));
  border: 1px solid var(--b-glass-line, rgba(255,255,255,.13));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.bcard__img {
  width: clamp(84px, 8vw, 110px); aspect-ratio: 1; flex: none;
  border-radius: var(--r-sm); overflow: hidden; background: rgba(255,255,255,.06);
}
.bcard__img img { width: 100%; height: 100%; object-fit: cover; }
.bcard__body { min-width: 0; }
.bcard__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); line-height: 1.25; color: #fff;
}
.bcard__copy {
  margin-top: .3rem; font-size: var(--fs-xs); line-height: 1.6;
  color: rgba(255,255,255,.62);
}
.bcard__rating { margin-top: .55rem; display: flex; align-items: center; gap: .6rem; }
.bcard__rating .stars svg { width: 14px; height: 14px; fill: var(--gold-lift); }
.bcard__rating b { font-size: var(--fs-sm); font-weight: 500; color: #fff; }

/* --- right: the photograph --- */
/* The photograph is taken out of flow so its intrinsic height cannot set the
   grid row — otherwise a short window would be pushed past one screen. */
.bhero__media {
  position: relative; margin: 0; min-height: 0;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--cream-2);
}
/* <picture> is a wrapper the layout must not see: display:contents takes it out
   of the box tree so the <img> inside stays the absolutely-positioned child of
   .bhero__media that the rule below expects. */
.bhero__media picture { display: contents; }
.bhero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }


@media (max-width: 1180px) {  /* Stacked, the panel and the photo cannot share one screen — let the hero
     grow to its content instead of squeezing both into 100svh. */
  .bhero { min-height: 0; display: block; }
  .bhero__grid { grid-template-columns: 1fr; }
  .bhero__panel { min-height: 0; }
  .bhero__media { min-height: clamp(300px, 48vw, 460px); }
}
@media (max-width: 640px) {  .bcard { flex-direction: column; align-items: flex-start; }
  .bcard__img { width: 100%; aspect-ratio: 16 / 9; }
}
