/* Oncebook – landing page: a hero, the onboarding tale scrolled downwards, a peek at the app, then download. */

html:has(body.landing) { scroll-behavior: smooth; }
body.landing { display: block; }

/* Washes may bleed past their section; only the page edge clips them (html/body overflow-x: clip). */

.hero {
    position: relative;
    min-height: min(100svh, 920px);
    display: grid;
    align-items: center;
    gap: 24px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 72px var(--gutter) 88px;
    text-align: left;
}
.hero-wash { position: absolute; max-width: none; pointer-events: none; z-index: -1; opacity: 0.4; animation: drift 15s ease-in-out infinite alternate; }
.hero-wash-a { top: -60px; left: -180px; width: 620px; }
.hero-wash-b { bottom: 20px; right: -200px; width: 640px; opacity: 0.32; animation-duration: 19s; }
.hero-copy { max-width: 560px; }
.hero-icon { display: block; width: 88px; height: 88px; border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 22px; }
.hero .hero-title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(64px, 13vw, 112px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin: 0;
}
.hero-tagline { font-family: var(--display); font-style: italic; font-size: clamp(26px, 4vw, 34px); color: var(--accent); margin: 10px 0 0; }
.hero-body { font-size: clamp(18px, 2.2vw, 20px); line-height: 1.6; color: var(--ink-soft); margin: 20px 0 0; text-wrap: pretty; }
.hero .button.store { margin-top: 28px; }
.hero .founder { margin-left: 0; }
.hero-art img { width: 100%; max-width: 600px; margin: 0 auto; }
.scroll-hint { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); color: var(--accent); font-weight: 600; white-space: nowrap; }

.chapter {
    position: relative;
    min-height: min(82svh, 760px);
    display: grid;
    align-items: center;
    gap: 8px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px var(--gutter);
}
.chapter-wash {
    position: absolute;
    top: 8%;
    right: -160px;
    width: 520px;
    max-width: none;
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
    animation: drift 14s ease-in-out infinite alternate;
}
.chapter-flip .chapter-wash { right: auto; left: -160px; animation-duration: 17s; }
.chapter-art img { width: 100%; max-width: 560px; margin: 0 auto; }
.chapter-copy { max-width: 560px; }
.chapter .chapter-title, .cta .chapter-title, .showcase .chapter-title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(42px, 9vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.01em;
    margin: 4px 0 0;
    text-wrap: balance;
}
.chapter .brush { margin: 18px 0 0; width: 120px; }
.chapter-body { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.6; color: var(--ink-soft); margin: 18px 0 0; text-wrap: pretty; }
.chapter-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.chapter-points li { position: relative; padding-left: 30px; font-size: 18px; line-height: 1.55; color: var(--ink-soft); }
.chapter-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    background: var(--dot) center / contain no-repeat;
}

