@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =========================================================
   BRAIN.FM HELP CENTER STYLES
   Done so far: colors and fonts, header and search,
   topic cards, home page spacing, headline text
   Upload in Help Scout: Manage > Docs > [site] > Custom Code
   ========================================================= */


/* ---------- COLORS ----------
   Change a color here and it changes everywhere. */
:root {
  --bfm-bg: #0D0C11;              /* page background (near-black, like brain.fm) */
  --bfm-surface: #17151F;         /* cards, boxes, inputs */
  --bfm-surface-raised: #1F1C29;  /* dropdowns, pop-ups */
  --bfm-border: rgba(255, 255, 255, 0.10);
  --bfm-text: #F5FCFF;            /* Calm White: titles, main text */
  --bfm-text-soft: rgba(245, 252, 255, 0.80);   /* body text */
  --bfm-text-muted: rgba(245, 252, 255, 0.60);  /* dates, small notes */
  --bfm-blurple: #4E17F4;
  --bfm-pink: #F34675;            /* Cell Red */
  --bfm-link: #12DAB2;            /* bright teal links */
  --bfm-focus: #69CAFF;           /* keyboard focus ring */
  --bfm-focus-color: #FE5A83;     /* Mental State: Focus */
  --bfm-relax-color: #69CAFF;     /* Mental State: Relax */
  --bfm-sleep-color: #BD63F4;     /* Mental State: Sleep */
  --bfm-meditate-color: #12DAB2;  /* Mental State: Meditate */
  --bfm-gradient: linear-gradient(90deg, #4E17F4 0%, #F34675 100%); /* brand button gradient */
  --bfm-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}


/* ---------- PAGE BASE ---------- */
html,
body {
  background: var(--bfm-bg) !important;
  color: var(--bfm-text-soft);
  font-family: var(--bfm-font) !important;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, input, button, select, textarea,
.navbar, #fullArticle, .btn {
  font-family: var(--bfm-font) !important;
}


/* ---------- HEADINGS AND TEXT ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--bfm-text);
  font-family: var(--bfm-font);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: 32px; line-height: 36px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 24px; line-height: 30px; }
h3 { font-size: 18px; line-height: 24px; }

p, li { color: var(--bfm-text-soft); }
strong, b { color: var(--bfm-text); }


/* ---------- LINKS ---------- */
a,
a:visited { color: var(--bfm-link); }
a:hover,
a:focus { color: var(--bfm-text); }

/* Visible outline for people using a keyboard */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--bfm-focus);
  outline-offset: 2px;
}


/* ---------- HEADER (top bar) ---------- */
.navbar .navbar-inner {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}
.navbar {
  position: relative;
  z-index: 2;
}

/* Logo: kept small and tidy, like brain.fm */
.navbar .brand {
  padding: 0 !important;
}
.navbar .brand img {
  height: 44px !important;
  width: auto !important;
  max-height: 44px !important;
}

/* Menu links */
.navbar .nav li a,
.navbar .nav li a:visited {
  color: var(--bfm-text-soft) !important;
  text-shadow: none !important;
  font-weight: 500;
}
.navbar .nav li a:hover,
.navbar .nav li.active a {
  color: var(--bfm-text) !important;
  background: transparent !important;
}

/* "Contact": outlined pill, like "Go to web app" */
.navbar .nav #contact a,
.navbar .nav #contactMobile a,
.navbar .nav a.contactUs {
  border: 1px solid rgba(255, 255, 255, 0.30) !important;
  border-radius: 999px !important;
  padding: 10px 22px !important;
  font-weight: 700 !important;
  color: var(--bfm-text) !important;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.navbar .nav #contact a:hover,
.navbar .nav #contactMobile a:hover,
.navbar .nav a.contactUs:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.60) !important;
}

