/*
 * adventurecacheapp.com
 * Colors, radii, spacing, and type follow the app's design tokens
 * (BBDMetalDetect.Maui/Features/Ui/Branding.cs and
 * docs/plans/2026-09-25-design-polish-plan.md sections 1.2-1.4).
 * The Content-Security-Policy allows no scripts, inline styles, or
 * third-party fonts, so everything here is plain HTML and CSS.
 * When the app's dark palette (D18, P10) lands, align the dark values below.
 */

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/Montserrat-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/fonts/Montserrat-Bold.ttf") format("truetype");
}

:root {
    color-scheme: light dark;

    /* App roles: PageBackground, CardBackground, SurfaceMuted, Border,
       TextHeading, TextBody, TextMuted, ActionPrimary, AccentText. */
    --page: #f6f1e7;
    --surface: #ffffff;
    --surface-muted: #f8f4ec;
    --border: #e9e1d0;
    --heading: #17352e;
    --text: #1a2925;
    --muted: #655a4b;
    --action: #225447;
    --action-hover: #17352e;
    --on-action: #fffdf8;
    --link: #225447;
    --accent-text: #86632a;
    --focus: #225447;

    /* Chrome (header, hero, download band, footer) stays deep forest in
       both schemes, like the app's navigation bars. */
    --chrome: #102c24;
    --chrome-raised: #17352e;
    --chrome-border: #2b4a41;
    --on-chrome: #fffdf8;
    --on-chrome-muted: #dde9e4;
    --gold: #d8b36a;
    --on-gold: #102c24;

    --radius-control: 14px;
    --radius-card: 16px;
    --radius-hero: 24px;
    --shadow-card: 0 5px 10px rgb(0 0 0 / 0.07);

    font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #0c1d18;
        --surface: #132822;
        --surface-muted: #17352e;
        --border: #2b4a41;
        --heading: #fffdf8;
        --text: #e8efeb;
        --muted: #b9c9c1;
        --action: #d8b36a;
        --action-hover: #e6c88c;
        --on-action: #102c24;
        --link: #d8b36a;
        --accent-text: #d8b36a;
        --focus: #d8b36a;
        --chrome: #081813;
        --chrome-raised: #102c24;
        --shadow-card: 0 5px 10px rgb(0 0 0 / 0.4);
    }
}

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

html {
    scroll-padding-block-start: 5.5rem;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text);
    background: var(--page);
}

main {
    flex: 1 0 auto;
}

main:focus {
    outline: none;
}

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

h1,
h2,
h3,
h4,
h5 {
    margin: 1.6em 0 0.5em;
    color: var(--heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    margin-top: 0;
    font-size: clamp(1.9rem, 1.5rem + 2vw, 2.8rem);
}

h2 {
    font-size: clamp(1.35rem, 1.2rem + 0.8vw, 1.75rem);
}

h3 {
    font-size: 1.2rem;
}

h4,
h5 {
    font-size: 1.05rem;
}

p,
ul,
ol {
    margin: 0 0 1rem;
}

a {
    color: var(--link);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-thickness: 0.16em;
}

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

.shell {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    z-index: 30;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-control);
    color: var(--on-gold);
    background: var(--gold);
    font-weight: 700;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    color: var(--on-chrome);
    background: var(--chrome);
    border-bottom: 1px solid var(--chrome-border);
}

.header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding-block: 0.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    color: var(--on-chrome);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.brand img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1.25rem;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--on-chrome);
    font-weight: 700;
    text-decoration: none;
}

.site-nav a:hover {
    text-decoration: underline;
}

.site-nav .nav-cta {
    padding-inline: 1rem;
    border-radius: 999px;
    color: var(--on-gold);
    background: var(--gold);
}

.site-header :focus-visible,
.site-footer :focus-visible,
.band :focus-visible {
    outline-color: var(--gold);
}

/* ---------- Content pages ---------- */

.page-shell {
    padding-block: 2.5rem 4rem;
}

.prose {
    max-width: 46rem;
    overflow-wrap: break-word;
}

.prose li + li {
    margin-top: 0.35rem;
}

.legal h2 {
    font-size: 1.3rem;
}

