/* PersonalBrain — additional consumer-warm styles */

:root {
  --pb-warm-bg: #fbf9f4;
  --pb-warm-bg-alt: #f3eee4;
  --pb-warm-fg: #1a1714;
  --pb-warm-fg-soft: #6b6258;
  --pb-warm-accent: #c8553d;
  --pb-warm-line: rgba(26,23,20,0.10);
  --pb-warm-line-strong: rgba(26,23,20,0.18);
}

body.pb {
  background: #ffffff;
  color: #1a1714;
  --bg: #ffffff;
  --bg-alt: #f7f6f4;
  --fg: #1a1714;
  --fg-soft: #6b6258;
  --fg-mute: #97897a;
  --line: rgba(26,23,20,0.08);
  --line-strong: rgba(26,23,20,0.16);
  --accent: #c8553d;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Geist", "Helvetica Neue", Arial, sans-serif;
}

body.pb.dark {
  background: #16120e;
  color: #f4ede0;
  --bg: #16120e;
  --bg-alt: #1f1a14;
  --fg: #f4ede0;
  --fg-soft: #b8ad9d;
  --fg-mute: #7a7060;
  --line: rgba(244,237,224,0.10);
  --line-strong: rgba(244,237,224,0.18);
}

/* Override nav background tint for PB */
body.pb .nav { background: rgba(255,255,255,0.78); }
body.pb.dark .nav { background: rgba(22,18,14,0.78); }

/* Hero — softer, more editorial */
.pb-hero {
  position: relative;
  min-height: 100vh;
  padding: clamp(120px, 14vh, 180px) var(--pad) clamp(80px, 10vh, 120px);
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.pb-hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 540px at 18% 18%, rgba(200, 85, 61, 0.05), transparent 65%),
    radial-gradient(820px 480px at 86% 82%, rgba(180, 140, 80, 0.05), transparent 65%);
}
body.pb.dark .pb-hero-bg {
  background:
    radial-gradient(900px 540px at 18% 18%, rgba(200, 85, 61, 0.18), transparent 65%),
    radial-gradient(820px 480px at 86% 82%, rgba(180, 140, 80, 0.14), transparent 65%);
}

.pb-hero-grid {
  position: relative; z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  width: 100%;
}
@media (max-width: 960px) {
  .pb-hero-grid { grid-template-columns: 1fr; gap: 56px; align-items: start; }
}

