/* ============================================================
   MyCerebrum landing — styles
   Tuned to closely match the original Framer design.
   ============================================================ */

:root {
  /* Brand palette (from the original) */
  --purple: #7b3573;
  --purple-dark: #612a5b;
  --page: #f1f5f1;          /* light-gray page background */
  --white: #ffffff;

  /* Text */
  --text: rgba(42, 42, 42, 0.86);
  --text-muted: rgba(42, 42, 42, 0.55);
  --on-purple: rgba(255, 255, 255, 0.92);
  --on-purple-muted: rgba(255, 255, 255, 0.7);

  /* Type — the original uses Poppins throughout */
  --font: "Poppins", system-ui, sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: 40px;
  --radius: 8px;
  --radius-lg: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
strong { font-weight: 600; }

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

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

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.875rem;      /* 14px */
  line-height: 1;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--purple); color: var(--white); }
.btn--primary:hover { background: var(--purple-dark); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(42, 42, 42, 0.15);
}
.btn--ghost:hover { border-color: var(--purple); color: var(--purple); }

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Smooth alpha fade: fully opaque at the top -> fully transparent at the bottom */
  background: linear-gradient(
    to bottom,
    rgba(241, 245, 241, 1) 0%,
    rgba(241, 245, 241, 1) 82%,
    rgba(241, 245, 241, 0) 100%
  );
  padding-bottom: 12px;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 38px; height: 38px; }
.brand__name {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--purple);
}
.header__actions { display: flex; align-items: center; gap: 12px; }

/* Menu dropdown panel */
.menu-panel {
  position: absolute;
  right: var(--gutter);
  top: calc(100% + 8px);
  display: none;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(42, 42, 42, 0.18);
}
.menu-panel.is-open { display: flex; }
.menu-panel__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.menu-panel__list a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--text);
}
.menu-panel__list a:hover { background: var(--page); color: var(--purple); }
.menu-panel .btn { margin-top: 6px; width: 100%; }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 80px); }
.hero__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__title {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--purple);
  font-size: clamp(2.1rem, 6.4vw, 4.5rem);   /* up to 72px */
  line-height: 1.2;
  max-width: 1060px;
}
.hero__subtitle {
  margin-top: 20px;
  max-width: 620px;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--text);
}
.hero .btn { margin-top: 28px; }

/* Shared media frame (hero + features) */
.media-frame {
  border: 3px solid var(--purple);
  border-radius: 5px;
  overflow: hidden;
  background: var(--white);
}
.media-frame__video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }

/* ---------------------------------------------------------------
   Features
   --------------------------------------------------------------- */
.features { padding-block: clamp(24px, 4vw, 48px); }
.feature {
  display: grid;
  grid-template-columns: 1fr 1.35fr;   /* media column noticeably wider than text */
  align-items: center;
  gap: clamp(24px, 3vw, 40px);
  padding-block: clamp(28px, 4vw, 52px);
}
.feature--reverse { grid-template-columns: 1.35fr 1fr; }   /* media (wide) on the left */
.feature--reverse .feature__text { order: 2; }
.feature--reverse .feature__media { order: 1; }

.feature__title {
  font-weight: 600;
  color: var(--text);
  font-size: clamp(1.8rem, 4.2vw, 2.625rem);   /* up to 42px */
  line-height: 1.2;
}
.feature__desc {
  margin-top: 16px;
  font-size: 1.125rem;      /* 18px — matches original */
  line-height: 1.35;
}
.feature__text .btn { margin-top: 24px; }

/* ---------------------------------------------------------------
   FAQ — purple rounded panel, two columns
   --------------------------------------------------------------- */
.faq { padding-block: clamp(40px, 6vw, 80px); }
.faq__panel {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;   /* title vertically centered next to the list (matches original) */
  gap: clamp(28px, 5vw, 72px);
  background: var(--purple);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 64px);
}
.faq__title {
  font-weight: 600;
  color: var(--white);
  font-size: clamp(1.9rem, 4.6vw, 2.875rem);   /* up to 46px */
  line-height: 1.2;
}
.faq__list { list-style: none; margin: 0; padding: 0; }
.faq__item { border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
.faq__item:first-child { border-top: 1px solid rgba(255, 255, 255, 0.22); }
.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-weight: 500;
  font-size: 1rem;
  color: var(--white);
}
.faq__chevron {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-right: 2px solid rgba(255, 255, 255, 0.85);
  border-bottom: 2px solid rgba(255, 255, 255, 0.85);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -4px;
}
.faq__question[aria-expanded="true"] .faq__chevron { transform: rotate(-135deg); margin-top: 4px; }

.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.faq__answer > p {
  overflow: hidden;
  padding: 0 4px;
  color: var(--on-purple-muted);
}
.faq__question[aria-expanded="true"] + .faq__answer { grid-template-rows: 1fr; }
.faq__question[aria-expanded="true"] + .faq__answer > p { padding-bottom: 20px; }

/* ---------------------------------------------------------------
   CTA — plain, centered, on the page background
   --------------------------------------------------------------- */
.cta { padding-block: clamp(48px, 8vw, 104px); }
.cta__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta__title {
  font-weight: 600;
  color: var(--text);
  font-size: clamp(1.9rem, 4.6vw, 2.875rem);   /* up to 46px */
  line-height: 1.2;
}
.cta__text { margin-top: 16px; max-width: 460px; font-size: 1rem; line-height: 1.3; }
.cta .btn { margin-top: 26px; }

/* ---------------------------------------------------------------
   Footer — purple
   --------------------------------------------------------------- */
.site-footer { background: var(--purple); color: var(--on-purple); padding-block: 48px 28px; }
.site-footer .brand__name { color: var(--white); }
.site-footer .brand__mark { filter: brightness(0) invert(1); }
.footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.footer__contact { margin-top: 14px; color: var(--on-purple-muted); }
.footer__contact a { color: var(--white); font-weight: 500; }
.footer__nav { display: flex; flex-direction: column; gap: 12px; text-align: right; }
.footer__nav a { color: var(--on-purple); }
.footer__nav a:hover { color: var(--white); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  color: var(--on-purple-muted);
  font-size: 0.85rem;
}
.footer__legal { display: flex; gap: 20px; }
.footer__legal a:hover { color: var(--white); }

/* ---------------------------------------------------------------
   Scroll reveal (applied only when JS is available)
   --------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===============================================================
   Responsive — breakpoints mirror the original (810 / 1080)
   =============================================================== */
@media (max-width: 809px) {
  :root { --gutter: 16px; }

  /* Original shows only the Menu button on mobile */
  .header__actions .btn--ghost { display: none; }
  .menu-panel { right: var(--gutter); left: var(--gutter); min-width: 0; }

  /* Stack features: centered text, then media below (matches the original) */
  .feature { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .feature--reverse .feature__text,
  .feature--reverse .feature__media { order: 0; }
  .feature__text { text-align: center; }
  .feature__desc { max-width: none; margin-inline: auto; }

  .faq__panel { grid-template-columns: 1fr; }

  .footer__nav { text-align: left; flex-direction: row; flex-wrap: wrap; gap: 16px 22px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
