/* Responsive layout and input adaptations. Breakpoints match main.js. */
.site-header nav a, .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.button, .brand { min-height: 44px; }
.page-arrow { width: 44px; height: 44px; flex-shrink: 0; }
.page-dots { gap: 0; }
.page-dot { width: 44px; height: 44px; padding: 0; }
.page-dot:after { left: calc(50% - 3px); top: calc(50% - 3px); }
.journal-controls { gap: 8px; }
.journal-caption a { display: inline-flex; min-height: 44px; align-items: center; }
.journal-caption { margin-top: 4px; }
.journal-sticky { min-height: 0; }
.book-stage, .journal-heading, .journal-controls, .journal-caption { flex-shrink: 0; }
.feature-card { min-width: 0; }
.paper > * { flex-shrink: 0; }
.memory-grid span { aspect-ratio: auto; height: 65px; }
.footer-links { gap: 0; }

@media (min-width: 1500px) {
  .note-left { left: 15%; }
  .note-right { right: 15%; }
}

/* Keep every journal scene within the paper, including its page number. */
.paper { padding: 24px; }
.paper-top { margin-bottom: 16px; }
.paper h3 { font-size: 28px; margin-bottom: 12px; }
.paper p { line-height: 1.8; }
.paper .handwritten { font-size: 18px; margin: 12px 0 8px; }
.paper-sticker { font-size: 28px; }
.paper-number { padding-top: 10px; }
.photo-frame { padding-bottom: 14px; }
.photo-frame img { height: 150px; }
.journal-timer { width: 140px; height: 140px; margin: 10px 0; }
.activity-bars { height: 100px; margin-top: 20px; }

/* Tablets: less crowding, larger copy, and generous gutters. */
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 64px); }
  .site-header { gap: 20px; }
  .site-header nav { gap: 20px; }
  .site-header .button-small { gap: 12px; }
  .hero h1 { font-size: clamp(60px, 8vw, 84px); letter-spacing: -3px; }
  .floating-note { scale: .8; pointer-events: none; }
  .note-left { left: 0; top: 440px; }
  .note-right { right: 0; top: 430px; }
  .book-annotation { display: none; }
  .book-stage { width: min(770px, 86vw); }
  .paper { padding: 26px; }
  .paper-top { margin-bottom: 20px; }
  .paper h3 { font-size: 28px; }
  .paper .handwritten { margin: 14px 0 10px; }
  .section-intro { gap: 32px; }
  .section-intro h2 { font-size: 39px; }
  .section-intro > p { max-width: 260px; font-size: 14px; }
  .feature-card { padding: 24px; }
  .feature-card h3 { font-size: 23px; }
  .feature-card p { font-size: 14px; }
  .mini-journal .art-star, .mini-timer .timer-spark { right: 5px; }
  .closing h2 { font-size: 48px; }
  .closing-star { left: 3%; font-size: 55px; }
  .closing-flower { right: 2%; font-size: 65px; }
}

/* Portrait tablets and phones show a legible single journal page. */
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; height: auto; min-height: 116px; padding-block: 16px 8px; row-gap: 4px; }
  .site-header nav { order: 3; width: 100%; justify-content: center; gap: 32px; font-size: 13px; }
  .site-header .button-small { margin-left: auto; }
  .hero { min-height: 730px; height: auto; padding-top: 60px; }
  .hero-description { font-size: 16px; }
  .hero-caption { font-size: 12px; }
  .hero-bottom { left: 32px; right: 32px; }
  .journal-section { height: 420svh; }
  .journal-sticky { padding: 28px 0; }
  .journal-heading { margin-bottom: 20px; padding-inline: 20px; }
  .journal-heading h2 { font-size: clamp(26px, 4vw, 34px); }
  .journal-heading p { font-size: 13px; line-height: 1.7; }
  .book-stage { width: min(400px, calc(100% - 64px)); margin: 10px auto 24px; }
  .book { aspect-ratio: auto; height: 480px; transform: rotate(-1deg); }
  .spread { grid-template-columns: 1fr; }
  .spread > .paper:first-child { display: none; }
  .paper, .paper:last-child { background: #fffdfa; padding: 26px; }
  .paper p { font-size: 13px; line-height: 1.85; }
  .paper h3 { font-size: 27px; margin-bottom: 14px; }
  .paper-top { font-size: 9px; margin-bottom: 20px; }
  .paper .handwritten { font-size: 20px; }
  .photo-frame img { height: 150px; }
  .photo-frame figcaption { font-size: 12px; }
  .paper-sticker { font-size: 35px; }
  .paper-tag { margin-top: 12px; font-size: 9px; }
  .paper-number { padding-top: 12px; }
  .journal-timer { width: 145px; height: 145px; margin: 10px 0 16px; }
  .activity-bars { height: 110px; margin-top: 22px; }
  .book-quote { font-size: 30px; }
  .flip-leaf { display: none !important; }
  .journal-caption { width: min(480px, calc(100% - 40px)); font-size: 9px; letter-spacing: .6px; gap: 12px; }
  .journal-caption a { font-size: 12px; white-space: nowrap; }
  .section-intro { display: block; }
  .section-intro > p { max-width: 540px; margin-top: 24px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-card:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; align-items: center; }
  .feature-card:last-child .feature-art { grid-column: 2; grid-row: 1 / 4; }
  .feature-card:last-child h3 { margin: 16px 0 12px; }
  .feature-card:last-child p { align-self: start; }
  .footer-top { gap: 24px; }
  .footer-top p { font-size: 13px; }
  .footer-wordmark { font-size: 13vw; }
  .footer-bottom { flex-wrap: wrap; font-size: 11px; }
  .footer-bottom > span:nth-child(2) { font-size: 9px; letter-spacing: 1px; }
}

