/* Design tokens */
:root {
  /* Light mode palette */
  --color-bg: #ffffff; /* page background */
  --color-bg-2: #f5f7fb; /* subtle section tint */
  --color-fg: #0a1a2b; /* navy for text */
  --color-fg-dim: #4b5b6e; /* muted body text */
  --color-accent: #1f5fcc; /* primary accent (calm navy/blue) */
  --color-brand: #012f99; /* logo blue (the P and I of the wordmark) */
  --color-brand-bright: #3d8bff; /* luminous blue from the logo's node glow */
  --radius-16: 16px;
  --radius-20: 20px;
  --shadow-1: 0 6px 20px rgba(10,26,43,.10);
  --shadow-2: 0 10px 28px rgba(10,26,43,.12);
  --space-1: 8px;  --space-2: 12px; --space-3: 16px; --space-4: 24px; --space-5: 32px; --space-6: 48px; --space-7: 72px; --space-8: 96px;
  /* Softer light-mode text shadow for hero */
  --text-glow: 0 0 18px rgba(0,0,0,.12), 0 0 44px rgba(0,0,0,.08);
}

/* Fluid type */
html { font-size: 16px; }
body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; color: var(--color-fg); background: var(--color-bg); margin: 0; }
h1 { font-size: clamp(2rem, 3vw + 1rem, 3.5rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 var(--space-4); }
h2 { font-size: clamp(1.5rem, 1.5vw + 1rem, 2rem); letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 var(--space-3); }
p { line-height: 1.65; color: var(--color-fg-dim); margin: 0 0 var(--space-3); }
a { color: var(--color-fg); text-decoration: none; }

/* Layout */
.container { width: min(1200px, 92%); margin: 0 auto; }
.section { padding: var(--space-8) 0; position: relative; }
.section.diagonal { clip-path: polygon(0 0, 100% 2%, 100% 98%, 0% 100%); background: linear-gradient(180deg, var(--color-bg-2), var(--color-bg)); }

/* Sticky glass nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px) saturate(130%); background: rgba(255,255,255,0.7); border-bottom: 1px solid rgba(10,26,43,0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) 0; }
.brand { display: flex; align-items: center; }
.brand-logo { display: block; height: 54px; width: auto; }
.nav a.brand { padding: 0; background: none; }
@media (max-width: 640px) { .brand-logo { height: 40px; } }
.nav-links { display: flex; gap: 18px; }
.nav a { color: var(--color-fg-dim); padding: 8px 10px; border-radius: 10px; transition: color .2s ease, background .2s ease; }
.nav a:hover, .nav a.active { color: var(--color-fg); background: rgba(10,26,43,0.06); }

/* Hero */
.hero { position: relative; min-height: 78vh; display: grid; place-items: center; overflow: hidden; background:
  radial-gradient(900px 600px at 70% 20%, rgba(31,95,204,0.10), transparent 60%),
  linear-gradient(180deg, var(--color-bg), var(--color-bg-2)); }
.hero .content { position: relative; z-index: 2; text-align: center; padding: var(--space-6) 0; }
.hero .content h1, .hero .content .subhead { text-shadow: var(--text-glow); }
.subhead { color: var(--color-fg-dim); font-size: clamp(1.05rem, .6vw + 1rem, 1.25rem); margin-bottom: var(--space-5); }
.hero .subhead { max-width: 80ch; margin-left: auto; margin-right: auto; text-wrap: balance; } /* keep the longer strapline to two even lines */
/* Hero strapline: darker, a touch larger, with a white halo so it reads clearly over the screenshots and graph */
.hero .content .subhead { color: #1c2f47; font-weight: 500; font-size: clamp(1.12rem, .7vw + 1rem, 1.38rem); margin-bottom: var(--space-6);
  text-shadow: 0 0 2px #ffffff, 0 0 10px rgba(255,255,255,.95), 0 0 24px rgba(255,255,255,.9); }
.hero-break { display: none; } /* desktop-only line break after the dash */
@media (min-width: 720px) { .hero-break { display: inline; } }
.cta-row { display: flex; gap: 12px; justify-content: center; }
.hero .cta-row { position: relative; top: 64px; } /* drop the hero buttons lower without moving the headline */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--radius-20); border: 1px solid rgba(10,26,43,.12); background: #ffffff; color: var(--color-fg); transition: transform .2s ease, background .2s ease, border-color .2s ease; box-shadow: var(--shadow-1); }
.btn.primary { background: linear-gradient(180deg, #2d6eea, var(--color-accent)); color: #fff; border-color: rgba(31,95,204,0.35); }
.btn:hover { transform: translateY(-2px); background: #f7fafc; }
.btn.primary:hover { filter: brightness(1.04); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
/* Apply subtle halo to hero CTAs only (light mode) */
.hero .content .btn { filter: drop-shadow(0 6px 20px rgba(10,26,43,.12)); }

/* SVG graph background behind cards, faded at center for readability */
.graph-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .65; pointer-events: none; }
.graph-bg { filter: saturate(110%); }
.graph-bg { mask-image: radial-gradient(60% 50% at 50% 45%, rgba(0,0,0,.15), rgba(0,0,0,1)); }
.graph-bg { -webkit-mask-image: radial-gradient(60% 50% at 50% 45%, rgba(0,0,0,.15), rgba(0,0,0,1)); }
.graph-bg line { stroke: rgba(10,26,43,0.20); stroke-width: 1.8; stroke-linecap: round; }
/* circle fill is set inline; keep rule minimal */
.graph-group { will-change: transform; }
/* Node callouts: own layer above the faded graph (and the screenshots) so they render at full strength */
.graph-callouts { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.graph-fx { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.graph-fx .callout-fx { animation: calloutFxIn .4s ease-out both; }
.graph-fx .callout-fx.is-leaving { animation: calloutFxOut .9s ease forwards; }
.graph-fx .leader { stroke: var(--color-brand); stroke-width: 1.75; stroke-linecap: round; opacity: .7; }
.graph-fx .core { fill: var(--color-brand); stroke: #ffffff; stroke-width: 2; }
.graph-fx .ring { fill: none; stroke: var(--color-brand-bright); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: calloutPulse 1.8s ease-out infinite; }
.graph-callout { position: absolute; left: 0; top: 0; will-change: transform; }
.graph-callout__card {
  position: relative; box-sizing: border-box; max-width: 340px; padding: 12px 18px 13px 28px; border-radius: 14px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(8px) saturate(140%); -webkit-backdrop-filter: blur(8px) saturate(140%);
  border: 1px solid rgba(1,47,153,.18);
  box-shadow: 0 14px 34px rgba(10,26,43,.18), 0 0 30px rgba(61,139,255,.22);
  color: var(--color-brand); font-size: clamp(15px, .45vw + 12px, 19px); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em;
  animation: calloutIn .5s cubic-bezier(.2,.9,.25,1.12) both;
}
/* DNA double helix in place of a solid accent bar: a seamless 10x22 tile (one full turn; brand-blue and bright-blue strands
   shaded for depth, base-pair rungs between) repeated down the card. Scrolling the tile reads as the helix turning. */
.graph-callout__card::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='22' viewBox='0 0 10 22'%3E%3Cdefs%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='22'%3E%3Cstop offset='0' stop-color='%23012f99'/%3E%3Cstop offset='.25' stop-color='%23012f99' stop-opacity='.6'/%3E%3Cstop offset='.5' stop-color='%23012f99' stop-opacity='.25'/%3E%3Cstop offset='.75' stop-color='%23012f99' stop-opacity='.6'/%3E%3Cstop offset='1' stop-color='%23012f99'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='22'%3E%3Cstop offset='0' stop-color='%233d8bff' stop-opacity='.3'/%3E%3Cstop offset='.25' stop-color='%233d8bff' stop-opacity='.65'/%3E%3Cstop offset='.5' stop-color='%233d8bff'/%3E%3Cstop offset='.75' stop-color='%233d8bff' stop-opacity='.65'/%3E%3Cstop offset='1' stop-color='%233d8bff' stop-opacity='.3'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M4.10 1.83H5.90M2.30 5.50H7.70M4.10 9.17H5.90M4.10 12.83H5.90M2.30 16.50H7.70M4.10 20.17H5.90' stroke='%237fb0ff' stroke-width='1' stroke-linecap='round' opacity='.7'/%3E%3Cg fill='none' stroke-width='1.3'%3E%3Cpath d='M6.95 -2.00 L6.50 -1.50 L6.01 -1.00 L5.51 -0.50 L5.00 0.00 L4.49 0.50 L3.99 1.00 L3.50 1.50 L3.05 2.00 L2.64 2.50 L2.28 3.00 L1.97 3.50 L1.73 4.00 L1.55 4.50 L1.44 5.00 L1.40 5.50 L1.44 6.00 L1.55 6.50 L1.73 7.00 L1.97 7.50 L2.28 8.00 L2.64 8.50 L3.05 9.00 L3.50 9.50 L3.99 10.00 L4.49 10.50 L5.00 11.00 L5.51 11.50 L6.01 12.00 L6.50 12.50 L6.95 13.00 L7.36 13.50 L7.72 14.00 L8.03 14.50 L8.27 15.00 L8.45 15.50 L8.56 16.00 L8.60 16.50 L8.56 17.00 L8.45 17.50 L8.27 18.00 L8.03 18.50 L7.72 19.00 L7.36 19.50 L6.95 20.00 L6.50 20.50 L6.01 21.00 L5.51 21.50 L5.00 22.00 L4.49 22.50 L3.99 23.00 L3.50 23.50 L3.05 24.00' stroke='url%28%23b%29'/%3E%3Cpath d='M3.05 -2.00 L3.50 -1.50 L3.99 -1.00 L4.49 -0.50 L5.00 0.00 L5.51 0.50 L6.01 1.00 L6.50 1.50 L6.95 2.00 L7.36 2.50 L7.72 3.00 L8.03 3.50 L8.27 4.00 L8.45 4.50 L8.56 5.00 L8.60 5.50 L8.56 6.00 L8.45 6.50 L8.27 7.00 L8.03 7.50 L7.72 8.00 L7.36 8.50 L6.95 9.00 L6.50 9.50 L6.01 10.00 L5.51 10.50 L5.00 11.00 L4.49 11.50 L3.99 12.00 L3.50 12.50 L3.05 13.00 L2.64 13.50 L2.28 14.00 L1.97 14.50 L1.73 15.00 L1.55 15.50 L1.44 16.00 L1.40 16.50 L1.44 17.00 L1.55 17.50 L1.73 18.00 L1.97 18.50 L2.28 19.00 L2.64 19.50 L3.05 20.00 L3.50 20.50 L3.99 21.00 L4.49 21.50 L5.00 22.00 L5.51 22.50 L6.01 23.00 L6.50 23.50 L6.95 24.00' stroke='url%28%23a%29'/%3E%3Cpath d='M1.40 5.50 L1.44 6.00 L1.55 6.50 L1.73 7.00 L1.97 7.50 L2.28 8.00 L2.64 8.50 L3.05 9.00 L3.50 9.50 L3.99 10.00 L4.49 10.50 L5.00 11.00 L5.51 11.50 L6.01 12.00 L6.50 12.50 L6.95 13.00 L7.36 13.50 L7.72 14.00 L8.03 14.50 L8.27 15.00 L8.45 15.50 L8.56 16.00 L8.60 16.50' stroke='url%28%23b%29'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 10px 22px repeat-y;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 6px, #000 calc(100% - 6px), transparent);
  mask-image: linear-gradient(180deg, transparent, #000 6px, #000 calc(100% - 6px), transparent);
  filter: drop-shadow(0 0 2px rgba(61,139,255,.45));
  animation: helixTurn 2.4s linear infinite;
}
.graph-callout__word { display: inline-block; opacity: 0; animation: calloutWord .55s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 45ms + 160ms); }
.graph-callout.is-leaving .graph-callout__card { animation: calloutOut .9s ease forwards; }

@keyframes calloutIn { from { opacity: 0; transform: translateY(6px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes calloutOut { to { opacity: 0; transform: translateY(-8px) scale(.98); filter: blur(4px); } }
@keyframes calloutWord { from { opacity: 0; transform: translateY(.45em); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes calloutFxIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes calloutFxOut { to { opacity: 0; } }
@keyframes helixTurn { to { background-position: 0 -22px; } }
@keyframes calloutPulse { from { transform: scale(1); opacity: .75; } to { transform: scale(3.4); opacity: 0; } }

/* Floating cards using screenshots */
.hero-cards { position: absolute; inset: 0; pointer-events: none; }
.card { position: absolute; width: min(460px, 38vw); border-radius: var(--radius-20); overflow: hidden; box-shadow: var(--shadow-2); opacity: .9; filter: saturate(105%); }
.card img { display: block; width: 100%; height: auto; }
.card.a { top: 12%; left: 6%; transform: rotate(-3deg); animation: driftA 16s ease-in-out infinite; }
.card.b { bottom: 8%; right: 8%; transform: rotate(2deg); width: min(520px, 42vw); animation: driftB 18s ease-in-out infinite; }
.card.c { top: 56%; left: 22%; transform: rotate(-1deg); width: min(380px, 32vw); animation: driftC 20s ease-in-out infinite; }

@keyframes driftA { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(-2deg); } }
@keyframes driftB { 0%,100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(12px) rotate(3deg); } }
@keyframes driftC { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(0deg); } }

@media (prefers-reduced-motion: reduce) {
  .card { animation: none !important; }
}

/* Tech pattern overlay */
.pattern { position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(10,26,43,0.06) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.2)); pointer-events: none; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin-top: var(--space-6); }
.feature { background: #ffffff; border: 1px solid rgba(10,26,43,0.08); border-radius: var(--radius-16); padding: var(--space-4); box-shadow: var(--shadow-1); }
.feature h3 { margin: 0 0 8px; font-size: 1.05rem; }
.muted { color: var(--color-fg-dim); }

@media (max-width: 980px) {
  .features { grid-template-columns: 1fr; }
  .card.a { top: 10%; left: 50%; transform: translateX(-60%) rotate(-3deg); }
  .card.b { right: 4%; width: 70vw; }
  .card.c { left: 8%; width: 60vw; }
}

/* Product showcase (Reporting / Performance, from the Pi-Intelligence deck pages 7 and 8) */
.showcase + .showcase { border-top: 1px solid rgba(10,26,43,0.06); }
.showcase-head { max-width: 760px; }
.showcase-head h2 { margin-bottom: var(--space-1); }
.accent { color: var(--color-brand); font-style: italic; }
.showcase-strap { font-style: italic; font-weight: 500; font-size: clamp(1.05rem, .4vw + 1rem, 1.2rem); color: var(--color-accent); margin-bottom: var(--space-3); }
.showcase-lede { margin: 0; }
.shot { position: relative; margin: 0; border-radius: var(--radius-16); overflow: hidden; background: #ffffff; border: 1px solid rgba(10,26,43,0.08); box-shadow: var(--shadow-2); }
.shot img { display: block; width: 100%; height: auto; }
.shot-tag { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(1,47,153,.92); color: #ffffff; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 4px 12px rgba(1,47,153,.25); }

/* Page 7: main report forks out to the two drill-throughs */
.report-showcase { display: grid; grid-template-columns: minmax(0, 1.55fr) 56px minmax(0, 1fr); align-items: center; margin-top: var(--space-6); }
.report-drills { display: grid; gap: var(--space-3); }
.report-fork { position: relative; align-self: stretch; }
.report-fork svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.report-fork path { fill: none; stroke: var(--color-accent); stroke-opacity: .55; stroke-width: 1.5; }
.fork-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--color-brand); box-shadow: 0 0 0 2px #ffffff, 0 0 10px rgba(61,139,255,.6); }

/* The "text at the bottom" of each deck page: tag row (page 7) and step tabs (page 8) */
.showcase-tags, .perf-steps { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 0; margin: var(--space-5) 0 0; padding: 0; list-style: none; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-fg-dim); }
.showcase-tags li { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; }
.showcase-tags li + li, .perf-step + .perf-step { border-left: 1px solid rgba(10,26,43,0.16); }
.showcase-tags svg { width: 16px; height: 16px; fill: none; stroke: var(--color-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Page 8: four views, cycled by the step tabs */
.perf { max-width: 1080px; margin: var(--space-6) auto 0; }
.perf-stage { position: relative; aspect-ratio: 1659 / 700; }
.perf-frame { position: absolute; top: 50%; left: 0; width: 100%; opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 10px)) scale(.985); transition: opacity .6s ease, transform .6s ease, visibility 0s linear .6s; }
.perf-frame.is-active { opacity: 1; visibility: visible; transform: translateY(-50%); transition: opacity .6s ease, transform .6s ease; }
.perf-step { position: relative; appearance: none; background: none; border: 0; border-radius: 0; margin: 0; padding: 6px 16px 10px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; transition: color .2s ease; }
.perf-step:hover { color: var(--color-fg); }
.perf-step:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 6px; }
.perf-step.is-active { color: var(--color-brand); }
.perf-step::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px; background: var(--color-brand); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.perf-step.is-active::after { transform: scaleX(1); }
/* While auto-advancing, the active underline doubles as a progress bar */
.perf.is-playing .perf-step.is-active::after { animation: perfProgress var(--perf-interval, 5.5s) linear both; }
@keyframes perfProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Scroll reveal (enabled by main.js, so content stays visible without JS) */
.showcase.reveal-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.showcase.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }
.showcase.reveal-ready .report-fork svg { transform: scaleX(0); transform-origin: left; transition: transform .7s ease .45s; }
.showcase.reveal-ready .report-fork.is-in svg { transform: none; }

@media (max-width: 980px) {
  .report-showcase { grid-template-columns: 1fr; gap: var(--space-3); }
  .report-fork { display: none; }
  .showcase-tags li, .perf-step { padding-left: 12px; padding-right: 12px; }
  .perf-step::after { left: 12px; right: 12px; }
}
@media (max-width: 640px) {
  /* Four steps don't fit on one line: a 2x2 grid avoids a stray divider at the start of a wrapped line */
  .perf-steps { display: grid; grid-template-columns: 1fr 1fr; }
  .perf-step + .perf-step { border-left: 0; }
  .showcase-tags { font-size: .72rem; letter-spacing: .05em; }
  .showcase-tags li { padding: 0 10px; }
}

/* Team page: founder at the hub, team around him (from the deck's "The Core Team" page).
   Cards show photo, name and role only; the summary expands on click so the whole team fits on one screen. */
.team-page { padding-top: 40px; }
.team-page h1 { margin-bottom: var(--space-1); }
.team-page .subhead { margin-bottom: 0; }
.team-hub { position: relative; margin-top: var(--space-4); }
.team-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.team-links line { stroke: var(--color-accent); stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: 3 7; animation: teamFlow 1.4s linear infinite; }
@keyframes teamFlow { to { stroke-dashoffset: -10; } }
.team-grid { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: ". top ." "left center right" ". bottom ."; gap: 32px 56px; align-items: start; justify-items: center; }
.member[data-pos="center"] { grid-area: center; }
.member[data-pos="top"] { grid-area: top; }
.member[data-pos="right"] { grid-area: right; }
.member[data-pos="bottom"] { grid-area: bottom; }
.member[data-pos="left"] { grid-area: left; }
.member { position: relative; width: 100%; max-width: 320px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 20px; background: #ffffff; border: 1px solid rgba(10,26,43,0.08); border-radius: var(--radius-20); box-shadow: var(--shadow-1); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.member:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: rgba(31,95,204,.28); }
.member:focus-within, .member.is-open { border-color: rgba(31,95,204,.45); }
.member--lead { border-color: rgba(1,47,153,.22); box-shadow: var(--shadow-2), 0 0 0 4px rgba(31,95,204,.06), 0 0 36px rgba(61,139,255,.18); }
.member-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: var(--space-1); box-shadow: 0 0 0 3px #ffffff, 0 0 0 4px rgba(31,95,204,.35), 0 6px 18px rgba(10,26,43,.15); }
.member--lead .member-photo { width: 84px; height: 84px; box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--color-brand), 0 8px 24px rgba(1,47,153,.25); }
.member-name { margin: 0; font-size: 1.02rem; letter-spacing: -0.01em; }
.member-open { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--color-fg); cursor: pointer; }
.member-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* the whole card toggles the summary */
.member-open:focus-visible { outline: none; }
.member:has(.member-open:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.member-title { margin: 2px 0 0; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-accent); }
.member-chevron { position: absolute; top: 12px; right: 12px; pointer-events: none; width: 26px; height: 26px; box-sizing: border-box; border-radius: 50%; border: 1px solid rgba(31,95,204,.25); color: var(--color-accent); display: grid; place-items: center; transition: transform .3s ease, background .2s ease; } /* decorative: clicks fall through to the card toggle */
.member-chevron::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.member:hover .member-chevron, .member.is-open .member-chevron { background: rgba(31,95,204,.08); }
.member.is-open .member-chevron { transform: rotate(180deg); }
/* Collapsible summary: animating grid rows 0fr -> 1fr opens it to its natural height */
.member-details { display: grid; grid-template-rows: 0fr; width: 100%; transition: grid-template-rows .3s ease; }
.member.is-open .member-details { grid-template-rows: 1fr; }
.member-details-inner { position: relative; z-index: 1; min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear .3s; }
.member.is-open .member-details-inner { visibility: visible; transition: none; }
.member-summary { margin: var(--space-2) 0 0; font-size: .92rem; line-height: 1.55; }
.member-full { appearance: none; background: none; border: 0; margin: 6px 0 2px; padding: 4px 6px; border-radius: 6px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--color-brand); cursor: pointer; }
.member-full:hover { text-decoration: underline; }
.member-full:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.member-bio { display: none; margin-top: var(--space-3); text-align: left; }
.team-hub.bios-inline .member-bio { display: block; }
.team-hub.bios-inline .member-full { display: none; }
.bio-linkedin { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--color-brand); }
.bio-linkedin::before { content: "in"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: #0a66c2; color: #ffffff; font-size: .78rem; font-weight: 700; }
.bio-linkedin:hover { text-decoration: underline; }

.bio-dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 0; border-radius: var(--radius-20); background: #ffffff; color: var(--color-fg); box-shadow: 0 24px 60px rgba(10,26,43,.3); }
.bio-dialog::backdrop { background: rgba(10,26,43,.45); backdrop-filter: blur(4px); }
.bio-dialog[open] { animation: bioIn .25s cubic-bezier(.2,.8,.2,1); }
@keyframes bioIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.bio-inner { position: relative; padding: var(--space-5); text-align: center; }
.bio-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(10,26,43,.12); background: #ffffff; color: var(--color-fg-dim); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.bio-close:hover { color: var(--color-fg); background: var(--color-bg-2); }
.bio-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--color-brand), 0 8px 24px rgba(1,47,153,.25); }
.bio-name { margin: var(--space-3) 0 4px; font-size: 1.5rem; }
.bio-title { margin: 0 0 var(--space-3); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-accent); }
.bio-body { text-align: left; }
.bio-body p { color: var(--color-fg); }