/* Menu button on phones */
.navbar .btn-navbar {
  background: transparent !important;
  background-image: none !important;
  border: 1px solid var(--bfm-border) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
.navbar .btn-navbar .icon-bar {
  background: var(--bfm-text) !important;
  box-shadow: none !important;
}


/* ---------- HOME SEARCH AREA (the glow) ---------- */
#docsSearch {
  background:
    radial-gradient(ellipse 45% 70% at 62% 10%, rgba(243, 70, 117, 0.30), transparent 70%),
    radial-gradient(ellipse 50% 80% at 38% 0%, rgba(78, 23, 244, 0.40), transparent 70%),
    var(--bfm-bg) !important;
  border: 0 !important;
  margin-top: -100px !important;   /* lets the glow sit behind the header too */
  padding: 150px 20px 56px !important;  /* bottom space trimmed so the cards sit closer */
  margin-bottom: 0 !important;
  text-align: center;
}

/* Headline
   The text set in Help Scout is hidden, and "How can we help?" is shown instead.
   To change the headline later, edit the words inside content: "..." below. */
#docsSearch h1 {
  color: var(--bfm-text) !important;
  font-size: 0 !important;          /* hides the original headline text */
  line-height: 0 !important;
  max-width: 720px;
  margin: 0 auto 32px !important;
}
#docsSearch h1 img { display: none !important; }   /* hides the old emoji if it shows as an image */
#docsSearch h1::before {
  content: "How can we help?";
  display: block;
  color: var(--bfm-text);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Search box: one rounded pill with the button inside */
#searchBar {
  position: relative !important;
  max-width: 640px !important;
  width: 100% !important;
  margin: 0 auto !important;
  float: none !important;
}
#searchBar .search-query {
  display: block !important;
  margin: 0 !important;
  width: 100% !important;
  height: 64px !important;
  box-sizing: border-box !important;
  padding: 0 150px 0 28px !important;
  font-size: 18px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 999px !important;
  color: var(--bfm-text) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#searchBar .search-query:focus {
  outline: none !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 0 4px rgba(78, 23, 244, 0.35), 0 10px 40px rgba(0, 0, 0, 0.35) !important;
}

/* Search button inside the pill: purple-to-pink gradient, like brain.fm buttons */
#searchBar button {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;   /* keeps the button centered in the bar */
  right: 8px !important;
  margin: 0 !important;
  height: 48px !important;
  padding: 0 28px !important;
  border-radius: 999px !important;
  background: var(--bfm-gradient) !important;
  color: #FFFFFF !important;
  border: 0 !important;
  box-shadow: 0 4px 20px rgba(78, 23, 244, 0.35) !important;
  text-shadow: none !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}
#searchBar button:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 28px rgba(243, 70, 117, 0.45) !important;
}

/* Other search boxes (sidebar on article pages) */
.search-query {
  background: var(--bfm-surface) !important;
  border: 1px solid var(--bfm-border) !important;
  color: var(--bfm-text) !important;
  box-shadow: none !important;
}
.search-query::placeholder { color: var(--bfm-text-muted); }

/* Search suggestions that drop down while typing */
#serp-dd,
#serp-dd .result {
  background: var(--bfm-surface-raised) !important;
  border-color: var(--bfm-border) !important;
  border-radius: 16px !important;
  text-align: left;
}
#serp-dd .result a { color: var(--bfm-text) !important; }
#serp-dd .result > li.active,
#serp-dd .result a:hover { background: rgba(255, 255, 255, 0.06) !important; }


/* ---------- HOME TOPIC CARDS ----------
   Each card gets its own Mental State color, by position:
   1st Focus pink, 2nd Relax blue, 3rd Sleep purple, 4th Meditate teal.
   A 5th card starts the colors over. Reordering topics moves the colors. */
.collection-category h2,
.collection-category h2 a { color: var(--bfm-text) !important; }

