/* MaterialX website — shared styles for the home, privacy and terms pages. */

:root {
  --bg: #f6f5fb;
  --bg-soft: #eeecf7;
  --surface: #ffffff;
  --surface-2: #f2f0fa;
  --text: #17162a;
  --text-2: #4c4a66;
  --text-3: #75738f;
  --line: rgba(23, 22, 42, 0.09);
  --brand: #4a5fa8;
  --brand-2: #7a4fa3;
  --accent: #5ad1c3;
  --red: #e5342b;
  --on-brand: #ffffff;
  --shadow: 0 1px 2px rgba(23, 22, 42, 0.05), 0 12px 32px -12px rgba(40, 34, 90, 0.18);
  --shadow-lg: 0 30px 80px -30px rgba(40, 34, 90, 0.45);
  --radius: 28px;
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0b16;
    --bg-soft: #12111f;
    --surface: #17162a;
    --surface-2: #1e1c34;
    --text: #f1effb;
    --text-2: #b9b6d3;
    --text-3: #8e8bab;
    --line: rgba(241, 239, 251, 0.09);
    --brand: #9fb2ff;
    --brand-2: #c6a0f0;
    --on-brand: #12111f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0c0b16;
  --bg-soft: #12111f;
  --surface: #17162a;
  --surface-2: #1e1c34;
  --text: #f1effb;
  --text-2: #b9b6d3;
  --text-3: #8e8bab;
  --line: rgba(241, 239, 251, 0.09);
  --brand: #9fb2ff;
  --brand-2: #c6a0f0;
  --on-brand: #12111f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 10px; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

/* ---------- Header ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px "Plus Jakarta Sans", sans-serif; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 15px "Inter", sans-serif;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: var(--shadow); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 88px 0 72px; isolation: isolate; }

.hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 0;
  z-index: -1;
  background:
    radial-gradient(600px 380px at 82% 18%, color-mix(in srgb, var(--brand-2) 30%, transparent), transparent 70%),
    radial-gradient(520px 360px at 12% 30%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 70%),
    radial-gradient(420px 300px at 60% 90%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
}

.hero .wrap { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  box-shadow: var(--shadow);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 18%, transparent); margin-left: 4px; }

.hero h1 { font-size: clamp(42px, 6.2vw, 72px); font-weight: 800; margin: 22px 0 20px; }

.grad {
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 55%, #d76fa6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { font-size: 19px; color: var(--text-2); max-width: 540px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 36px; color: var(--text-3); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 18px; height: 18px; color: var(--brand); }

/* Phone mockup */

.stage { position: relative; display: grid; place-items: center; }

.phone {
  position: relative;
  width: min(360px, 88vw);
  aspect-ratio: 9 / 19;
  border-radius: 48px;
  padding: 12px;
  background: #0b0a12;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #2a2838;
}

.screen {
  position: relative;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  padding: 54px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(120% 70% at 0% 100%, #4fc3b4 0%, transparent 55%),
    radial-gradient(100% 70% at 100% 0%, #a079e0 0%, transparent 60%),
    linear-gradient(160deg, #3a608f 0%, #5b4a92 55%, #6a3a7a 100%);
}

.screen::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  width: 92px;
  height: 26px;
  border-radius: 20px;
  background: #0b0a12;
}

.screen .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.screen img { width: 100%; border-radius: 20px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45); }

.float {
  position: absolute;
  width: 190px;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  animation: bob 7s ease-in-out infinite;
}
.float.a { left: -6%; top: 14%; width: 150px; }
.float.b { right: -8%; bottom: 12%; animation-delay: -3.5s; }

@keyframes bob { 50% { transform: translateY(-14px); } }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; }
.section-head p { margin-top: 16px; color: var(--text-2); font-size: 18px; }

.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }

/* Styles switcher */

.styles { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: center; }

.tabs { display: flex; flex-direction: column; gap: 12px; }

.tab {
  text-align: left;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.tab strong { display: flex; align-items: center; gap: 10px; font: 700 19px "Plus Jakarta Sans", sans-serif; }
.tab span { display: block; margin-top: 6px; color: var(--text-2); font-size: 15px; }
.tab[aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow); }
.swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; }

