:root {
  --blue: #07578f;
  --deep-blue: #063a62;
  --sea: #13a8bd;
  --sun: #f5b72e;
  --coral: #ee5d58;
  --sand: #fff0c9;
  --cream: #fffaf0;
  --ink: #173548;
  --green: #087c67;
  --shadow: 0 18px 50px rgba(4, 58, 98, .17);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "Trebuchet MS", "Segoe UI", sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.site-header { height: 84px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: rgba(255, 250, 240, .95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(7, 87, 143, .1); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--blue); }
.brand-sun { width: 42px; height: 42px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; color: white; box-shadow: 0 0 0 6px rgba(245, 183, 46, .2); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.15rem; }
.brand small { font-size: .67rem; text-transform: uppercase; letter-spacing: .16em; margin-top: 2px; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { text-decoration: none; font-weight: 700; font-size: .92rem; }
nav a:hover { color: var(--coral); }
.nav-cta { background: var(--blue); color: white; padding: 11px 17px; border-radius: 999px; }
.nav-cta:hover { color: white; background: var(--coral); }
.menu-button { display: none; border: 0; padding: 10px 14px; border-radius: 999px; color: white; background: var(--blue); font-weight: 800; }

.hero { min-height: 680px; padding: 70px clamp(24px, 7vw, 110px) 80px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(30px, 5vw, 80px); overflow: hidden; position: relative; background: radial-gradient(circle at 85% 10%, #e3fbff 0 19%, transparent 40%), linear-gradient(145deg, #fffaf0 20%, #edfdf6 100%); }
.hero::after { content: ""; height: 14px; position: absolute; inset: auto 0 0; background: repeating-linear-gradient(90deg, var(--sea) 0 80px, var(--sun) 80px 160px, var(--coral) 160px 240px); }
.eyebrow { margin: 0 0 14px; text-transform: uppercase; letter-spacing: .2em; font-weight: 900; font-size: .77rem; color: var(--green); }
h1, h2, h3 { color: var(--deep-blue); line-height: 1.05; margin-top: 0; }
h1 { font-size: clamp(3.1rem, 6.5vw, 6.6rem); letter-spacing: -.055em; margin-bottom: 25px; }
h1 span { color: var(--coral); }
.hero-intro { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.65; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 900; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(4, 58, 98, .18); }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover { background: var(--coral); }
.button-ghost { color: var(--blue); border: 2px solid rgba(7, 87, 143, .25); background: white; }
.button-sand { background: var(--sand); color: var(--deep-blue); }
.promise { color: var(--blue); font-weight: 800; font-size: .9rem; margin-top: 23px; }

.hero-art { min-height: 610px; position: relative; display: grid; place-items: center; overflow: visible; isolation: isolate; }
.portal { position: absolute; z-index: 1; width: min(54%, 365px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: url("assets/maisie-bay-empty-portal.webp") center/cover no-repeat; border: 7px solid rgba(246, 211, 148, .92); box-shadow: inset 0 0 30px rgba(6, 58, 98, .48), 0 0 0 11px rgba(7, 87, 143, .18), 0 0 55px 22px rgba(19, 168, 189, .35); animation: portalBreathe 2.2s ease-in-out infinite; }
.portal::before { content: ""; position: absolute; inset: -28px; border-radius: 50%; border: 4px dashed rgba(255, 255, 255, .78); }
.portal::after { content: ""; position: absolute; inset: -42px; border-radius: 50%; background: radial-gradient(circle, transparent 52%, rgba(245, 183, 46, .24) 54%, transparent 68%); z-index: -1; }
.portal-title { position: absolute; z-index: 12; top: 2%; left: 50%; min-width: 148px; padding: 8px 24px 7px; transform: translateX(-50%); border-radius: 26px; color: var(--blue); background: rgba(255,255,255,.97); border: 4px solid var(--blue); line-height: .9; text-align: center; font-weight: 900; box-shadow: 0 8px 18px rgba(6, 58, 98, .22); }
.portal-title b { display: block; color: var(--blue); font-size: clamp(1.05rem, 2vw, 1.42rem); }
.portal-title small { display: block; margin-top: 6px; color: #6b241c; font-size: .46rem; letter-spacing: .24em; font-weight: 800; }
.portal i { position: relative; z-index: 3; width: 52px; height: 52px; border-radius: 50%; background: white; opacity: 0; transform: scale(.1); animation: portalFlash 4.3s ease-out 1s both; }
.jugg-runner, .jugg-jumper { position: absolute; z-index: 8; filter: drop-shadow(0 13px 11px rgba(6, 58, 98, .24)); will-change: left, bottom, transform, opacity; }
.jugg-runner { left: -30%; bottom: 0; width: min(30%, 190px); aspect-ratio: 3 / 2; opacity: 0; animation: juggGroundRun 3.8s linear 1s both; }
.jugg-runner .stride { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.jugg-runner .stride-a { animation: juggStrideA .34s ease-in-out 1s 10 both; }
.jugg-runner .stride-b { animation: juggStrideB .34s ease-in-out 1s 10 both; }
.jugg-jumper { left: 33%; bottom: 1%; width: min(34%, 220px); opacity: 0; animation: juggFinalJump 3.8s cubic-bezier(.31,.01,.37,1) 1s both; }
.book-reveal { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cover { width: min(49%, 355px); aspect-ratio: .947; object-fit: cover; border: 8px solid white; border-radius: 9px; box-shadow: 0 28px 62px rgba(6, 58, 98, .34); position: absolute; opacity: 0; will-change: transform, opacity; }
.cover-one { z-index: 2; animation: coverPopLeft .9s cubic-bezier(.17,.89,.32,1.25) 4.85s both; }
.cover-two { z-index: 3; animation: coverPopRight .9s cubic-bezier(.17,.89,.32,1.25) 5.02s both; }
.hero-badge { position: absolute; z-index: 7; right: -1%; bottom: 2%; width: 124px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; font-weight: 900; font-size: .84rem; color: var(--deep-blue); background: var(--sand); border: 3px dashed var(--coral); transform: rotate(7deg); opacity: 0; animation: badgePop .65s ease-out 5.45s both; }
.replay-animation { position: absolute; z-index: 10; bottom: -22px; left: 50%; transform: translateX(-50%); padding: 9px 14px; border: 0; border-radius: 999px; color: var(--blue); background: rgba(255,255,255,.92); box-shadow: 0 7px 18px rgba(6, 58, 98, .15); font: inherit; font-size: .75rem; font-weight: 900; cursor: pointer; opacity: 0; animation: replayAppear .4s ease-out 5.8s forwards; }
.replay-animation:hover { background: var(--sand); }

@keyframes portalBreathe { 50% { transform: scale(1.04); box-shadow: inset 0 0 34px rgba(6, 58, 98, .52), 0 0 0 15px rgba(7, 87, 143, .15), 0 0 70px 28px rgba(19, 168, 189, .46); } }
@keyframes portalFlash { 0%, 66% { opacity: 0; transform: scale(.1); } 76% { opacity: .95; transform: scale(5.2); } 93%, 100% { opacity: 0; transform: scale(7); } }
@keyframes juggStrideA { 0%, 34% { opacity: 1; } 50% { opacity: 0; } 66%, 100% { opacity: 1; } }
@keyframes juggStrideB { 0%, 34% { opacity: 0; } 50% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes juggGroundRun {
  0% { left: -30%; bottom: 0; transform: rotate(-1deg) translateY(0); opacity: 0; }
  1% { opacity: 1; }
  5% { transform: rotate(1deg) translateY(-3px); }
  10% { transform: rotate(-1deg) translateY(0); }
  15% { transform: rotate(1deg) translateY(-3px); }
  20% { transform: rotate(-1deg) translateY(0); }
  25% { transform: rotate(1deg) translateY(-3px); }
  30% { transform: rotate(-1deg) translateY(0); }
  35% { transform: rotate(1deg) translateY(-3px); }
  40% { transform: rotate(-1deg) translateY(0); }
  45% { transform: rotate(1deg) translateY(-3px); }
  50% { transform: rotate(-1deg) translateY(0); }
  55% { transform: rotate(1deg) translateY(-3px); }
  60% { transform: rotate(-1deg) translateY(0); }
  65% { transform: rotate(1deg) translateY(-3px); }
  70% { left: 33%; bottom: 0; transform: rotate(-1deg) translateY(0); opacity: 1; }
  72%, 100% { left: 33%; bottom: 0; transform: translateY(0); opacity: 0; }
}
@keyframes juggFinalJump {
  0%, 70% { left: 33%; bottom: 1%; transform: rotate(0) scale(.78); opacity: 0; }
  71% { left: 33%; bottom: 1%; transform: rotate(-2deg) scale(.78); opacity: 1; }
  82% { left: 41%; bottom: 23%; transform: rotate(-9deg) scale(.62); opacity: 1; }
  92%, 100% { left: 49%; bottom: 44%; transform: rotate(-18deg) scale(.06); opacity: 0; }
}
@keyframes coverPopLeft { 0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.05); } 72% { opacity: 1; transform: translate(-48%, 2%) rotate(-7deg) scale(1.07); } 100% { opacity: 1; transform: translate(-48%, 2%) rotate(-7deg) scale(1); } }
@keyframes coverPopRight { 0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.05); } 72% { opacity: 1; transform: translate(50%, -2%) rotate(7deg) scale(1.07); } 100% { opacity: 1; transform: translate(50%, -2%) rotate(7deg) scale(1); } }
@keyframes badgePop { 0% { opacity: 0; transform: rotate(7deg) scale(.25); } 75% { opacity: 1; transform: rotate(7deg) scale(1.1); } 100% { opacity: 1; transform: rotate(7deg) scale(1); } }
@keyframes replayAppear { to { opacity: 1; } }

.hero-art.replay .portal i,
.hero-art.replay .jugg-runner,
.hero-art.replay .jugg-runner .stride,
.hero-art.replay .jugg-jumper,
.hero-art.replay .cover-one,
.hero-art.replay .cover-two,
.hero-art.replay .hero-badge,
.hero-art.replay .replay-animation { animation-name: none; }
.hero-art.replay.playing .portal i { animation: portalFlash 4.3s ease-out .05s both; }
.hero-art.replay.playing .jugg-runner { animation: juggGroundRun 3.8s linear .05s both; }
.hero-art.replay.playing .jugg-runner .stride-a { animation: juggStrideA .34s ease-in-out .05s 10 both; }
.hero-art.replay.playing .jugg-runner .stride-b { animation: juggStrideB .34s ease-in-out .05s 10 both; }
.hero-art.replay.playing .jugg-jumper { animation: juggFinalJump 3.8s cubic-bezier(.31,.01,.37,1) .05s both; }
.hero-art.replay.playing .cover-one { animation: coverPopLeft .9s cubic-bezier(.17,.89,.32,1.25) 3.85s both; }
.hero-art.replay.playing .cover-two { animation: coverPopRight .9s cubic-bezier(.17,.89,.32,1.25) 4.02s both; }
.hero-art.replay.playing .hero-badge { animation: badgePop .65s ease-out 4.45s both; }
.hero-art.replay.playing .replay-animation { animation: replayAppear .4s ease-out 4.8s forwards; }

.motto { padding: 26px 20px; color: white; background: var(--blue); text-align: center; font-size: clamp(1.25rem, 2.4vw, 2rem); font-weight: 900; }
.motto p { margin: 0; }
.motto span { color: #ffd769; }
.section { padding: 95px clamp(24px, 7vw, 110px); }
.section-heading { max-width: 720px; margin: 0 auto 50px; text-align: center; }
.section-heading h2, .world h2, .author h2, .contact-strip h2 { font-size: clamp(2.2rem, 4vw, 4.25rem); letter-spacing: -.04em; margin-bottom: 16px; }
.section-heading > p:last-child { font-size: 1.1rem; line-height: 1.6; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 55px); max-width: 1120px; margin: auto; }
.book-card { display: grid; grid-template-columns: .83fr 1.17fr; overflow: hidden; border-radius: 26px; background: white; box-shadow: var(--shadow); border: 1px solid rgba(7, 87, 143, .09); }
.book-image-wrap { padding: 24px; display: grid; place-items: center; background: linear-gradient(150deg, #bff1ed, #ecfbef); }
.christmas .book-image-wrap { background: linear-gradient(150deg, #0f6257, #063a62); }
.book-image-wrap img { width: 100%; border-radius: 4px; box-shadow: 0 15px 28px rgba(6, 58, 98, .22); }
.book-details { padding: 34px 30px; display: flex; flex-direction: column; }
.status { align-self: flex-start; padding: 7px 10px; border-radius: 999px; background: #fff2ce; color: #875a00; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.book-details h3 { font-size: 1.72rem; margin: 20px 0 12px; }
.book-details p { line-height: 1.55; margin: 0; }
.book-meta { display: flex; justify-content: space-between; align-items: end; margin: auto 0 20px; padding-top: 25px; }
.book-meta strong { font-size: 1.8rem; color: var(--coral); }
.book-meta span { font-weight: 800; font-size: .85rem; }
.full { width: 100%; }
.reservation-note { text-align: center; margin: 26px 0 0; font-size: .86rem; color: #526977; }

.world { min-height: 590px; padding: 90px clamp(24px, 7vw, 110px); color: white; display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; background: linear-gradient(120deg, rgba(0, 70, 80, .96), rgba(5, 83, 143, .94)), url("assets/jugg-little-boat.webp") center/cover; }
.world h2 { color: white; }
.world p { max-width: 680px; font-size: 1.1rem; line-height: 1.7; }
.light { color: #ffd769; }
.world ul { list-style: none; padding: 0; display: grid; gap: 12px; font-weight: 800; }
.world li span { display: inline-block; width: 35px; }
.jugg-callout { min-height: 330px; padding: 45px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--deep-blue); background: rgba(255, 250, 240, .95); border-radius: 50% 46% 52% 44%; box-shadow: 0 20px 50px rgba(0, 24, 35, .25); transform: rotate(2deg); }
.jugg-callout strong { font-size: clamp(2.2rem, 4.5vw, 4rem); line-height: 1; }
.sniff { color: var(--coral); font-weight: 900; margin-bottom: 12px; }
.trail { color: var(--coral); margin-top: 28px; transform: rotate(-6deg); }

.author { background: #fff6df; }
.author-card { max-width: 1000px; margin: auto; display: grid; grid-template-columns: .7fr 1.3fr; gap: 60px; align-items: center; }
.author-portrait { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: #fffefa; box-shadow: 0 20px 40px rgba(6, 58, 98, .12); }
.author-portrait img { position: absolute; top: 50%; left: 50%; width: 220%; max-width: none; transform: translate(-50%, -34%); }
.author-card p:not(.eyebrow):not(.signature) { font-size: 1.08rem; line-height: 1.75; }
.signature { color: var(--blue); font-weight: 900; font-size: 1.1rem; }
.contact-strip { padding: 60px clamp(24px, 7vw, 110px); display: flex; justify-content: space-between; align-items: center; gap: 35px; color: white; background: var(--coral); }
.contact-strip h2 { color: white; margin-bottom: 0; }
footer { padding: 35px clamp(24px, 7vw, 110px); display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; color: white; background: #032f4f; font-size: .83rem; }
footer div span { display: block; opacity: .72; margin-top: 3px; }
footer p { text-align: center; }
footer a { justify-self: end; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 55px; }
  .hero-intro { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { min-height: 590px; }
  .book-grid { grid-template-columns: 1fr; max-width: 700px; }
  .world { grid-template-columns: 1fr; }
  .jugg-callout { max-width: 520px; width: 100%; margin: auto; }
}

@media (max-width: 760px) {
  .site-header { height: 72px; }
  .menu-button { display: block; }
  nav { display: none; position: absolute; top: 72px; left: 16px; right: 16px; padding: 22px; flex-direction: column; align-items: stretch; gap: 8px; border-radius: 18px; background: white; box-shadow: var(--shadow); }
  nav.open { display: flex; }
  nav a { padding: 11px; text-align: center; }
  .hero { min-height: auto; padding-inline: 20px; }
  h1 { font-size: clamp(3.1rem, 17vw, 5rem); }
  .hero-art { min-height: 465px; }
  .portal { width: 55%; border-width: 13px; }
  .portal-title { top: 1%; padding: 6px 14px; border-width: 3px; }
  .jugg-runner { width: 33%; }
  .jugg-jumper { width: 38%; }
  .cover { width: 50%; border-width: 5px; }
  .hero-badge { width: 94px; right: -2%; bottom: 2%; font-size: .7rem; }
  .replay-animation { bottom: -10px; }
  .section { padding: 70px 20px; }
  .book-card { grid-template-columns: 1fr; }
  .book-image-wrap { padding: 34px; }
  .book-image-wrap img { width: min(78%, 330px); }
  .book-meta { margin-top: 10px; }
  .world { padding: 70px 24px; gap: 35px; }
  .author-card { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .author-portrait { width: min(75%, 340px); margin: auto; }
  .contact-strip { flex-direction: column; text-align: center; }
  footer { grid-template-columns: 1fr; text-align: center; }
  footer a { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .portal, .portal::before, .portal i, .jugg-runner, .jugg-runner .stride, .jugg-jumper, .hero-badge, .replay-animation { animation: none !important; }
  .jugg-runner, .jugg-jumper, .replay-animation { display: none; }
  .cover-one { animation: none; opacity: 1; transform: translate(-48%, 2%) rotate(-7deg); }
  .cover-two { animation: none; opacity: 1; transform: translate(50%, -2%) rotate(7deg); }
  .hero-badge { opacity: 1; }
}
