/* ==========================================================================
   Bruin Capital Advisory — shared styles
   Blues and pastels built outward from the logo's navy and sky.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap;
}

:root {
  /* Logo colors */
  --navy: #052c4a;
  --navy-deep: #031d33;
  --sky: #84b5ff;
  /* Pastels */
  --ice: #dce9ff;
  --mist: #f3f7ff;
  --lilac: #ddd8fb;
  --periwinkle: #b9cdfb;
  /* Working colors */
  --blue: #2563c9;
  --white: #ffffff;
  --ink: #0c2238;
  --muted: #4b5f79;
  --line: #d3e0f7;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-lg: 28px;
  --r-md: 18px;
  --shadow: 0 18px 40px -22px rgba(5, 44, 74, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; text-wrap: balance; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--white);
  padding: 10px 16px; z-index: 100; border-radius: 999px;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header: floating pill ---------- */
.site-header {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 50;
  padding: 0 var(--gutter);
  margin-top: 10px;
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 8px 10px 8px 12px;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  box-shadow: 0 10px 30px -18px rgba(5, 44, 74, .5);
  transition: box-shadow .3s, background .3s;
}
.site-header.scrolled .header-inner { background: rgba(255, 255, 255, .93); box-shadow: 0 14px 34px -16px rgba(5, 44, 74, .55); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 46px; height: 46px; transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand-name {
  font-family: var(--font-display); font-weight: 700;
  color: var(--navy); line-height: 1.05; letter-spacing: -.01em;
  font-size: 1.08rem;
}
.brand-name small { display: block; font-size: .8rem; letter-spacing: .01em; color: var(--muted); font-weight: 500; }

.nav { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--navy); text-decoration: none;
  font-size: .95rem; font-weight: 500;
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--ice); }
.nav a[aria-current="page"] { background: var(--navy); color: var(--white); }

.nav-toggle {
  display: none;
  background: var(--ice); border: 0; color: var(--navy); border-radius: 999px;
  font: 600 .95rem var(--font-body); padding: 9px 18px; cursor: pointer;
}

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; border-radius: 26px; }
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; padding: 4px 0 6px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 14px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: 2px solid var(--navy); border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  text-decoration: none; color: var(--navy);
  transition: background .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(5, 44, 74, .6); }
