/* Subpage hero (pattern bedri/page-hero): .page-hero*. Phase 5 (27 Oct).
   The frontpage hero's smaller sibling (sections/hero.css): the same navy, wrap, centred column and CTA row. The small
   line on top is a label, the big line (the page's H1, since 2 Nov on every subpage) a step smaller than the
   frontpage's headline; a lead paragraph under it. Styled by class only, so the tags don't change the look.
   No start states: it is static, so reduced motion and no-JS show the same page. Except with .has-intro (the builder's
   'intro' option, For sælgere): then hero.js runs the frontpage hero's intro on it, see the end of this file. */

.page-hero { padding: calc(76px + clamp(2.5rem, 8vh, 5rem)) 0 clamp(3rem, 7vh, 4.5rem); background: var(--bg); }
.page-hero-head { text-align: center; }

/* the small line on top (a paragraph; until 2 Nov the H1 on most subpages): set as an eyebrow */
.page-hero-kicker {
  margin: 0 auto clamp(.9rem, 2.2vh, 1.5rem);
  font-family: var(--font-text); font-weight: 600; font-size: clamp(.95rem, .9rem + .2vw, 1.05rem);
  letter-spacing: normal; line-height: 1.4; color: var(--accent-lit);
}

.page-hero-title {
  margin: 0 auto; max-width: 20ch;
  font-family: var(--font-display); font-weight: var(--display-wght); letter-spacing: var(--display-track);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: clamp(2.2rem, 1rem + 3.2vw, 4rem); line-height: 1.05;
  text-wrap: balance; /* no lone short word on the last line */
}
.page-hero-lead { margin: clamp(1rem, 2.5vh, 1.5rem) auto 0; max-width: 44ch; font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.page-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: clamp(1.75rem, 4.5vh, 2.5rem); }

/* optional frontpage parts (bedri_pg_page_hero's $opts; For sælgere, 30 Oct). The kicker with "Bedri ·" reads as the
   frontpage's (hero.css .hero-kicker): muted, the brand in ink. Not the class .hero-kicker itself: its start state
   (hidden until hero.js) is not scoped to .hero. */
.page-hero-kicker:has(.hk-brand) { font-weight: 500; color: var(--muted); }
.page-hero-kicker .hk-brand { color: var(--ink); font-weight: 600; }
.page-hero-kicker .hk-sep { margin: 0 .3em; }
/* the rating shares the kicker line (.hero-meta on the frontpage); the block's divider assumes this row */
.page-hero-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem 1.1rem; margin: 0 auto clamp(.9rem, 2.2vh, 1.5rem); }
.page-hero-meta .page-hero-kicker { margin: 0; }
/* the logo row (bedri/logo-marquee) at the bottom, full width as on the frontpage */
.page-hero.has-logos { padding-bottom: clamp(2.5rem, 6vh, 3.5rem); }

/* the marked phrase in the big line (the builder's 'mark', For sælgere: "ikke finder", from the hero prototype A, 30 Oct):
   a hand-drawn accent stroke under it. One inline-block, so the phrase never breaks over two lines and the stroke
   always sits under one line. The stroke is a pseudo-element (an SVG curve as a mask, tinted with --accent), so it is
   decorative and the heading's text is unchanged; --mark-draw (0 to 1) uncovers it from the left: hero.js draws it in,
   without the intro it is simply there. */
.page-hero-mark { --mark-draw: 1; position: relative; display: inline-block; }
.page-hero-mark::after {
  content: ""; position: absolute; left: -3%; bottom: -.12em; width: 106%; height: .28em; pointer-events: none;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 0 102 10' preserveAspectRatio='none'%3E%3Cpath d='M1,7 C30,3 70,3 99,6' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 0 102 10' preserveAspectRatio='none'%3E%3Cpath d='M1,7 C30,3 70,3 99,6' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  clip-path: inset(0 calc(100% - var(--mark-draw) * 100%) 0 0);
}

/* .has-photo: a picture under the buttons (bedri/page-hero's 'image', Om os 10 Nov, the approved Om os design): a
   900 px card that hangs half into the next section. The card is its own band after the hero (.page-hero-photo, as
   bedri/vsl's card over the seam): navy behind its upper half, the light surface (.surface-light's --bg) behind the
   lower half, so the light section after it needs no padding that knows the card's height. The design's overlap is
   the card's height / 2 (900 / 3.9 at aspect 1.95), which is what the seam at 50% gives at every width. */
.page-hero.has-photo { padding-bottom: 0; }
.page-hero-photo { padding-top: clamp(3rem, 6vw, 4.5rem); background: var(--bg); overflow-x: clip; } /* the light half's full bleed */
.page-hero-photo-inner { position: relative; }
.page-hero-photo-inner::before { content: ""; position: absolute; z-index: 0; top: 50%; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); background: #F1F2F4; }
.page-hero-figure { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.page-hero-figure img {
  display: block; width: 100%; height: auto; aspect-ratio: 1.95 / 1; object-fit: cover; object-position: 50% 30%;
  border-radius: 24px; background: var(--surface); box-shadow: 0 40px 80px -50px rgba(10, 16, 32, .7);
}

/* .has-intro: the frontpage hero's intro (hero.js). Hidden until it runs, only with .js and motion, as the frontpage's
   start states (hero.css, global.css); bedri-motion.js drops .js without GSAP or with reduced motion, so then all of
   it shows at once. The headline's words (.hw) have their start state in hero.css already. */
@media (prefers-reduced-motion: no-preference) {
  .js .page-hero.has-intro :is(.page-hero-kicker, .hero-tp, .page-hero-lead, .page-hero-actions .btn, .hero-logos) { opacity: 0; }
  .js .page-hero.has-intro .page-hero-title:not(:has(.hw)) { opacity: 0; }
  .js .page-hero.has-intro .page-hero-mark { --mark-draw: 0; }
}

@media (max-width: 899px) { .page-hero { padding-top: calc(76px + 2.5rem); } }
/* small phones: long Danish compounds must not push the H1 past the gutter */
@media (max-width: 419px) { .page-hero-title { overflow-wrap: break-word; hyphens: auto; } }