/* A peek inside: phones, then the grandparents' page on a laptop */
.showcase { position: relative; max-width: 1200px; margin: 0 auto; padding: 88px var(--gutter) 40px; text-align: center; }
.showcase .chapter-body { max-width: 560px; margin-left: auto; margin-right: auto; }
.showcase-wash { position: absolute; top: 40px; left: -160px; width: 560px; max-width: none; opacity: 0.3; z-index: -1; pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.showcase-wash-right { left: auto; right: -160px; }

.phones {
    display: flex;
    gap: 28px;
    justify-content: center;
    margin-top: 48px;
    padding: 8px 4px 24px;
}
.phone-shot { margin: 0; flex: 0 0 auto; width: 240px; }
.phone-shot:nth-child(even) { transform: translateY(36px); }
.phone {
    position: relative;
    padding: 9px;
    border-radius: 42px;
    background: #2a2523;
    box-shadow: 0 30px 60px -30px rgba(59, 52, 49, 0.55), inset 0 0 0 2px #48403c;
}
.phone img { width: 100%; height: auto; border-radius: 0 0 33px 33px; display: block; background: var(--paper); }
/* iOS status bar above the screenshot, so the app content starts below the island */
.phone-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 4px 26px 0 30px;
    border-radius: 33px 33px 0 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, 'SF Pro Text', var(--body);
    font-size: 13px;
    font-weight: 600;
}
.phone-island { position: absolute; top: 18px; left: 50%; width: 70px; height: 20px; margin-left: -35px; border-radius: 12px; background: #2a2523; z-index: 1; }
.phone-shot figcaption { margin-top: 16px; font-family: var(--display); font-style: italic; font-size: 19px; color: var(--ink-soft); }

.laptop { max-width: 980px; margin: 48px auto 0; }
.laptop-screen {
    padding: 14px 14px 18px;
    border-radius: 18px 18px 6px 6px;
    background: #2a2523;
    box-shadow: inset 0 0 0 2px #48403c;
}
.laptop-screen img { width: 100%; height: auto; display: block; border-radius: 4px; }
.laptop-base {
    position: relative;
    height: 18px;
    margin: 0 -7%;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(#d9d2c8, #bfb6aa);
    box-shadow: 0 24px 40px -24px rgba(59, 52, 49, 0.6);
}
.laptop-base::before { content: ''; position: absolute; top: 0; left: 50%; width: 120px; margin-left: -60px; height: 7px; border-radius: 0 0 8px 8px; background: #a99f93; }

.quote-block { max-width: 760px; margin: 0 auto; padding: 96px var(--gutter) 72px; text-align: center; }
.quote-sprig { width: 150px; margin: 0 auto; }
.quote-block blockquote { margin: 0; }
.quote-block p {
    font-family: var(--display);
    font-style: italic;
    font-size: clamp(28px, 4.6vw, 42px);
    line-height: 1.25;
    margin: 16px 0 0;
    text-wrap: balance;
}
.quote-block p::before { content: '“'; display: block; font-size: 1.8em; line-height: 0.8; color: var(--accent); }
.quote-block footer { margin-top: 18px; color: var(--ink-soft); font-size: 16px; }

.cta { position: relative; max-width: 760px; margin: 0 auto 40px; padding: 72px var(--gutter) 88px; text-align: center; }
.cta-wash { position: absolute; inset: 10% -20% auto; width: 140%; max-width: none; opacity: 0.4; z-index: -1; animation: drift 16s ease-in-out infinite alternate; }
.cta-icon { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 25px; box-shadow: var(--shadow); }
.cta .chapter-body { margin-left: auto; margin-right: auto; max-width: 520px; }
.founder {
    margin: 22px auto 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 460px;
    text-wrap: balance;
}
/* The spots left get a painted highlighter stroke */
.founder strong {
    color: var(--ink);
    font-weight: 700;
    white-space: nowrap;
    padding: 0 6px;
    background: var(--stroke) center 70% / 100% 75% no-repeat;
}
.button.store { width: auto; min-width: 280px; margin-top: 28px; gap: 10px; }
.button.store.is-soon { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); cursor: default; }

.foot-lang { display: flex; justify-content: center; align-items: baseline; gap: 18px; margin-top: 14px; font-size: 14px; }
.foot-lang span, .foot-lang a { padding: 6px 0; line-height: 1.4; }
.foot-lang span { color: var(--ink); font-weight: 600; }
.foot-lang a { color: var(--ink-soft); }
.site-foot .copyright { text-align: center; color: var(--ink-faint); font-size: 14px; margin: 8px 0 0; }

.lang-suggest {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    align-items: center;
    max-width: 300px;
    padding: 14px 14px 14px 18px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow);
    font-size: 15px;
    animation: suggest-in .35s ease-out;
}
.lang-suggest[hidden] { display: none; }
.lang-suggest-text { margin: 0; color: var(--ink-soft); line-height: 1.4; }
.lang-suggest-action { grid-column: 1; color: var(--accent); font-weight: 700; }
.lang-suggest-close {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--paper-deep);
    color: var(--ink-soft);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
@keyframes suggest-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@keyframes drift {
    from { transform: translate(0, 0) rotate(0deg) scale(1); }
    to { transform: translate(14px, -10px) rotate(2deg) scale(1.04); }
}

@media (min-width: 860px) {
    .hero { grid-template-columns: 1fr 1fr; gap: 48px; }
    .chapter { grid-template-columns: 1.05fr 1fr; gap: 56px; }
    .chapter-flip .chapter-art { order: 2; }
}

/* Phones: no painted washes in the corners, the pictures carry the page; screenshots scroll sideways. */
@media (max-width: 859px) {
    .hero { padding-top: 64px; text-align: center; }
    .hero-copy { margin: 0 auto; }
    .hero-icon { margin-left: auto; margin-right: auto; }
    .hero-art { display: none; }
    .hero .founder { margin-left: auto; margin-right: auto; }
    .hero-wash, .chapter-wash, .showcase-wash { display: none; }
    .phones {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-left: calc(-1 * var(--gutter));
        margin-right: calc(-1 * var(--gutter));
        padding-left: var(--gutter);
        padding-right: var(--gutter);
        scrollbar-width: none;
    }
    .phone-shot { scroll-snap-align: center; width: 230px; }
    .phone-shot:nth-child(even) { transform: none; }
    .laptop-base { margin: 0 -4%; height: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html:has(body.landing) { scroll-behavior: auto; }
    .hero-wash, .chapter-wash, .cta-wash, .showcase-wash { animation: none; }
}
