/* Tiny Pocket Studio — shared styles for every page */

/* Palette: autumn street. Golden foliage, sandstone facades,
   dark branches and a pale sky. */
:root {
    --bg: #FBF3E4;          /* parchment */
    --surface: #FFFBF3;
    --surface-alt: #EFE0C4; /* sandstone */
    --ink: #33231A;         /* branch bark */
    --ink-soft: #6B5240;
    --line: #E2CFAE;
    --gold: #E3A33B;        /* foliage */
    --amber: #8E4C0E;       /* deep amber: buttons, links, labels */
    --rust: #C7652A;
    --honey: #F4C46A;       /* warm glow */
    --sky: #BCD0DC;
    --btn-bg: var(--amber);
    --btn-ink: #FFF8EC;
    --link: var(--amber);
    --focus: #2F5A78;
    --logo-plate: transparent;

    /* Each app page overrides these */
    --app-accent: var(--amber);
    --app-accent-ink: #FFF8EC;
    --app-tint: #F7E6C4;

    --shadow-1: 0 2px 6px rgba(51, 35, 26, 0.06), 0 8px 24px rgba(51, 35, 26, 0.08);
    --shadow-2: 0 4px 10px rgba(51, 35, 26, 0.09), 0 16px 40px rgba(51, 35, 26, 0.14);
    --radius: 24px;
    --radius-sm: 16px;

    --font-head: 'Fredoka', 'Nunito', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    /* Always light, even when the visitor's device is in dark mode */
    color-scheme: light;
}

/* Spendzi: autumn orange from the app's Leaves theme */
.app-spendzi {
    --app-accent: #B4531A;
    --app-accent-ink: #FFF8EC;
    --app-tint: #FBE3CC;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    text-wrap: balance;
}

p {
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--link);
    text-underline-offset: 3px;
}

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

.icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-fill {
    fill: currentColor;
    stroke: none;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--btn-bg);
    color: var(--btn-ink);
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

    .skip-link:focus {
        top: 12px;
    }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.narrow {
    max-width: 760px;
}

.section {
    padding: 88px 0;
}

.section-alt {
    background: var(--surface-alt);
}

.section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 48px;
}

    .section-head h2 {
        font-size: clamp(28px, 4vw, 36px);
        margin-bottom: 12px;
    }

    .section-head p {
        color: var(--ink-soft);
        font-size: 18px;
    }

.eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 10px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}

    .site-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        min-height: 68px;
    }

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 12px;
    background: var(--logo-plate);
    padding: 2px 6px;
}

    .brand img {
        height: 44px;
        width: auto;
    }

.site-nav {
    display: flex;
    gap: 4px;
}

    .site-nav a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0 14px;
        border-radius: 999px;
        color: var(--ink);
        font-weight: 700;
        font-size: 16px;
        text-decoration: none;
        transition: background-color 0.18s ease;
    }

        .site-nav a:hover,
        .site-nav a[aria-current="page"] {
            background: var(--surface-alt);
        }

/* Buttons & chips */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    border: 2px solid transparent;
    background: var(--btn-bg);
    color: var(--btn-ink);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s var(--ease-out), box-shadow 0.18s ease, background-color 0.18s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-1);
    }

    .btn:active {
        transform: translateY(0) scale(0.98);
    }

    .btn .icon {
        width: 20px;
        height: 20px;
    }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

    .btn-ghost:hover {
        background: var(--surface);
    }

.btn-app {
    background: var(--app-accent);
    color: var(--app-accent-ink);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 14px;
}

    .chip .icon {
        width: 18px;
        height: 18px;
    }

.chip-app {
    background: var(--app-tint);
    color: var(--ink);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* Hero */
.hero {
    position: relative;
    padding: 72px 0 96px;
    text-align: center;
    overflow: hidden;
}

.hero-logo {
    width: min(560px, 86%);
    margin: 0 auto 28px;
    padding: 12px 20px;
    border-radius: 40px;
    background: var(--logo-plate);
}

.hero h1 {
    font-size: clamp(32px, 5.5vw, 52px);
    max-width: 16ch;
    margin: 0 auto 16px;
}

.hero-lead {
    color: var(--ink-soft);
    font-size: clamp(17px, 2vw, 20px);
    max-width: 52ch;
    margin: 0 auto 32px;
}

.hero .actions {
    justify-content: center;
}

.leaf {
    position: absolute;
    width: 64px;
    height: 64px;
    fill: var(--gold);
    opacity: 0.7;
    pointer-events: none;
}

.leaf-1 { top: 18%; left: 6%; transform: rotate(-20deg); }
.leaf-2 { top: 58%; left: 12%; width: 40px; height: 40px; transform: rotate(40deg); fill: var(--rust); opacity: 0.55; }
.leaf-3 { top: 22%; right: 7%; transform: rotate(100deg); }
.leaf-4 { top: 64%; right: 13%; width: 44px; height: 44px; transform: rotate(160deg); fill: var(--rust); opacity: 0.55; }

.blob {
    position: absolute;
    border-radius: 50%;
    background: var(--honey);
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none;
    z-index: -1;
}

/* Featured app */
.featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    background: var(--surface);
    border-radius: 32px;
    padding: clamp(24px, 5vw, 56px);
    box-shadow: var(--shadow-1);
    position: relative;
    overflow: hidden;
}

    .featured::before {
        content: "";
        position: absolute;
        inset: auto -80px -120px auto;
        width: 320px;
        height: 320px;
        border-radius: 50%;
        background: var(--app-tint);
        z-index: 0;
    }

    .featured > * {
        position: relative;
        z-index: 1;
    }

