/* ===== Brain Groove — shared styles ===== */

:root {
  --blue:   #2F6BFF;
  --purple: #8A52DB;
  --green:  #0E824D;
  --red:    #BC2A20;
  --teal:   #0A7E8C;
  --amber:  #B26A00;

  --ink:        #1d1d2b;
  --ink-soft:   #4a4866;
  --muted:      #6a6883;
  --muted-2:    #6f6d88;
  --line:       #f0eef7;
  --line-2:     #e7e4f2;
  --lilac-bg:   #f7f5fc;
  --chip-bg:    #f4f2fb;

  --maxw: 1240px;

  --font-head: 'Fredoka', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background: #fff;
  color: var(--ink);
}
a { text-decoration: none; color: inherit; }

/* visible keyboard focus for all interactive elements */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.material-symbols-rounded { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.icon-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ---- layout helpers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 32px; }

/* ---- nav ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}
.nav.bordered { border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 42px; }
.brand span { font-family: var(--font-head); font-weight: 600; font-size: 25px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-weight: 500;
  font-size: 16px;
  color: #5b5972;
}
.navlink:hover { color: var(--ink); }
.nav-pill {
  background: var(--ink);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

/* ---- hero ---- */
.hero { text-align: center; padding: 64px 32px 40px; max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--purple);
  margin-bottom: 30px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(48px, 7vw, 86px);
  line-height: .96;
  letter-spacing: -.02em;
  max-width: 880px;
  margin: 0 auto 24px;
}
.hero .lead {
  font-size: 21px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.5;
}
.store-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.fineprint { font-size: 14px; color: var(--muted-2); }

/* ---- store buttons ---- */
.store {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 14px 24px;
  transition: transform .15s ease;
}
.store:hover { transform: translateY(-2px); }
.store.light { background: #fff; color: var(--ink); }
.store .label { line-height: 1.1; text-align: left; }
.store .label small { display: block; font-size: 11px; opacity: .7; }
.store.light .label small { opacity: .6; }
.store .label strong { font-family: var(--font-head); font-weight: 600; font-size: 18px; }

/* ---- phone mockups ---- */
.phone-stage {
  display: flex;
  justify-content: center;
  padding: 32px 32px 0;
}
.phone-trio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.phone {
  width: 270px;
  background: #1b1b2e;
  border-radius: 44px;
  padding: 11px;
  box-shadow: 0 24px 50px rgba(40, 30, 80, .18);
}
.phone img { width: 100%; display: block; border-radius: 34px; }
.phone.side { transform: scale(.9); opacity: .96; }
.phone.center {
  position: relative;
  z-index: 1;
  box-shadow: 0 34px 70px rgba(40, 30, 80, .26);
}

/* ---- category pills row ---- */
.pill-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 56px 32px 0;
}
.pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  padding: 12px 22px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 18px;
}
.pill .material-symbols-rounded { font-size: 22px; }