@media (max-width: 980px) {
  .team-grid { grid-template-columns: minmax(0, 560px); grid-template-areas: none; justify-content: center; gap: var(--space-3); }
  .member { max-width: none; }
  .team-grid .member { grid-area: auto; }
  .team-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .team-links line { animation: none; }
  .bio-dialog[open] { animation: none; }
  .member-details, .member-chevron { transition: none; }
}

/* Privacy policy and other long-form legal text */
.legal { max-width: 820px; }
.legal h2 { margin-top: var(--space-6); }
.legal h3 { margin: var(--space-4) 0 var(--space-1); font-size: 1.05rem; }
.legal p, .legal li { line-height: 1.7; color: var(--color-fg); }
.legal ul { padding-left: 22px; margin: 0 0 var(--space-3); }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--color-accent); text-decoration: underline; }
.legal .updated { color: var(--color-fg-dim); }
.todo { background: #fff3c4; padding: 0 3px; border-radius: 3px; } /* details still to be filled in before launch */
.legal table { width: 100%; border-collapse: collapse; margin: var(--space-2) 0 var(--space-4); font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid rgba(10,26,43,0.1); }
.legal th { background: var(--color-bg-2); font-weight: 600; }
@media (max-width: 640px) { .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; } .legal thead { display: none; } .legal td { border: 0; padding: 4px 0; } .legal tr { padding: 10px 0; border-bottom: 1px solid rgba(10,26,43,0.1); } .legal td::before { content: attr(data-label); display: block; font-weight: 600; } }

