/* MyBadde website. Colours follow the Android app (Theme.kt). */
:root {
  --bg: #f8f6fc;
  --surface: #ffffff;
  --surface-2: #efebf7;
  --text: #1b1a21;
  --muted: #5e5a6b;
  --line: #d3cee0;
  --primary: #5b3bdb;
  --primary-ink: #ffffff;
  --accent: #b0279e;
  --ok: #0f7b4f;
  --warn: #9a5b00;
  --danger: #b3261e;
  --night: #1a1033;
  --violet: #7c4dff;
  --magenta: #e040fb;
  --cyan: #00e5ff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(40, 20, 90, 0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121018;
    --surface: #1c1924;
    --surface-2: #26222f;
    --text: #ece8f4;
    --muted: #aaa4b8;
    --line: #3a3546;
    --primary: #c6b8ff;
    --primary-ink: #2b1287;
    --accent: #ffaee9;
    --ok: #6fdcaa;
    --warn: #ffc876;
    --danger: #ffb4ab;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121018; --surface: #1c1924; --surface-2: #26222f; --text: #ece8f4; --muted: #aaa4b8; --line: #3a3546;
  --primary: #c6b8ff; --primary-ink: #2b1287; --accent: #ffaee9; --ok: #6fdcaa; --warn: #ffc876; --danger: #ffb4ab;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.2rem; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); }
.nav .btn { margin-left: 6px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 6px 10px; font: inherit; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 0.15s, background 0.15s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: #fff; color: #1a1033; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.4); background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: 0.92rem; }

/* Hero */
.hero { position: relative; color: #fff; background: radial-gradient(1200px 600px at 75% 20%, #3b1f7a 0%, transparent 60%), radial-gradient(900px 500px at 10% 90%, #4a0f5c 0%, transparent 60%), var(--night); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero p.lead { font-size: 1.2rem; color: rgba(255, 255, 255, 0.82); max-width: 34em; }
.hero .kicker { display: inline-block; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; font-weight: 600; }
.hero .grad { background: linear-gradient(90deg, var(--cyan), #b9a4ff 45%, var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.orb-stage { position: relative; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.orb { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 42% 38%, #fff 0%, var(--cyan) 22%, var(--violet) 58%, var(--magenta) 100%); box-shadow: 0 0 80px rgba(124, 77, 255, 0.6), 0 0 160px rgba(224, 64, 251, 0.35); animation: breathe 4.5s ease-in-out infinite; }
.orb-ring { position: absolute; inset: 4%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); animation: spin 18s linear infinite; }
.orb-ring::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.orb-ring.two { inset: -4%; border-color: rgba(255, 255, 255, 0.08); animation-duration: 30s; animation-direction: reverse; }
.orb-ring.two::after { background: var(--magenta); box-shadow: 0 0 14px var(--magenta); }
.bubble { position: absolute; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); backdrop-filter: blur(8px); padding: 10px 14px; border-radius: 16px; font-size: 0.92rem; max-width: 220px; animation: float 6s ease-in-out infinite; }
.bubble.b1 { top: 4%; left: -6%; }
.bubble.b2 { bottom: 10%; right: -8%; animation-delay: -3s; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .orb, .orb-ring, .bubble { animation: none; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 56px; }
  .orb-stage { max-width: 280px; order: -1; }
  .bubble.b1 { left: -10%; } .bubble.b2 { right: -10%; }
}
@media (max-width: 420px) { .bubble { display: none; } }

/* Sections */
section.block { padding: 72px 0; }
section.block.alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); margin-bottom: 14px; }
.card .icon svg { width: 24px; height: 24px; }
.card p:last-child { margin-bottom: 0; }
.say { font-style: italic; color: var(--accent); }

/* Try Badde chat */
.try { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .try { grid-template-columns: 1fr; } }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; height: 520px; max-height: 75vh; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head .mini-orb { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 42% 38%, #fff 0%, var(--cyan) 22%, var(--violet) 58%, var(--magenta) 100%); flex: none; }
.chat-head .status { margin-left: auto; font-size: 0.85rem; color: var(--muted); text-align: right; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.badde { background: var(--surface-2); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.user { background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 6px; align-self: flex-end; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: 0.9rem; text-align: center; }
.msg.typing { color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 10px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.88rem; cursor: pointer; }
.chip:hover { background: var(--surface-2); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; font: inherit; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.chat-form input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.limit-cta { padding: 14px 18px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }

/* Sign-in box */
.signin { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; max-width: 30em; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.gsi-slot { min-height: 44px; }
.notice { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text); font-size: 0.93rem; }
.notice.error { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.notice.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.hero .consent { color: rgba(255, 255, 255, 0.85); }
.hero .consent a { color: #fff; }

/* Downloads */
.dl-card { display: flex; flex-direction: column; gap: 10px; }
.dl-card .meta { font-size: 0.88rem; color: var(--muted); }
.dl-card .btn { align-self: flex-start; margin-top: auto; }
ol.steps { padding-left: 1.2em; margin: 0; }
ol.steps li { margin-bottom: 6px; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
pre { background: var(--surface-2); padding: 14px; border-radius: 12px; overflow-x: auto; font-size: 0.88rem; }

/* Marketplace */
.product { display: flex; flex-direction: column; gap: 8px; }
.product .art { height: 150px; border-radius: 14px; margin: -6px -6px 8px; display: grid; place-items: center; background: radial-gradient(240px 140px at 50% 40%, color-mix(in srgb, var(--violet) 35%, transparent), transparent), var(--night); color: #fff; }
.product .art svg { width: 64px; height: 64px; opacity: 0.95; }
.badge { align-self: flex-start; display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.product .foot { margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; }

/* Account */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }
.profile { display: flex; gap: 14px; align-items: center; }
.profile img { width: 56px; height: 56px; border-radius: 50%; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }

/* Legal docs */
.doc { max-width: 780px; padding: 48px 16px 72px; margin: 0 auto; }
.doc h2 { font-size: 1.35rem; margin-top: 1.8em; }
.doc h3 { margin-top: 1.4em; }
.doc li { margin-bottom: 6px; }
.doc .version { color: var(--muted); font-size: 0.92rem; }
.doc .summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.toc { columns: 2; font-size: 0.95rem; padding-left: 1.2em; }
@media (max-width: 600px) { .toc { columns: 1; } }

/* CTA band + footer */
.cta-band { background: linear-gradient(120deg, #2a1663, #5b1a6e); color: #fff; border-radius: 26px; padding: 40px 32px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band p { color: rgba(255, 255, 255, 0.82); margin: 0; }
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; font-size: 0.93rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
