/* JavaScript Baby Books — a little paper, a little code. */
:root { color-scheme: light; --paper: #faf6eb; --ink: #103d2c; --coral: #e77c59; --link: #a94328; }
html { box-sizing: border-box; -webkit-text-size-adjust: 100%; }
*, ::before, ::after { box-sizing: inherit; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Georgia, 'Times New Roman', serif; line-height: 1.45; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; opacity: .2; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23997850' opacity='.2' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
a { color: var(--link); text-decoration: none; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 7px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p { margin: 0; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 12px 20px; background: var(--paper); z-index: 5; }
.skip-link:focus { top: 10px; }
.home, .detail { width: min(1380px, calc(100% - 96px)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; min-height: 570px; padding: 38px 30px 44px; border-bottom: 1px solid #526e59; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(56px, 7.1vw, 104px); line-height: .96; letter-spacing: -.055em; font-weight: 700; }
.tagline { font-size: clamp(19px, 2vw, 28px); line-height: 1.4; margin-top: 30px; max-width: 590px; }
.doodle { color: var(--coral); font-weight: normal; user-select: none; }
.star { position: absolute; font-size: 72px; left: -48px; top: -57px; transform: rotate(-12deg); }
.braces { display: block; font-size: 51px; line-height: 1; margin: 22px 0 -22px 78%; transform: rotate(9deg); }
.wash { position: relative; isolation: isolate; }
.wash::before { content: ''; position: absolute; inset: -2% -5%; z-index: -1; background: radial-gradient(ellipse at 42% 48%, #f7d776a6 0%, #f8df96a6 42%, #f9e6b15c 64%, transparent 73%); border-radius: 43% 57% 42% 48%; transform: rotate(-4deg); }
.wash::after { content: '{ }'; position: absolute; right: -12px; bottom: 15px; color: var(--coral); font-size: 52px; transform: rotate(9deg); pointer-events: none; }
.hero-art { height: 460px; display: flex; align-items: center; justify-content: center; }
.hero-art img { width: auto; height: auto; max-width: 94%; max-height: 365px; transform: rotate(6deg); box-shadow: 3px 13px 17px #503e262e, 0 2px 4px #503e2626; border-radius: 2px; }
/* Portrait covers get 18% more height, while the hero itself stays stable. */
.hero-art.is-portrait img { max-height: 430px; max-width: 86%; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 100px; row-gap: 64px; padding: 54px 76px 20px; }
.book-card { min-width: 0; }
.book-art { height: 400px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.book-art .cover { width: auto; max-width: 100%; max-height: 100%; box-shadow: 2px 7px 12px #503e2629, 0 1px 3px #503e2626; border-radius: 2px; transition: transform .2s ease; }
.book-art:hover .cover { transform: translateY(-5px) rotate(-1deg); }
.book-card h2 { font-size: clamp(24px, 2.25vw, 32px); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 10px; }
.reference { font-size: 22px; line-height: 1.35; }
.detail { padding: 44px 28px 0; }
.back-link { display: inline-block; font-size: 23px; margin-bottom: 30px; }
.detail h1 { font-size: clamp(38px, 5.7vw, 78px); line-height: 1.07; text-align: center; letter-spacing: -.04em; max-width: 1100px; margin: 0 auto 34px; }
.detail-art { width: min(920px, 100%); margin: 0 auto; padding: 26px 60px 36px; }
.detail-art a { display: flex; justify-content: center; }
.detail-art img { max-height: 610px; width: auto; max-width: 100%; box-shadow: 3px 10px 17px #503e2638; border-radius: 2px; }
.detail-art.portrait img { max-height: 660px; }
.detail > .reference { text-align: center; margin: 20px auto 34px; font-size: clamp(20px, 2.3vw, 30px); }
.book-navigation { display: flex; justify-content: space-between; gap: 28px; padding: 28px 0 0; border-top: 1px solid #526e59; }
.navigation { max-width: 46%; }
.navigation a { display: flex; flex-direction: column; font-size: 25px; }
.navigation small { font-size: 17px; margin-top: 6px; }
.navigation.next { text-align: right; }
/* Keep the footer's spacing while matching the storybook typography and palette. */
hr { height: 0; margin: 1rem 0; border: 0; border-top: 1px solid rgba(0, 0, 0, .1); }
.footer-space { margin-top: 50px; height: 16px; }
footer.container-fluid { width: 100%; padding: 20px 30px 28px; text-align: center; font-family: inherit; font-size: 13px; line-height: 1.5; color: var(--ink); }
footer p { margin: 4px 0; }
footer .inspiration { color: var(--ink); }
@media (max-width: 1100px) {
  .home, .detail { width: calc(100% - 48px); }
  .hero { gap: 20px; padding-left: 20px; padding-right: 20px; min-height: 500px; }
  .hero-art { height: 400px; }
  .hero-art img { max-height: 315px; }
  .hero-art.is-portrait img { max-height: 370px; }
  .star { left: -25px; font-size: 50px; }
  .book-grid { padding: 44px 30px 20px; gap: 48px; }
  .book-art { height: 340px; }
}
@media (max-width: 700px) {
  .home, .detail { width: calc(100% - 36px); }
  .hero { grid-template-columns: 1fr; gap: 16px; padding: 56px 12px 32px; }
  .hero h1 { font-size: clamp(49px, 12vw, 78px); }
  .tagline { font-size: 21px; margin-top: 22px; }
  .star { left: -10px; top: -42px; font-size: 43px; }
  .braces { display: none; }
  .hero-art { height: 350px; margin: 0 12px; }
  .hero-art img { max-height: 280px; max-width: 92%; }
  .hero-art.is-portrait img { max-height: 325px; }
  .wash::after { font-size: 38px; right: -5px; }
  .book-grid { grid-template-columns: 1fr; padding: 36px 20px 10px; gap: 44px; }
  .book-art { height: auto; min-height: 180px; max-height: none; }
  .book-art .cover { max-height: 430px; }
  .book-card h2 { font-size: 28px; }
  .reference { font-size: 20px; }
  .detail { padding: 28px 10px 0; }
  .back-link { font-size: 20px; }
  .detail h1 { font-size: 43px; margin-bottom: 20px; }
  .detail-art { padding: 20px 12px 26px; }
  .detail-art img, .detail-art.portrait img { max-height: 490px; }
  .detail > .reference { margin: 20px 0 30px; }
  .navigation a { font-size: 21px; }
  .navigation small { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .book-art .cover { transition: none; } }
