/* =============================================================================
   CookieMaker.app — static marketing funnel styles (#52)
   Self-contained: marketing domains deploy as standalone static Vercel
   projects (Root Directory = marketing/cookiemaker), so no app CSS is shared.
   Palette = cookie niche (caramel + raspberry icing) from
   src/styles/scss/themes/_niche-palettes.scss. Design system rules apply:
   2px borders, 8px radius, warm grays.
   ============================================================================= */

:root {
    /* Cookie niche palette (light mode values) */
    --color-primary: #A06A3E;
    --color-primary-dark: #855632;
    --color-primary-light: #BC8A5E;
    --color-primary-05: rgba(160, 106, 62, 0.05);
    --color-primary-10: rgba(160, 106, 62, 0.10);
    --color-accent: #B5446A;
    --color-accent-dark: #993857;
    --gradient-primary: linear-gradient(135deg, #A06A3E 0%, #855632 100%);
    --gradient-cta: linear-gradient(135deg, #B5446A 0%, #993857 100%);

    /* Warm neutrals (matches app warm-white family) */
    --color-bg-page: #F9F7F4;
    --color-bg-section: #F2EEE8;
    --color-white: #FFFFFF;
    --color-gray-50: #F7F5F1;
    --color-border: #E2DCD2;
    --color-text-primary: #2D2A26;
    --color-text-secondary: #5C564E;
    --color-text-muted: #8A8378;
    --color-success: #5B8A5E;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow-md: 0 4px 10px rgba(45, 42, 38, 0.10);
    --shadow-lg: 0 10px 24px rgba(45, 42, 38, 0.14);

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-page);
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 2px solid var(--color-border);
    padding: 0.75rem 0;
}

.nav__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-text-primary);
    text-decoration: none;
}

.nav__logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav__links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav__links a:hover { color: var(--color-primary-dark); }

/* .nav__links a (0,2,1) outweighs .btn--primary (0,1,0) — restore CTA contrast */
.nav__links a.btn--primary { color: var(--color-white); }
.nav__links a.btn--primary:hover { color: var(--color-white); }

.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-primary);
    margin: 5px 0;
}

/* --------------------------------------------------------------------------
   Buttons / CTAs
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    cursor: pointer;
}

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

.btn--primary {
    background: var(--color-accent);
    color: var(--color-white);
}
.btn--primary:hover { background: var(--color-accent-dark); }

.btn--outline {
    background: transparent;
    color: var(--color-primary-dark);
    border-color: var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary-05); }

.btn--white {
    background: var(--color-white);
    color: var(--color-primary-dark);
}

.btn--outline-white {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn--lg { padding: 1rem 2.2rem; font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    background: var(--gradient-primary);
    color: var(--color-white);
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

/* Subtle scalloped "cookie edge" deco circles */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 3px dashed rgba(255, 255, 255, 0.18);
}
.hero::before { width: 320px; height: 320px; top: -120px; left: -90px; }
.hero::after { width: 420px; height: 420px; bottom: -200px; right: -130px; }

.hero__inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }

.hero h1 {
    font-size: 2.8rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: 1.2rem;
    opacity: 0.92;
    margin-bottom: 2rem;
}

.hero__ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.hero__trust {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.95rem;
    opacity: 0.92;
}

