/* ==========================================================================
   My Wallet – website styles
   Shared by index.html, privacy_policy.html and terms_and_conditions.html.
   Light and dark themes follow the visitor's system setting.
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-soft: #eef2ff;
  --income: #059669;
  --expense: #e11d48;
  --warning: #d97706;

  --bg: #f8fafc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 30px 60px rgba(30, 27, 75, .18);

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1160px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-head: 'Poppins', var(--font);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #818cf8;
    --primary-2: #a78bfa;
    --primary-soft: rgba(129, 140, 248, .14);
    --income: #34d399;
    --expense: #fb7185;
    --warning: #fbbf24;

    --bg: #0b1120;
    --bg-alt: #0f172a;
    --surface: #131c31;
    --surface-2: #1b2640;
    --text: #e2e8f0;
    --text-2: #a5b1c5;
    --text-3: #8492a9;
    --border: #24314d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 30px 60px rgba(0, 0, 0, .45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.grad { background: linear-gradient(90deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: .96rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav-cta { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; width: 44px; height: 44px; font-size: 22px; cursor: pointer; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav .nav-cta { display: none; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 70px; flex-direction: column; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1.05rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 14px; font-weight: 600; font-size: 1rem; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; box-shadow: 0 10px 24px rgba(79, 70, 229, .3); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-sm { padding: 10px 18px; font-size: .94rem; border-radius: 12px; }
.play-badge { display: inline-flex; align-items: center; gap: 12px; background: #0f172a; color: #fff; border-radius: 14px; padding: 10px 22px 10px 16px; border: 1px solid #334155; }
.play-badge:hover { text-decoration: none; transform: translateY(-1px); }
.play-badge svg { width: 30px; height: 30px; }
.play-badge small { display: block; font-size: .72rem; opacity: .8; line-height: 1.2; }
.play-badge strong { display: block; font-size: 1.15rem; line-height: 1.2; font-family: var(--font-head); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 760px; z-index: -1;
  background: radial-gradient(50% 50% at 25% 30%, rgba(99, 102, 241, .22), transparent 70%),
              radial-gradient(40% 40% at 80% 20%, rgba(124, 58, 237, .18), transparent 70%),
              radial-gradient(40% 40% at 70% 80%, rgba(16, 185, 129, .12), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: .9rem; margin-bottom: 18px; }
.lead { font-size: 1.2rem; color: var(--text-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; color: var(--text-2); font-size: .95rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 20px; height: 20px; color: var(--income); flex: none; }
.hero-phones { position: relative; height: 620px; }
.hero-phones img { position: absolute; width: 290px; filter: drop-shadow(0 30px 50px rgba(30, 27, 75, .35)); }
.hero-phones .p1 { left: 4%; top: 30px; transform: rotate(-6deg); }
.hero-phones .p2 { right: 4%; top: 0; transform: rotate(5deg); z-index: 1; }
@media (max-width: 900px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phones { height: 470px; max-width: 520px; margin: 0 auto; width: 100%; }
  .hero-phones img { width: 220px; }
}
@media (max-width: 480px) {
  .hero-phones { height: 400px; }
  .hero-phones img { width: 185px; }
  .hero-phones .p1 { left: 0; } .hero-phones .p2 { right: 0; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 30px 0 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--font-head); font-size: 1.9rem; line-height: 1.1; }
.stat span { color: var(--text-3); font-size: .93rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Sections ---------- */
section.block { padding: 90px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--text-2); font-size: 1.1rem; }
.kicker { color: var(--primary); font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; display: block; }

