/* Baryah website. Light only, four brand colours: ink, white, violet, gold. */
:root {
  color-scheme: light;
  --bg: #f6efff;
  --surface: #ffffff;
  --soft: #efe2ff;
  --text: #24103f;
  --muted: #6a5a84;
  --accent: #8b3df0;
  --ink: #3b1470;
  --gold: #ffc21a;
  --gold-soft: #fff3cc;
  --line: rgba(59, 20, 112, 0.09);
  --shadow: 0 1px 0 rgba(59, 20, 112, 0.04), 0 20px 40px -28px rgba(59, 20, 112, 0.45);
  --heading: 'Fredoka', 'Nunito', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  /* Menu links are animated by the small script in index.html, so every browser scrolls the same way
     (Firefox and Safari skip CSS smooth scrolling when Reduce Motion is on). */
  scroll-behavior: auto;
  /* Keep section titles below the sticky top bar when the page opens at a #section */
  scroll-padding-top: 88px;
}

/* Fade between pages (Home, Support, Privacy) in browsers that support it */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
}

.topbar {
  view-transition-name: topbar;
}

/* The page fade is turned off for Reduce Motion. The short in-page scroll stays smooth on purpose (March's choice). */
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

a {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--heading);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---------- Top bar (flat, not floating) ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  /* Solid colour, no backdrop blur: a blurred sticky bar repaints on every scroll frame and makes scrolling heavy */
  background: rgba(246, 239, 255, 0.97);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 23px;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.links {
  display: flex;
  gap: 28px;
}

.links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}

.links a:hover {
  color: var(--accent);
}

/* ---------- Chip ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
}

.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 194, 26, 0.25);
}

.chip.light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ---------- Hero: centered text, one device rising from below ---------- */

.hero {
  padding-top: 64px;
  text-align: center;
  background: radial-gradient(50% 55% at 50% 100%, rgba(139, 61, 240, 0.22), transparent 70%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(46px, 8vw, 92px);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  background: linear-gradient(transparent 68%, rgba(255, 194, 26, 0.55) 68% 92%, transparent 92%);
}

.hero .lead {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 19px;
}

.stage {
  position: relative;
  max-width: 760px;
  height: 470px;
  margin: 48px auto 0;
}

.device {
  position: absolute;
  left: 50%;
  top: 0;
  width: 300px;
  height: 100%;
  transform: translateX(-50%);
  padding: 10px 10px 0;
  border-radius: 46px 46px 0 0;
  background: #1b0d30;
  box-shadow: 0 -10px 60px -20px rgba(59, 20, 112, 0.5);
  overflow: hidden;
}

.device img {
  width: 100%;
  border-radius: 36px 36px 0 0;
}

.hero-mascot {
  position: absolute;
  left: 40px;
  bottom: 24px;
  z-index: 3;
  width: 150px;
  filter: drop-shadow(0 14px 18px rgba(59, 20, 112, 0.25));
}

.float {
  position: absolute;
  z-index: 3;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}

.float small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.float strong {
  display: block;
  color: var(--ink);
  font-family: var(--heading);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
}

.f-budget {
  left: 0;
  top: 70px;
  width: 190px;
}

.bar {
  display: block;
  height: 8px;
  margin-top: 8px;
  border-radius: 99px;
  background: var(--soft);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}

.f-bill {
  right: 0;
  top: 130px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.f-bill strong {
  font-size: 18px;
}

.bill-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
}

.f-lang {
  right: 60px;
  bottom: 60px;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
}

.f-lang b,
.f-lang span {
  padding: 6px 14px;
  border-radius: 999px;
}

.f-lang b {
  background: var(--ink);
  color: #fff;
}

.f-lang span {
  color: var(--muted);
}

/* ---------- Section heads ---------- */

.section {
  padding: 96px 0 0;
}

.head {
  margin-bottom: 40px;
  text-align: center;
}

.head h2 {
  font-size: clamp(34px, 5vw, 52px);
}

.head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 19px;
}

/* ---------- Bento grid ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 28px;
  border-radius: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card .label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card h3 {
  font-size: 30px;
}

.card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.card.soft {
  background: var(--soft);
}

.card.gold {
  background: var(--gold-soft);
}

.card.ink {
  background: var(--ink);
  border-color: transparent;
}

.card.ink h3 {
  color: #fff;
}

.card.ink p {
  color: #d9c8f5;
}

.card.ink .label {
  color: var(--gold);
}

/* A cut-off phone screen peeking from the bottom of a card */
.peek {
  flex: none;
  width: 230px;
  height: 250px;
  margin: 24px auto -28px;
  padding: 8px 8px 0;
  border-radius: 34px 34px 0 0;
  background: #1b0d30;
  overflow: hidden;
}

.peek img {
  width: 100%;
  border-radius: 27px 27px 0 0;
}

.c-home {
  grid-column: span 4;
  flex-direction: row;
  align-items: flex-end;
  gap: 24px;
  min-height: 380px;
}

.c-home .copy {
  align-self: center;
  max-width: 330px;
}

.c-home .peek {
  width: 270px;
  height: 340px;
  margin: 0 0 -28px auto;
}

.c-budget {
  grid-column: span 2;
  grid-row: span 2;
}

.c-budget .peek {
  height: 420px;
  margin-top: auto;
}

.c-wallet,
.c-history {
  grid-column: span 2;
}

.c-wallet .peek,
.c-history .peek {
  width: 210px;
  height: 190px;
  margin-top: auto;
}

.c-lang {
  grid-column: span 2;
}