.hero__trust .check { color: #BDE3BF; font-weight: 700; margin-right: 0.3rem; }

.hero--short { padding: 3.5rem 1.5rem 2.75rem; }
.hero--short h1 { font-size: 2.2rem; }

/* Photo hero (index) — generated image with caramel overlay for text contrast */
.hero--photo {
    background:
        linear-gradient(rgba(96, 60, 32, 0.62), rgba(96, 60, 32, 0.62)),
        url('/images/hero.jpg') center / cover no-repeat;
    padding: 6rem 1.5rem 5rem;
}
.hero--photo::before,
.hero--photo::after { display: none; }
.hero--photo h1,
.hero--photo .hero__subtitle { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 4rem 0; }
.section--alt { background: var(--color-bg-section); }

.section__header { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section__header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.6rem; }
.section__header p { color: var(--color-text-secondary); font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.step {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
    text-align: center;
}

.step__number {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
}

.step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step p { color: var(--color-text-secondary); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Feature cards
   -------------------------------------------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
}

.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.feature-card__icon { font-size: 2.2rem; margin-bottom: 0.75rem; display: block; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--color-text-secondary); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Size cards (CSS-drawn previews — no screenshots yet, keep it authentic)
   -------------------------------------------------------------------------- */
.sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.25rem;
    max-width: 760px;
    margin: 0 auto;
}

.size-card {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.size-card:hover { transform: translateY(-3px); border-color: var(--color-primary); }

.size-card__preview {
    margin: 0 auto 0.75rem;
    background: var(--color-primary-10);
    border: 3px dashed var(--color-primary);
}

.size-card__preview--circle { border-radius: 50%; }
.size-card__preview--square { border-radius: 6px; }

/* Relative scale: 51mm / 76mm / 102mm */
.size-card__preview--sm { width: 44px; height: 44px; }
.size-card__preview--md { width: 64px; height: 64px; }
.size-card__preview--lg { width: 84px; height: 84px; }

.size-card__name { display: block; font-weight: 800; font-size: 1.05rem; }
.size-card__desc { display: block; color: var(--color-text-muted); font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   Use-case cards
   -------------------------------------------------------------------------- */
.uses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.use-card {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.use-card__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.use-card__icon { font-size: 2rem; display: block; margin-bottom: 0.6rem; }
.use-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.use-card p { color: var(--color-text-secondary); font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.plan {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.plan--featured { border-color: var(--color-primary); box-shadow: var(--shadow-md); }

.plan__badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    white-space: nowrap;
}

.plan__tier { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.4rem; }

.plan__price { font-size: 2.4rem; font-weight: 800; color: var(--color-primary-dark); }
.plan__price span { font-size: 1rem; font-weight: 600; color: var(--color-text-muted); }

.plan__desc { color: var(--color-text-secondary); margin: 0.4rem 0 1.25rem; font-size: 0.95rem; }

.plan__features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.plan__features li {
    padding: 0.35rem 0;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.plan__features .check { color: var(--color-success); font-weight: 700; margin-right: 0.4rem; }

.pricing-footnote {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.pricing-footnote a { color: var(--color-primary-dark); }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq { max-width: 720px; margin: 0 auto; }

.faq details {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { color: var(--color-text-secondary); margin-top: 0.6rem; font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */
.final-cta {
    background: var(--gradient-cta);
    color: var(--color-white);
    text-align: center;
    padding: 4rem 1.5rem;
}

.final-cta h2 { font-size: 2.1rem; font-weight: 800; margin-bottom: 1.5rem; }

.final-cta__trust {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.92;
}

.final-cta__trust .check { color: #F4CBDA; font-weight: 700; margin-right: 0.3rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--color-text-primary);
    color: #C9C3BA;
    padding: 2.5rem 0;
    font-size: 0.9rem;
}

.footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
    justify-content: space-between;
}

.footer a { color: #E2DCD2; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* --------------------------------------------------------------------------
   Prose (occasion / guide pages)
   -------------------------------------------------------------------------- */
.prose {
    max-width: 720px;
    margin: 0 auto;
    color: var(--color-text-secondary);
    font-size: 1.02rem;
}

.prose p { margin-bottom: 1rem; }
.prose a { color: var(--color-primary-dark); }
.prose strong { color: var(--color-text-primary); }

/* Size guide table */
.size-table {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    border-collapse: collapse;
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.size-table th,
.size-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--color-border);
    font-size: 0.95rem;
}

.size-table th {
    background: var(--color-bg-section);
    font-weight: 800;
    color: var(--color-text-primary);
}

.size-table td { color: var(--color-text-secondary); }
.size-table tr:last-child td { border-bottom: none; }

/* 404 */
.error-hero { padding: 6rem 1.5rem; }
.error-hero .error-code { font-size: 4.5rem; font-weight: 800; line-height: 1; margin-bottom: 0.5rem; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero__subtitle { font-size: 1.05rem; }
    .section { padding: 3rem 0; }
    .section__header h2 { font-size: 1.6rem; }
    .final-cta h2 { font-size: 1.6rem; }

    .nav__toggle { display: block; }
    .nav__links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 2px solid var(--color-border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 1rem;
        align-items: flex-start;
    }
    .nav__links--open { display: flex; }

    .btn--lg { width: 100%; max-width: 320px; }
}