.app-title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.app-icon {
    width: 88px;
    height: 88px;
    border-radius: 22%;
    box-shadow: var(--shadow-1);
    flex-shrink: 0;
}

.app-icon-lg {
    width: 120px;
    height: 120px;
}

/* For icons exported with transparent padding around the rounded square.
   Spendzi_Logo.png: a 276px icon centred in a 432px canvas. */
.app-icon-padded {
    display: block;
    overflow: hidden;
    border-radius: 24%;
}

    .app-icon-padded img {
        width: 156.5%;
        max-width: none;
        height: auto;
        margin: -27.9% 0 0 -28.3%;
    }

.app-title h3 {
    font-size: clamp(28px, 4vw, 36px);
}

.app-tagline {
    color: var(--ink-soft);
    font-size: 18px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 28px;
    display: grid;
    gap: 14px;
}

    .feature-list li {
        display: flex;
        gap: 14px;
        align-items: flex-start;
    }

    .feature-list strong {
        display: block;
        font-family: var(--font-head);
        font-weight: 600;
        font-size: 18px;
    }

    .feature-list span {
        color: var(--ink-soft);
        font-size: 16px;
    }

.icon-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--app-tint);
    color: var(--app-accent);
    flex-shrink: 0;
}

.featured-art {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Wide store banner used as the featured app's art */
.featured-banner {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-2);
}

/* Phone frame used for screenshots and placeholders */
.phone {
    width: 200px;
    aspect-ratio: 9 / 19.5;
    border-radius: 32px;
    background: var(--app-tint);
    border: 6px solid var(--ink);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    flex-shrink: 0;
}

    .phone img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .phone:nth-child(2) {
        transform: translateY(32px);
    }

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
}

    .theme-grid figure {
        margin: 0;
        text-align: center;
    }

    .theme-grid .phone {
        width: 100%;
        max-width: 220px;
        margin: 0 auto 14px;
        border-width: 5px;
        border-radius: 28px;
    }

    .theme-grid figcaption {
        font-family: var(--font-head);
        font-weight: 600;
        font-size: 18px;
    }

/* App grid */
.app-grid-title {
    display: block;
    text-align: center;
    margin: 72px 0 24px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
    justify-content: center;
    gap: 24px;
}

.app-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-1);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}

a.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
}

.app-card .app-icon {
    width: 72px;
    height: 72px;
}

.app-card h3 {
    font-size: 24px;
}

.app-card p {
    color: var(--ink-soft);
}

.app-card .more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--app-accent);
}

.app-card-soon {
    background: transparent;
    box-shadow: none;
    border: 2px dashed var(--line);
    align-items: flex-start;
    justify-content: center;
}

    .app-card-soon .icon-bubble {
        background: var(--surface);
        color: var(--amber);
        width: 72px;
        height: 72px;
        border-radius: 22%;
    }

        .app-card-soon .icon-bubble .icon {
            width: 32px;
            height: 32px;
        }

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.about-text p + p {
    margin-top: 16px;
}

.about-text p {
    color: var(--ink-soft);
    font-size: 18px;
}

.about-text h2 {
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 16px;
}

.team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.team-member {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-1);
}

.avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 32px;
    color: #33231A;
}

.avatar-gold { background: #F3D08E; }
.avatar-sky { background: #CADBE6; }

.team-member h3 {
    font-size: 22px;
    margin-bottom: 4px;
}

.team-member p {
    color: var(--ink-soft);
    font-size: 16px;
}

/* App page */
.app-hero {
    padding: 64px 0 88px;
    position: relative;
    overflow: hidden;
}

    .app-hero .container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 48px;
        align-items: center;
    }

    .app-hero h1 {
        font-size: clamp(40px, 7vw, 64px);
    }

    .app-hero .app-tagline {
        font-size: clamp(19px, 2.4vw, 23px);
        max-width: 30ch;
        margin: 12px 0 28px;
    }

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--ink-soft);
    text-decoration: none;
}

    .breadcrumb:hover {
        color: var(--ink);
    }

    .breadcrumb .icon {
        width: 18px;
        height: 18px;
    }

.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-1);
}

    .feature-card .icon-bubble {
        margin-bottom: 16px;
    }

    .feature-card h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .feature-card p {
        color: var(--ink-soft);
        font-size: 16px;
    }

