/* ============================================================
   BRAND PAGES — shared layout for the 54 identity boards
   Inherits tokens from styles.css (--bg, --ink, --accent, --line)
   ============================================================ */

.bp-hero {
  min-height: 52vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px; padding: 80px 24px 56px;
}
.bp-hero-logo {
  max-width: min(520px, 78vw);
  max-height: 40vh;
  /* flat: the hero background is sampled from the logo file itself, so the JPG blends seamlessly */
  border-radius: 0;
  box-shadow: none;
}
.bp-hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.25em; opacity: 0.75;
}

.bp-wrap { max-width: 880px; margin: 0 auto; padding: 40px var(--gutter, 24px) 100px; }
.bp-crumbs { margin-bottom: 36px; }

.bp-title {
  font-weight: 700;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.95; letter-spacing: -0.04em;
  color: var(--ink); margin: 0 0 24px;
}
.bp-intro {
  font-size: 17px; line-height: 1.7; color: var(--ink-mute);
  max-width: 640px; margin: 0 0 64px;
}

.bp-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin: 56px 0 18px;
}

.bp-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.bp-swatch {
  aspect-ratio: 1 / 1.35; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: flex-end; padding: 10px;
}
.bp-swatch span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.06em;
}

.bp-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bp-app {
  border-radius: 14px; border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 26px 14px;
  aspect-ratio: 1 / 0.9; overflow: hidden;
}
.bp-app span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em;
  color: rgba(242,237,226,0.85);
  background: rgba(11,11,10,0.55);
  padding: 4px 9px; border-radius: 999px;
}
.bp-card img { width: 72%; border-radius: 8px; box-shadow: 0 14px 34px rgba(0,0,0,0.35); transform: rotate(-4deg); }
.bp-icon img { width: 42%; border-radius: 22%; box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.bp-avatar img { width: 42%; border-radius: 50%; box-shadow: 0 12px 28px rgba(0,0,0,0.35); }

.bp-pattern {
  height: 220px; border-radius: 14px; border: 1px solid var(--line);
  background-size: 96px; background-repeat: repeat;
  image-rendering: auto; opacity: 0.9;
}

.bp-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 72px;
}
.bp-nav-link {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; text-decoration: none;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.15s ease;
}
.bp-nav-link:hover, .bp-nav-link:focus-visible { border-color: var(--accent); outline: none; }
.bp-nav-next { text-align: right; }
.bp-nav-link .dir {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em; color: var(--ink-faint);
}
.bp-nav-link .nm { color: var(--ink); font-size: 15px; }
.bp-nav-link:hover .nm { color: var(--accent); }

.bp-cta { text-align: center; margin-top: 96px; }
.bp-cta h3 {
  font-size: clamp(26px, 4vw, 40px); font-weight: 700;
  letter-spacing: -0.03em; color: var(--ink); margin: 0 0 10px;
}
.bp-cta h3 em { color: var(--accent); font-style: italic; }
.bp-cta p { color: var(--ink-mute); font-size: 14px; margin: 0 0 24px; }
.bp-cta-btn {
  display: inline-block; background: var(--accent); color: #0B0B0A;
  font-weight: 600; font-size: 14px; text-decoration: none;
  padding: 14px 26px; border-radius: 999px;
}
.bp-cta-btn:hover { filter: brightness(1.08); }

@media (max-width: 640px) {
  .bp-swatches { grid-template-columns: repeat(3, 1fr); }
  .bp-apps { grid-template-columns: 1fr; }
  .bp-app { aspect-ratio: auto; min-height: 180px; }
  .bp-nav { grid-template-columns: 1fr; }
  .bp-nav-next { text-align: left; }
}

/* ================= v2 — interactive modules ================= */
.bp-swatch { cursor: pointer; border: 0; text-align: left; transition: transform 160ms ease; position: relative; }
.bp-swatch:hover { transform: translateY(-3px); }
.bp-swatch .rgb { display: block; font-size: 8.5px; opacity: 0.7; }
.bp-swatch::after { content: 'COPY'; position: absolute; top: 8px; right: 8px; font-family: 'JetBrains Mono', monospace; font-size: 8px; letter-spacing: 0.12em; opacity: 0; transition: opacity 140ms; }
.bp-swatch:hover::after { opacity: 0.7; }