/* ---- section headings ---- */
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1;
  margin-bottom: 16px;
}
.section-head p {
  font-size: 19px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---- games / categories ---- */
.games { max-width: var(--maxw); margin: 0 auto; padding: 96px 32px 32px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cat-card {
  border-radius: 24px;
  padding: 38px;
  border: 1px solid;
  transition: transform .18s ease;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-icon .material-symbols-rounded { color: #fff; font-size: 32px; }
.cat-card h3 { font-family: var(--font-head); font-weight: 600; font-size: 30px; margin-bottom: 6px; }
.cat-card p { font-size: 16px; color: #5b5972; line-height: 1.5; }

.cat-card.blue   { background: #f5f8ff; border-color: #e3ecff; }
.cat-card.purple { background: #faf6ff; border-color: #ece0fb; }
.cat-card.green  { background: #f1faf5; border-color: #d4eede; }
.cat-card.red    { background: #fdf4f3; border-color: #f4d9d6; }
.cat-card.teal   { background: #eff9fa; border-color: #d2ebee; }
.cat-card.amber  { background: #fdf7ec; border-color: #f2e3c6; }

.t-blue   { color: var(--blue); }
.t-purple { color: var(--purple); }
.t-green  { color: var(--green); }
.t-red    { color: var(--red); }
.t-teal   { color: var(--teal); }
.t-amber  { color: var(--amber); }
.bg-blue   { background: var(--blue); }
.bg-purple { background: var(--purple); }
.bg-green  { background: var(--green); }
.bg-red    { background: var(--red); }
.bg-teal   { background: var(--teal); }
.bg-amber  { background: var(--amber); }

/* ---- features ---- */
.features { background: var(--lilac-bg); margin-top: 96px; padding: 88px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: #fff; border-radius: 24px; padding: 36px; }
.feature-card .big {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 48px;
  line-height: 1;
}
.feature-card h3 { font-family: var(--font-head); font-weight: 600; font-size: 22px; margin: 12px 0 8px; }
.feature-card p { font-size: 16px; color: var(--muted); line-height: 1.55; }
.feature-card a { color: var(--purple); font-weight: 600; }

/* ---- download CTA ---- */
.cta { max-width: var(--maxw); margin: 0 auto; padding: 96px 32px; }
.cta-inner {
  background: var(--ink);
  border-radius: 32px;
  padding: 72px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-inner h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  color: #fff;
  margin-bottom: 18px;
}
.cta-inner p { font-size: 19px; color: #b9b6e0; max-width: 480px; margin: 0 auto 36px; line-height: 1.5; }
.cta-inner .content { position: relative; z-index: 1; }
.cta .deco { position: absolute; opacity: .9; }
.cta .d1 { top: -30px; left: 8%;  width: 80px; height: 80px; background: var(--blue);   border-radius: 22px; transform: rotate(-14deg); }
.cta .d2 { bottom: -20px; left: 22%; width: 54px; height: 54px; background: var(--green);  border-radius: 16px; transform: rotate(12deg); }
.cta .d3 { top: 30px; right: 10%;  width: 64px; height: 64px; background: var(--red);    border-radius: 50%; }
.cta .d4 { bottom: -30px; right: 24%; width: 70px; height: 70px; background: var(--purple); border-radius: 20px; transform: rotate(8deg); }

/* ---- footer ---- */
.footer { background: var(--lilac-bg); padding: 56px 0; }
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-brand { max-width: 320px; }
.footer-brand .row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 34px; height: 34px; }
.footer-brand .name { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.footer-brand p { font-size: 15px; color: var(--muted); line-height: 1.55; }
.footer-col h4 { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--ink); margin-bottom: 14px; }
.footer-col .links { display: flex; flex-direction: column; gap: 11px; font-size: 15px; color: var(--muted); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 24px 32px 0;
  border-top: 1px solid var(--line-2);
  font-size: 14px;
  color: var(--muted-2);
}

/* compact footer (sub-pages) */
.footer-compact .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-compact { padding: 48px 0; }
.footer-compact .fc-brand { display: flex; align-items: center; gap: 10px; }
.footer-compact .fc-brand img { width: 32px; height: 32px; }
.footer-compact .fc-brand span { font-family: var(--font-head); font-weight: 600; font-size: 19px; }
.footer-compact .fc-links { display: flex; gap: 28px; font-size: 15px; color: var(--muted); }
.footer-compact .copyright { font-size: 14px; color: var(--muted-2); }

/* ---- document (privacy / accessibility) ---- */
.doc-header { max-width: 760px; margin: 0 auto; padding: 64px 32px 8px; }
.doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 22px;
}
.doc-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; }
.doc-header h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1.02;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}
.doc-header .updated { font-size: 16px; color: var(--muted-2); }
.doc-header .intro { font-size: 20px; color: var(--muted); line-height: 1.55; }

.doc { max-width: 760px; margin: 0 auto; padding: 24px 32px 96px; }
.doc p { font-size: 17px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 16px; }
.doc h2 { font-family: var(--font-head); font-weight: 600; font-size: 27px; margin: 48px 0 14px; color: var(--ink); }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 9px; }
.doc a { color: var(--purple); font-weight: 600; }
.doc .note {
  font-size: 14px;
  color: var(--muted-2);
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* commitment cards (accessibility) */
.commit { max-width: 980px; margin: 0 auto; padding: 48px 32px 8px; }
.commit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.commit-card { border-radius: 22px; padding: 30px; border: 1px solid; }
.commit-card h3 { font-family: var(--font-head); font-weight: 600; font-size: 20px; margin-bottom: 10px; }
.commit-card p { font-size: 16px; color: #5b5972; line-height: 1.55; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .cat-grid, .commit-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 18px; font-size: 15px; }
  .phone-trio { gap: 0; }
  .phone.side { display: none; }
  .phone.center { transform: none; }
}

/* Phones: tighten the gutters and scale the nav down so the brand + links fit
   on one row at ~360px widths (was overflowing the viewport). */
@media (max-width: 560px) {
  .wrap, .narrow { padding: 0 14px; }
  .nav { padding: 16px 0; }
  .brand { gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand span { font-size: 19px; }
  .nav-links { gap: 10px; font-size: 14px; }
  .nav-pill { padding: 8px 13px; font-size: 13px; }
}
