/* Clara website v3. Plain CSS, no build step. */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #8D57C4;
  --heading: #6528A2;
  --ink: #2B1446;          /* deep plum for the big headline */
  --accent: #8033CC;
  --accent-2: #9556D4;
  --accent-3: #B589E1;
  --tint: #E5D2F8;
  --tint-2: #F6EEFB;
  --text: #333;
  --muted: #7D7390;
  --line: #ECE4F4;
  --wrap: 1312px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 64px; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--heading);
  font-weight: 900; font-size: 30px; letter-spacing: -0.02em; line-height: 1;
}
.logo img { width: 40px; height: 40px; border-radius: 11px; }

/* ---------- Store badges (platform specific) ---------- */
.badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badges-left { justify-content: flex-start; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 18px 0 15px; min-width: 176px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid #A6A6A6; border-radius: 11px;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: transform .2s ease, box-shadow .2s ease;
}
.badge:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(43, 20, 70, .55); }
.badge:focus-visible { outline: 3px solid var(--accent-3); outline-offset: 3px; }
.badge-icon { width: 26px; height: 28px; flex: none; }
.badge-ios .badge-icon { width: 24px; height: 29px; margin-top: -3px; }
.badge-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.badge-text small { font-size: 11px; font-weight: 500; letter-spacing: .01em; }
.badge-text strong { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.badge-play .badge-text small { font-size: 10px; letter-spacing: .06em; }
html.platform-ios .badge-play,
html.platform-android .badge-ios { display: none; }

/* ---------- Android banner (iOS gets Apple's Smart App Banner) ---------- */
.android-banner {
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line);
  position: relative; z-index: 10;
}
html.platform-android .android-banner:not(.is-dismissed) { display: flex; }
.android-banner button {
  border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted);
  padding: 4px; cursor: pointer;
}
.android-banner img { width: 40px; height: 40px; border-radius: 10px; }
.ab-text { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.ab-text strong { font-size: 15px; color: var(--ink); }
.ab-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.android-banner a {
  background: var(--primary); color: #fff; font-weight: 800; font-size: 14px;
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #EBDCFA 0%, #F2E7FC 46%, #F6EEFB 100%);
}
.hero-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cloud {
  position: absolute; background: rgba(255, 255, 255, .55); border-radius: 999px;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 46%; height: 150%; left: 14%; bottom: 20%; }
.cloud::after { width: 34%; height: 120%; left: 50%; bottom: 25%; }
.c1 { width: 240px; height: 56px; left: -40px; top: 92px; }
.c2 { width: 300px; height: 64px; right: -30px; top: 70px; }
.c3 { width: 180px; height: 44px; left: 5%; top: 420px; opacity: .7; }
.c4 { width: 200px; height: 48px; right: 4%; top: 380px; opacity: .7; }

.hero-head { text-align: center; padding-top: 36px; position: relative; z-index: 2; }
.hero h1 {
  margin: 56px auto 0; max-width: 900px;
  font-size: 68px; line-height: 1.08; text-wrap: balance; font-weight: 900; letter-spacing: -0.025em;
  color: var(--ink);
}
.lead {
  margin: 22px auto 0; max-width: 760px; text-wrap: balance;
  font-size: 22px; line-height: 1.4; font-weight: 800; color: var(--heading);
}
.cta-row {
  margin-top: 36px; display: flex; align-items: center; justify-content: center; gap: 28px;
}

/* QR: desktop only */
.qr { display: none; align-items: center; gap: 12px; text-align: left;
  padding: 8px 16px 8px 8px; background: #fff; border-radius: 16px;
  box-shadow: 0 1px 0 var(--line), 0 12px 28px -16px rgba(101, 40, 162, .45); }
html.platform-desktop .qr { display: flex; }
.qr-code { width: 76px; height: 76px; padding: 6px; background: #fff; border-radius: 10px; flex: none; }
.qr-code svg { width: 100%; height: 100%; }
.qr p { margin: 0; font-size: 13px; line-height: 1.35; color: var(--muted); max-width: 172px; font-weight: 600; }
.qr p strong { display: block; color: var(--ink); font-size: 15px; font-weight: 800; margin-bottom: 2px; }

/* Phone fan */
.stage { position: relative; height: 600px; margin-top: 64px; }
.hills {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: max(1600px, 115%); max-width: none; height: 430px; object-fit: cover; object-position: 50% 0;
  opacity: .42;
}
.phones { position: absolute; inset: 0; }
.phone {
  --w: 300px; --x: 0px; --y: 0px;
  position: absolute; left: 50%; top: 0; margin: 0;
  width: var(--w); aspect-ratio: 720 / 1563;
  transform: translate(calc(-50% + var(--x)), var(--y));
  background: #17121d; border-radius: calc(var(--w) * .15); padding: calc(var(--w) * .032);
  box-shadow:
    0 0 0 1.5px #3a3242 inset,
    0 30px 60px -24px rgba(58, 20, 98, .45),
    0 12px 24px -12px rgba(58, 20, 98, .3);
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) both;
}
.phone::after { /* dynamic island */
  content: ""; position: absolute; left: 50%; top: calc(var(--w) * .052);
  width: 31%; height: calc(var(--w) * .085); transform: translateX(-50%);
  background: #000; border-radius: 999px;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: calc(var(--w) * .12); background: var(--tint-2); }
.phone-center      { --w: 340px; --x: 0px;    --y: 0px;  z-index: 3; animation-delay: .05s; }
.phone-inner-left  { --w: 290px; --x: -282px; --y: 62px; z-index: 2; animation-delay: .15s; }
.phone-inner-right { --w: 290px; --x: 282px;  --y: 62px; z-index: 2; animation-delay: .15s; }
.phone-outer-left  { --w: 250px; --x: -530px; --y: 118px; z-index: 1; animation-delay: .25s; }
.phone-outer-right { --w: 250px; --x: 530px;  --y: 118px; z-index: 1; animation-delay: .25s; }
.mascot {
  position: absolute; left: 50%; top: 392px; z-index: 4; width: 132px; height: auto;
  transform: translateX(calc(-50% + 628px)) rotate(10deg);
  filter: drop-shadow(0 10px 18px rgba(58, 20, 98, .25));
  animation: peek 1s .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }
@keyframes peek { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }

.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 110px; z-index: 5; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; padding: 72px 0 0; }
.footer-grid { display: flex; justify-content: space-between; gap: 48px; }
.footer-brand { max-width: 500px; }
.footer-brand .logo { font-size: 28px; }
.footer-brand .logo img { width: 36px; height: 36px; border-radius: 10px; }
.footer-brand p { margin: 20px 0 28px; font-size: 16px; line-height: 1.6; color: var(--muted); font-weight: 600; }
.footer-links { min-width: 230px; }
.footer-links h2 { margin: 6px 0 18px; font-size: 20px; font-weight: 800; color: var(--ink); }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--muted); font-size: 16px; font-weight: 700;
  transition: color .15s ease;
}
.footer-links a:hover { color: var(--accent); }
.arrow { width: 12px; height: 12px; transition: transform .15s ease; }
.footer-links a:hover .arrow { transform: translate(2px, -2px); }
.footer-bottom { margin-top: 56px; }
.footer-bottom p {
  margin: 0; padding: 26px 0 30px; border-top: 1px solid var(--line);
  text-align: center; font-size: 14px; color: var(--muted); font-weight: 600;
}