/* Footer */
footer a { color: var(--color-fg-dim); text-decoration: underline; }
footer a:hover { color: var(--color-fg); }
footer { color: var(--color-fg-dim); border-top: 1px solid rgba(10,26,43,0.08); background: #ffffff; padding: var(--space-5) 0; }

/* Article list */
.articles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-5); }
.article-card { background: #ffffff; border: 1px solid rgba(10,26,43,0.08); padding: var(--space-4); border-radius: var(--radius-16); transition: transform .2s ease, box-shadow .2s ease; box-shadow: var(--shadow-1); }
.article-card:hover { transform: translateY(-3px); }

@media (max-width: 980px) { .articles { grid-template-columns: 1fr; } }

/* Forms */
form { display: grid; gap: var(--space-4); max-width: 640px; }
label { font-weight: 600; color: var(--color-fg); margin-bottom: 6px; display: inline-block; }
input, select, textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(10,26,43,0.16); background: #ffffff; color: var(--color-fg); outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(31,95,204,.6); box-shadow: 0 0 0 3px rgba(31,95,204,.18); }
.helper { color: var(--color-fg-dim); font-size: .9rem; }
/* Two fields side by side (first / last name); stacks on narrow screens */
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
fieldset.field-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-label { font-weight: 600; color: var(--color-fg); margin-bottom: 6px; padding: 0; }

/* Multi-select dropdown: a <details> holding grouped checkboxes, so it works (and submits) without JS */
.multi-select { position: relative; }
.multi-select summary { position: relative; display: flex; align-items: center; gap: 10px; list-style: none; padding: 12px 42px 12px 14px; border-radius: 12px; border: 1px solid rgba(10,26,43,0.16); background: #ffffff; cursor: pointer; user-select: none; }
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--color-fg-dim); border-bottom: 2px solid var(--color-fg-dim); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.multi-select[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.multi-select summary:focus-visible, .multi-select[open] summary { outline: none; border-color: rgba(31,95,204,.6); box-shadow: 0 0 0 3px rgba(31,95,204,.18); }
.ms-value { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--color-fg-dim); }
.multi-select.has-value .ms-value { color: var(--color-fg); }
.ms-count { display: none; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: var(--color-accent); color: #ffffff; font-size: .78rem; font-weight: 700; text-align: center; }
.multi-select.has-value .ms-count { display: inline-block; }
.ms-panel { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); display: grid; gap: var(--space-2); max-height: 340px; overflow: auto; padding: var(--space-2); background: #ffffff; border: 1px solid rgba(10,26,43,.12); border-radius: 14px; box-shadow: var(--shadow-2); }
.ms-panel fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.ms-panel legend { padding: 4px 8px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-accent); }
.ms-option { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 8px; border-radius: 8px; font-weight: 400; cursor: pointer; }
.ms-option:hover { background: var(--color-bg-2); }
.ms-option input { flex: none; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--color-accent); }
@media (max-width: 560px) {
  .field-row, .ms-panel fieldset { grid-template-columns: 1fr; }
}

