/* ==========================================================================
   Landing page (index.html). Builds on style.css for the header, footer,
   .container and .app-store-btn.

   Look: the app's warm cream page, Plated coral, and the fox and recipe-pile
   art from the App Store header. Sections alternate cream / white / coral /
   ink so the page has rhythm instead of one long white sheet.

   Values follow the landing-page-design skill: named text styles on the
   Tailwind type scale, the spacing tokens below, Tailwind radii, flat fills.
   ========================================================================== */

.landing {
    --cream: #FBF7F3;      /* app page background (colors.ts bg.secondary) */
    --coral: #F2462B;      /* solid fills; darker than #FF5236 so white text stays readable */
    --accent: #FF5236;     /* brand coral for small marks */
    --ink: #131209;        /* warm near-black for the social section */
    --tint-coral: #FFE3DA;
    --tint-peach: #FFEBD6;
    --tint-green: #E2F4EA;

    /* Spacing tokens */
    --s-25: 2px;
    --s-50: 4px;
    --s-75: 8px;
    --s-100: 12px;
    --s-200: 16px;
    --s-300: 24px;
    --s-400: 32px;
    --s-500: 40px;
    --s-600: 48px;
    --s-700: 64px;
    --s-800: 80px;
    --s-900: 96px;

    /* Radii (Tailwind) */
    --r-lg: 8px;
    --r-xl: 12px;
    --r-2xl: 16px;
    --r-3xl: 24px;
    --r-full: 9999px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    background: var(--cream);
}

/* ---------- Text styles (one class per named style) ---------- */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.03em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.03em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.025em; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.title-1   { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2   { font-size: 18px; line-height: 28px; font-weight: 500; }
.body-1    { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-2    { font-size: 16px; line-height: 24px; font-weight: 500; }
.body-3    { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-4    { font-size: 14px; line-height: 20px; font-weight: 600; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }

.landing h1,
.landing h2,
.landing h3 {
    text-wrap: balance;
}

.landing p,
.landing li,
.landing blockquote {
    text-wrap: pretty;
}

/* A phrase that should stay on one line when there's room, so headings break where the thought breaks */
.lp-phrase {
    display: inline-block;
}

.lp-muted {
    color: var(--text-secondary);
}

.lp-center {
    text-align: center;
}

.lp-stars {
    color: #FFB020;
    letter-spacing: 1px;
}

/* ---------- Focus, skip link ---------- */
.lp-skip {
    position: absolute;
    left: var(--s-200);
    top: -64px;
    z-index: 2000;
    background: var(--ink);
    color: #FFFFFF;
    padding: var(--s-75) var(--s-200);
    border-radius: var(--r-lg);
}

.lp-skip:focus {
    top: var(--s-200);
}

.landing a:focus-visible,
.landing summary:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
    border-radius: var(--r-lg);
}

/* ---------- Buttons ---------- */
/* The header button, flat instead of the site's gradient */
.landing .nav-cta-btn {
    background: var(--coral);
    box-shadow: none;
    padding: var(--s-75) var(--s-100);
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    letter-spacing: 0;
    transition: transform 0.5s var(--ease), background-color 0.3s var(--ease);
}

.landing .nav-cta-btn:hover {
    background: #D93A21;
    box-shadow: none;
    transform: translateY(-2px);
}

.landing .nav-cta-btn:active,
.landing .app-store-btn:active {
    transform: scale(0.98);
}

.landing .app-store-btn {
    transition: transform 0.5s var(--ease), opacity 0.3s var(--ease);
}

.landing .app-store-btn:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.lp-checks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--s-100);
}

.lp-checks li {
    position: relative;
    padding-left: var(--s-400);
}

.lp-checks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: var(--s-25);
    width: 20px;
    height: 20px;
    border-radius: var(--r-full);
    background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.8 2.8L14.5 7.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* ---------- 1. Hero ---------- */