.pb-hero-meta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-mute); font-weight: 500;
  margin-bottom: 28px;
}
.pb-hero-meta .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(200,85,61,0.55);
  animation: pbDot 2.4s ease-out infinite;
}
@keyframes pbDot {
  0%   { box-shadow: 0 0 0 0 rgba(200,85,61,0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(200,85,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,85,61,0); }
}

.pb-hero-title {
  font-size: clamp(44px, 6.4vw, 88px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.pb-hero-title .soft { color: var(--fg-soft); }

.pb-hero-lede { max-width: 560px; margin: 0 0 36px; }

.pb-hero-ctas { display: inline-flex; gap: 12px; flex-wrap: wrap; }

/* Companion vignette — abstract memory cloud */
.pb-vignette {
  position: relative;
  aspect-ratio: 1 / 1.05;  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(200,85,61,0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 30px 60px -30px rgba(80,40,20,0.18);
}
body.pb.dark .pb-vignette {
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}

/* Memory orbits */
.pb-orbit {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.pb-orbit-ring {
  position: absolute;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  opacity: 0.5;
  animation: pbSpin 60s linear infinite;
}
.pb-orbit-ring.r1 { width: 38%; height: 38%; }
.pb-orbit-ring.r2 { width: 62%; height: 62%; animation-duration: 100s; animation-direction: reverse; }
.pb-orbit-ring.r3 { width: 86%; height: 86%; animation-duration: 160s; }
@keyframes pbSpin { to { transform: rotate(360deg); } }

/* Constellation — new hero animation */
.pb-constellation {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
}
.pb-const-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.pb-const-edge {
  stroke: var(--line-strong);
  stroke-width: 0.25;
  fill: none;
  animation: pbDraw 1.6s cubic-bezier(.6,.05,.3,1) forwards;
}
@keyframes pbDraw { to { stroke-dashoffset: 0; } }

.pb-const-node circle {
  fill: var(--fg);
  opacity: 0;
  transform-origin: center;
  animation: pbNodeIn 0.6s ease-out forwards;
}
.pb-const-node.is-core circle:last-child {
  fill: var(--accent);
}
.pb-const-core-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.4;
  opacity: 0;
  animation: pbRingPulse 3.2s ease-out infinite;
}
@keyframes pbNodeIn {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pbRingPulse {
  0%   { opacity: 0; transform: scale(0.6); transform-origin: 50px 50px; }
  30%  { opacity: 0.6; }
  100% { opacity: 0; transform: scale(2.4); transform-origin: 50px 50px; }
}

/* Floating chip labels */
.pb-const-chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  transform: translate(var(--ox), var(--oy));
  opacity: 0;
  animation: pbChipIn 0.7s ease-out forwards, pbChipFloat 6s ease-in-out infinite 1s;
  box-shadow: 0 4px 14px -6px rgba(80,40,20,0.18);
}
.pb-const-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
@keyframes pbChipIn {
  from { opacity: 0; transform: translate(var(--ox), var(--oy)) translateY(6px); }
  to   { opacity: 1; transform: translate(var(--ox), var(--oy)); }
}
@keyframes pbChipFloat {
  0%, 100% { transform: translate(var(--ox), var(--oy)) translateY(0); }
  50%      { transform: translate(var(--ox), var(--oy)) translateY(-4px); }
}

/* Core "memory" label */
.pb-const-core-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, calc(-50% + 22px));
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-soft);
  font-weight: 600;
  opacity: 0;
  animation: pbCoreLabelIn 0.6s ease-out 1s forwards;
}
@keyframes pbCoreLabelIn {
  to { opacity: 1; }
}

@media (max-width: 900px) {
  .pb-const-chip { font-size: 11px; padding: 5px 9px; }
}

.pb-core {
  position: relative; z-index: 2;
  width: 26%; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--fg);
  box-shadow:
    0 0 0 8px rgba(200,85,61,0.06),
    0 0 0 24px rgba(200,85,61,0.04),
    0 0 80px rgba(200,85,61,0.20);
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
}
.pb-core::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.4;
  animation: pbPulse 3s ease-in-out infinite;
}
@keyframes pbPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50%      { transform: scale(1.15); opacity: 0; }
}

/* Memory chips floating around the core */
.pb-chip {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px; letter-spacing: -0.005em;
  color: var(--fg);
  white-space: nowrap;
  box-shadow: 0 6px 20px -6px rgba(80,40,20,0.10);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  animation: pbChipIn 0.9s cubic-bezier(.2,.7,.2,1) forwards;
}
body.pb.dark .pb-chip { box-shadow: 0 6px 20px -6px rgba(0,0,0,0.4); }
@keyframes pbChipIn {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.pb-chip .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; vertical-align: 1px;
}

/* PB section warm surfaces */
/* How section now also white */
body.pb .pb-how-card { background: var(--bg-alt); }
body.pb .footer { background: var(--bg-alt); }

/* What — bullet pills */
.pb-pills {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 28px;
}
.pb-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
}

