/*
 * Homepage Styles
 *
 * Styles specific to the landing page (index.html.twig), plus the postcard
 * preview component and FAQ list, which are also used elsewhere.
 * Mobile-first: base rules target phones, min-width queries scale up.
 */

.container.narrow {
    max-width: 720px;
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
}

/* ---------- Hero ---------- */
.hero-section {
    background-color: var(--color-hero-bg);
    background-image:
        linear-gradient(210deg, transparent 0%, var(--color-hero-bg) 70%),
        radial-gradient(circle, var(--dots-on-dark) 1.6px, transparent 2.2px);
    background-size: auto, 16px 16px;
    color: var(--color-hero-text);
    padding: 1.25rem 0 2.25rem;
    overflow: hidden;
}

.hero-inner {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
    max-width: 1100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "cta" "card";
    gap: 1.25rem;
}

.hero-copy { grid-area: copy; }
.hero-card { grid-area: card; position: relative; padding: 0.5rem 0.75rem 0.75rem; }
.hero-cta  { grid-area: cta; }

.hero-heading {
    font-size: clamp(2rem, 8.5vw, 3.6rem);
    font-weight: var(--font-weight-heavy);
    line-height: 1.02;
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}

.hero-text {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 1rem;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.95rem 0.6rem;
    list-style: none;
    padding: 0;
    margin: 0 0 0.45rem;
}

.hero-sticker {
    position: absolute;
    right: 0;
    bottom: 0.1rem;
    background: var(--color-highlight);
    color: var(--color-primary);
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-heavy);
    font-size: 1rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-bubble);
    transform: rotate(-4deg);
}

.hero-sticker::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    bottom: -0.5rem;
    border-style: solid;
    border-width: 0.55rem 0.65rem 0 0;
    border-color: var(--color-highlight) transparent transparent transparent;
}

.hero-reassure {
    margin: 0.6rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (min-width: 900px) {
    .hero-section {
        padding: 2.5rem 0 4rem;
    }

    .hero-grid {
        grid-template-columns: 1.05fr 1fr;
        grid-template-areas: "copy card" "cta card";
        column-gap: 3rem;
        align-items: center;
    }

    .hero-cta {
        align-self: start;
        max-width: 380px;
    }

    .hero-reassure {
        text-align: left;
    }
}

/* ---------- Postcard preview component ---------- */
.pc-card {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 4%;
    aspect-ratio: 3 / 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 5%;
    background: var(--postcard-bg);
    color: var(--postcard-text);
    border-radius: 10px;
    container-type: inline-size;
}

.hero-card .pc-card {
    outline: 3px solid var(--color-bg);
}

.pc-card--tilt {
    transform: rotate(-3deg);
}

.pc-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.pc-text p {
    margin: 0;
}

.pc-greeting {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-heavy);
    font-size: 9cqw;
    line-height: 1.05;
    margin-bottom: 4cqw !important;
    overflow-wrap: anywhere;
}

.pc-friend {
    color: var(--postcard-highlight);
}

.pc-message {
    font-size: 4.6cqw;
    line-height: 1.25;
    margin-bottom: 3cqw !important;
}

.pc-message strong {
    color: var(--postcard-highlight);
}

.pc-ask {
    font-size: 3.4cqw;
    line-height: 1.3;
    opacity: 0.9;
}

.pc-sign {
    margin-top: auto !important;
    font-family: var(--font-family-heading);
    font-style: italic;
    font-weight: 700;
    font-size: 5cqw;
}

.pc-photo {
    border: 1.6cqw solid var(--postcard-photo-border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--color-bg-subtle);
}

.pc-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pc-photo-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
    font-size: 3.5cqw;
    text-align: center;
}

.pc-photo-placeholder i {
    font-size: 9cqw;
}

/* ---------- Content sections ---------- */
.home-section {
    padding: 2.75rem 0;
}

.home-section h2 {
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-weight: var(--font-weight-heavy);
    text-transform: lowercase;
}

.lead-text {
    font-size: 1.1rem;
}

.small-note {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.why-section {
    background: var(--color-bg);
}

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

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.9rem;
}

.step-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--color-bg);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-card);
    padding: 1rem 1.1rem;
}

.step-card h3 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin: 0.15rem 0 0.25rem;
}

.step-card p {
    margin: 0;
}

.step-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-accent);
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-heavy);
    font-size: 1.2rem;
    line-height: 1;
    /* Nudge Jost's digits to the true center of the circle (measured) */
    padding-top: 0.05em;
}

.trust-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

.trust-list li {
    padding-left: 0.9rem;
    border-left: 4px solid var(--color-highlight);
}

.trust-list strong {
    color: var(--color-primary);
}

.sweeps-section {
    background: var(--color-section-fun);
}

.sweeps-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.faq-section {
    background: var(--color-bg);
}

.closing-section {
    background-color: var(--brand-soft-pink);
    background-image:
        linear-gradient(20deg, transparent 0%, var(--brand-soft-pink) 75%),
        radial-gradient(circle, var(--dots-on-light) 1.6px, transparent 2.2px);
    background-size: auto, 16px 16px;
    color: var(--color-primary);
}

.closing-section .btn-on-dark {
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-border-color: var(--color-primary);
    --bs-btn-active-border-color: var(--color-primary);
}

@media (min-width: 768px) {
    .home-section {
        padding: 4rem 0;
    }

    .trust-list {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

/* ---------- FAQ list (homepage + FAQ page) ---------- */
.faq-list {
    display: grid;
    gap: 0.6rem;
}

.faq-item {
    border: 2px solid var(--color-primary);
    border-radius: 14px;
    background: var(--color-bg);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 0.85rem 2.75rem 0.85rem 1rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    position: relative;
    min-height: 48px;
}

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

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: "\2212";
}

.faq-item[open] summary {
    border-bottom: 2px solid var(--color-line);
}

.faq-item p {
    margin: 0;
    padding: 0.85rem 1rem 1rem;
}

.faq-more {
    margin-top: 1rem;
    text-align: center;
}

/* Full-width image helper */
.img-full {
    width: 100%;
}

/* ---------- Simple content pages (FAQ, privacy) ---------- */
.page-title {
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    font-weight: var(--font-weight-heavy);
}

.legal-content h2,
.legal-content h3 {
    color: var(--color-primary);
    margin-top: 1.5rem;
}

.legal-content {
    overflow-wrap: anywhere;
}