.lp-hero {
    background: var(--cream);
    padding-top: var(--s-600);
    position: relative;
}

.lp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 680px) minmax(0, 1fr);
    align-items: center;
    gap: var(--s-500);
    position: relative;
    z-index: 2;
}

.lp-hero-text {
    display: flex;
    flex-direction: column;
    gap: var(--s-300);
    max-width: 680px;
}

/* Hero heading: left to right ink-to-grey on the text only */
.lp-hero h1 {
    background: linear-gradient(90deg, #000000 0%, #666666 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lp-lede {
    max-width: 560px;
}

.lp-cta-row {
    display: flex;
    align-items: center;
    gap: var(--s-200);
    flex-wrap: wrap;
}

.lp-rating {
    display: flex;
    flex-direction: column;
}

/* Library phone behind, saved recipe in front, the fox presenting a recipe card */
.lp-hero-stage {
    position: relative;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 460 / 540;
    margin: 0 auto;
}

.lp-phone {
    position: absolute;
    width: 54%;
    height: auto;
    filter: drop-shadow(0 28px 40px rgba(60, 25, 10, 0.18)) drop-shadow(0 6px 12px rgba(60, 25, 10, 0.08));
}

.lp-phone-back {
    left: 8%;
    top: 0;
    transform: rotate(-5deg);
}

.lp-phone-front {
    right: 0;
    top: 7%;
    transform: rotate(4deg);
}

.lp-fox {
    position: absolute;
    width: 42%;
    height: auto;
    left: -14%;
    bottom: -6%;
    z-index: 3;
    filter: drop-shadow(0 12px 18px rgba(60, 25, 10, 0.15));
}

/* The pile of saved recipe cards and phones, tiled edge to edge */
.lp-pile {
    height: 170px;
    background: url("art/recipe-pile.webp") repeat-x center bottom / auto 100%;
    position: relative;
    z-index: 1;
}

.lp-hero .lp-pile {
    margin-top: calc(-1 * var(--s-700));
}

/* ---------- 2. Proof ---------- */
.lp-proof {
    background: #FFFFFF;
    padding: var(--s-600) 0 var(--s-800);
}

.lp-sources {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--s-100) var(--s-300);
    text-align: center;
}

.lp-logo-row {
    display: flex;
    align-items: center;
    /* Clear space between logos (Meta asks for a quarter of the logo's width) */
    gap: var(--s-300);
}

.lp-logo-row img {
    display: block;
}

.lp-reviews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-600);
    max-width: 1080px;
    margin: var(--s-600) auto 0;
}

.lp-review {
    display: flex;
    flex-direction: column;
    gap: var(--s-200);
}

.lp-review blockquote {
    flex: 1;
}

/* Opening quote mark drawn in brand coral */
.lp-review blockquote::before {
    content: '“';
    display: block;
    font-size: 60px;
    line-height: 32px;
    height: var(--s-400);
    font-weight: 700;
    color: var(--accent);
}

/* ---------- 3. Tagline ---------- */
.lp-tagline {
    background: var(--coral);
    color: #FFFFFF;
    padding: var(--s-900) 0;
}

.lp-tagline p {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    text-wrap: balance;
}

.lp-tagline p.is-split .lp-word {
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.6s var(--ease);
}

.lp-tagline p.is-split .lp-word.is-on {
    color: #FFFFFF;
}

/* ---------- 4. How it works ---------- */
.lp-steps {
    padding: var(--s-900) 0 var(--s-500);
}

.lp-steps > .container > h2 {
    margin-bottom: var(--s-700);
}

.lp-step {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--s-700);
    max-width: 1020px;
    margin: 0 auto var(--s-800);
}

.lp-step-flip .lp-step-text {
    order: 2;
}

.lp-step-text {
    max-width: 440px;
}

.lp-prop {
    display: block;
    height: 80px;
    width: auto;
    margin-bottom: var(--s-300);
}