.category-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 760px;
  margin: 8px auto 80px !important;   /* bottom space keeps the footer off the cards */
  padding: 0 20px !important;
  position: relative;
  isolation: isolate;
}
/* Soft second glow behind the cards, so the color carries down the page */
.category-list::before {
  content: "" !important;
  position: absolute;
  inset: -60px -120px;
  background:
    radial-gradient(ellipse 50% 60% at 25% 55%, rgba(78, 23, 244, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 55% at 78% 45%, rgba(243, 70, 117, 0.10), transparent 70%);
  z-index: -1;
  pointer-events: none;
  display: block !important;
}
.category-list::after { display: none !important; }

/* The card itself */
.category-list .category {
  --card-accent: var(--bfm-focus-color);
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  width: auto !important;
  min-height: 150px;
  margin: 0 !important;
  float: none !important;
  padding: 28px !important;
  box-sizing: border-box;
  text-align: left !important;
  text-decoration: none !important;
  background: linear-gradient(160deg, #241F33 0%, #16141D 100%) !important;
  border: 1px solid var(--bfm-border) !important;
  border-radius: 24px !important;
  box-shadow: 0 4px 52px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.category-list .category:nth-child(4n+2) { --card-accent: var(--bfm-relax-color); }
.category-list .category:nth-child(4n+3) { --card-accent: var(--bfm-sleep-color); }
.category-list .category:nth-child(4n+4) { --card-accent: var(--bfm-meditate-color); }

/* The colored glow in the top-right corner of each card */
.category-list .category::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--card-accent);
  opacity: 0.35;
  filter: blur(50px);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Card text */
.category-list .category h3 {
  position: relative;
  color: var(--bfm-text) !important;
  font-size: 20px !important;
  line-height: 26px !important;
  font-weight: 700 !important;
  margin: 0 0 6px !important;
}
.category-list .category p {
  position: relative;
  color: var(--bfm-text-soft) !important;
  margin: 0 !important;
}
.category-list .category .article-count {
  position: relative;
  color: var(--bfm-text-muted) !important;
  font-size: 14px !important;
  margin: 0 !important;
}

/* Hover: card lifts a little, border and glow pick up the card's color */
.category-list .category:hover {
  transform: translateY(-3px);
  border-color: var(--card-accent) !important;
}
.category-list .category:hover::before { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  .category-list .category,
  .category-list .category::before { transition: none; }
  .category-list .category:hover { transform: none; }
}


/* ---------- MAIN CONTENT AREA ---------- */
#contentArea,
#main-content,
.contentWrapper {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--bfm-text-soft);
}


/* ---------- SIDEBAR (left menu on topic and article pages) ---------- */
#sidebar,
#sidebar .nav-list { background: transparent !important; }
#sidebar h3 { color: var(--bfm-text-muted) !important; }
#sidebar .nav-list a { color: var(--bfm-text-soft) !important; }
#sidebar .nav-list .active a,
#sidebar .nav-list a:hover {
  color: var(--bfm-text) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}


/* ---------- TOPIC PAGES (lists of articles) ---------- */
#categoryHead h1 { color: var(--bfm-text) !important; }
#categoryHead p,
#categoryHead .descrip { color: var(--bfm-text-soft) !important; }
.articleList li a { color: var(--bfm-text-soft) !important; }
.articleList li a:hover { color: var(--bfm-text) !important; }
.articleList li i { color: var(--bfm-text-muted) !important; }


/* ---------- ARTICLE TEXT ---------- */
#fullArticle .title { color: var(--bfm-text) !important; }
#fullArticle,
#fullArticle p,
#fullArticle li {
  color: var(--bfm-text-soft);
  font-size: 17px;
  line-height: 28px;
}
#fullArticle h2,
#fullArticle h3 { color: var(--bfm-text) !important; }
#fullArticle a { color: var(--bfm-link) !important; }
#fullArticle a:hover { color: var(--bfm-text) !important; }
#fullArticle hr { border-color: var(--bfm-border) !important; }

#fullArticle code,
#fullArticle pre {
  background: var(--bfm-surface) !important;
  color: var(--bfm-text) !important;
  border-color: var(--bfm-border) !important;
}