/* Changes list */
.pb-change-list { list-style: none; padding: 0; margin: 0; }
.pb-change-list li {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 28px 1fr 2fr; gap: 24px;
  align-items: center;
}
.pb-change-list li:last-child { border-bottom: 1px solid var(--line); }
.pb-change-list .pb-change-num {
  font-size: 12px; color: var(--fg-mute);
  font-variant-numeric: tabular-nums; letter-spacing: 0.06em;
}
.pb-change-list .pb-change-h {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.pb-change-list .pb-change-p {
  font-size: 16px; line-height: 1.5; color: var(--fg-soft);
}
@media (max-width: 760px) {
  .pb-change-list li { grid-template-columns: 28px 1fr; gap: 12px; padding: 22px 0; }
  .pb-change-list .pb-change-p { grid-column: 2; }
}

/* Use case grid — 5 items: 3 + 2 layout */
.pb-uc-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.pb-uc-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  display: flex; flex-direction: column;
  min-height: 260px;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), background .3s;
  position: relative;
}
.pb-uc-card:hover { transform: translateY(-3px); }
body.pb.dark .pb-uc-card { background: #1f1a14; }

.pb-uc-card.span2 { grid-column: span 2; }
.pb-uc-card.span3 { grid-column: span 3; }

.pb-uc-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  color: #fff;
}
.pb-uc-mark svg { width: 18px; height: 18px; }
.pb-uc-mark.c-coral { background: #c8553d; }
.pb-uc-mark.c-amber { background: #d59b3a; }
.pb-uc-mark.c-teal  { background: #3a8a86; }
.pb-uc-mark.c-plum  { background: #7a4a78; }
.pb-uc-mark.c-olive { background: #6c8a4a; }

/* Eyebrow flash badge */
.pb-flash {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(200,85,61,0.10);
  color: var(--accent);
  border: 1px solid rgba(200,85,61,0.20);
  margin-bottom: 18px;
}
.pb-flash svg { width: 12px; height: 12px; }
.pb-flash.muted { background: rgba(26,23,20,0.04); color: var(--fg); border-color: var(--line); }
body.pb.dark .pb-flash.muted { background: rgba(255,255,255,0.04); color: var(--fg); }

/* Pill list accent */
.pb-pill {
  display: inline-flex; align-items: center; gap: 8px;
}
.pb-pill .pb-pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.pb-pill:nth-child(2) .pb-pill-dot { background: #d59b3a; }
.pb-pill:nth-child(3) .pb-pill-dot { background: #3a8a86; }
.pb-pill:nth-child(4) .pb-pill-dot { background: #7a4a78; }

/* Change list — add icon column color */
.pb-change-list .pb-change-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.pb-change-list .pb-change-icon svg { width: 14px; height: 14px; }
.pb-change-list li:nth-child(1) .pb-change-icon { background: #c8553d; }
.pb-change-list li:nth-child(2) .pb-change-icon { background: #d59b3a; }
.pb-change-list li:nth-child(3) .pb-change-icon { background: #3a8a86; }
.pb-change-list li:nth-child(4) .pb-change-icon { background: #7a4a78; }
.pb-change-list li:nth-child(5) .pb-change-icon { background: #6c8a4a; }
.pb-uc-h {
  font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.2;
  margin-bottom: 10px;
}
.pb-uc-p {
  font-size: 15px; line-height: 1.5; color: var(--fg-soft);
  margin-bottom: 24px;
  flex: 1;
}
.pb-uc-link {
  font-size: 14px; font-weight: 500; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .2s;
  text-decoration: none;
  align-self: flex-start;
}
.pb-uc-link:hover { gap: 10px; }

@media (max-width: 900px) {
  .pb-uc-grid { grid-template-columns: 1fr 1fr; }
  .pb-uc-card.span2, .pb-uc-card.span3 { grid-column: span 1; }
  .pb-uc-card.span3:last-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  .pb-uc-grid { grid-template-columns: 1fr; }
  .pb-uc-card.span2, .pb-uc-card.span3, .pb-uc-card.span3:last-child { grid-column: span 1; }
}

/* How it works — single editorial card */
.pb-how-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(40px, 5vw, 72px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 760px) {
  .pb-how-card { grid-template-columns: 1fr; gap: 36px; padding: 36px 28px; }
}
.pb-how-vis {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background:
    radial-gradient(50% 50% at 50% 50%, rgba(200,85,61,0.10), transparent 70%),
    var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pb-how-layers {
  position: relative; width: 70%; height: 70%;
}
.pb-how-layer {
  position: absolute; left: 0; right: 0;
  height: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  display: flex; align-items: center; padding: 0 10px;
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-mute); font-weight: 600;
}
.pb-how-layer.l1 { top: 0; }
.pb-how-layer.l2 { top: 24px; opacity: .85; }
.pb-how-layer.l3 { top: 48px; opacity: .7; background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pb-how-layer.l4 { top: 72px; opacity: .55; }
.pb-how-layer.l5 { top: 96px; opacity: .4; }

/* Closing */
.pb-closing {
  text-align: center;
  padding: clamp(120px, 16vw, 200px) 0;
}

/* Image band overrides for PB warmth */
body.pb .image-band img { filter: grayscale(60%) sepia(15%) contrast(1.05); }

/* Buttons accent variant */
body.pb .btn-link { color: var(--accent); }
body.pb .btn-link:hover { color: var(--accent); }