.btn-solid { background: var(--navy); color: var(--white); }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-dark:hover { background: var(--navy); color: var(--white); }
.btn-light { color: var(--white); border-color: rgba(255, 255, 255, .7); }
.btn-light:hover { background: var(--white); color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  margin-top: -76px; padding-top: 76px;
  background: linear-gradient(135deg, #eaf1ff 0%, var(--ice) 45%, var(--lilac) 100%);
}
.hero-blobs span {
  position: absolute; border-radius: 50%; filter: blur(50px); opacity: .7;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero-blobs span:nth-child(1) { width: 420px; height: 420px; left: -120px; top: -80px; background: #bcd6ff; }
.hero-blobs span:nth-child(2) { width: 360px; height: 360px; right: 6%; top: 18%; background: #cfc6fa; animation-duration: 20s; animation-delay: -6s; }
.hero-blobs span:nth-child(3) { width: 300px; height: 300px; left: 34%; bottom: -120px; background: #a9ccff; animation-duration: 24s; animation-delay: -11s; }
@keyframes drift { to { transform: translate3d(50px, 34px, 0) scale(1.12); } }

.hero-inner {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 7vw, 84px) var(--gutter) clamp(96px, 12vw, 150px);
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(24px, 5vw, 64px);
}
.hero h1 {
  font-weight: 800; color: var(--navy);
  font-size: clamp(2.7rem, 7.2vw, 5.3rem);
  line-height: .95; letter-spacing: -.04em; margin: 0 0 22px;
}
.hero-content p { font-size: clamp(1.05rem, 1.7vw, 1.28rem); margin: 0; max-width: 34em; color: #213a57; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(40px, 7vw, 90px); display: block; }
.wave path { fill: var(--mist); }

/* Load-in for the hero text */
@media (prefers-reduced-motion: no-preference) {
  .hero-content > * { animation: rise .8s var(--ease) both; }
  .hero-content > :nth-child(2) { animation-delay: .1s; }
  .hero-content > :nth-child(3) { animation-delay: .2s; }
  .hero-mark { animation: pop .9s var(--ease) .15s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes pop { from { opacity: 0; transform: scale(.82) rotate(-6deg); } }

/* ---------- The roaring bear ---------- */
.hero-mark { display: grid; place-items: center; }
.roar {
  position: relative; display: block; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.roar-bear-wrap {
  position: absolute; inset: 0;
  filter: drop-shadow(0 22px 26px rgba(5, 44, 74, .3));
  animation: bob 6s ease-in-out infinite;
}
.roar-bear, .roar-bear img { position: absolute; inset: 0; width: 100%; height: 100%; }
.roar-bear { transform-origin: 50% 55%; }
.roar-rings i {
  position: absolute; inset: 8%; border-radius: 50%;
  border: 3px solid var(--navy); opacity: 0;
}
.roar-rings i:nth-child(2) { border-color: var(--blue); }
.roar-rings i:nth-child(3) { border-color: var(--sky); }
@keyframes bob { 50% { transform: translateY(-8px); } }

.roar.is-roaring .roar-bear { animation: bear-roar 1.5s var(--ease); }
.roar.is-roaring .roar-jaw { animation: jaw-drop 1.5s var(--ease); }
.roar.is-roaring .roar-rings i { animation: ring 1.1s ease-out .28s; }
.roar.is-roaring .roar-rings i:nth-child(2) { animation-delay: .46s; }
.roar.is-roaring .roar-rings i:nth-child(3) { animation-delay: .64s; }

@keyframes bear-roar {
  0%   { transform: none; }
  12%  { transform: translateY(1.5%) scale(.96); }
  26%  { transform: translateY(-4%) scale(1.08) rotate(-3deg); }
  36%  { transform: translateY(-4%) scale(1.08) rotate(3deg); }
  46%  { transform: translateY(-4%) scale(1.08) rotate(-2.5deg); }
  56%  { transform: translateY(-4%) scale(1.08) rotate(2.5deg); }
  66%  { transform: translateY(-4%) scale(1.08) rotate(-1deg); }
  76%  { transform: translateY(-3%) scale(1.06); }
  100% { transform: none; }
}
@keyframes jaw-drop {
  0%, 12% { transform: none; }
  26%, 72% { transform: translateY(7.6%); }
  92%, 100% { transform: none; }
}
@keyframes ring {
  0% { opacity: .7; transform: scale(.95); }
  100% { opacity: 0; transform: scale(1.45); }
}

/* Optional group photo behind the banner (set BCA_HERO_PHOTO in js/data.js).
   A pastel wash sits over the photo so the bear and headline stay readable. */
.hero.has-photo {
  background:
    linear-gradient(100deg, rgba(234, 241, 255, .92) 0%, rgba(220, 233, 255, .8) 45%, rgba(221, 216, 251, .45) 100%),
    var(--hero-photo) center / cover no-repeat,
    var(--ice);
}
.hero.has-photo .hero-blobs { opacity: .35; }

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-mark { order: -1; }
  .roar { width: min(62vw, 280px); }
  .hero.has-photo {
    background:
      linear-gradient(180deg, rgba(234, 241, 255, .7) 0%, rgba(220, 233, 255, .9) 45%, rgba(221, 216, 251, .94) 100%),
      var(--hero-photo) center / cover no-repeat,
      var(--ice);
  }
  .hero-content p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
}

/* ---------- Reports carousel ---------- */
.carousel {
  position: relative; overflow: hidden;
  width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 8px auto 0;
  border-radius: var(--r-lg); color: var(--white);
  background: var(--navy);
  box-shadow: var(--shadow);
}
.slides { display: flex; transition: transform .7s var(--ease); }
.slide {
  flex: 0 0 100%; min-height: 280px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px clamp(28px, 7vw, 84px) 56px;
  background:
    radial-gradient(520px 320px at 92% 0%, rgba(132, 181, 255, .5), transparent 70%),
    radial-gradient(420px 300px at 70% 120%, rgba(221, 216, 251, .28), transparent 70%),
    var(--navy);
}
.slide .tag {
  align-self: flex-start; margin: 0 0 14px; padding: 3px 12px; border-radius: 999px;
  background: rgba(132, 181, 255, .22); color: var(--ice); font-size: .85rem; font-weight: 600;
}
.slide h3 { font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.15; margin: 0 0 22px; max-width: 20em; }
.slide .btn { align-self: flex-start; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); border: 0; color: var(--white); font-size: 1.7rem; line-height: 1; cursor: pointer;
  transition: background .2s;
}
.carousel-arrow:hover { background: rgba(255, 255, 255, .3); }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 9px; height: 9px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .45); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.dots button[aria-current="true"] { background: var(--sky); width: 26px; }

/* ---------- About ---------- */
.about { padding: clamp(56px, 8vw, 104px) 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 5vw, 72px); align-items: start; }
.about .section-title {
  position: sticky; top: 104px;
  font-weight: 800; color: var(--navy);
  font-size: clamp(2.2rem, 5.4vw, 3.8rem); line-height: .98; letter-spacing: -.035em; margin: 0;
}
.about-row { padding: 26px 0 28px; border-top: 1px solid var(--line); }
.about-row:first-child { border-top: 0; padding-top: 6px; }
.about-row h3 { margin: 0 0 8px; font-size: clamp(1.3rem, 2.4vw, 1.65rem); font-weight: 700; line-height: 1.15; }
.about-row h3 a {
  color: var(--navy); text-decoration: none;
  background: linear-gradient(var(--sky), var(--sky)) 0 100% / 0 .32em no-repeat;
  transition: background-size .35s var(--ease);
}
.about-row h3 a:hover, .about-row h3 a:focus-visible { background-size: 100% .32em; }
.about-row p { margin: 0; max-width: 62ch; color: #223a56; }
.about-row p + p { margin-top: 14px; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about .section-title { position: static; }
}

/* ---------- Generic page bits ---------- */
.page-hero {
  position: relative; text-align: center;
  margin-top: -76px; padding: calc(76px + clamp(44px, 7vw, 76px)) 0 clamp(52px, 7vw, 76px);
  background: linear-gradient(135deg, #eaf1ff 0%, var(--ice) 50%, var(--lilac) 100%);
  border-radius: 0 0 44px 44px;
  margin-bottom: 36px;
}
.page-hero h1 {
  font-weight: 800; color: var(--navy);
  font-size: clamp(2.2rem, 6vw, 4rem); margin: 0; line-height: 1; letter-spacing: -.035em;
}
.page-hero p { color: #2b4563; margin: 14px auto 0; max-width: 40em; }
.fine-print { font-size: .85rem; color: var(--muted); padding-bottom: 56px; margin: 0; }

.band { padding: 28px 0 72px; }
.band h2 {
  text-align: center; color: var(--navy); margin: 0 0 30px;
  font-weight: 800; font-size: clamp(1.8rem, 4.4vw, 2.7rem); letter-spacing: -.03em;
}

.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; counter-reset: step; }
.step {
  counter-increment: step; position: relative;
  background: var(--white); padding: 30px 26px 28px; border-radius: var(--r-lg);
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 50%;
  background: var(--ice); color: var(--navy); font: 700 1.05rem var(--font-display);
}
.step h3 { color: var(--navy); margin: 0 0 8px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--muted); }
.step .date { margin-top: 16px; font-weight: 600; color: var(--blue); }

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto 80px;
}
.split > div { padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 48px); border-radius: var(--r-lg); }
.split h2 { font-weight: 800; font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin: 0 0 16px; line-height: 1.05; letter-spacing: -.03em; }
.split p { margin: 0; }
.split p + p { margin-top: 14px; }
.split .light { background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.split .light h2 { color: var(--navy); }
.split .dark {
  color: #e8f0ff;
  background: radial-gradient(420px 300px at 100% 0%, rgba(132, 181, 255, .4), transparent 70%), var(--navy);
}
.split .dark h2 { color: var(--white); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { background: rgba(132, 181, 255, .2); border-radius: 999px; padding: 4px 13px; font-size: .9rem; }

/* ---------- Team ---------- */
.team-heading {
  text-align: center; color: var(--navy); margin: 0 0 26px;
  font-weight: 800; font-size: clamp(1.8rem, 4.4vw, 2.7rem); letter-spacing: -.03em;
}
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; padding: 0 0 80px; max-width: 980px; margin: 0 auto; }
@media (max-width: 760px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } }
.member { text-align: center; }
.member .photo {
  aspect-ratio: 1; width: 100%; border-radius: var(--r-lg);
  background: var(--ice); object-fit: cover;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.member:hover .photo { transform: translateY(-5px) rotate(-1.5deg); box-shadow: var(--shadow); }
.member h3 { margin: 14px 0 0; color: var(--navy); font-size: 1.12rem; }
.member p { margin: 0; color: var(--muted); font-size: .94rem; }
.member a { font-size: .88rem; }

/* ---------- Reports + Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 8px; justify-content: center; }
.filters button {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 9px 20px; cursor: pointer;
  font: 600 1rem var(--font-display); color: var(--navy);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.filters button:hover { background: var(--ice); transform: translateY(-1px); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

.report-list, .project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding: 28px 0 56px; }
.report-list:empty, .project-list:empty { padding: 0; }
.report-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 24px; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.report-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.report-card .tag {
  align-self: flex-start; margin: 0; padding: 2px 11px; border-radius: 999px;
  background: var(--ice); color: var(--navy); font-size: .82rem; font-weight: 600;
}
.report-card h3 { color: var(--navy); margin: 12px 0 8px; font-size: 1.22rem; line-height: 1.25; }
.report-card h3 a { color: inherit; text-decoration: none; }
.report-card h3 a:hover { text-decoration: underline; }
.report-card p { margin: 0 0 14px; color: var(--muted); font-size: .96rem; }
.report-card .team { color: var(--ink); font-size: .9rem; }
.report-card time { margin-top: auto; font-size: .85rem; color: var(--muted); }
.empty {
  text-align: center; margin: 24px auto 40px; padding: 44px 24px; max-width: 620px;
  color: var(--muted); background: var(--white); border: 1px dashed var(--periwinkle); border-radius: var(--r-lg);
}

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; padding-bottom: 88px; }
.legal h2 { color: var(--navy); font-size: 1.4rem; margin: 40px 0 8px; }
.legal h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.legal .updated { color: var(--muted); font-size: .92rem; }
.legal .callout { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; margin: 24px 0; }
.legal ul { padding-left: 1.2em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: #d6e4fb; text-align: center;
  padding: 52px var(--gutter) 30px; border-radius: 44px 44px 0 0;
}
.site-footer .footer-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3.5vw, 2.1rem); letter-spacing: -.03em; color: var(--white); margin: 0 0 14px; }
.socials { display: flex; justify-content: center; gap: 12px; margin-bottom: 14px; }
.socials a {
  color: var(--white); display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(132, 181, 255, .18); transition: background .2s, transform .25s var(--ease);
}
.socials a:hover { background: var(--sky); color: var(--navy); transform: translateY(-3px); }
.socials svg { width: 22px; height: 22px; }
.site-footer .email { font-weight: 600; color: var(--white); text-decoration: none; }
.site-footer .email:hover { text-decoration: underline; }
.footer-legal { margin: 28px auto 0; padding-top: 20px; border-top: 1px solid rgba(132, 181, 255, .28); max-width: var(--max); font-size: .82rem; color: #a9bfdf; }
.footer-legal nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 10px; }
.footer-legal a { color: #cfe0fb; }
.footer-legal a:hover { color: var(--white); }
.footer-legal p { margin: 4px auto; max-width: 760px; }

/* ---------- Scroll reveal (class added by main.js) ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
