/* ============================================================================
   Budget Fury — landing page + guides.
   One stylesheet, no web fonts, no framework (js/site.js is 40 lines of nav toggle).
   Palette is sampled from the App Store screenshots (see ../../app.md §4) so the
   store assets sit on the page without a visible seam.
   ========================================================================= */

:root {
    --max: 1080px;
    --prose: 68ch;

    --cream: #f4e4c1; /* exact screenshot background */
    --cream-soft: #faf1de;
    --bg: #fdfaf4;
    --surface: #ffffff;

    --ink: #171818;
    --ink-soft: #3d3a33;
    --muted: #6b6455;
    --line: #e7dcc6;

    --brand: #ca6416;
    --brand-deep: #9e4c0f;
    --brand-wash: #fdefe0;
    --blue: #068bfe;
    --green: #1c9c4b;

    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;

    --shadow: 0 1px 2px rgba(23, 24, 24, .05), 0 8px 24px -12px rgba(23, 24, 24, .18);
    --shadow-lg: 0 2px 4px rgba(23, 24, 24, .06), 0 24px 56px -24px rgba(23, 24, 24, .28);

    color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    overflow-wrap: break-word;
}

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

a { color: var(--brand-deep); text-underline-offset: 3px; }
a:hover { color: var(--brand); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--prose); }
.fine { color: var(--muted); font-size: 15px; }
.center { text-align: center; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.021em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(34px, 5.4vw, 54px); letter-spacing: -.03em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.025em; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }

section { padding: 72px 0; }
section > .wrap > h2 { margin-bottom: .35em; }

.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--brand);
    margin: 0 0 14px;
}

.lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 62ch; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1.5px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .12s ease, background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { transform: translateY(-1px); color: var(--ink); }

.btn.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 6px 18px -8px rgba(202, 100, 22, .8);
}
.btn.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }

.btn.ghost { border-color: var(--line); background: var(--surface); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-deep); }

.btn.sm { padding: 9px 16px; font-size: 15px; }

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

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(253, 250, 244, .88);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -.02em;
    font-size: 17px;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }

.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 500;
}
.nav-links a:hover { color: var(--brand-deep); }
.nav-links .btn { color: #fff; }

/* CTA + hamburger: always in the bar, links collapse behind the hamburger. */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-cta { white-space: nowrap; }

.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    flex: 0 0 auto;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
    padding: 64px 0 40px;
    background:
        radial-gradient(900px 420px at 78% 6%, rgba(244, 228, 193, .95), transparent 62%),
        radial-gradient(700px 380px at 8% 0%, rgba(253, 239, 224, .9), transparent 60%);
}
.hero .wrap {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 48px;
    align-items: center;
}
.hero h1 { margin-bottom: .35em; }
.hero .lede { margin-bottom: 26px; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 340px; filter: drop-shadow(0 32px 48px rgba(23, 24, 24, .2)); }

.trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 22px;
    padding: 0;
    list-style: none;
}
.trust li {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 13px;
}

/* ---------- generic blocks ---------- */

.band { background: var(--cream); }
.band-soft { background: var(--cream-soft); }

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 26px;
}
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 22px;
    box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

a.card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
a.card:hover {
    transform: translateY(-2px);
    border-color: #d9c79c;
    box-shadow: var(--shadow-lg);
    color: inherit;
}
a.card strong { display: block; margin-bottom: 6px; font-size: 17px; letter-spacing: -.01em; }
a.card .post-date, .post-date {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

ul.checks { list-style: none; padding: 0; margin: 18px 0 0; }
ul.checks li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 11px;
}
ul.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .45em;
    width: 16px;
    height: 9px;
    border-left: 2.5px solid var(--brand);
    border-bottom: 2.5px solid var(--brand);
    transform: rotate(-45deg);
}

/* ---------- download ---------- */

.download-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 34px;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 118px 1fr auto;
    gap: 28px;
    align-items: center;
}
.download-card img.icon { width: 118px; height: 118px; border-radius: 26px; display: block; }
.download-card h2 { font-size: 27px; margin-bottom: .3em; }

.specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 26px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14.5px;
    color: var(--muted);
}
.specs li strong { color: var(--ink); font-weight: 600; }

/* ---------- screenshots ---------- */

.shots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-top: 34px;
}
.shot { margin: 0; }
.shot img {
    display: block;
    width: 100%;
    border-radius: var(--r);
}
.shot figcaption {
    margin-top: 10px;
    font-size: 14.5px;
    color: var(--ink-soft);
    text-align: center;
}
.shot figcaption b { display: block; color: var(--ink); }

/* ---------- how it works ---------- */

.steps { display: grid; gap: 60px; margin-top: 44px; }
.step {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: center;
}
/* Even steps put the phone on the left. The column widths have to swap too —
   `order` alone moves the art into the 1fr cell and it stretches to fill it. */
