/* ─── Creative Portrait shared brand components ──────────────────────────
 *
 * Single source of truth for the reusable UI pieces that appear across
 * every public landing-page surface (offer page, book-call, enquire,
 * /lp/* campaign pages, guide page). Each page links to this file once
 * instead of duplicating the CSS inline.
 *
 * Why it exists: before this stylesheet, the `.brand-bar`, `.scarcity-bar`
 * and `.rv-card` blocks lived in 5 different files in 5 slightly drifting
 * copies. One tweak required 5 edits. The drift caused brand-integrity
 * issues that this stylesheet now prevents.
 *
 * Scoped tokens use the `--cp-` prefix so they can't collide with the
 * host page's own `:root` variables (the offer page uses `--ink`, the LPs
 * use `--ink` and `--forest`, etc — both stay untouched).
 * ─────────────────────────────────────────────────────────────────────── */

:root {
  /* Canonical Creative Portrait palette — the brand floor. Host pages may
   * declare lighter/darker aliases; these are the never-change baseline. */
  --cp-ink:      #2A2722;   /* primary text */
  --cp-ink-mid:  #5A554C;   /* secondary text */
  --cp-ink-soft: #857F68;   /* muted text */
  --cp-paper:    #FCFAF2;   /* raised surfaces */
  --cp-mist:     #F0EBDB;   /* primary background */
  --cp-hair:     #E2DBC8;   /* hairline borders */
  --cp-forest:   #2F4A33;   /* signature accent */
  --cp-deep:     #1E2F22;   /* solid dark sections */
  --cp-gold:     #D4A437;   /* review stars only */
  --cp-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
             "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ─── Brand bar (every landing page) ─────────────────────────────────────
 * Sticky ~58px band at the top. Logo left, 5-star or tag right.
 * Two variants: `.brand-bar` (light Oat background) and `.brand-bar--dark`
 * (Deep Forest background, light logo variant). The host page picks the
 * variant by setting one or the other class.
 * ───────────────────────────────────────────────────────────────────── */
.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(18px, 4vw, 36px);
  background: rgba(252, 250, 242, 0.96);
  border-bottom: 1px solid var(--cp-hair);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
}
.brand-bar--dark {
  background: var(--cp-deep);
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  position: static;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.brand-bar-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
/* Logo integrity: width is the only sizing dimension; height stays auto so
 * SVG aspect-ratio is preserved. Any inline override of these is rejected
 * by the brand-integrity validator on save. */
.brand-bar-logo img {
  display: block;
  height: auto;
  width: clamp(110px, 14vw, 150px);
  max-width: 150px;
}
.brand-bar--dark .brand-bar-logo img {
  width: clamp(100px, 13vw, 140px);
}
.brand-bar-stars {
  color: var(--cp-gold);
  font-size: 15px;
  letter-spacing: 0.06em;
  font-family: var(--cp-font);
}
.brand-bar--dark .brand-bar-stars {
  font-size: 14px;
}
@media (max-width: 480px) {
  .brand-bar-stars { font-size: 13px; }
}

/* ─── Scarcity bar (campaign LPs) ────────────────────────────────────────
 * Sticky dark band that sits below the brand-bar (or top of page when no
 * brand-bar present). One-line urgent message + a single inline link.
 * ───────────────────────────────────────────────────────────────────── */
.scarcity-bar {
  background: var(--cp-deep);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  position: sticky;
  top: 0;
  z-index: 200;
  font-family: var(--cp-font);
}
.scarcity-bar strong { font-weight: 600; color: #fff; }
.scarcity-bar a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.scarcity-bar .pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8FA889;
  margin-right: 7px;
  vertical-align: middle;
  animation: cp-glow 1.8s ease-in-out infinite;
}
@keyframes cp-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 90, 78, 0.5); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 5px rgba(255, 90, 78, 0); }
}

/* ─── Review cards (offer page + LP review blocks) ───────────────────────
 * Three card variants share the same chassis:
 *   .rv-card            — text review (Google, Facebook)
 *   .rv-card--video     — embedded YouTube/Vimeo testimonial
 *   .rv-card--featured  — bigger card for a single hero review
 * ───────────────────────────────────────────────────────────────────── */
.rv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 767px) {
  .rv-grid { grid-template-columns: 1fr; }
}
.rv-card {
  background: var(--cp-paper);
  border: 1px solid var(--cp-hair);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--cp-font);
}
.rv-stars {
  color: var(--cp-gold);
  font-size: 15px;
  letter-spacing: 0.04em;
}
.rv-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--cp-ink);
  flex: 1 1 auto;
}
.rv-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--cp-hair);
  padding-top: 11px;
}
.rv-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cp-mist);
  color: var(--cp-ink);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  letter-spacing: 0.01em;
}
.rv-meta { min-width: 0; flex: 1 1 auto; }
.rv-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cp-ink);
  line-height: 1.2;
}
.rv-date {
  font-size: 11px;
  color: var(--cp-ink-soft);
  margin-top: 2px;
}
.rv-platform-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 3px;
  opacity: 0.7;
}