/* why */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.calc { background: linear-gradient(150deg, #1e1b4b, #312e81 55%, #4c1d95); color: #fff; border-radius: 28px; padding: 40px; box-shadow: var(--shadow-lg); }
.calc h3 { color: #fff; font-size: 1.4rem; }
.calc p { color: #c7d2fe; }
.calc-row { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: 1.1rem; }
.calc-row:last-of-type { border-bottom: 0; }
.calc-row b { font-family: var(--font-head); font-size: 1.6rem; }
.calc-row .big { font-size: 2.3rem; color: #fda4af; }
.calc small { color: #a5b4fc; display: block; margin-top: 14px; font-size: .85rem; }
.reasons { display: grid; gap: 16px; }
.reason { display: flex; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.reason h3 { margin-bottom: .25em; }
.reason p { margin: 0; color: var(--text-2); font-size: .98rem; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }

.ic { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; }
.ic svg { width: 26px; height: 26px; }
.ic.indigo { background: #eef2ff; color: #4f46e5; }
.ic.green { background: #d1fae5; color: #059669; }
.ic.amber { background: #fef3c7; color: #d97706; }
.ic.rose { background: #ffe4e6; color: #e11d48; }
.ic.sky { background: #e0f2fe; color: #0284c7; }
.ic.violet { background: #ede9fe; color: #7c3aed; }
@media (prefers-color-scheme: dark) {
  .ic.indigo { background: rgba(129, 140, 248, .16); color: #a5b4fc; }
  .ic.green { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
  .ic.amber { background: rgba(251, 191, 36, .14); color: #fcd34d; }
  .ic.rose { background: rgba(251, 113, 133, .14); color: #fda4af; }
  .ic.sky { background: rgba(56, 189, 248, .14); color: #7dd3fc; }
  .ic.violet { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
}

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .ic { margin-bottom: 18px; }
.feature p { color: var(--text-2); margin: 0; font-size: .98rem; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

/* reports */
.reports-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.report-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.report-list li { display: flex; gap: 14px; align-items: flex-start; }
.report-list li svg { width: 24px; height: 24px; color: var(--income); flex: none; margin-top: 3px; }
.report-list b { display: block; }
.report-list span { color: var(--text-2); font-size: .97rem; }
.chart-cards { display: grid; gap: 18px; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.chart-card h4 { font-size: 1rem; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.chart-card h4 small { font-family: var(--font); font-weight: 500; color: var(--text-3); font-size: .85rem; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.legend { list-style: none; padding: 0; margin: 0; font-size: .9rem; display: grid; gap: 4px; flex: 1; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend em { margin-left: auto; font-style: normal; color: var(--text-3); }
.svg-text { fill: var(--text-3); font: 600 11px var(--font); }
.svg-grid { stroke: var(--border); }
.pdf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: .9rem; margin: 4px 6px 0 0; }
@media (max-width: 960px) { .reports-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .chart-row { grid-template-columns: 1fr; } }

/* screens gallery */
.gallery { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 24px 30px; margin: 0 -24px; scrollbar-width: thin; }
.shot { flex: 0 0 240px; scroll-snap-align: center; text-align: center; margin: 0; }
.shot img { width: 240px; filter: drop-shadow(0 20px 34px rgba(30, 27, 75, .28)); margin-bottom: 14px; }
.shot figcaption { font-weight: 600; }
.shot figcaption span { display: block; font-weight: 400; color: var(--text-3); font-size: .9rem; }
.gallery { justify-content: safe center; } /* centred when it fits, scrollable from the first screen when it doesn't */

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px 26px; box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -18px; left: 26px; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; font: 800 1.1rem var(--font-head); display: grid; place-items: center; }
.step p { color: var(--text-2); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 34px; } }

/* privacy band */
.privacy-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; background: linear-gradient(150deg, #052e2b, #064e3b 55%, #065f46); color: #ecfdf5; border-radius: 32px; padding: 54px; box-shadow: var(--shadow-lg); }
.privacy-band h2 { color: #fff; }
.privacy-band p { color: #a7f3d0; }
.privacy-band ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.privacy-band li { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 14px 16px; }
.privacy-band li svg { width: 22px; height: 22px; flex: none; color: #6ee7b7; margin-top: 2px; }
.privacy-band .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
@media (max-width: 900px) { .privacy-band { grid-template-columns: 1fr; padding: 34px 26px; } }

/* faq */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 22px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; padding: 16px 30px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--primary); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-2); margin: 0 0 16px; }

/* final CTA */
.cta { text-align: center; background: linear-gradient(140deg, #312e81, #4f46e5 50%, #7c3aed); color: #fff; border-radius: 32px; padding: 64px 28px; box-shadow: var(--shadow-lg); }
.cta h2 { color: #fff; }
.cta p { color: #e0e7ff; font-size: 1.15rem; max-width: 600px; margin: 0 auto 28px; }
.cta img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 20px; box-shadow: 0 16px 36px rgba(0, 0, 0, .3); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 50px 0 34px; margin-top: 90px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer h4 { font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text-2); }
.site-footer p { color: var(--text-3); }
.copy { border-top: 1px solid var(--border); margin-top: 34px; padding-top: 22px; color: var(--text-3); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */
.legal-hero { padding: 64px 0 34px; background: linear-gradient(180deg, var(--primary-soft), transparent); border-bottom: 1px solid var(--border); }
.legal-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.legal-hero .meta { color: var(--text-3); font-size: .95rem; margin: 0; }
.legal-layout { display: grid; grid-template-columns: 250px 1fr; gap: 50px; padding-top: 44px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: .92rem; }
.toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); font-family: var(--font); font-weight: 700; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; border-left: 2px solid var(--border); }
.toc a { display: block; padding: 6px 0 6px 16px; color: var(--text-2); margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--primary); text-decoration: none; }
.legal-layout > * { min-width: 0; } /* lets wide tables scroll inside .table-wrap instead of widening the page */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.45rem; margin-top: 2.2em; padding-top: 10px; scroll-margin-top: 90px; }
.legal h3 { font-size: 1.08rem; margin-top: 1.5em; }
.legal p, .legal li { color: var(--text-2); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: .5em; }
.legal code { font-size: .88em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; word-break: break-word; }
.summary-box { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--income); border-radius: 16px; padding: 22px 26px; box-shadow: var(--shadow); margin-bottom: 10px; }
.summary-box h2 { margin-top: 0; padding-top: 0; font-size: 1.15rem; }
.summary-box ul { margin: 0; }
.note { background: var(--primary-soft); border-radius: 14px; padding: 16px 20px; color: var(--text); }
.table-wrap { overflow-x: auto; margin: 1em 0 1.5em; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
th { background: var(--surface-2); color: var(--text); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px 26px; box-shadow: var(--shadow); margin-top: 1em; }
.contact-card p { margin: .3em 0; }
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 10px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
}
@media print {
  .site-header, .site-footer, .toc, .menu-btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .legal-layout { display: block; padding: 0; }
  .legal p, .legal li { color: #000; }
}
