/* The painted reading terrace and stamp covers anchor the homepage. */
.home-page .site-header { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 3; background: transparent; }
.home-page .site-header::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; background: var(--canvas); box-shadow: 0 1px 0 var(--border); opacity: 0; transition: opacity 180ms ease; }
.home-page .site-header.has-covered-scene::before { opacity: 1; }
/* The foreground paper covers the pinned painting as the page scrolls. */
.home-scene { position: sticky; top: 0; z-index: 0; width: 100%; height: clamp(340px, 42vw, 680px); max-height: 75svh; overflow: hidden; background: #728cb0; }
.home-scene picture, .home-scene img { display: block; width: 100%; height: 100%; }
.home-scene img { object-fit: cover; object-position: 54% center; transform: scale(1.12); }
.home-content { position: relative; z-index: 1; display: flow-root; background: var(--canvas); }
.home-content > .scene-edge { position: absolute; bottom: calc(100% - 1px); left: 0; width: 100%; height: 32px; fill: var(--canvas); pointer-events: none; }
.home-page :is(section[id], main[id], article[id]) { scroll-margin-top: 144px; }
.home-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px; align-items: start; padding: 28px 0 40px; }
.home-hero h1 { max-width: none; margin: 0; font-size: clamp(2.6rem, 4.2vw, 4.2rem); line-height: 1.04; letter-spacing: -0.035em; text-wrap: initial; }
.home-hero h1 span { display: block; }
.home-introduction > p:first-child { max-width: 46ch; margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.home-introduction .hero-actions { gap: 24px; margin-top: 16px; }
.home-assurance { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.home-store-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--primary); }
.home-store-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.home-store-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.home-library { padding: 64px 0 60px; border-top: 1px solid var(--border); }
.home-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.home-section-heading h2, .home-feature-copy h2, .home-discovery h2, .home-membership h2, .home-closing h2, .home-page .reading-faq h2 { margin: 0; font-size: clamp(2.6rem, 4vw, 4rem); line-height: 1.08; letter-spacing: -0.035em; }
.home-section-heading p { margin: 12px 0 0; color: var(--muted); }
.home-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); margin: 48px 0 32px; }
.shelf-book { display: flex; flex-direction: column; align-items: center; min-width: 0; text-decoration: none; text-align: center; padding: 16px 4px; }
.shelf-book img { display: block; width: min(100%, 190px); height: auto; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 3px 10px 16px rgb(32 45 41 / 12%); }
.shelf-book h3 { margin: 24px 0 6px; font-family: var(--font-display); font-size: 24px; line-height: 1.15; font-weight: 400; }
.shelf-book p { margin: 0; color: var(--muted); font-size: 12px; }
.shelf-book:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
.home-genres { display: flex; justify-content: center; gap: 10px 28px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); }
.home-genres a { display: flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--muted); text-decoration: none; }
.home-genres a:hover { color: var(--primary); text-decoration: underline; }
/* Product sections share the page's parchment; the devices provide the contrast. */
.home-ritual { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 64px 80px; padding: 88px 0 64px; border-top: 1px solid var(--border); }
.home-feature-copy > p { max-width: 44ch; margin: 24px 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.screenshot-composition { position: relative; min-width: 0; isolation: isolate; }
/* Official Android Studio Pixel 8 art. Screen bounds: (49,55), 1080×2400,
   on an 1187×2513 canvas. Contain preserves every screenshot's full aspect ratio. */
.app-shot { position: relative; display: block; width: 100%; aspect-ratio: 1187 / 2513; line-height: 0; filter: drop-shadow(0 24px 20px rgb(44 37 25 / 16%)) drop-shadow(0 4px 4px rgb(44 37 25 / 12%)); }
.app-shot > img { position: absolute; left: 4.128%; top: 2.189%; width: 90.986%; height: 95.503%; object-fit: contain; background: #0e1511; border-radius: 8% / 3.6%; }
.app-shot::before { content: ""; position: absolute; inset: 0; background: url('/assets/devices/pixel-8-frame.webp') center / 100% 100% no-repeat; pointer-events: none; z-index: 1; }
.app-shot::after { content: ""; position: absolute; left: 4.128%; top: 2.189%; width: 90.986%; height: 95.503%; background: url('/assets/devices/pixel-8-screen-mask.webp') center / 100% 100% no-repeat; pointer-events: none; z-index: 2; }
.app-shot:focus-visible, .desktop-shot:focus-visible { outline: 3px solid var(--primary); outline-offset: 8px; border-radius: 24px; }
.reading-screens, .group-screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; width: 100%; max-width: 520px; margin-inline: auto; }
.reader-shot, .discussion-shot { margin-top: 64px; }
.home-principles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; list-style: none; margin: 0; padding: 36px 0 0; border-top: 1px solid var(--border); }
.home-principles h3 { margin: 0 0 12px; font-size: 16px; font-weight: 500; }
.home-principles p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.home-companion { padding: 88px 0 80px; border-top: 1px solid var(--border); }
.companion-intro { max-width: 800px; }
.companion-intro .companion-label { margin: 0 0 20px; color: var(--primary); font-size: 14px; font-weight: 500; }
.companion-intro > p:last-child { max-width: 60ch; }
.companion-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; margin-top: 48px; }
.companion-features article { display: flex; flex-direction: column; min-width: 0; }
.companion-features h3 { margin: 0 0 16px; padding-top: 24px; border-top: 1px solid var(--border); font-family: var(--font-display); font-size: clamp(2rem, 3vw, 2.6rem); font-weight: 400; line-height: 1.15; letter-spacing: -0.025em; }
.companion-features p { max-width: 45ch; margin: 0 0 36px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.companion-visual { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; justify-items: center; margin-top: auto; padding: 0 16px 24px; }
.companion-visual .app-shot { width: min(100%, 310px); }
.companion-availability { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 40px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.companion-availability p { max-width: 64ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.home-community { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: center; padding: 88px 0; border-top: 1px solid var(--border); }
.discussion-excerpt { position: relative; z-index: 2; grid-column: 1 / -1; width: calc(100% - 32px); margin: -76px auto 0; padding: 24px 28px; color: #e6e9e3; background: #15241e; border: 1px solid #3c4b42; border-radius: 12px; box-shadow: 0 16px 32px rgb(44 37 25 / 14%), 0 2px 5px rgb(44 37 25 / 8%); }
.discussion-excerpt figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; line-height: 1.5; }
.discussion-excerpt strong { font-size: 14px; font-weight: 500; }
.discussion-excerpt figcaption > span { font-size: 11px; color: #b1c2b7; }
.discussion-excerpt blockquote { margin: 14px 0; font-size: 15px; line-height: 1.65; }
.discussion-excerpt > a { display: inline-flex; align-items: center; gap: 12px; min-height: 28px; color: #b1c2b7; font-size: 11px; text-underline-offset: 3px; }
.home-web-reader { padding: 100px 0 80px; }
.home-web-reader .home-section-heading { align-items: end; margin-bottom: 40px; }
.home-web-reader .companion-label { margin: 0 0 20px; font-size: 14px; color: var(--primary); }
.home-web-reader .home-section-heading p:last-child { max-width: 54ch; margin: 20px 0 0; color: var(--muted); line-height: 1.7; }
.home-web-reader .primary-action { width: auto; max-width: 100%; gap: 12px; flex-shrink: 0; white-space: nowrap; }
/* Safari-style desktop chrome, with a full toolbar and centered address field. */
.desktop-shot { display: block; overflow: hidden; border: 1px solid #4b4b4b; background: #292929; border-radius: 11px; box-shadow: 0 32px 56px -20px rgb(44 37 25 / 28%), 0 4px 12px rgb(44 37 25 / 12%); text-decoration: none; }
.desktop-shot > img { display: block; width: 100%; height: auto; }
.browser-frame { display: flex; align-items: center; gap: 22px; height: 54px; padding: 0 18px; color: #c6c6c6; background: linear-gradient(#343434, #292929); border-bottom: 1px solid #141414; }
.browser-frame svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.browser-window-controls { display: flex; gap: 8px; }
.browser-window-controls i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgb(0 0 0 / 10%); background: #ff6057; }
.browser-window-controls i:nth-child(2) { background: #febc2e; }
.browser-window-controls i:nth-child(3) { background: #28c840; }
.browser-history, .browser-tools { display: flex; align-items: center; gap: 16px; }
.browser-history svg:last-child { opacity: .35; }
.browser-address { display: flex; align-items: center; justify-content: center; gap: 8px; width: 48%; margin: 0 auto; height: 30px; background: #202020; border-radius: 6px; box-shadow: inset 0 1px 2px rgb(0 0 0 / 24%); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 12px; }
.browser-address svg { width: 13px; height: 13px; }
.browser-address svg:last-child { margin-left: auto; margin-right: 8px; }
.browser-address svg:first-child { margin-left: auto; }
.home-page .home-discovery { padding: 64px 0 88px; gap: 100px; }
.home-page .home-discovery h2 { max-width: 14ch; }
.home-page .reading-links a { font-size: 15px; font-weight: 400; }
.home-page .reading-links a:first-child { border-top: 1px solid var(--border); }
.home-page .reading-links span { font-size: 20px; color: var(--muted); }
.home-membership { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; padding: 64px; margin: 0 -32px; background: var(--primary); color: var(--on-primary); border-radius: 12px; }
.home-membership p { max-width: 46ch; margin: 22px 0; color: #e1e9df; line-height: 1.75; }
.home-membership .home-store-link { color: #fff; }
.home-membership-details { align-self: center; padding-left: 32px; border-left: 1px solid #678478; }
.home-membership-details h3 { margin: 0; font-family: var(--font-display); font-size: 29px; line-height: 1.25; font-weight: 400; }
.home-membership-details p { font-size: 14px; }
.home-membership-details p:last-child { margin-bottom: 0; }
.home-page .reading-faq { display: grid; grid-template-columns: 0.9fr 1.1fr; max-width: none; gap: 0 100px; margin: 0; padding: 100px 0; }
.home-page .reading-faq > h2 { grid-column: 1; grid-row: 1 / 9; max-width: 12ch; }
.home-page .reading-faq details { grid-column: 2; }
.home-page .reading-faq summary { padding: 22px 0; font-size: 15px; font-weight: 500; line-height: 1.5; }
.home-page .reading-faq details p { color: var(--muted); font-size: 14px; margin-inline: 0; }
.home-closing { text-align: center; padding: 64px 24px 80px; border-top: 1px solid var(--border); }
.home-closing h2 { font-size: clamp(3rem, 5vw, 4.8rem); }
.home-closing > p { color: var(--muted); margin: 20px 0 30px; }
.home-closing .play-store-button { margin-inline: auto; }
@media (max-width: 1000px) {
  .home-hero { gap: 40px; }
  .home-membership { margin-inline: 0; padding: 48px 32px; gap: 48px; }
  .home-ritual, .home-community { gap: 48px; }
  .home-community { padding-inline: 0; gap: 64px; }
  .home-companion { padding-inline: 0; }
  .home-page .home-discovery, .home-page .reading-faq { gap: 0 48px; }
}
@media (max-width: 780px) {
  .home-companion { padding-block: 64px; }
  .home-ritual { padding-block: 64px; }
  .reading-screens, .group-screens { max-width: 480px; }
  .companion-visual .app-shot { width: min(100%, 300px); }
  .browser-frame { gap: 14px; }
  .browser-history { display: none; }
  .companion-features { grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
  .companion-features p { font-size: 16px; }
  .home-page .site-header { display: block; padding-block: 18px 12px; }
  .home-page .brand { min-height: 42px; }
  .home-page .site-nav { width: 100%; justify-content: flex-start; gap: 24px; margin-top: 8px; }
  .home-page .site-nav a { font-size: 14px; min-height: 44px; }
  .home-page .site-nav .nav-install { position: absolute; top: 18px; right: 0; padding-inline: 14px; }
  /* Use the painting's own sky behind both navigation rows, without a join. */
  .home-scene { height: clamp(340px, 52vw, 440px); }
  .home-scene img { object-position: 54% top; transform: none; }
  .home-hero { grid-template-columns: 1fr; gap: 20px; padding: 24px 0 40px; }
  .home-hero h1 { font-size: clamp(2.4rem, 5.8vw, 3.8rem); }
  .home-introduction > p:first-child { max-width: 54ch; }
  .home-library { padding-block: 48px; }
  .home-section-heading { align-items: start; }
  .home-section-heading h2 { font-size: 2.7rem; }
  .home-shelf { gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-book img { width: min(100%, 180px); }
  .home-ritual, .home-community, .home-membership { grid-template-columns: 1fr; }
  .home-community .home-feature-copy { grid-row: 1; }
  .home-web-reader { padding-block: 64px; }
  .home-web-reader .home-section-heading { align-items: start; flex-direction: column; gap: 24px; }
  .home-principles { gap: 24px; }
  .home-community { padding-block: 64px; gap: 48px; }

  .home-page .home-discovery { gap: 24px; padding-block: 48px; }
  .home-page .home-discovery h2 { max-width: none; }
  .home-membership-details { padding: 28px 0 0; border-left: 0; border-top: 1px solid #678478; }
  .home-page .reading-faq { grid-template-columns: 1fr; padding-block: 64px; }
  .home-page .reading-faq > h2 { grid-column: 1; grid-row: auto; max-width: none; margin-bottom: 24px; }
  .home-page .reading-faq details { grid-column: 1; }
}
@media (max-width: 520px) {
  .home-page .site-header { display: block; padding-block: 18px 12px; }
  .home-page .brand { min-height: 42px; }
  .home-page .site-nav { width: 100%; justify-content: flex-start; gap: 20px; margin-top: 8px; }
  .home-page .site-nav a { font-size: 12px; min-height: 44px; }
  .home-page .site-nav .nav-install { position: absolute; top: 18px; right: 0; padding-inline: 14px; }
  .home-content > .scene-edge { height: 16px; }
  .home-hero h1 { font-size: clamp(1.85rem, 8.2vw, 2.8rem); }
  .home-introduction > p:first-child { font-size: 16px; }
  .home-introduction .hero-actions { gap: 10px 20px; }
  .home-assurance { font-size: 11px; }
  .home-section-heading { flex-direction: column; gap: 8px; }
  .home-section-heading h2, .home-feature-copy h2, .home-membership h2, .home-page .reading-faq h2, .home-discovery h2 { font-size: 2.6rem; }
  .home-shelf { margin-top: 24px; gap: 24px 20px; }
  .shelf-book { padding-inline: 0; }
  .shelf-book h3 { font-size: 22px; margin-top: 20px; }
  .shelf-book p { font-size: 11px; }
  .home-genres { justify-content: start; gap: 0 22px; }
  .home-membership { padding: 36px 24px; border-radius: 8px; gap: 32px; }
  .home-feature-copy > p { font-size: 16px; }
  .home-ritual { padding: 56px 0; gap: 36px; }
  .companion-features { gap: 56px; }
  .reading-screens, .group-screens { gap: 14px; }
  .reader-shot, .discussion-shot { margin-top: 40px; }
  .companion-visual { padding: 0 8px 12px; }
  .companion-visual .app-shot { width: min(100%, 280px); }
  .discussion-excerpt { width: calc(100% - 8px); margin-top: -24px; padding: 20px; }
  .discussion-excerpt blockquote { font-size: 14px; }
  .browser-frame { height: 40px; gap: 12px; padding-inline: 12px; }
  .browser-window-controls { gap: 5px; }
  .browser-window-controls i { width: 7px; height: 7px; }
  .browser-sidebar, .browser-tools { display: none; }
  .browser-address { width: auto; flex: 1; height: 25px; font-size: 10px; }
  .home-web-reader .home-section-heading h2 { font-size: 2.6rem; }
  .home-principles { grid-template-columns: 1fr; padding-top: 24px; }
  .home-closing { padding-inline: 0; }
}
@media (prefers-reduced-motion: reduce) { .home-page *, .home-page *::before { scroll-behavior: auto; animation: none; transition: none; } }