.lp-step-label {
    color: var(--coral);
}

.lp-step-text h3 {
    margin: var(--s-50) 0 var(--s-100);
}

.lp-step-media {
    border-radius: var(--r-3xl);
    height: 460px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    padding-top: var(--s-500);
}

.lp-tint-coral { background: var(--tint-coral); }
.lp-tint-peach { background: var(--tint-peach); }
.lp-tint-green { background: var(--tint-green); }

.lp-step-media img {
    width: 300px;
    max-width: 80%;
    height: auto;
    align-self: flex-start;
    filter: drop-shadow(0 24px 36px rgba(60, 25, 10, 0.16));
}

/* ---------- 5. Social ---------- */
.lp-social {
    background: var(--ink);
    color: #FFFFFF;
    padding: var(--s-900) 0;
    overflow: hidden;
}

.lp-social-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--s-700);
    max-width: 1100px;
}

.lp-social-text h2 {
    margin-bottom: var(--s-200);
}

.lp-social-text > p {
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: var(--s-400);
    max-width: 460px;
}

.lp-social-phones {
    display: flex;
    justify-content: center;
    gap: var(--s-300);
}

.lp-social-phones img {
    width: 48%;
    max-width: 250px;
    height: auto;
    /* A faint light edge so the black phone frames don't disappear into the dark background */
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.35)) drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5));
}

.lp-social-phones img:last-child {
    margin-top: var(--s-700);
}

/* ---------- 6. FAQ ---------- */
.lp-faq {
    background: #FFFFFF;
    padding: var(--s-900) 0 var(--s-800);
}

/* 680px of text keeps answers under about 80 characters a line */
.lp-faq .container {
    max-width: 728px;
}

.lp-faq h2 {
    margin-bottom: var(--s-400);
}

/* Hairline rules between questions (list dividers, not card borders) */
.lp-faq details + details {
    border-top: 1px solid var(--border-base);
}

.lp-faq summary {
    list-style: none;
    cursor: pointer;
    padding: var(--s-300) var(--s-600) var(--s-300) 0;
    position: relative;
    transition: color 0.3s var(--ease);
}

.lp-faq summary:hover {
    color: var(--coral);
}

.lp-faq summary::-webkit-details-marker {
    display: none;
}

.lp-faq summary::after {
    content: '+';
    position: absolute;
    right: var(--s-50);
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    line-height: 36px;
    font-weight: 400;
    color: var(--accent);
    transition: transform 0.5s var(--ease);
}

.lp-faq details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.lp-faq details p {
    padding: 0 0 var(--s-300);
}

/* ---------- 7. Closing CTA ---------- */
.lp-final {
    background: var(--cream);
    padding-top: var(--s-900);
}

.lp-final-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-200);
    text-align: center;
    max-width: 728px;
    margin-bottom: var(--s-600);
}

.lp-final-inner .lp-cta-row {
    justify-content: center;
    margin-top: var(--s-200);
}

.lp-final-inner .lp-rating {
    align-items: flex-start;
    text-align: left;
}

.landing .osta-footer {
    margin-top: 0;
}