.policy-toc {
    margin: 1.5rem 0 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.policy-toc h2 {
    margin-top: 0;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

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

.table-scroll {
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
}

.table-scroll table {
    width: 100%;
    min-width: 40rem;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.table-scroll th,
.table-scroll td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table-scroll th {
    color: var(--heading);
    background: var(--surface-muted);
}

.table-scroll tr:last-child td {
    border-bottom: 0;
}

.table-scroll ul,
.table-scroll p {
    margin: 0 0 0.5rem;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-control);
    color: var(--on-action);
    background: var(--action);
    font-weight: 700;
    text-decoration: none;
}

.button-link:hover {
    background: var(--action-hover);
}

/* ---------- Home ---------- */

.band {
    color: var(--on-chrome-muted);
    background: var(--chrome);
}

.band h1,
.band h2 {
    color: var(--on-chrome);
}

.band a:not(.store-badge) {
    color: var(--gold);
}

.eyebrow {
    margin: 0 0 0.5rem;
    color: var(--accent-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.band .eyebrow {
    color: var(--gold);
}

.lede {
    font-size: 1.15rem;
}

.hero {
    padding-block: 2.5rem 3rem;
}

.hero-grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.hero-copy h1 {
    margin-bottom: 1rem;
}

.hero-note {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.shot {
    justify-self: center;
    width: min(20rem, 78vw);
    margin: 0;
}

.shot img {
    display: block;
    width: 100%;
    border-radius: var(--radius-hero);
    box-shadow: 0 1.5rem 3rem -1.5rem rgb(0 0 0 / 0.6);
}

.store-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.store-badges > li {
    display: flex;
}

/* Official artwork, unmodified. Google's PNG carries transparent clear
   space, so it is scaled until the visible badge matches Apple's height
   and the built-in margin is pulled back (as on yourwheyfitness.com). */
.store-badge {
    --badge-height: 3rem;
    display: inline-flex;
    border-radius: 0.65rem;
    line-height: 0;
}

.store-badge img {
    width: auto;
    max-width: none;
    height: var(--badge-height);
}

.google-play-badge img {
    height: calc(var(--badge-height) * 250 / 168);
    margin: calc(var(--badge-height) * -41 / 168);
}

.fact-strip {
    color: var(--on-chrome-muted);
    background: var(--chrome-raised);
    border-top: 1px solid var(--chrome-border);
}

.fact-strip ul {
    display: grid;
    gap: 1rem;
    margin-block: 0;
    padding: 1.5rem 0;
    list-style: none;
}

.fact-strip li {
    display: grid;
    gap: 0.2rem;
}

.fact-strip strong {
    color: var(--gold);
}

.section {
    padding-block: clamp(3rem, 7vw, 5rem);
}

.section-head {
    max-width: 42rem;
    margin-bottom: 2.5rem;
}

.section-head h2 {
    margin-top: 0;
}

.feature {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.feature + .feature {
    margin-top: clamp(3rem, 8vw, 5rem);
}

.feature-copy h3 {
    margin-top: 0;
    font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem);
}

.feature-copy p {
    color: var(--muted);
    font-size: 1.05rem;
}

.check-list {
    display: grid;
    gap: 0.6rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 1.75rem;
}

.check-list li::before {
    content: "";
    position: absolute;
    top: 0.3rem;
    left: 0.35rem;
    width: 0.45rem;
    height: 0.8rem;
    border: solid var(--action);
    border-width: 0 0.2rem 0.2rem 0;
    transform: rotate(45deg);
}

.cta {
    padding-block: clamp(3rem, 7vw, 5rem);
    text-align: center;
}

.cta-icon {
    width: 5rem;
    height: 5rem;
    margin-bottom: 1rem;
    border-radius: 1.2rem;
}

.cta .store-badges {
    justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
    padding-block: 2.5rem 1.5rem;
    color: var(--on-chrome-muted);
    background: var(--chrome);
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--on-chrome);
}

.footer-grid {
    display: grid;
    gap: 1.5rem;
}

.site-footer h2 {
    margin: 0 0 0.5rem;
    color: var(--on-chrome);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-links {
    display: grid;
    gap: 0.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

.footer-legal {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--chrome-border);
    font-size: 0.85rem;
}

.footer-legal p {
    margin: 0 0 0.5rem;
}

/* ---------- Breakpoints ---------- */

@media (max-width: 40rem) {
    .site-header {
        position: static;
    }

    html {
        scroll-padding-block-start: 1rem;
    }
}

@media (min-width: 48rem) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .fact-strip ul {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 60rem) {
    .hero-grid {
        grid-template-columns: 1.2fr 1fr;
    }

    .feature {
        grid-template-columns: 1fr 1.2fr;
    }

    .feature.reverse .shot {
        order: 2;
    }
}
