/*
 * Book2Brain — over the template.
 *
 * The template was built for a pink brand on a photographic hero: the header
 * is transparent with white links, which on a white page is invisible, and
 * every button is a two-colour gradient that turned muddy once the pink
 * became brass. This file fixes those rather than editing the template.
 */

:root {
  --ink: #191b23;
  --ink-deep: #11131a;
  --brass: #d8a94a;
  --brass-dark: #b98f35;
  --paper: #fbfaf5;
  --muted: #6f6e78;
  --line: #e8e5dc;
}

/* ---- header ------------------------------------------------------------ */

/* Sits on the dark hero, so white reads. */
#header-sticky .main-menu ul li a,
#header-sticky .b2b-wordmark { color: #fff; }
#header-sticky .b2b-wordmark span { color: var(--brass); }
#header-sticky .main-menu ul li a:hover { color: var(--brass); }

/* Once scrolled past the hero it floats over light sections, so it takes
   its own dark ground with it rather than turning invisible. */
.sticky-menu {
  background: rgba(17, 19, 26, .96) !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px rgba(17, 19, 26, .18) !important;
}
.sticky-menu .second-menu::before { display: none; }

.responsive i { color: #fff; }

/* ---- buttons ----------------------------------------------------------- */

/* One solid colour. The template's gradient ran dark-to-brass and read as a
   smudge, with a coloured halo left over from the old brand. */
.btn,
.slider-btn .btn,
.header-btn .btn {
  background: var(--brass) !important;
  background-image: none !important;
  color: var(--ink) !important;
  border: 1px solid var(--brass) !important;
  box-shadow: none !important;
  font-weight: 600;
  letter-spacing: .1px;
  text-transform: none;
  border-radius: 8px;
  padding: 14px 26px;
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--brass-dark) !important; transform: translateY(-1px); }

/* Needs to outrank `.slider-btn .btn` above, which is more specific than a
   single class and was winning. */