.showcase {
  position: relative;
  border-radius: 36px;
  padding: clamp(24px, 5vw, 56px);
  background:
    radial-gradient(80% 90% at 0% 100%, #4fc3b4 0%, transparent 60%),
    linear-gradient(150deg, #3a608f, #6a3a7a);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.showcase img { width: 100%; border-radius: 26px; transition: opacity 0.35s ease, transform 0.35s ease; }
.showcase img[hidden] { display: none; }

/* Widget gallery */

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-4px); }
.card .art {
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(150deg, #3a608f, #6a3a7a);
  display: grid;
  place-items: center;
  flex: 1;
}
.card .art img { border-radius: 16px; }
.card h3 { font-size: 18px; }
.card p { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.card.wide { grid-column: span 2; }

/* Features */

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

.feature {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.feature .ico {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  margin-bottom: 18px;
}
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 15px; }

/* Privacy band */

.privacy-band {
  border-radius: 36px;
  padding: clamp(32px, 6vw, 64px);
  background: linear-gradient(135deg, #1b1a30, #2b2550 60%, #3a2a5c);
  color: #f1effb;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.privacy-band h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.privacy-band p { color: #c9c5e6; margin-top: 14px; }
.privacy-band ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.privacy-band li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
}
.privacy-band li svg { width: 20px; height: 20px; flex: none; color: #5ad1c3; margin-top: 2px; }
.privacy-band .btn { margin-top: 26px; background: #f1effb; color: #17162a; }

/* FAQ */

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 22px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--text-3); transition: rotate 0.2s ease; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 0 20px; color: var(--text-2); font-size: 15px; }

/* Final CTA */

.final { text-align: center; }
.final img { width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 24px; box-shadow: var(--shadow-lg); }
.final h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; }
.final p { color: var(--text-2); margin: 16px auto 0; max-width: 520px; font-size: 18px; }
.final .cta { justify-content: center; }

/* ---------- Footer ---------- */

footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
footer a { text-decoration: none; color: var(--text-2); }
footer a:hover { color: var(--text); }

/* ---------- Legal pages ---------- */

.legal-hero { padding: 72px 0 40px; position: relative; isolation: isolate; }
.legal-hero::before {
  content: "";
  position: absolute;
  inset: -100px 0 0;
  z-index: -1;
  background: radial-gradient(560px 300px at 20% 30%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%),
    radial-gradient(520px 280px at 85% 10%, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 70%);
}
.legal-hero h1 { font-size: clamp(38px, 5.4vw, 56px); font-weight: 800; margin-top: 14px; }
.legal-hero p { color: var(--text-2); margin-top: 14px; font-size: 18px; max-width: 640px; }
.updated { display: inline-block; margin-top: 20px; font-size: 14px; color: var(--text-3); }

.legal { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 24px 0 96px; align-items: start; }

.toc { position: sticky; top: 96px; font-size: 14px; }
.toc p { font-weight: 700; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 14px; text-decoration: none; color: var(--text-2); margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--brand); }

.doc { max-width: 760px; min-width: 0; }
.doc section { padding: 0; margin-bottom: 44px; scroll-margin-top: 96px; }
.doc h2 { font-size: 26px; font-weight: 700; margin-bottom: 14px; }
.doc h3 { font-size: 18px; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 12px 0 0; display: grid; gap: 8px; }
.doc strong { color: var(--text); }
.doc a { color: var(--brand); text-underline-offset: 3px; }

.summary {
  padding: 24px 26px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 44px;
}
.summary h2 { font-size: 20px; }

.table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; display: block; overflow-x: auto; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 13px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.table td { color: var(--text-2); }
.table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float { animation: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero .wrap, .styles, .privacy-band { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
  .stage { margin-top: 12px; }
  .tabs { flex-direction: row; overflow-x: auto; }
  .tab { flex: 1 0 200px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr 1fr; }
  .legal { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  section { padding: 72px 0; }
  .gallery, .features { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; }
  .card:not(.wide) .art img { max-width: 220px; }
  .float { display: none; }
  .tab span { display: none; }
  .tab { flex-basis: auto; padding: 14px 18px; }
  .lead { font-size: 17px; }
}

/* Grid children may shrink below their content (the scrolling style tabs, wide images). */
.hero .wrap > *, .styles > *, .privacy-band > *, .legal > * { min-width: 0; }
