/* SpendPal — site styles.
   One file, no framework, no build step. Colours are the app's own:
   mediumPurple #9B70EA, backgroundPrimary #F2F0F5, textSecondary #605A6D,
   with the app's dark-mode values under prefers-color-scheme. */

:root {
    --bg: #F2F0F5;
    --bg-tint-1: #E7DDFB;
    --bg-tint-2: #FBE3EE;
    --ink: #1B1530;
    --ink-2: #605A6D;
    --ink-3: #8C8699;
    --purple: #9B70EA;
    --purple-deep: #7B4FD6;
    --purple-soft: rgba(155, 112, 234, 0.12);
    --card: rgba(255, 255, 255, 0.72);
    --card-solid: #FFFFFF;
    --line: rgba(27, 21, 48, 0.08);
    --line-purple: rgba(155, 112, 234, 0.22);
    --shadow: 0 1px 2px rgba(27, 21, 48, 0.04), 0 12px 40px rgba(91, 60, 160, 0.10);
    --paper: #FFFDF8;
    --paper-ink: #2B2620;

    --radius: 28px;
    --radius-sm: 16px;
    --max: 1120px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --cat-groceries: #8B3DFF;
    --cat-restaurants: #FF7A1A;
    --cat-utilities: #E5285A;
    --cat-shopping: #16B07A;
    --cat-travel: #0EA5E9;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1C1A28;
        --bg-tint-1: #2E2350;
        --bg-tint-2: #3A2140;
        --ink: #F3F0FA;
        --ink-2: #C4BEC9;
        --ink-3: #9A94A6;
        --purple: #AA85F0;
        --purple-deep: #C3A6FF;
        --purple-soft: rgba(170, 133, 240, 0.16);
        --card: rgba(255, 255, 255, 0.06);
        --card-solid: #26233A;
        --line: rgba(255, 255, 255, 0.08);
        --line-purple: rgba(170, 133, 240, 0.28);
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.35);
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* The app's substrate: two soft blooms behind everything. */
body::before {
    content: "";
    position: fixed;
    inset: -20vh -20vw auto;
    height: 120vh;
    z-index: -1;
    background:
        radial-gradient(40vw 40vw at 15% 10%, var(--bg-tint-1), transparent 70%),
        radial-gradient(35vw 35vw at 90% 25%, var(--bg-tint-2), transparent 70%);
    pointer-events: none;
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: 88px 0; }
.center { text-align: center; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 16px; }
h1 { font-size: clamp(44px, 7vw, 76px); font-weight: 800; }
h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; }
h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 600px; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; color: var(--ink-3); }
.purple { color: var(--purple); }
.kicker {
    display: inline-block;
    font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--purple-deep);
    margin-bottom: 14px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 10;
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.nav .brand { margin-inline-end: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); text-decoration: none; }
.nav-menu { display: none; position: relative; }
.lang-menu { position: relative; }
.lang-menu[open] .menu-panel { display: flex; }
.lang-menu summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
    border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink-2);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary svg { width: 17px; height: 17px; }
.lang-menu a[aria-current] { color: var(--purple-deep); font-weight: 700; }
.nav-menu summary {
    list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] .menu-panel { display: flex; }
.menu-panel {
    display: none; flex-direction: column; position: absolute; inset-inline-end: 0; top: 46px; min-width: 190px;
    padding: 8px; background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.menu-panel a { padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 500; }
.menu-panel a:hover { background: var(--purple-soft); text-decoration: none; }
@media (max-width: 760px) {
    .nav-links { display: none; }
    .nav-menu { display: block; }
}

/* ---------- Buttons / badges ---------- */
.store-badge {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px; border-radius: 999px;
    /* A status, not a button: nothing to tap until the app is live. */
    background: var(--purple-soft); color: var(--purple-deep); font-weight: 700; font-size: 17px;
    border: 1px solid var(--line-purple);
}
.store-badge svg { width: 20px; height: 20px; }
.text-link { font-weight: 600; color: var(--purple-deep); }
.cta-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 28px; }