/* ─── Video review card ─────────────────────────────────────────────────
 * YouTube/Vimeo embed. The poster image loads instantly; the iframe only
 * mounts after the user clicks play (privacy + performance — no GET to
 * YouTube on initial page paint).
 * ───────────────────────────────────────────────────────────────────── */
.rv-card--video {
  padding: 0;
  overflow: hidden;
  background: var(--cp-deep);
  border: 0;
}
.rv-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.rv-video-frame img,
.rv-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.rv-video-frame img { object-fit: cover; }
.rv-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(252, 250, 242, 0.96);
  color: var(--cp-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.rv-video-play::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 18px solid currentColor;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 5px;
}
.rv-card--video .rv-foot {
  border-top: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 11px 14px;
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
}
.rv-card--video .rv-name { color: #fff; }
.rv-card--video .rv-date { color: rgba(255, 255, 255, 0.7); }
.rv-card--video .rv-avatar {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Reduced motion — kill the pulse animation. */
@media (prefers-reduced-motion: reduce) {
  .scarcity-bar .pulse-dot { animation: none; }
}

/* ─── Standard LP topbar ──────────────────────────────────────────────────
 * The canonical header used by every Creative Portrait landing page.
 * Logo top-left, optional nav top-right, sticky to viewport top.
 *
 * Usage (in any LP HTML):
 *
 *   <header class="lp-topbar">
 *     <div class="lp-topbar-inner">
 *       <a href="https://www.creativeportrait.net.au" class="lp-brand"
 *          aria-label="Creative Portrait Photography">
 *         <img src="/logo.svg" alt="Creative Portrait Photography">
 *       </a>
 *       <nav class="lp-topbar-nav">
 *         <a href="/pricing">Pricing</a>
 *         <a href="/style-guide">Style guide</a>
 *         <a href="/book-now" class="lp-cta">Book now</a>
 *       </nav>
 *     </div>
 *   </header>
 *
 * Anti-distortion guarantee: the logo image is sized by HEIGHT only
 * (32px desktop, 26px mobile). `width:auto` preserves the natural
 * aspect ratio defined by the SVG's viewBox. There is no `clamp()`
 * on width — that was the source of the old stretching on the
 * booking pages.
 *
 * Customisation: a host page can override `--lp-topbar-bg` /
 * `--lp-topbar-logo-h` in its own :root to vary the colour or logo
 * height without forking this block.
 */
:root {
  --lp-topbar-bg:        var(--cp-paper, #FCFAF2);
  --lp-topbar-border:    var(--cp-hair, #E2DBC8);
  --lp-topbar-logo-h:    44px;
  --lp-topbar-logo-h-sm: 36px;
  --lp-topbar-link:      var(--cp-ink-mid, #5A554C);
  --lp-topbar-link-hover:var(--cp-forest, #2F4A33);
  --lp-topbar-cta-bg:    var(--cp-forest, #2F4A33);
  --lp-topbar-cta-fg:    #FAF6EA;
}
.lp-topbar {
  background: var(--lp-topbar-bg);
  border-bottom: 1px solid var(--lp-topbar-border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  font-family: var(--cp-font, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif);
}
.lp-topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lp-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
/* IMG inside .lp-brand: HEIGHT only, width:auto.
 * This is the entire "no distortion" guarantee — never set both
 * width and height, never use `clamp(width)`. The browser will draw
 * the SVG at its intrinsic aspect ratio from the viewBox. */
.lp-brand img {
  display: block;
  height: var(--lp-topbar-logo-h);
  width: auto;
  max-width: none;
}
.lp-topbar-nav {
  display: flex;
  gap: 22px;
  font-size: 13px;
  align-items: center;
}
.lp-topbar-nav a {
  color: var(--lp-topbar-link);
  text-decoration: none;
  transition: color .15s;
}
.lp-topbar-nav a:hover { color: var(--lp-topbar-link-hover); }
.lp-topbar-nav a.lp-cta {
  background: var(--lp-topbar-cta-bg);
  color: var(--lp-topbar-cta-fg);
  padding: 9px 18px;
  border-radius: 980px;
  font-weight: 500;
  transition: opacity .15s;
}
.lp-topbar-nav a.lp-cta:hover { color: var(--lp-topbar-cta-fg); opacity: 0.88; }
@media (max-width: 720px) {
  .lp-topbar { padding: 11px 18px; }
  .lp-brand img { height: var(--lp-topbar-logo-h-sm); }
  .lp-topbar-nav { gap: 14px; font-size: 12px; }
  .lp-topbar-nav a.lp-cta { padding: 7px 14px; }
}