/* mark on grounds */
.bp-grounds-stage { border: 1px solid var(--line); border-radius: 14px; padding: clamp(28px, 6vw, 64px); display: flex; align-items: center; justify-content: center; transition: background 320ms cubic-bezier(0.2,0.8,0.2,1); position: relative; overflow: hidden; }
.bp-grounds-stage img { max-width: min(420px, 80%); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.35); transition: filter 260ms ease; position: relative; z-index: 1; }
.bp-grounds-stage.mono img { filter: grayscale(1) contrast(1.05); }
.bp-clear { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 220ms ease; }
.bp-grounds-stage.clearspace .bp-clear { opacity: 1; }
.bp-ground-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.bp-ground-chips button.gchip { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; transition: transform 140ms, border-color 140ms; }
.bp-ground-chips button.gchip:hover { transform: scale(1.12); }
.bp-ground-chips button.gchip.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,255,61,0.16); }
.bp-tglbtn { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-mute); cursor: pointer; transition: all 160ms; margin-left: 6px; }
.bp-tglbtn.on, .bp-tglbtn:hover { border-color: var(--accent); color: var(--accent); }
.bp-tglbtn.on { background: rgba(212,255,61,0.08); }

/* pattern slider */
.bp-pattern { transition: background-size 120ms linear; }
.bp-pat-ctrl { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.bp-pat-ctrl input { flex: 1; accent-color: var(--accent); }
.bp-pat-ctrl span { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--accent); min-width: 52px; }

/* usage don'ts — hover corrects the mistake */
.bp-donts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bp-dont { border: 1px solid var(--line); border-radius: 14px; padding: 24px 14px 16px; text-align: center; overflow: hidden; }
.bp-dont .frame { height: 120px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; position: relative; }
.bp-dont img { max-height: 90px; max-width: 80%; border-radius: 8px; transition: transform 340ms cubic-bezier(0.2,0.8,0.2,1), filter 340ms ease; }
.bp-dont .clutter { position: absolute; font-family: 'Space Grotesk','Hanken Grotesk',sans-serif; font-weight: 700; color: var(--ink-faint); font-size: 22px; letter-spacing: -0.02em; transition: opacity 300ms ease, transform 300ms ease; }
.bp-dont-stretch img { transform: scaleX(1.55); }
.bp-dont-tilt img { transform: rotate(-14deg) scale(0.96); }
.bp-dont-crowd .clutter.a { top: 6px; left: 8px; }
.bp-dont-crowd .clutter.b { bottom: 2px; right: 6px; }
.bp-dont:hover img { transform: none; }
.bp-dont:hover .clutter { opacity: 0; transform: translateY(8px); }
.bp-dont .cap { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.18em; color: #E36956; display: block; }
.bp-dont .fix { font-size: 11.5px; color: var(--ink-mute); }
.bp-dont:hover .cap { color: var(--accent); }
.bp-hint { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-faint); margin-top: 10px; }

/* copy toast */
.bp-toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--accent); color: #0B0B0A; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; padding: 10px 18px; border-radius: 999px; animation: bp-toast-in 240ms cubic-bezier(0.2,0.8,0.2,1) both; }
@keyframes bp-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
.bp-toast.bye { opacity: 0; transition: opacity 200ms; }

@media (max-width: 640px) { .bp-donts { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .bp-grounds-stage, .bp-grounds-stage img, .bp-dont img, .bp-dont .clutter, .bp-pattern { transition: none !important; }
}

/* ================= v3 — hero scan-in: mono -> colour on page open ================= */
@media (prefers-reduced-motion: no-preference) {
  body:not(.futur-motion-off) .bp-hero { position: relative; overflow: hidden; }

  body:not(.futur-motion-off) .bp-hero-logo {
    animation: bp-scan-logo 1350ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  @keyframes bp-scan-logo {
    0%   { opacity: 0; transform: translateY(14px) scale(0.97); filter: grayscale(1) contrast(1.06); }
    30%  { opacity: 1; transform: none;                          filter: grayscale(1) contrast(1.06); }
    62%  {                                                       filter: grayscale(1) contrast(1.06); }
    100% {                                                       filter: grayscale(0) contrast(1); }
  }

  /* the scanline that "paints" the colour in */
  body:not(.futur-motion-off) .bp-hero::after {
    content: '';
    position: absolute; top: 0; bottom: 0; left: -12%;
    width: 3px; border-radius: 2px;
    background: var(--accent, #D4FF3D);
    box-shadow: 0 0 18px 2px rgba(212, 255, 61, 0.55);
    opacity: 0;
    animation: bp-scanline 900ms cubic-bezier(0.4, 0, 0.2, 1) 480ms both;
    pointer-events: none;
  }
  @keyframes bp-scanline {
    0%   { left: -12%; opacity: 0; }
    12%  { opacity: 0.9; }
    88%  { opacity: 0.9; }
    100% { left: 112%; opacity: 0; }
  }

  body:not(.futur-motion-off) .bp-hero-tag {
    animation: bp-tag-in 500ms ease 1050ms both;
  }
  @keyframes bp-tag-in {
    from { opacity: 0; transform: translateY(6px); }
  }
}
