/* Bubble Notes landing page: the story told with Josh's screenshots, his
   letter, and the FAQ. Tokens come from styles.css.

   Phone: each chapter is its copy, then its screenshot. Wide: copy and
   screenshot side by side, alternating sides down the page. Each chapter sets
   --tint (one of the brand accents) for its bubble marker and the glow behind
   its phone. */

/* ---- Chapters ----------------------------------------------------------- */

/* minmax(0, ...) so the search strip's 440px cap can't widen the track. */
.chapter {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 72px 0;
    border-top: 1px solid var(--line);
}

.chapter-copy {
    max-width: 30em;
}

.chapter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tint);
}

/* A small open bubble, the hero's motif, marking each chapter. */
.chapter-bubble {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--tint);
    box-shadow: inset -2px -2px 0 rgba(255, 255, 255, 0.12);
}

.chapter-title {
    font-size: clamp(30px, 8vw, 44px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.chapter-copy p {
    color: var(--text-soft);
    font-size: 17px;
}

.chapter-copy .chapter-aside {
    margin-top: 16px;
    font-size: 15px;
    color: var(--text-faint);
}

.chapter-figure {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 0;
    isolation: isolate;
}

.chapter-figure::before {
    content: '';
    position: absolute;
    inset: 8% -10%;
    background: radial-gradient(closest-side, var(--tint), transparent);
    opacity: 0.16;
    filter: blur(24px);
    z-index: -1;
}

/* ---- Screenshot frames -------------------------------------------------- */

/* A slim bezel rather than a full phone mockup: the status bar is cropped off
   the shots, so a notch would only cover the app. */
.device {
    display: block;
    width: min(300px, 76vw);
    padding: 8px;
    border-radius: 44px;
    background: #0d0a12;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 40px 80px -24px rgba(0, 0, 0, 0.7);
}

.device img,
.strip img {
    display: block;
    width: 100%;
    height: auto;
}

.device img {
    border-radius: 36px;
}

.strip {
    display: block;
    align-self: center;
    width: min(440px, 100%);
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14),
        0 30px 60px -24px rgba(0, 0, 0, 0.7);
}

/* Day and night: the light timeline sits back, the dark one steps forward. */
.chapter--pair .chapter-figure {
    padding-bottom: 48px;
}

.chapter--pair .device {
    width: min(250px, 50vw);
}

.device--back {
    transform: translateX(14%);
}

.device--front {
    margin-left: -18%;
    transform: translate(-14%, 48px);
}

/* ---- From Josh ---------------------------------------------------------- */

.letter {
    padding: 72px 0;
    border-top: 1px solid var(--line);
}

/* The letter sits on the app's own light paper, so it reads as a note. */
.letter-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 36px 28px;
    border-radius: 28px;
    background: #f6f4ef;
    color: #2a2433;
    font-size: 17px;
    line-height: 1.7;
    box-shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.6);
}

.letter-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--navy);
    margin-bottom: 18px;
}

.letter-card p + p {
    margin-top: 16px;
}

.letter-card .letter-signature {
    margin-top: 28px;
    font-weight: 600;
    color: var(--navy);
}

.letter-signature span {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #6b6475;
}

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

.faq {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 0 80px;
}

.faq-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

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

.faq summary::after {
    content: '+';
    flex: none;
    font-weight: 400;
    color: var(--text-faint);
    transition: transform 0.2s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details p {
    padding-bottom: 20px;
    color: var(--text-soft);
}

.faq a {
    color: var(--yellow);
    text-decoration: none;
}

/* ---- Wider screens ------------------------------------------------------ */

@media (min-width: 860px) {
    .chapter {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 64px;
        padding: 112px 0;
    }

    .chapter--flip .chapter-copy {
        order: 2;
    }

    .device {
        width: 320px;
    }

    .chapter--pair .device {
        width: 270px;
    }

    .letter {
        padding: 112px 0;
    }

    .letter-card {
        padding: 56px 64px;
    }
}