/* Spam trap: kept off-screen (not display:none, which some bots skip) and out of the tab order */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #c62828; }

/* Consent + privacy notice above the submit button */
.form-consent { display: grid; gap: var(--space-2); padding: var(--space-3); border-radius: 12px; background: var(--color-bg-2); border: 1px solid rgba(10,26,43,0.08); }
.check-option { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 400; cursor: pointer; }
.check-option input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; padding: 0; accent-color: var(--color-accent); }
.privacy-note { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--color-fg-dim); }
.privacy-note a, .form-notice a { color: var(--color-accent); text-decoration: underline; }
.btn:disabled { opacity: .7; cursor: progress; transform: none; }

/* Result messages. #demo-sent:target shows the thanks after a no-JavaScript submission redirects back */
.form-notice { padding: var(--space-3); border-radius: 12px; border: 1px solid; }
.form-notice:focus { outline: none; }
.form-notice p { margin: 0; color: inherit; }
.form-notice ul { margin: var(--space-1) 0 0; padding-left: 20px; }
.form-notice--ok { background: #ecf7ee; border-color: #9fd3a8; color: #1d5e2a; }
.form-notice--error { background: #fdecec; border-color: #f2b2b2; color: #8e1f1f; }
#demo-sent:target { display: block; }

/* Utilities */
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(31,95,204,.12); border: 1px solid rgba(31,95,204,.28); color: #0a3e9c; font-size: .85rem; }
.spacer { height: var(--space-6); }
