/* ============================================================
   Treetop BD Hub — shared design system
   Tokens lifted verbatim from the Parent Resource Hub
   (the-treehouse-preview.pages.dev) so the two sites read as one family.
   ============================================================ */

:root{
  --purple-900:#3D1540; --purple-800:#4A1B4E; --purple-700:#502050;
  --purple-500:#903090; --purple-200:#EBD8EB;
  --cream-100:#FBF4EA; --cream-200:#F5EAD8; --cream-300:#EFE0C6;
  --lime:#D0E030; --gold:#F0C830; --orange:#F0A060; --pink:#E080B0;
  --magenta:#B83280; --teal:#70C0E0;
  --ink:#1F1220; --ink-soft:#4A2F4D; --white:#fff;
  --r-md:16px; --r-lg:24px; --r-pill:36px;
  --shadow:0 10px 30px rgba(61,21,64,.10);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--cream-100); color:var(--ink);
  font-family:'Montserrat',system-ui,sans-serif; font-size:16px; line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
.wrap{max-width:1200px; margin:0 auto; padding:0 24px}
.eyebrow{font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--purple-500)}
h1,h2{font-family:'Unna',Georgia,serif; font-style:italic; font-weight:400; margin:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- Header ---------- */
header.site{
  position:sticky; top:0; z-index:50; background:rgba(251,244,234,.92);
  backdrop-filter:saturate(140%) blur(10px);
}
header.site::after{
  content:""; display:block; height:3px;
  background:linear-gradient(90deg,var(--lime),var(--gold),var(--orange),var(--pink),var(--magenta),var(--teal));
}
header.site .wrap{display:flex; align-items:center; justify-content:space-between; height:66px; gap:20px}
.brand{display:flex; align-items:center; text-decoration:none; gap:11px; flex:none}
.brand img{height:38px; width:auto; display:block}
.brand .brand-tag{
  font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  color:var(--purple-500); border-left:1.5px solid var(--purple-200); padding-left:11px; line-height:1.25; max-width:78px;
}
.head-nav{display:flex; gap:24px; align-items:center}
.head-nav a{font-weight:600; font-size:14.5px; color:var(--purple-700); text-decoration:none;
  padding:6px 1px; border-bottom:2.5px solid transparent; transition:.15s; white-space:nowrap}
.head-nav a:hover{color:var(--magenta)}
.head-nav a[aria-current="page"]{color:var(--purple-800); border-bottom-color:var(--lime)}
.head-right{display:flex; align-items:center; gap:16px}
.cta{
  display:inline-block; background:var(--lime); color:var(--purple-800);
  font-weight:700; text-decoration:none; padding:11px 20px; border-radius:var(--r-pill);
  font-size:14px; border:0; cursor:pointer; font-family:inherit;
  transition:transform .15s ease, background .15s ease; white-space:nowrap;
}
.cta:hover{transform:translateY(-1px); background:#DAEA3F}
.cta.ghost{background:transparent; color:var(--purple-700); border:1.5px solid var(--purple-200)}
.cta.ghost:hover{background:var(--purple-200); border-color:var(--purple-500)}
@media (max-width:900px){ .brand .brand-tag{display:none} }
@media (max-width:760px){ .head-nav{gap:15px; font-size:13px} .brand img{height:33px} .cta{padding:9px 14px; font-size:13px} }
@media (max-width:520px){ .head-nav{display:none} }

/* ---------- Hero ---------- */
.hero{
  position:relative; overflow:hidden; padding:60px 0 64px;
  background:
    radial-gradient(72% 60% at 88% 14%, rgba(184,50,128,.42), transparent 60%),
    radial-gradient(60% 65% at 4% 108%, rgba(112,192,224,.22), transparent 60%),
    radial-gradient(52% 48% at 55% -12%, rgba(240,200,48,.16), transparent 60%),
    linear-gradient(158deg, rgba(74,27,78,.97) 0%, rgba(61,21,64,.95) 55%, rgba(44,14,48,.98) 100%);
}
.hero .wrap{position:relative; z-index:2; display:grid; grid-template-columns:1.06fr .94fr; gap:48px; align-items:center}
.hero .eyebrow{margin-bottom:14px; color:var(--lime); display:inline-flex; align-items:center; gap:8px}
.hero .eyebrow svg{width:15px;height:15px; fill:currentColor}
.hero h1{font-size:clamp(33px,4.6vw,52px); line-height:1.06; color:#fff; max-width:15ch}
.hero h1 .accent{position:relative; color:var(--lime); white-space:nowrap}
.hero h1 .accent svg{position:absolute; left:-2%; bottom:-.30em; width:104%; height:.34em; overflow:visible}
.hero h1 .h1-aud{display:block; font-family:'Montserrat',sans-serif; font-style:normal; font-weight:700;
  font-size:clamp(17px,2.4vw,23px); color:#fff; margin-top:16px; max-width:26ch; line-height:1.3}
.hero h1 .h1-aud b{color:var(--pink); font-weight:700}
.hero p.lede{font-size:clamp(15.5px,1.9vw,18px); color:#E7D6E8; max-width:52ch; margin:18px 0 0}
.hero p.lede strong{color:#fff; font-weight:700}
.hero-leaf{position:absolute; z-index:0; pointer-events:none; display:block; height:auto; opacity:.5}

/* hero search — same pill silhouette as the parent hub's signup */
.herosearch{margin-top:26px; max-width:480px}
.herosearch form{display:flex; gap:8px; background:#fff; border-radius:var(--r-pill); padding:7px 7px 7px 16px;
  box-shadow:0 14px 34px rgba(0,0,0,.32); align-items:center}
.herosearch svg.mag{width:18px; height:18px; fill:none; stroke:#9A8A9A; stroke-width:2; flex:none}
.herosearch input{flex:1; min-width:0; border:0; outline:0; background:transparent; font-family:inherit;
  font-size:15px; color:var(--ink); padding:11px 8px}
.herosearch input::placeholder{color:#9A8A9A}
.herosearch button{flex:none; border:0; cursor:pointer; background:var(--lime); color:var(--purple-800);
  font-family:inherit; font-weight:700; font-size:15px; padding:12px 22px; border-radius:var(--r-pill);
  transition:transform .15s ease, background .15s ease}
.herosearch button:hover{transform:translateY(-1px); background:#DAEA3F}
.herosearch .micro{margin-top:12px; font-size:12.5px; color:#CBB6CC; display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.herosearch .micro b{color:#F2A6CC; font-weight:700}

/* hero stat rail */
.hero-stats{display:grid; grid-template-columns:repeat(2,1fr); gap:14px}
.hstat{background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.16); border-radius:var(--r-lg); padding:20px 20px 18px}
.hstat .n{font-family:'Unna',Georgia,serif; font-style:italic; font-size:38px; line-height:1; color:var(--lime); display:block}
.hstat .l{display:block; margin-top:8px; font-size:13px; font-weight:600; color:#E7D6E8; line-height:1.35}
@media (max-width:880px){
  .hero .wrap{grid-template-columns:1fr; gap:34px}
  .hero h1,.hero p.lede,.herosearch{max-width:none; width:100%}
  .hero-leaf{display:none}
}
@media (max-width:520px){ .hero-stats{grid-template-columns:1fr 1fr; gap:10px} .hstat{padding:15px} .hstat .n{font-size:29px} }

/* ---------- Filter tabs ---------- */
.filters{position:sticky; top:69px; z-index:40; background:var(--cream-100);
  padding:16px 0 14px; border-bottom:1px solid var(--cream-300); box-shadow:0 6px 16px rgba(61,21,64,.06)}
.filters .wrap{display:flex; flex-wrap:wrap; gap:9px 12px; align-items:center}
.filters-label{font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.09em;
  color:var(--purple-500); white-space:nowrap; display:flex; align-items:center; gap:7px; margin-right:2px}
.filters-label svg{width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2}
.tab{
  display:inline-flex; align-items:center; gap:8px;
  border:1.5px solid var(--purple-200); background:var(--white); color:var(--purple-700);
  font-family:inherit; font-size:14.5px; font-weight:600; cursor:pointer;
  padding:10px 17px; border-radius:var(--r-pill); transition:all .15s ease; white-space:nowrap;
}
.tab .tdot{width:9px; height:9px; border-radius:50%; flex:none}
.tab:hover{border-color:var(--purple-500); transform:translateY(-1px)}
.tab[aria-pressed="true"]{background:var(--purple-700); color:var(--white); border-color:var(--purple-700); box-shadow:0 6px 16px rgba(80,32,80,.25)}
.tab .n{opacity:.55; font-weight:600; font-variant-numeric:tabular-nums}
.tab[aria-pressed="true"] .n{opacity:.85}
@media (max-width:640px){
  .filters-label{display:none}
  .filters{padding:9px 0; top:69px}
  .filters .wrap{flex-wrap:nowrap; overflow-x:auto; gap:8px; padding-bottom:2px;
    scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity}
  .filters .wrap::-webkit-scrollbar{display:none}
  .tab{padding:8px 14px; font-size:13.5px; scroll-snap-align:start; flex:0 0 auto}
}

/* ---------- Category sections ---------- */
.cat-section{padding:44px 0 8px}
.cat-head{display:flex; align-items:baseline; gap:14px; margin-bottom:6px; flex-wrap:wrap}
.cat-head h2{font-size:clamp(26px,3.2vw,38px); color:var(--purple-800)}
.cat-head .dot{width:14px;height:14px;border-radius:50%;flex:none}
.cat-sub{color:var(--ink-soft); max-width:66ch; margin:0 0 26px; font-size:15px}

/* ---------- Collateral grid ---------- */
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(258px,1fr)); gap:26px}
.card{
  background:var(--white); border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow);
  display:flex; flex-direction:column; border:1px solid var(--cream-300);
  transition:transform .18s ease, box-shadow .18s ease;
}
.card:hover{transform:translateY(-3px); box-shadow:0 18px 42px rgba(61,21,64,.16)}
.thumb{position:relative; aspect-ratio:4/3; overflow:hidden; background:var(--purple-900); display:block}
.thumb img{width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s ease}
.card:hover .thumb img{transform:scale(1.04)}
/* generated cover when no thumbnail image exists */
.thumb .cover{position:absolute; inset:0; display:flex; flex-direction:column; justify-content:space-between;
  padding:16px 16px 14px; color:#fff}
.thumb .cover .ct{font-family:'Unna',Georgia,serif; font-style:italic; font-size:20px; line-height:1.2;
  text-shadow:0 2px 10px rgba(0,0,0,.28); max-width:15ch}
.thumb .cover .cf{font-size:10.5px; font-weight:700; letter-spacing:.11em; text-transform:uppercase; opacity:.9}
.thumb .cover::before{
  content:""; position:absolute; right:-34px; bottom:-46px; width:150px; height:150px; border-radius:50%;
  background:rgba(255,255,255,.10);
}
.badge{
  position:absolute; top:10px; right:10px; z-index:2; font-size:10.5px; font-weight:700; letter-spacing:.05em;
  text-transform:uppercase; background:rgba(255,255,255,.95); color:var(--purple-700); padding:4px 9px;
  border-radius:var(--r-pill); box-shadow:0 2px 6px rgba(61,21,64,.25);
}
.badge.new{background:var(--lime); color:var(--purple-800)}
.badge.soon{background:var(--cream-200); color:var(--ink-soft)}
.card-body{padding:16px 16px 18px; display:flex; flex-direction:column; gap:8px; flex:1}
.card-body h3{font-size:15.5px; font-weight:700; margin:0; line-height:1.35; color:var(--ink)}
.card-body p{font-size:13.5px; margin:0; color:var(--ink-soft); line-height:1.5}
.meta{display:flex; flex-wrap:wrap; gap:6px 10px; font-size:11.5px; color:#8B7A8C; font-weight:600;
  letter-spacing:.03em; text-transform:uppercase; margin-top:2px}
.meta span{display:inline-flex; align-items:center; gap:5px}
.card-actions{margin-top:auto; padding-top:12px; display:flex; gap:9px; align-items:center; flex-wrap:wrap}
.btn-dl{
  display:inline-flex; align-items:center; gap:7px; background:var(--purple-700); color:#fff;
  font-family:inherit; font-size:13px; font-weight:700; text-decoration:none; border:0; cursor:pointer;
  padding:10px 16px; border-radius:var(--r-pill); transition:.15s;
}
.btn-dl:hover{background:var(--magenta); transform:translateY(-1px)}
.btn-dl svg{width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2.2}
.btn-dl[aria-disabled="true"]{background:var(--cream-200); color:#9A8A9A; cursor:not-allowed; transform:none}
.btn-sec{
  display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--purple-500);
  text-decoration:none; background:none; border:0; cursor:pointer; font-family:inherit; padding:6px 2px;
}
.btn-sec:hover{text-decoration:underline}
.empty{padding:52px 24px; text-align:center; color:var(--ink-soft); background:var(--white);
  border:1px dashed var(--cream-300); border-radius:var(--r-lg)}
.empty b{display:block; font-size:17px; color:var(--purple-800); margin-bottom:6px}

/* ---------- Create band ---------- */
.createband{margin:64px 0 0; background:var(--purple-800); color:#fff; padding:52px 0 56px; position:relative; overflow:hidden}
.createband::before{content:""; position:absolute; inset:0;
  background:radial-gradient(60% 70% at 82% 10%, rgba(184,50,128,.45), transparent 62%),
             radial-gradient(50% 60% at 6% 100%, rgba(112,192,224,.20), transparent 62%)}
.createband .wrap{position:relative; z-index:2}
.createband .eyebrow{color:var(--lime); margin-bottom:12px}
.createband h2{color:#fff; font-size:clamp(26px,3.4vw,38px); max-width:20ch}
.createband > .wrap > p{color:var(--purple-200); max-width:60ch; margin:12px 0 30px; font-size:15.5px}
.tgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(232px,1fr)); gap:18px}
.tcard{
  display:flex; flex-direction:column; gap:9px; text-decoration:none; color:#fff;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.16); border-radius:var(--r-lg);
  padding:22px 20px 20px; transition:.18s;
}
.tcard:hover{background:rgba(255,255,255,.13); border-color:var(--lime); transform:translateY(-3px)}
.tcard .ico{width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:var(--lime); color:var(--purple-800); margin-bottom:4px}
.tcard .ico svg{width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2}
.tcard h3{margin:0; font-size:15.5px; font-weight:700; line-height:1.3}
.tcard p{margin:0; font-size:13px; color:var(--purple-200); line-height:1.5}
.tcard .go{margin-top:auto; padding-top:10px; font-size:12.5px; font-weight:700; color:var(--lime);
  display:inline-flex; align-items:center; gap:6px}

/* ---------- Footer ---------- */
footer.site{background:var(--purple-900); color:var(--white); padding:56px 0 40px}
footer.site .wrap{display:flex; flex-direction:column}
.foot-top{display:grid; grid-template-columns:1.15fr .85fr; gap:36px 56px; align-items:start}
footer h2{color:var(--white); font-size:clamp(24px,3vw,34px); max-width:18ch}
footer p{color:var(--purple-200); margin:10px 0 0; max-width:46ch; font-size:15px}
.foot-actions{display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-top:26px}
.foot-links{background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.15);
  border-radius:var(--r-lg); padding:24px}
.foot-links h3{font-family:'Unna',Georgia,serif; font-style:italic; font-weight:400; color:#fff; font-size:23px; margin:0 0 14px}
.foot-links ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:11px}
.foot-links a{color:var(--purple-200); text-decoration:none; font-size:14px; font-weight:600;
  display:inline-flex; align-items:center; gap:8px; transition:.15s}
.foot-links a:hover{color:var(--lime)}
.foot-links a svg{width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; flex:none}
footer .fine{width:100%; border-top:1px solid rgba(255,255,255,.15); margin-top:40px; padding-top:20px;
  font-size:12px; color:var(--purple-200); display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px}
footer .fine a{color:var(--lime); text-decoration:none}
@media (max-width:760px){ .foot-top{grid-template-columns:1fr; gap:30px} }

/* ---------- Toast ---------- */
.toast{
  position:fixed; left:50%; bottom:26px; transform:translate(-50%,20px); z-index:300;
  background:var(--purple-800); color:#fff; padding:13px 22px; border-radius:var(--r-pill);
  font-size:14px; font-weight:600; box-shadow:0 16px 40px rgba(0,0,0,.35);
  opacity:0; pointer-events:none; transition:opacity .22s ease, transform .22s ease;
  display:flex; align-items:center; gap:9px; max-width:calc(100vw - 40px);
}
.toast.show{opacity:1; transform:translate(-50%,0)}
.toast svg{width:16px; height:16px; fill:none; stroke:var(--lime); stroke-width:2.5; flex:none}
@media (prefers-reduced-motion:reduce){ *{animation:none !important; transition:none !important} }