#fullArticle table td,
#fullArticle table th { border-color: var(--bfm-border) !important; }

/* Numbered step circles */
#fullArticle dt {
  background: var(--bfm-blurple) !important;
  color: #FFFFFF !important;
}

/* Note boxes (callouts) */
#fullArticle .callout,
#fullArticle .callout-blue,
#fullArticle .callout-green,
#fullArticle .callout-yellow,
#fullArticle .callout-red {
  background: var(--bfm-surface) !important;
  color: var(--bfm-text-soft) !important;
  border: 1px solid var(--bfm-border) !important;
  border-left: 4px solid var(--bfm-text-muted) !important;
}
#fullArticle .callout-blue  { border-left-color: var(--bfm-relax-color) !important; }
#fullArticle .callout-green { border-left-color: var(--bfm-meditate-color) !important; }
#fullArticle .callout-yellow { border-left-color: var(--bfm-sleep-color) !important; }
#fullArticle .callout-red   { border-left-color: var(--bfm-pink) !important; }

/* "Last updated" line */
.articleFoot,
.articleFoot p,
.articleFoot time { color: var(--bfm-text-muted) !important; }

/* "Did this answer your question?" box */
.articleRatings {
  background: var(--bfm-surface) !important;
  border-color: var(--bfm-border) !important;
  color: var(--bfm-text-soft) !important;
}

/* "Related articles" box */
.related {
  background: var(--bfm-surface) !important;
  border: 1px solid var(--bfm-border) !important;
}
.related h3 { color: var(--bfm-text) !important; }
.related ul li a { color: var(--bfm-text-soft) !important; }
.related ul li a:hover { color: var(--bfm-text) !important; }


/* ---------- BUTTONS (white pills, like brain.fm) ---------- */
.btn,
.btn-primary,
#sbContact {
  background: #FFFFFF !important;
  background-image: none !important;
  color: var(--bfm-bg) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 700;
}
.btn:hover,
.btn-primary:hover,
#sbContact:hover {
  background: #E3EBF0 !important;
  color: var(--bfm-bg) !important;
}


/* ---------- FORMS (contact form) ---------- */
input[type="text"],
input[type="email"],
textarea,
select {
  background: var(--bfm-surface) !important;
  color: var(--bfm-text) !important;
  border: 1px solid var(--bfm-border) !important;
  box-shadow: none !important;
}
.modal,
.modal-body,
.modal-header,
.modal-footer {
  background: var(--bfm-surface-raised) !important;
  border-color: var(--bfm-border) !important;
  color: var(--bfm-text-soft) !important;
}
label { color: var(--bfm-text-soft) !important; }


/* ---------- FOOTER ---------- */
footer,
footer p { background: transparent !important; color: var(--bfm-text-muted) !important; }
footer {
  clear: both;
  padding: 32px 20px 40px !important;
  font-size: 14px;
}
footer a { color: var(--bfm-text-muted) !important; }
footer a:hover { color: var(--bfm-text) !important; }


/* ---------- PHONES AND SMALL SCREENS ---------- */
@media (max-width: 768px) {
  #docsSearch {
    padding: 130px 16px 40px !important;
  }
  #docsSearch h1 {
    margin-bottom: 24px !important;
  }
  #docsSearch h1::before {
    font-size: 32px;
  }
  #searchBar .search-query {
    height: 56px !important;
    font-size: 16px !important;
    padding: 0 110px 0 20px !important;
  }
  #searchBar button {
    height: 42px !important;
    right: 7px !important;
    padding: 0 18px !important;
  }
  .navbar .nav a.contactUs {
    display: inline-block !important;
    margin-top: 8px;
  }

  /* Topic cards stack in one column */
  .category-list {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 16px !important;
    margin-bottom: 56px !important;
  }
  .category-list .category {
    min-height: 0;
    padding: 22px !important;
    border-radius: 20px !important;
  }
}