/* ---------- Phone frame ---------- */
.phone {
    width: min(300px, 78vw);
    border-radius: 48px;
    padding: 10px;
    background: #15121F;
    box-shadow: 0 30px 80px rgba(60, 30, 120, 0.28), inset 0 0 0 1.5px #3A3550;
}
.phone img { border-radius: 39px; width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual .phone { transform: rotate(-2deg); }
.hero-visual .float-card {
    position: absolute; inset-inline-end: -10px; bottom: -24px; width: min(210px, 46vw);
    border-radius: 22px; overflow: hidden; transform: rotate(5deg);
    box-shadow: 0 24px 60px rgba(60, 30, 120, 0.30);
}
/* The real widget, cropped from the Home Screen: clip-path trims the wallpaper at its corners. */
.widget-float {
    position: absolute; inset-inline-start: -6px; bottom: 40px; z-index: 2; width: min(170px, 40vw);
    clip-path: inset(3% round 24%); transform: rotate(-5deg);
    filter: drop-shadow(0 18px 40px rgba(60, 30, 120, 0.30));
}
.hero-visual .phone + .float-card { z-index: 2; }
@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: 1fr; text-align: center; }
    .hero .lead { margin-left: auto; margin-right: auto; }
    .hero .cta-row { justify-content: center; }
    .hero-visual { margin-top: 24px; }
    .hero-visual .float-card { inset-inline-end: 4%; }
}

/* ---------- Two-column feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 900px) {
    .split, .split.flip { grid-template-columns: 1fr; gap: 36px; }
    .split.flip > :first-child { order: 0; }
    .split .phone { margin: 0 auto; }
}
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { position: relative; padding-inline-start: 30px; margin-bottom: 10px; color: var(--ink-2); }
.ticks li::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--purple-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239B70EA' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ticks strong { color: var(--ink); font-weight: 600; }

/* ---------- Receipt → items ---------- */
.receipt-demo { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center; }
.receipt {
    background: var(--paper); color: var(--paper-ink); font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
    padding: 26px 24px 30px; border-radius: 6px; position: relative;
    box-shadow: 0 18px 50px rgba(60, 30, 120, 0.18);
    transform: rotate(-1.5deg);
    /* Torn edge at the bottom. */
    -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 10px repeat-x;
    mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 10px repeat-x;
}
.receipt .shop { text-align: center; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 4px; }
.receipt .meta { text-align: center; font-size: 12px; opacity: 0.6; margin-bottom: 12px; }
.receipt .row { display: flex; justify-content: space-between; gap: 12px; }
.receipt .rule { border-top: 1.5px dashed rgba(43, 38, 32, 0.35); margin: 10px 0; }
.receipt .total { font-weight: 700; }
.arrow { font-size: 30px; color: var(--purple); }
.items { padding: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; }
.item + .item { border-top: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.item .name { font-weight: 600; }
.item .cat { font-size: 13px; color: var(--ink-3); }
.item .price { margin-inline-start: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.item .was { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 760px) {
    .receipt-demo { grid-template-columns: 1fr; }
    .arrow { transform: rotate(90deg); justify-self: center; }
}
.quote {
    margin: 36px auto 0; max-width: 720px; padding: 26px 30px;
    font-size: 18px; color: var(--ink-2); font-style: italic;
}
.quote cite { display: block; margin-top: 10px; font-style: normal; font-size: 14px; color: var(--ink-3); }

/* ---------- Ways grid ---------- */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.way { padding: 24px 20px; }
.way .icon {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
    background: var(--purple); color: #fff; margin-bottom: 14px;
}
.way .icon svg { width: 22px; height: 22px; }
.way h3 { font-size: 18px; margin-bottom: 6px; }
.way p { font-size: 15px; color: var(--ink-2); margin: 0; }
@media (max-width: 1000px) { .ways { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ways { grid-template-columns: 1fr; } }

/* ---------- Siri conversation ---------- */
.siri { padding: 24px; max-width: 420px; margin: 0 auto; }
.bubble { padding: 12px 16px; border-radius: 20px; margin-bottom: 10px; max-width: 85%; font-size: 16px; }
.bubble.me { margin-inline-start: auto; background: var(--purple); color: #fff; border-end-end-radius: 6px; }
.bubble.siri-says { background: var(--card-solid); border: 1px solid var(--line); border-end-start-radius: 6px; }
.logged {
    margin-top: 14px; padding: 16px; border-radius: 20px; background: var(--card-solid); border: 1px solid var(--line);
}
.logged .amount { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.logged .shop { color: var(--ink-3); font-size: 14px; margin-bottom: 12px; }
.logged .top { display: flex; justify-content: space-between; align-items: flex-start; }
.undo { font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-purple); color: var(--purple-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
    padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2);
}
.chip.on { border-color: var(--cat-restaurants); color: var(--cat-restaurants); background: rgba(255, 122, 26, 0.08); }

/* ---------- Awards ---------- */
.awards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
figure.award { margin: 0; }
.award img, .award video { border-radius: 20px; box-shadow: 0 18px 44px rgba(60, 30, 120, 0.20); aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }
.award figcaption { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.award figcaption strong { display: block; color: var(--ink); }
@media (max-width: 900px) {
    .awards { grid-template-columns: repeat(4, 62vw); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin-inline: -20px; padding-inline-start: 20px; }
    .award { scroll-snap-align: start; }
}
.personas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 32px; }
.personas img { border-radius: 22px; box-shadow: var(--shadow); width: 100%; }
@media (max-width: 760px) {
    .personas { grid-template-columns: repeat(5, 70vw); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px; padding: 0 20px 14px; }
    .personas img { scroll-snap-align: start; }
}

/* ---------- Where to save ---------- */
.savings { padding: 20px; max-width: 460px; margin: 0 auto; }
.savings-head { font-weight: 800; font-size: 18px; margin: 4px 4px 10px; }
.saving { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); margin-bottom: 10px; }
.saving .name { font-weight: 700; }
.saving .sub { font-size: 14px; color: var(--ink-2); }
.saving .amt { font-weight: 800; font-size: 20px; color: var(--cat-shopping); text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.saving .amt span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); }

/* ---------- Four facts ---------- */
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.four .card { padding: 24px; }
.four h3 { font-size: 18px; margin-bottom: 8px; }
.four p { font-size: 15px; color: var(--ink-2); margin: 0; }
@media (max-width: 1000px) { .four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .four { grid-template-columns: 1fr; } }

/* ---------- Privacy ---------- */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; text-align: start; }
.three .card { padding: 28px; }
.three h3 { font-size: 20px; }
.three p { color: var(--ink-2); font-size: 16px; margin: 0; }
@media (max-width: 900px) { .three { grid-template-columns: 1fr; } }

/* ---------- Everywhere ---------- */
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.langs span { padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 820px; margin: 40px auto 0; }
.plan { padding: 32px; text-align: start; position: relative; }
.plan.pro { border: 1.5px solid var(--purple); }
.plan .name { font-weight: 700; color: var(--ink-2); }
.plan .price { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 6px 0 2px; }
.plan .price span { font-size: 18px; font-weight: 600; color: var(--ink-3); }
.plan .scans { font-size: 20px; font-weight: 700; margin: 18px 0 6px; }
.plan .tag {
    position: absolute; top: 20px; right: 20px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
    padding: 5px 10px; border-radius: 999px; background: var(--purple); color: #fff;
}
.included { max-width: 820px; margin: 20px auto 0; padding: 28px 32px; text-align: start; }
.included ul { columns: 2; column-gap: 32px; margin: 12px 0 0; padding: 0; list-style: none; }
.included li { break-inside: avoid; padding-inline-start: 26px; position: relative; margin-bottom: 8px; color: var(--ink-2); font-size: 16px; }
.included li::before { content: "✓"; position: absolute; inset-inline-start: 2px; color: var(--purple); font-weight: 800; }
@media (max-width: 700px) {
    .plans { grid-template-columns: 1fr; }
    .included ul { columns: 1; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 36px auto 0; padding: 8px 28px; text-align: start; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--purple); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); }