.privacy-callout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
    background: var(--app-tint);
    border-radius: 32px;
    padding: clamp(24px, 5vw, 48px);
}

    .privacy-callout .icon-bubble {
        width: 56px;
        height: 56px;
        background: var(--surface);
    }

        .privacy-callout .icon-bubble .icon {
            width: 28px;
            height: 28px;
        }

    .privacy-callout h2 {
        font-size: clamp(24px, 3.5vw, 32px);
        margin-bottom: 10px;
    }

    .privacy-callout p {
        color: var(--ink-soft);
        margin-bottom: 20px;
        max-width: 60ch;
    }

/* Legal / long-form pages */
.legal {
    padding: 56px 0 88px;
}

    .legal h1 {
        font-size: clamp(32px, 5vw, 44px);
        margin-bottom: 8px;
    }

    .legal .meta {
        color: var(--ink-soft);
        margin-bottom: 32px;
    }

    .legal h2 {
        font-size: 24px;
        margin: 40px 0 12px;
    }

    .legal h3 {
        font-size: 19px;
        margin: 24px 0 8px;
    }

    .legal p,
    .legal ul {
        margin: 0 0 14px;
        max-width: 70ch;
    }

    .legal ul {
        padding-left: 22px;
    }

    .legal li {
        margin-bottom: 6px;
    }

.tldr {
    background: var(--app-tint);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 8px;
}

    .tldr h2 {
        margin: 0 0 12px;
        font-size: 20px;
    }

    .tldr ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .tldr li {
        display: flex;
        gap: 10px;
        align-items: flex-start;
    }

        .tldr li .icon {
            color: var(--app-accent);
            margin-top: 2px;
        }

.toc {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 24px 0 28px;
}

    .toc h2 {
        font-size: 18px;
        margin: 0 0 8px;
    }

    .toc ol {
        margin: 0;
        padding-left: 22px;
        columns: 2 220px;
        column-gap: 32px;
    }

    .toc li {
        margin-bottom: 4px;
    }

.policy-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: grid;
    gap: 14px;
    max-width: none;
}

    .policy-list a {
        display: flex;
        align-items: center;
        gap: 16px;
        background: var(--surface);
        border-radius: var(--radius-sm);
        padding: 16px 20px;
        box-shadow: var(--shadow-1);
        color: var(--ink);
        text-decoration: none;
        transition: transform 0.2s var(--ease-out);
    }

        .policy-list a:hover {
            transform: translateY(-2px);
        }

    .policy-list .app-icon {
        width: 52px;
        height: 52px;
        box-shadow: none;
    }

    .policy-list strong {
        font-family: var(--font-head);
        font-weight: 600;
        font-size: 19px;
        display: block;
    }

    .policy-list span {
        color: var(--ink-soft);
        font-size: 15px;
    }

    .policy-list .icon {
        margin-left: auto;
    }

/* Footer */
.site-footer {
    background: var(--surface-alt);
    padding: 64px 0 40px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-size: 26px;
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--ink-soft);
    max-width: 36ch;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

    .footer-links h3 {
        font-size: 15px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--ink-soft);
        margin-bottom: 10px;
    }

    .footer-links ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-links a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        color: var(--ink);
        font-weight: 700;
        text-decoration: none;
    }

        .footer-links a:hover {
            color: var(--link);
            text-decoration: underline;
        }

    .footer-links .icon {
        width: 18px;
        height: 18px;
    }

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    color: var(--ink-soft);
    font-size: 14px;
}

/* 404 */
.not-found {
    min-height: 70vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 64px 0;
}

    .not-found h1 {
        font-size: clamp(32px, 5vw, 48px);
        margin: 16px 0 12px;
    }

    .not-found p {
        color: var(--ink-soft);
        margin-bottom: 28px;
    }

    .not-found .actions {
        justify-content: center;
    }

    .not-found img {
        width: min(360px, 80%);
        margin: 0 auto;
        padding: 8px 16px;
        border-radius: 32px;
        background: var(--logo-plate);
    }

/* Scroll reveal (only when JS is running) */
.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.5s var(--ease-out);
}

    .js .reveal.is-visible {
        opacity: 1;
        transform: none;
    }

/* Breakpoints */
@media (min-width: 768px) {
    .featured {
        grid-template-columns: 1.1fr 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 56px;
    }

    .app-hero .container {
        grid-template-columns: 1.2fr 1fr;
    }

    .theme-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }
}

@media (max-width: 560px) {
    .section {
        padding: 64px 0;
    }

    .site-nav a {
        padding: 0 10px;
        font-size: 15px;
    }

    .brand img {
        height: 36px;
    }

    .featured-art .phone {
        width: 150px;
        border-width: 5px;
        border-radius: 26px;
    }

    .leaf {
        display: none;
    }

    .privacy-callout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .site-nav a {
        padding: 0 8px;
    }

    .site-nav .nav-optional {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}