.step:nth-child(even) { grid-template-columns: 280px 1fr; }
.step:nth-child(even) .step-art { order: -1; }
.step-art img {
    display: block;
    width: 100%;
    filter: drop-shadow(0 22px 38px rgba(23, 24, 24, .16));
}
.step-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
}
.step h3 { font-size: 25px; letter-spacing: -.02em; }

/* ---------- FAQ ---------- */

.faq { margin-top: 30px; max-width: 78ch; }
.faq details {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 19px 52px 19px 22px;
    font-weight: 650;
    font-size: 17.5px;
    letter-spacing: -.012em;
    position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 27px;
    width: 9px;
    height: 9px;
    border-right: 2.2px solid var(--brand);
    border-bottom: 2.2px solid var(--brand);
    transform: rotate(45deg);
    transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 31px; }
.faq .answer { padding: 0 22px 20px; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .learn {
    display: inline-block;
    margin-top: 6px;
    font-weight: 650;
    font-size: 15.5px;
    text-decoration: none;
    border-bottom: 2px solid var(--brand-wash);
    padding-bottom: 1px;
}
.faq .learn:hover { border-bottom-color: var(--brand); }

/* ---------- CTA ---------- */

.cta-band {
    background: linear-gradient(160deg, #1f1c17 0%, #2e2519 60%, #4a2f13 100%);
    color: #fdfaf4;
    padding: 80px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #e5d9c2; }
.cta-band .btn { border-color: rgba(253, 250, 244, .35); color: #fdfaf4; }
.cta-band .btn:hover { color: #fff; border-color: #fdfaf4; }
.cta-band .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.cta-band .btn.primary:hover { background: #e07421; border-color: #e07421; }
.cta-band .fine { color: #b9ac93; }
.cta-inner { display: flex; align-items: center; gap: 44px; flex-wrap: wrap; justify-content: space-between; }
.cta-inner > div:first-child { max-width: 56ch; }

/* ---------- footer ---------- */

.site-footer {
    background: var(--cream-soft);
    border-top: 1px solid var(--line);
    padding: 56px 0 34px;
    font-size: 15px;
}
.footer-cols {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 34px;
}
.footer-cols h4 {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 9px; }
.footer-cols a { text-decoration: none; color: var(--ink-soft); }
.footer-cols a:hover { color: var(--brand-deep); text-decoration: underline; }
.footer-bottom {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- guides ---------- */

.breadcrumb { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.guide-head { padding: 52px 0 12px; }
.guide-head h1 { max-width: 22ch; }
.guide-head .lede { margin-top: 14px; }

.guide-body { padding: 26px 0 72px; }
.guide-body .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.guide-body article { max-width: var(--prose); }
.guide-body article h2 { margin-top: 1.9em; font-size: clamp(23px, 2.6vw, 29px); }
.guide-body article h3 { margin-top: 1.6em; }
.guide-body article > *:first-child { margin-top: 0; }
.guide-body article ul, .guide-body article ol { padding-left: 22px; margin: 0 0 1.1em; }
.guide-body article li { margin-bottom: .5em; }

.answer-box {
    background: var(--brand-wash);
    border: 1px solid #f0d5b8;
    border-left: 4px solid var(--brand);
    border-radius: var(--r-sm);
    padding: 18px 20px;
    margin: 0 0 28px;
}
.answer-box p { margin: 0; font-size: 17.5px; }
.answer-box strong { color: var(--brand-deep); }

.howto {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 24px 26px 8px;
    margin: 26px 0;
    box-shadow: var(--shadow);
    counter-reset: howto;
}
.howto h3 { margin-top: 0; }
.howto ol { list-style: none; padding: 0; margin: 0; }
.howto li {
    position: relative;
    padding-left: 42px;
    margin-bottom: 16px;
    counter-increment: howto;
}
.howto li::before {
    content: counter(howto);
    position: absolute;
    left: 0;
    top: 0;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.howto li b { display: block; }

.sidebar { position: sticky; top: 90px; display: grid; gap: 20px; }
.sidebar .card { padding: 20px; }
.sidebar h4 { font-size: 15px; margin-bottom: 10px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.sidebar li { margin-bottom: 9px; }
.sidebar a { text-decoration: none; }
.sidebar a:hover { text-decoration: underline; }
.sidebar .shot-mini img { border-radius: 12px; display: block; width: 100%; }

.guide-cta {
    background: var(--cream);
    border-radius: var(--r-lg);
    padding: 30px 32px;
    margin-top: 46px;
    display: flex;
    gap: 26px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}
.guide-cta h3 { margin-bottom: .3em; }
.guide-cta p { margin: 0; color: var(--ink-soft); }
.guide-cta img { width: 62px; height: 62px; border-radius: 14px; }
.guide-cta > div:first-child { display: flex; gap: 18px; align-items: center; max-width: 58ch; }

.related { margin-top: 44px; }
.related h2 { font-size: 22px; }

.guide-index-group { margin-top: 46px; }
.guide-index-group h2 { font-size: 23px; margin-bottom: .2em; }
.guide-index-group > p { color: var(--muted); margin-bottom: 4px; }

.tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--brand-deep);
    background: var(--brand-wash);
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 10px;
}

/* ---------- press kit ---------- */

.press-intro { padding-top: 56px; padding-bottom: 40px; }
.press-intro .lede { margin: 0 0 22px; }
.press-intro .btn-row { margin: 22px 0 16px; }

.press-contact {
    font-size: 17px;
    margin: 0;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    display: inline-block;
}
.press-contact a { font-weight: 600; }

/* Fact sheet — label/value rows, wide enough to scan in one pass. */
.factsheet { margin: 26px 0 0; }
.factsheet > div {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 8px 28px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}
.factsheet > div:last-child { border-bottom: 1px solid var(--line); }
.factsheet dt {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 2px;
}
.factsheet dd { margin: 0; color: var(--ink-soft); }

.press-summary {
    font-size: 19px;
    line-height: 1.55;
    color: var(--ink);
    padding-left: 18px;
    border-left: 3px solid var(--brand);
}

.press-features { list-style: none; padding: 0; margin: 24px 0 0; max-width: var(--prose); }
.press-features li {
    padding: 16px 0;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
}
.press-features li:last-child { border-bottom: 1px solid var(--line); }
.press-features strong { color: var(--ink); }

/* Screenshot grid — unframed images, so give each one a hairline and a caption. */
.press-shots {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 24px;
}
.press-shots img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--surface);
}
.press-shots a { display: block; }
.press-shots a:hover img { border-color: var(--brand); }
.press-shots p { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.45; }

.press-icon { display: flex; align-items: center; gap: 22px; margin: 18px 0 8px; flex-wrap: wrap; }
.press-icon img { border-radius: 22px; box-shadow: var(--shadow); }
.press-icon ul { list-style: none; padding: 0; margin: 0; }
.press-icon li { padding: 4px 0; color: var(--muted); font-size: 15px; }

#images h3 { margin-top: 44px; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
    .hero .wrap { grid-template-columns: 1fr; gap: 34px; }
    .hero-art { order: -1; }
    .hero-art img { max-width: 260px; }
    .guide-body .wrap { grid-template-columns: 1fr; gap: 40px; }
    .sidebar { position: static; grid-template-columns: repeat(2, 1fr); }
    .grid.four { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .download-card { grid-template-columns: 92px 1fr; }
    .download-card img.icon { width: 92px; height: 92px; }
    .download-card .btn-row { grid-column: 1 / -1; }
    .press-shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    section { padding: 56px 0; }
    .grid, .grid.two, .grid.four { grid-template-columns: 1fr; }
    .shots { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .step,
    .step:nth-child(even) { grid-template-columns: 1fr; gap: 26px; }
    .step:nth-child(even) .step-art { order: 0; }
    .step-art { max-width: 260px; margin: 0 auto; }
    .steps { gap: 48px; }
    /* Links drop into a panel under the sticky bar; the CTA stays in the bar. */
    .nav { gap: 12px; }
    .nav-actions { margin-left: auto; }  /* .nav-links leaves the flow below */
    .nav-toggle { display: flex; }
    .nav-cta { padding: 8px 14px; font-size: 14px; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 4px 24px 12px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 22px 34px -26px rgba(23, 24, 24, .55);
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 13px 2px;
        font-size: 16px;
        color: var(--ink);
    }
    .nav-links a + a { border-top: 1px solid var(--line); }
    .sidebar { grid-template-columns: 1fr; }
    .cta-inner { gap: 26px; }
    .press-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
    .factsheet > div { grid-template-columns: 1fr; gap: 6px; padding: 14px 0; }
    .press-summary { font-size: 18px; }
}

@media (max-width: 520px) {
    body { font-size: 16.5px; }
    /* Longhands on purpose: the shorthand would wipe .nav's vertical padding
       and squeeze the header bar onto the CTA pill. */
    .wrap { padding-left: 18px; padding-right: 18px; }
    .nav-links { padding: 4px 18px 12px; }
    .brand { font-size: 16px; }
    .brand img { width: 30px; height: 30px; }
    .nav-cta { padding: 8px 13px; font-size: 13.5px; }
    .shots { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; }
    .download-card { grid-template-columns: 1fr; padding: 26px; text-align: left; }
    .footer-cols { grid-template-columns: 1fr; gap: 26px; }
    .guide-cta { padding: 24px; }
    .guide-cta > div:first-child { flex-direction: column; align-items: flex-start; gap: 12px; }
    .press-contact { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