.c-insights {
  grid-column: span 4;
  flex-direction: row;
  align-items: flex-end;
  gap: 24px;
}

.c-insights .copy {
  align-self: center;
  max-width: 330px;
}

.c-insights .peek {
  width: 270px;
  height: 260px;
  margin: 0 0 -28px auto;
}

.c-private {
  grid-column: span 4;
  min-height: 260px;
}

.c-private .copy {
  max-width: 520px;
}

.c-family {
  grid-column: span 2;
  min-height: 260px;
}

.people {
  display: flex;
  margin-top: auto;
  padding-top: 20px;
}

.people span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-right: -10px;
  border-radius: 50%;
  border: 3px solid var(--soft);
  color: #fff;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 22px;
}

.people .p1 {
  background: var(--accent);
}

.people .p2 {
  background: var(--ink);
}

.people .p3 {
  background: var(--gold);
  color: var(--ink);
}

.toggle {
  display: inline-flex;
  align-self: flex-start;
  gap: 4px;
  margin-top: auto;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface);
  font-weight: 800;
  font-size: 14px;
}

.toggle span {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--muted);
}

.toggle .on {
  background: var(--ink);
  color: #fff;
}

.greet {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
  color: var(--ink);
  font-family: var(--heading);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
}

.greet span:last-child {
  color: var(--accent);
}

.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: auto 0 0;
  padding: 24px 0 0;
  list-style: none;
}

.perks li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.perks svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 28px;
  border-radius: 30px;
  border: 1px dashed rgba(139, 61, 240, 0.35);
}

.steps .num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--heading);
  font-weight: 600;
  font-size: 22px;
}

.steps h3 {
  font-size: 24px;
}

.steps p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* ---------- Q&A grid ---------- */

.qa {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.q {
  padding: 24px 26px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.q h3 {
  font-family: inherit;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.q p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Final call ---------- */

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 96px 0;
  padding: 48px 56px;
  border-radius: 36px;
  background: radial-gradient(80% 120% at 100% 0%, rgba(255, 194, 26, 0.28), transparent 60%), var(--ink);
  overflow: hidden;
}

.cta h2 {
  color: #fff;
  font-size: clamp(32px, 4.5vw, 48px);
}

.cta p {
  max-width: 460px;
  margin: 14px 0 24px;
  color: #d9c8f5;
  font-size: 18px;
}

.cta img {
  flex: none;
  width: 230px;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.3));
}

/* ---------- Footer (flat) ---------- */

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 28px;
  padding-bottom: 40px;
}

footer .brand {
  font-size: 20px;
}

footer .brand img {
  width: 28px;
  height: 28px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

footer a:hover {
  color: var(--accent);
}

footer .copy {
  width: 100%;
  margin: 0;
  font-size: 13px;
}

/* ---------- Text pages (support, privacy) ---------- */

.doc {
  max-width: 760px;
  margin: 48px auto 96px;
  padding: 40px 40px 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.doc h1 {
  margin-bottom: 6px;
  font-size: 44px;
}

.doc .date {
  margin-top: 0;
  color: var(--muted);
}

.doc h2 {
  margin-top: 36px;
  font-size: 26px;
}

.doc h3 {
  margin-top: 26px;
  color: var(--text);
  font-family: inherit;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.4;
}

.doc h3 + p {
  margin-top: 6px;
}

.note {
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--soft);
}

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .c-home,
  .c-insights,
  .c-private {
    grid-column: span 2;
  }

  .c-family {
    grid-column: span 2;
  }

  .c-budget {
    grid-column: span 1;
    grid-row: span 2;
  }

  .c-wallet,
  .c-history,
  .c-lang {
    grid-column: span 1;
  }

  .steps,
  .qa {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .links {
    gap: 16px;
  }

  .links a:nth-child(n + 3) {
    display: none;
  }

  .hero {
    padding-top: 40px;
  }

  .stage {
    height: 400px;
  }

  .device {
    width: 230px;
  }

  .hero-mascot {
    left: 0;
    bottom: 16px;
    width: 96px;
  }

  .f-budget {
    top: 90px;
    left: -6px;
    width: 128px;
    padding: 10px 12px;
  }

  .f-budget strong {
    font-size: 18px;
  }

  .f-bill {
    top: 210px;
    right: -6px;
    padding: 10px 12px;
  }

  .f-bill strong {
    font-size: 15px;
  }

  .f-lang {
    display: none;
  }

  .f-budget small,
  .f-bill small {
    font-size: 11px;
  }

  .bento,
  .steps,
  .qa {
    grid-template-columns: 1fr;
  }

  .c-home,
  .c-budget,
  .c-wallet,
  .c-history,
  .c-lang,
  .c-insights,
  .c-family,
  .c-private {
    grid-column: auto;
    grid-row: auto;
  }

  .c-home,
  .c-insights {
    flex-direction: column;
    align-items: stretch;
  }

  .c-home .peek,
  .c-insights .peek,
  .c-budget .peek {
    width: 230px;
    height: 250px;
    margin: 24px auto -28px;
  }

  .card {
    min-height: 0;
    padding: 24px;
  }

  .card h3 {
    font-size: 26px;
  }

  .c-lang .toggle {
    margin-top: 20px;
  }

  .cta {
    flex-direction: column-reverse;
    margin: 72px 0;
    padding: 36px 24px;
    text-align: center;
  }

  .cta p {
    margin-left: auto;
    margin-right: auto;
  }

  .cta img {
    width: 150px;
  }

  .doc {
    margin: 24px 16px 72px;
    padding: 28px 22px 36px;
  }

  .doc h1 {
    font-size: 36px;
  }
}