/* ---------- Sub pages (FAQ / legal) ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  background: linear-gradient(180deg, #EBDCFA 0%, #F6EEFB 100%);
  padding: 36px 0 120px;
}
.page-hero h1 {
  margin: 48px 0 0; font-size: 52px; line-height: 1.1; font-weight: 900; letter-spacing: -0.02em; color: var(--ink);
}
.page-hero .lead { font-size: 19px; margin-top: 14px; }
.page-hero .wave { height: 80px; }
.page-body { padding-top: 24px; padding-bottom: 24px; }
.doc { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.7; }
.doc h2 { margin: 40px 0 10px; font-size: 22px; line-height: 1.3; font-weight: 800; color: var(--heading); }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc ul { margin: 0 0 14px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--accent-3); }
.doc a { color: var(--accent); font-weight: 700; }

.accordion { display: grid; gap: 12px; }
.acc-item { background: #fff; border: 1.5px solid var(--line); border-radius: 18px; transition: border-color .2s ease, box-shadow .2s ease; }
.acc-item:hover { border-color: var(--tint); }
.acc-item.is-open { border-color: var(--tint); box-shadow: 0 14px 30px -22px rgba(101, 40, 162, .5); }
.acc-item button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 22px; border: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; font-size: 18px; font-weight: 800; color: var(--ink);
}
.acc-item button::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--tint-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238033CC' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .25s ease;
}
.acc-item.is-open button::after { transform: rotate(180deg); }
.acc-item button:focus-visible { outline: 3px solid var(--accent-3); outline-offset: 2px; border-radius: 18px; }
.acc-panel { display: none; padding: 0 22px 18px; color: #4a4458; }
.acc-panel p { margin: 0; }
.acc-item.is-open .acc-panel { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .phone-outer-left  { --x: -480px; }
  .phone-outer-right { --x: 480px; }
  .mascot { display: none; }
  .c3, .c4 { display: none; }
}
@media (max-width: 980px) {
  .hero h1 { font-size: 56px; }
  .stage { height: 520px; }
  .phone-center { --w: 300px; }
  .phone-inner-left  { --w: 255px; --x: -230px; --y: 54px; }
  .phone-inner-right { --w: 255px; --x: 230px;  --y: 54px; }
  .phone-outer-left, .phone-outer-right { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 24px; }
  .logo { font-size: 26px; }
  .logo img { width: 34px; height: 34px; border-radius: 9px; }
  .hero-head { padding-top: 22px; }
  .hero h1 { margin-top: 34px; font-size: 40px; line-height: 1.12; }
  .br-desktop { display: none; }
  .lead { font-size: 17px; margin-top: 14px; max-width: 340px; }
  .cta-row { margin-top: 26px; }
  .badge { height: 50px; min-width: 156px; padding: 0 14px 0 12px; gap: 8px; }
  .badge-text strong { font-size: 19px; }
  .badge-text small { font-size: 10px; }
  .stage { height: 430px; margin-top: 40px; }
  .phone-center { --w: 260px; }
  .phone-inner-left  { --w: 220px; --x: -205px; --y: 48px; }
  .phone-inner-right { --w: 220px; --x: 205px;  --y: 48px; }
  .wave { height: 60px; }
  .c3, .c4 { display: none; }
  .c1 { top: 60px; width: 160px; height: 40px; }
  .c2 { top: 40px; width: 180px; height: 42px; }

  .site-footer { padding-top: 40px; }
  .footer-grid { flex-direction: column; gap: 36px; }
  .footer-brand p { margin: 16px 0 22px; font-size: 15px; }
  .footer-bottom { margin-top: 36px; }
  .footer-bottom p { font-size: 13px; padding: 22px 0 26px; }

  .page-hero { padding: 22px 0 84px; }
  .page-hero h1 { margin-top: 32px; font-size: 34px; }
  .page-hero .lead { font-size: 16px; }
  .page-hero .wave { height: 50px; }
  .doc { font-size: 16px; }
  .acc-item button { font-size: 16px; padding: 16px 18px; }
  .acc-panel { padding: 0 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