/* ---------- Footer ---------- */
footer { padding: 48px 0 60px; border-top: 1px solid var(--line); margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer .links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 15px; }
footer .links a { color: var(--ink-2); }
footer .brand img { width: 30px; height: 30px; }
footer .small { margin: 0; }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 56px 20px 40px; }
.doc .card { padding: clamp(24px, 5vw, 48px); }
.doc h1 { font-size: clamp(34px, 5vw, 48px); }
.doc h2 { font-size: 26px; margin-top: 40px; }
.doc h3 { font-size: 19px; margin-top: 28px; }
.doc p, .doc li { color: var(--ink-2); }
/* German legal compounds outrun a phone's width; let them break. */
.doc article { overflow-wrap: break-word; hyphens: auto; }
.doc strong { color: var(--ink); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.doc code { font-family: var(--mono); font-size: 0.9em; background: var(--purple-soft); padding: 1px 6px; border-radius: 6px; }
.doc .table-scroll { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; min-width: 560px; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc th { color: var(--ink); }

/* ---------- Reveal on scroll (only when JS is on and motion is welcome) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Right to left ---------- */
/* The printed receipt stays a printed receipt; arrows point the way the text reads. */
[dir="rtl"] .receipt, [dir="rtl"] .was, [dir="rtl"] .price, [dir="rtl"] .amt, [dir="rtl"] .amount { direction: ltr; }
[dir="rtl"] .receipt { transform: rotate(1.5deg); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
@media (max-width: 760px) { [dir="rtl"] .arrow { transform: rotate(90deg); } }
[dir="rtl"] .hero-visual .phone { transform: rotate(2deg); }
[dir="rtl"] .hero-visual .float-card { transform: rotate(-5deg); }
[dir="rtl"] .widget-float { transform: rotate(5deg); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.3; }
[dir="rtl"] .kicker { letter-spacing: 0; }
[dir="rtl"] .saving .amt { text-align: left; }