.btn.btn-outline,
.slider-btn .btn.btn-outline,
.header-btn .btn.btn-outline {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .38) !important;
}
.btn.btn-outline:hover,
.slider-btn .btn.btn-outline:hover { background: rgba(255, 255, 255, .08) !important; color: #fff !important; }

/* On light sections an outline button needs the opposite treatment. */
.on-light .btn.btn-outline {
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
.on-light .btn.btn-outline:hover { background: #fff !important; }

/* ---- hero -------------------------------------------------------------- */

/* Dark, so the white header has something to stand on — and because the
   product itself is a lit page in a dark room. */
.b2b-hero {
  background: radial-gradient(120% 90% at 78% 12%, #262a3d 0%, var(--ink) 42%, var(--ink-deep) 100%);
  color: #fff;
  padding: 150px 0 110px;
  margin-top: -89px;   /* the header sits inside it */
  position: relative;
  overflow: hidden;
}
.b2b-hero h1 {
  color: #fff;
  font-size: 54px;
  line-height: 1.12;
  letter-spacing: -1px;
  margin-bottom: 22px;
}
.b2b-hero h1 span { color: var(--brass); }
.b2b-hero p.lead { color: rgba(255, 255, 255, .76); font-size: 18.5px; line-height: 1.65; max-width: 34em; }
.b2b-hero .eyebrow {
  display: inline-block; color: var(--brass); font-size: 13px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 18px;
}
.b2b-hero .under { color: rgba(255, 255, 255, .5); font-size: 14.5px; margin-top: 18px; }
.b2b-hero .app-shot {
  width: 100%; max-width: 330px; height: auto;
  /* The mockup carries its own frame and shadow. */
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .55));
}

/* The template hides `.slider-btn` outright below 991px — its own hero had no
   call to action on a phone. Ours is the whole point of the page. */
.b2b-hero .slider-btn {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px;
}
.b2b-hero .slider-btn .btn { margin: 0 !important; }

/* The buttons sit under the headline on a wide screen, where the row has
   already wrapped, so they need the gap the copy block no longer provides. */
.b2b-hero .hero-cta { margin-top: 30px; }

@media (max-width: 991px) {
  .b2b-hero { padding: 120px 0 70px; }
  .b2b-hero h1 { font-size: 36px; }
  .b2b-hero .app-shot { max-width: 240px; }
  /* Stacked, the app comes between the promise and the button. */
  .b2b-hero .hero-shot { margin: 34px 0 6px; }
}

@media (max-width: 575px) {
  /* Full-width and stacked, so both are a comfortable thumb target. */
  .b2b-hero .slider-btn { flex-direction: column; align-items: stretch; }
  .b2b-hero .slider-btn .btn { width: 100%; text-align: center; padding: 15px 20px; }
  .b2b-hero h1 { font-size: 31px; }
  .b2b-section { padding: 60px 0; }
  .b2b-section h2 { font-size: 27px; }
}

/* ---- sections ---------------------------------------------------------- */

.b2b-section { padding: 88px 0; }
.b2b-section.tinted { background: var(--paper); }
.b2b-section h2 { font-size: 36px; letter-spacing: -.6px; margin-bottom: 14px; color: var(--ink); }
.b2b-section .sub { color: var(--muted); font-size: 17.5px; line-height: 1.65; max-width: 38em; margin: 0 auto; }

.b2b-dark { background: var(--ink); color: #fff; }
.b2b-dark h2 { color: #fff; }
.b2b-dark .sub { color: rgba(255, 255, 255, .7); }

/* The problem, stated as three plain facts. */
.fact { padding: 26px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.fact:last-child { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.fact h5 { color: #fff; font-size: 19px; margin-bottom: 6px; }
.fact p { color: rgba(255, 255, 255, .64); margin: 0; line-height: 1.6; }

.step { padding: 30px 28px; background: #fff; border: 1px solid var(--line); border-radius: 14px; height: 100%; }
.step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(216, 169, 74, .16); color: var(--brass-dark);
  font-weight: 700; margin-bottom: 16px;
}
.step h5 { font-size: 19px; margin-bottom: 8px; color: var(--ink); }
.step p { color: var(--muted); margin: 0; line-height: 1.6; }

/* The five dots, as the app shows them. */
.dots { display: flex; gap: 10px; justify-content: center; margin: 26px 0 8px; flex-wrap: wrap; }
.dot { text-align: center; width: 92px; }
.dot i { display: block; width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 8px; border: 2px solid; }
.dot span { font-size: 12.5px; color: var(--muted); }

.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item h5 { font-size: 18px; margin-bottom: 8px; color: var(--ink); }
.faq-item p { color: var(--muted); margin: 0; line-height: 1.7; }

/* ---- footer ------------------------------------------------------------ */

.footer-bg { background: var(--ink-deep) !important; }
.footer-bg .footer-link ul li a { color: rgba(255, 255, 255, .62); }
.footer-bg .footer-link ul li a:hover { color: var(--brass); }
.footer-bg .f-widget-title h5 { color: #fff; }
.footer-bg .footer-text p { color: rgba(255, 255, 255, .55); }
.copyright-wrap { border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0; margin-top: 30px; color: rgba(255, 255, 255, .45); font-size: 14px; }

/* ---- the hero's playable card ------------------------------------------ */

.demo { max-width: 340px; margin: 0 auto; }

/* The device frame is decoration: it earns its height on a wide screen and
   is dropped on a phone, where the card is the whole point. */
.demo-frame {
  border-radius: 40px; padding: 10px;
  background: linear-gradient(160deg, #3a3d48 0%, #23252e 42%, #16171d 100%);
  box-shadow: 0 40px 70px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.demo-screen {
  background: #191b23; border-radius: 31px; padding: 20px 14px 16px;
  display: flex; flex-direction: column; gap: 12px; overflow: hidden;
}

.demo-bar { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.demo-title { color: #ecedf1; font-size: 16px; font-weight: 600; margin-right: auto; }
.demo-count { color: #ecedf1; font-size: 13px; font-weight: 600; }
.demo-ring {
  width: 20px; height: 20px; border-radius: 50%;
  background: conic-gradient(var(--brass) var(--turn, 0deg), #2b2f3b 0deg);
  transition: background .35s ease;
  position: relative;
}
.demo-ring::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #191b23;
}
.demo.is-complete .demo-ring { background: conic-gradient(#30a46c 360deg, #30a46c 0deg); }

.demo-card {
  background: #fbfaf5; border-radius: 8px; border: 1px solid #e8e4d8;
  min-height: 250px; display: flex; flex-direction: column; overflow: hidden;
  transition: transform .24s ease, opacity .24s ease;
}
.demo-card.is-leaving { transform: translateX(-46px); opacity: 0; }
.demo-card.is-arriving { transform: translateX(46px); opacity: 0; transition: none; }
.demo-marker { display: block; height: 4px; background: #f2cf4a; }
.demo-body { padding: 22px 20px; }
.demo-passage {
  font-family: 'Literata', Georgia, serif; font-size: 17px; line-height: 1.55;
  color: #1d1e24; margin: 0;
}
.demo-note {
  font-family: 'Literata', Georgia, serif; font-style: italic; font-size: 13.5px;
  color: #6b6a64; margin: 14px 0 0; padding-left: 11px; border-left: 2px solid #f2cf4a;
  line-height: 1.5;
}
.demo-source { color: #6b6a64; font-size: 12px; margin: 16px 0 0; }

.demo-prompt { color: #9ba1b0; font-size: 13px; margin: 2px 0 0; padding: 0 6px; }

.demo-dots { display: flex; gap: 6px; }
.demo-dot {
  flex: 1; background: none; border: 0; padding: 4px 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.demo-dot span {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid;
  background: color-mix(in srgb, var(--fill) 16%, transparent);
  transition: background .12s ease, transform .12s ease;
}
.demo-dot:hover span { background: color-mix(in srgb, var(--fill) 34%, transparent); }
.demo-dot:active span { background: var(--fill); transform: scale(.94); }
.demo-dot:focus-visible span { outline: 2px solid var(--brass); outline-offset: 3px; }
.demo-dot small { color: #9ba1b0; font-size: 10.5px; line-height: 1.1; }

.demo-hint { color: rgba(255, 255, 255, .42); font-size: 13px; text-align: center; margin: 14px 0 0; }

/* ---- the phone, on a wide screen ---------------------------------------
 *
 * Below this width the frame is dropped entirely; here it is worth its
 * height, so it is drawn as the thing people actually hold: the proportions
 * of a phone, the island at the top, the buttons down the sides. The screen
 * inside it is the live demo, not a picture of one.
 */
@media (min-width: 992px) {
  .demo { max-width: 296px; margin-left: auto; margin-right: auto; }

  .demo-frame {
    position: relative;
    border-radius: 48px;
    padding: 12px;
  }

  /* The island, sitting on the screen rather than cut out of it. */
  .demo-frame::before {
    content: "";
    position: absolute; z-index: 2;
    top: 24px; left: 50%; transform: translateX(-50%);
    width: 78px; height: 23px; border-radius: 12px;
    background: #05060a;
  }

  /*
   * Three buttons from one element: volume up and down on the left as
   * shadows of each other, power on the right.
   */
  .demo-frame::after {
    content: "";
    position: absolute;
    top: 122px; left: -2px;
    width: 3px; height: 32px; border-radius: 2px;
    background: #2e313c;
    box-shadow:
      0 44px 0 #2e313c,
      calc(100% + 292px) 18px 0 #2e313c;
  }

  .demo-screen {
    border-radius: 37px;
    aspect-ratio: 9 / 19.3;
    padding: 46px 14px 20px;
    gap: 14px;
  }

  /*
   * The card is as tall as its passage. The slack belongs below it, between
   * the card and the dial — a card stretched to fill a phone is mostly empty
   * paper.
   */
  .demo-card { flex: 0 0 auto; min-height: 0; }
  .demo-prompt { margin-top: auto; }
}

@media (max-width: 991px) {
  /* No frame, no chrome: the card and the dots, and the height they save. */
  .demo { max-width: 100%; }
  .demo-frame { background: none; box-shadow: none; padding: 0; border-radius: 0; }
  .demo-screen { background: none; border-radius: 0; padding: 0; gap: 10px; }
  .demo-bar { display: none; }
  .demo-card { min-height: 0; }
  .demo-hint { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-card { transition: none; }
}

/* ---- the menu on a phone ----------------------------------------------- */

@media (max-width: 1199px) {
  /*
   * The template drops a white panel here, while the links are white for the
   * dark hero above — so opening the menu showed nothing at all. It takes its
   * own dark ground instead of fighting over the text colour.
   */
  #mobile-menu {
    background: #11131a;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    margin-top: 12px;
    padding: 6px 4px;
    box-shadow: 0 20px 44px rgba(0, 0, 0, .45);
  }
  #mobile-menu ul li { display: block; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  #mobile-menu ul li:last-child { border-bottom: 0; }
  #mobile-menu ul li a {
    display: block; padding: 13px 16px; color: #ecedf1 !important; font-size: 15px;
  }
  #mobile-menu ul li a:hover { color: var(--brass) !important; }

  .responsive { cursor: pointer; }
  .responsive i { font-size: 24px; }
}

/* ---- a phone screen is shorter than a test viewport --------------------- */

@media (max-width: 767px) {
  /* Every line here pushes the demo below the fold, and the demo is the
     thing that explains the product. */
  .b2b-hero { padding: 96px 0 56px; }
  .b2b-hero h1 { font-size: 27px; line-height: 1.18; margin-bottom: 16px; }
  .b2b-hero h1 br { display: none; }          /* one paragraph, not two lines */
  .b2b-hero .eyebrow { font-size: 11.5px; margin-bottom: 12px; }
  .b2b-hero p.lead { font-size: 15.5px; line-height: 1.55; }
  .b2b-hero .hero-shot { margin: 22px 0 4px; }
  .b2b-hero .hero-cta { margin-top: 20px; }
  .b2b-hero .under { font-size: 13px; margin-top: 14px; }
  .demo-passage { font-size: 16px; }
  .demo-body { padding: 18px 16px; }
}