/* ---------- Sticky download bar (phones only) ---------- */
.lp-sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .lp-sticky-cta {
        display: flex;
        align-items: center;
        gap: var(--s-100);
        position: fixed;
        left: var(--s-100);
        right: var(--s-100);
        bottom: calc(var(--s-100) + env(safe-area-inset-bottom));
        z-index: 1001;
        padding: var(--s-75);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: var(--r-3xl);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
        transform: translateY(140%);
        transition: transform 0.5s var(--ease);
    }

    .lp-sticky-cta.is-visible {
        transform: translateY(0);
    }

    /* 24px bar radius minus 8px padding */
    .lp-sticky-icon {
        border-radius: var(--r-2xl);
        flex-shrink: 0;
    }

    .lp-sticky-text {
        display: flex;
        flex-direction: column;
        flex: 1;
        color: var(--text-secondary);
    }

    .lp-sticky-text strong {
        color: var(--text-primary);
    }

    .lp-sticky-btn {
        background: var(--coral);
        color: #FFFFFF;
        padding: var(--s-75) var(--s-300);
        border-radius: var(--r-2xl);
        transition: transform 0.5s var(--ease);
    }

    .lp-sticky-btn:active {
        transform: scale(0.98);
    }

    /* Room so the bar never covers the footer links */
    body.landing {
        padding-bottom: var(--s-900);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-sticky-cta,
    .lp-faq summary::after,
    .landing .app-store-btn,
    .landing .nav-cta-btn {
        transition: opacity 0.3s var(--ease);
    }

    .landing .app-store-btn:hover,
    .landing .nav-cta-btn:hover {
        transform: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    /* Heading 2 while the hero shares the row with the phones */
    .lp-hero h1 {
        font-size: 48px;
        line-height: 48px;
    }

    .lp-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    }
}

@media (max-width: 1024px) {
    .lp-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--s-500);
    }

    .lp-hero-text {
        align-items: center;
        margin: 0 auto;
    }

    .lp-cta-row {
        justify-content: center;
    }

    .lp-hero .lp-rating,
    .lp-final-inner .lp-rating {
        align-items: center;
        text-align: center;
    }

    .lp-hero-stage {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .lp-hero {
        padding-top: var(--s-400);
    }

    /* Heading 3 on phones */
    .lp-hero h1,
    .lp-tagline p {
        font-size: 36px;
        line-height: 40px;
    }

    /* Heading 4 on phones */
    .landing .heading-2,
    .landing .heading-3 {
        font-size: 30px;
        line-height: 36px;
    }

    /* Body 2 on phones */
    .lp-lede,
    .lp-final-inner > p {
        font-size: 16px;
        line-height: 24px;
    }

    .lp-pile {
        height: 110px;
    }

    .lp-hero .lp-pile {
        margin-top: calc(-1 * var(--s-500));
    }

    .lp-proof {
        padding: var(--s-500) 0 var(--s-600);
    }

    .lp-reviews {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin-top: var(--s-500);
        gap: var(--s-400);
    }

    .lp-tagline {
        padding: var(--s-700) 0;
    }

    .lp-steps {
        padding-top: var(--s-700);
    }

    .lp-steps > .container > h2 {
        margin-bottom: var(--s-500);
    }

    .lp-step {
        grid-template-columns: 1fr;
        gap: var(--s-300);
        margin-bottom: var(--s-700);
        text-align: center;
    }

    .lp-step-text {
        margin: 0 auto;
    }

    .lp-step-flip .lp-step-text {
        order: 0;
    }

    .lp-prop {
        height: 64px;
        margin: 0 auto var(--s-200);
    }

    .lp-step-media {
        height: 380px;
        padding-top: var(--s-400);
    }

    .lp-step-media img {
        width: 250px;
    }

    .lp-social {
        padding: var(--s-700) 0;
    }

    .lp-social-inner {
        grid-template-columns: 1fr;
        gap: var(--s-500);
        text-align: center;
    }

    .lp-social-text > p {
        margin-left: auto;
        margin-right: auto;
    }

    .lp-social-text .lp-checks {
        display: inline-flex;
        text-align: left;
    }

    .lp-faq {
        padding: var(--s-700) 0 var(--s-600);
    }

    /* Title 3 on phones */
    .lp-faq summary {
        font-size: 16px;
        line-height: 24px;
    }

    .lp-final {
        padding-top: var(--s-700);
    }
}

@media (max-width: 480px) {
    /* Heading 4, so "Save any recipe from" still fits on one line */
    .lp-hero h1 {
        font-size: 30px;
        line-height: 36px;
    }

    .lp-hero-stage {
        max-width: 330px;
    }

    .lp-logo-row {
        gap: var(--s-200);
    }
}