@media (max-width: 600px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { column-gap: 10px; }
  .brand { font-size: 21px; gap: 7px; }
  .brand-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .brand-dot { margin-left: -6px; }
  .site-header .button-small { font-size: 11px; padding: 12px 14px; gap: 8px; }
  .hero { min-height: 710px; padding-top: 45px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.4px; }
  .hero h1 { font-size: clamp(42px, 10.6vw, 62px); letter-spacing: -2px; margin: 28px 0 24px; }
  .headline-star { width: 22px; margin: 5px 0 0 2px; }
  .hero-description { font-size: 15px; max-width: 330px; }
  .desktop-break { display: none; }
  .hero-caption { font-size: 11px; }
  .floating-note { scale: .65; }
  .note-left { left: -14px; top: 410px; }
  .note-right { right: -10px; top: 420px; }
  .hero-bottom { left: 20px; right: 20px; font-size: 8px; letter-spacing: .5px; gap: 16px; }
  .hero-bottom span:last-child { text-align: right; }
  .scroll-cue { bottom: 55px; font-size: 9px; }
  .journal-heading h2 { font-size: 26px; letter-spacing: -.8px; }
  .journal-heading p { font-size: 12px; }
  .book-stage { width: min(365px, calc(100% - 48px)); }
  .paper, .paper:last-child { padding: 22px; }
  .journal-caption { font-size: 8px; gap: 8px; }
  .journal-caption > span:nth-child(2) { max-width: 135px; text-align: center; line-height: 1.6; }
  .journal-caption a { font-size: 11px; }
  .why-section { padding-block: 72px; }
  .section-intro { margin-bottom: 30px; }
  .section-intro h2 { font-size: 34px; }
  .section-intro > p { margin-top: 20px; }
  .feature-grid { grid-template-columns: 1fr; gap: 18px; }
  .feature-card, .feature-card:last-child { display: block; padding: 26px; }
  .feature-card h3 { font-size: 25px; }
  .feature-card:last-child h3 { margin: 0 0 13px; }
  .feature-art { height: 175px; }
  .mini-journal .art-star, .mini-timer .timer-spark { right: calc(50% - 100px); }
  .closing { padding: 65px 0 75px; }
  .closing h2 { font-size: clamp(30px, 8vw, 40px); letter-spacing: -1px; }
  .closing-star { font-size: 28px; top: 18px; left: 5%; }
  .closing-flower { font-size: 35px; bottom: 25px; right: 3%; }
  .footer-top { flex-wrap: wrap; gap: 16px; }
  .footer-top .brand { width: 100%; }
  .footer-top p { flex: 1 1 140px; font-size: 12px; }
  .footer-links { font-size: 12px; }
  .footer-wordmark { font-size: 13.5vw; margin: 30px 0 20px; }
  .footer-wordmark span { margin-left: 7px; }
  .footer-bottom { gap: 16px; font-size: 10px; }
  .footer-bottom > span:nth-child(2) { display: none; }
  .footer-bottom > span:last-child { margin-left: auto; }
}

@media (max-width: 360px) {
  .site-header .brand { font-size: 19px; gap: 5px; }
  .site-header .brand-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .site-header .button-small { font-size: 10px; gap: 4px; }
  .site-header .button-small { padding-inline: 10px; }
  .hero h1 { font-size: 40px; }
  .headline-star { display: none; }
  .page-dot { width: 32px; }
  .paper, .paper:last-child { padding: 20px; }
  .paper h3 { font-size: 24px; }
  .paper p { font-size: 12px; }
  .photo-frame img { height: 150px; }
  .journal-heading h2 { font-size: 24px; }
}

/* Short phones and landscape: no oversized sticky panel or trapped scroll. */
@media (max-height: 780px) and (max-width: 900px), (max-height: 600px) {
  .journal-section { height: auto; }
  .journal-sticky { position: relative; height: auto; min-height: 0; padding: 48px 0 32px; overflow: visible; }
  .flip-leaf { display: none !important; }
}

@media (hover: none), (pointer: coarse) {
  .button:hover, .feature-card:hover { transform: none; box-shadow: none; }
  .floating-note { pointer-events: none; }
  .hero-glow { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; animation: none !important; }
  .hero-glow { transform: none; }
  .journal-section { height: auto; }
  .journal-sticky { position: relative; height: auto; min-height: 0; padding: 48px 0; }
  .flip-leaf { display: none !important; }
}

@media(max-width:900px){.pricing-section{grid-template-columns:1fr;gap:28px;padding-bottom:72px}.pricing-section h2{font-size:39px}}
@media(max-width:600px){.pricing-section h2{font-size:34px}.pricing-preview{padding:26px}.pricing-preview h3{font-size:25px}}
