:root {
  --ink: #173c3b;
  --deep: #103b39;
  --deepest: #092b2b;
  --cream: #fff9ec;
  --paper: #fffdf5;
  --sun: #ffce50;
  --coral: #f47c52;
  --mint: #dbeedb;
  --muted: #5e706c;
  --heading: 'Baloo 2', 'Trebuchet MS', sans-serif;
  --body: 'Nunito', 'Trebuchet MS', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; overflow-x: hidden; color: var(--ink); font-family: var(--body); background: var(--cream); -webkit-font-smoothing: antialiased; }
body:has(.world-dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #ffad31; outline-offset: 5px; }
::selection { color: #14332e; background: #ffdb74; }
.container { width: min(1220px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 1000; top: -80px; left: 20px; padding: 12px 20px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 900; }
.skip-link:focus { top: 14px; }

/* Navigation */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 30; padding: 20px 0; transition: background .3s ease, padding .3s ease, box-shadow .3s ease; }
.site-header.is-scrolled { position: fixed; padding: 9px 0; background: rgba(255, 250, 237, .96); box-shadow: 0 10px 30px rgba(17, 52, 45, .08); backdrop-filter: blur(18px); }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 205px; color: white; font: 800 1.15rem/1 var(--heading); letter-spacing: -.03em; }
.brand img { width: 62px; height: 62px; object-fit: contain; border: 2px solid rgba(255,255,255,.62); border-radius: 18px; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.brand small { display: block; font-size: .97em; color: var(--sun); }
.site-header.is-scrolled .brand { color: var(--ink); }
.site-header.is-scrolled .brand small { color: #e17f28; }
.nav-links { display: flex; align-items: center; gap: 34px; color: white; font-weight: 900; font-size: .9rem; }
.nav-links > a:not(.nav-cta) { transition: color .2s ease; }
.nav-links > a:not(.nav-cta):hover { color: var(--sun); }
.site-header.is-scrolled .nav-links { color: var(--ink); }
.site-header.is-scrolled .nav-links > a:not(.nav-cta):hover { color: #e58531; }
.nav-cta { padding: 13px 20px; border-radius: 50px; background: var(--sun); color: var(--deepest); box-shadow: 0 5px 0 rgba(73,56,7,.18); transition: transform .2s ease, box-shadow .2s ease; }
.nav-cta:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(73,56,7,.12); }
.nav-cta span { margin-left: 5px; }
.menu-toggle { display: none; }

/* Hero */
.hero { position: relative; display: flex; min-height: 730px; min-height: min(880px, 100svh); overflow: hidden; color: #fff; background: #174d3c; isolation: isolate; }
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -3; object-fit: cover; object-position: center 48%; animation: hero-in 1.8s cubic-bezier(.2,.7,.2,1) both; }
.hero-shade { z-index: -2; background: linear-gradient(90deg, rgba(6,40,36,.96) 0%, rgba(7,43,39,.87) 22%, rgba(7,47,41,.50) 47%, rgba(7,43,34,.03) 83%), linear-gradient(0deg, rgba(7,37,32,.58) 0%, transparent 25%, rgba(8,34,31,.24) 100%); }
.hero-content { position: relative; display: flex; align-items: center; padding-block: 150px 136px; }
.hero-copy { max-width: 670px; animation: content-in .9s .15s both; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; color: #278a70; font-size: .78rem; font-weight: 900; letter-spacing: .16em; line-height: 1.45; text-transform: uppercase; }
.eyebrow-star { color: #e9ac29; font-size: 1.18rem; }
.eyebrow--light { color: #e8ebce; }
.eyebrow--light .eyebrow-star { color: var(--sun); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { max-width: 660px; margin: 0 0 18px; color: white; font: 800 clamp(3.6rem, 5.6vw, 6.2rem)/.98 var(--heading); letter-spacing: -.045em; text-wrap: balance; }
.hero h1 em { display: inline; color: var(--sun); font-style: normal; }
.hero-lead { max-width: 490px; margin: 0 0 30px; color: #ecf4e9; font-size: clamp(1.02rem, 1.6vw, 1.17rem); font-weight: 700; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 19px; min-height: 56px; padding: 15px 27px; border: 2px solid transparent; border-radius: 50px; font-weight: 900; font-size: .92rem; line-height: 1.2; transition: transform .25s ease, background .25s ease, box-shadow .25s ease; }
.button:hover { transform: translateY(-4px); }
.button span { font-size: 1.2rem; font-weight: 700; }
.button--sun { color: var(--deepest); background: var(--sun); box-shadow: 0 6px 0 #dca83b; }
.button--sun:hover { background: #ffe088; box-shadow: 0 10px 0 #dca83b; }
.button--glass { color: #fff; background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.5); backdrop-filter: blur(12px); }
.button--glass:hover { background: rgba(255,255,255,.21); }
.hero-bottom { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; width: min(1220px, calc(100% - 64px)); }
.hero-note { display: inline-flex; align-items: center; gap: 9px; font-size: .83rem; font-weight: 900; letter-spacing: .01em; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.note-glow { color: var(--sun); font-size: 1.5rem; }
.scroll-cue { display: inline-flex; align-items: center; gap: 14px; font-size: .78rem; font-weight: 800; }
.scroll-line { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; }
.scroll-line::after { content: '↓'; font-size: 1.35rem; animation: bob 2.6s ease-in-out infinite; }
.hero-sparkle { position: absolute; color: #fff0a7; pointer-events: none; text-shadow: 0 0 18px rgba(255,215,91,.85); animation: twinkle 3s ease-in-out infinite alternate; }
.hero-sparkle--one { top: 28%; left: 52%; font-size: 2rem; }
.hero-sparkle--two { top: 61%; right: 8%; font-size: 3rem; animation-delay: .8s; }
.hero-sparkle--three { top: 21%; right: 21%; font-size: 1.2rem; animation-delay: 1.3s; }

/* Transition ribbon */
.story-ribbon { overflow: hidden; background: var(--sun); transform: rotate(-1deg) scale(1.02); transform-origin: center; position: relative; z-index: 2; margin-block: -13px -8px; border-block: 2px solid rgba(98,66,10,.12); }
.story-ribbon-track { display: flex; align-items: center; gap: 34px; width: max-content; min-height: 70px; white-space: nowrap; animation: marquee 37s linear infinite; color: var(--deepest); font: 800 1.62rem/1 var(--heading); }
.story-ribbon-track b { font-size: 1rem; color: #e77f3a; }

/* Shared section styles */
.section-pad { padding-block: clamp(88px, 10vw, 140px); }
.display-title { color: var(--ink); font: 800 clamp(3.1rem, 5.1vw, 5.3rem)/1.02 var(--heading); letter-spacing: -.043em; text-wrap: balance; }
.ink-underline { position: relative; z-index: 0; white-space: nowrap; }
.ink-underline::after { content: ''; position: absolute; z-index: -1; left: 1%; right: 0; bottom: .07em; height: .17em; border-radius: 60%; transform: rotate(-2deg); background: #f2cd64; opacity: .8; }
.ink-underline--orange::after { background: #fac18c; }
.body-large { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 900; line-height: 1.55; }
.text-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 8px; padding-bottom: 6px; border-bottom: 2px solid #e99a53; color: var(--ink); font-weight: 900; transition: gap .2s ease; }
.text-link:hover { gap: 20px; }

/* Story */
.story-section { position: relative; background: var(--cream); overflow: hidden; }
.story-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(50px, 9vw, 120px); align-items: center; }
.story-copy .display-title { margin-bottom: 26px; }
.story-copy > p:not(.eyebrow) { max-width: 490px; margin-bottom: 17px; color: var(--muted); font-size: 1.02rem; line-height: 1.77; }
.story-copy > p.body-large { color: var(--ink); font-size: 1.22rem; line-height: 1.65; }
.story-art { position: relative; padding: 10px 25px 42px 4px; }
.story-art-shadow { position: absolute; inset: 13px 20px 45px 7px; transform: rotate(5deg); border: 8px solid white; border-radius: 32px; background: #ffce68; box-shadow: 0 22px 36px rgba(16, 65, 47, .09); }
.story-image-frame { position: relative; overflow: hidden; margin: 0; transform: rotate(-3deg); border: 9px solid #fff; border-bottom-width: 72px; border-radius: 29px; background: white; box-shadow: 0 20px 50px rgba(30, 63, 46, .16); }
.story-image-frame img { width: 100%; aspect-ratio: 1.3; object-fit: cover; object-position: center; }
.story-image-frame figcaption { position: absolute; right: 12px; bottom: -54px; left: 12px; color: var(--ink); font: 800 .87rem/1.4 var(--heading); text-align: center; }
.story-sticker { position: absolute; z-index: 2; right: -17px; bottom: -4px; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 144px; height: 144px; padding: 20px; border: 5px solid var(--cream); border-radius: 50%; transform: rotate(12deg); color: var(--deepest); background: var(--sun); box-shadow: 0 9px 18px rgba(38,62,44,.14); font: 700 .88rem/1.15 var(--heading); text-align: center; }
.story-sticker strong { font-size: 1.07rem; }
.story-sticker span:last-child { margin-top: 7px; color: #e47935; }
.story-deco { position: absolute; pointer-events: none; }
.story-deco--one { top: 16%; right: 6%; color: #f7d184; font-size: 5rem; }
.story-deco--two { bottom: 7%; left: 3%; color: #d8e8ce; font-size: 8rem; }

/* Worlds */
.worlds-section { background: #e6f0e8; background-image: radial-gradient(circle at 3% 6%, #fff9e6 0, transparent 32%), radial-gradient(circle at 96% 72%, #cde9dc 0, transparent 33%); }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 48px; }
.section-intro .display-title { margin-bottom: 0; }
.accent-coral { color: #e9764d; }
.section-intro > p { max-width: 360px; margin-bottom: 7px; color: #526d66; font-size: 1.06rem; line-height: 1.7; font-weight: 700; }
.worlds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.world-card { position: relative; display: block; overflow: hidden; width: 100%; min-height: 366px; padding: 0; border: 0; border-radius: 30px; color: #fff; background: #346e64; text-align: left; cursor: pointer; isolation: isolate; box-shadow: 0 16px 36px rgba(21,76,52,.12); transition: transform .3s ease, box-shadow .3s ease; }
.world-card:hover { transform: translateY(-7px); box-shadow: 0 25px 45px rgba(21,76,52,.22); }
.world-card img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.world-card:hover img { transform: scale(1.07); }
.world-card--dino img { object-position: center 43%; }
.world-card--forest img { object-position: center 45%; }
.world-card-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, rgba(3,35,32,.88), rgba(3,35,32,.02) 68%), linear-gradient(180deg, rgba(7,46,38,.3), transparent 34%); }
.world-card-number { position: absolute; top: 26px; left: 28px; padding: 9px 14px; border: 1px solid rgba(255,255,255,.6); border-radius: 99px; background: rgba(8,48,41,.23); backdrop-filter: blur(6px); font-size: .76rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.world-card-info { position: absolute; right: 85px; bottom: 27px; left: 30px; display: flex; flex-direction: column; gap: 5px; }
.world-card-info strong { font: 800 clamp(1.8rem, 2.9vw, 2.7rem)/1.05 var(--heading); letter-spacing: -.02em; }
.world-card-info small { color: #e7f7e9; font-size: .9rem; font-weight: 800; }
.world-card-arrow { position: absolute; right: 28px; bottom: 31px; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; color: var(--deepest); background: var(--sun); font-size: 1.35rem; transition: transform .3s ease; }
.world-card:hover .world-card-arrow { transform: rotate(45deg); }
.space-note { position: relative; display: grid; grid-template-columns: 145px 1fr auto; align-items: center; gap: 30px; overflow: hidden; min-height: 198px; margin-top: 24px; padding: 27px 48px; border-radius: 29px; color: #fff; background: radial-gradient(circle at 2% 90%, #316c83 0, transparent 24%), linear-gradient(120deg, #153f5c, #112943 65%, #0a233b); }
.space-note::before, .space-note::after { content: '✦'; position: absolute; color: rgba(255,255,255,.45); }
.space-note::before { top: 22px; right: 70px; font-size: 1.6rem; }
.space-note::after { bottom: 18px; left: 31%; font-size: .9rem; }
.space-planet { position: relative; width: 126px; height: 126px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #a6e3cc, #4ab7bc 35%, #32749a 66%, #143b79); box-shadow: inset -15px -17px 25px rgba(8,22,83,.32), 0 0 27px rgba(133,207,228,.25); }
.space-planet::after { content: ''; position: absolute; top: 44%; left: -23%; width: 151%; height: 21%; border: 8px solid #edcb81; border-radius: 50%; transform: rotate(-21deg); opacity: .86; }
.space-planet i { position: absolute; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: rgba(222,255,250,.52); }
.space-planet i:nth-child(1) { left: 32%; top: 20%; }
.space-planet i:nth-child(2) { left: 60%; top: 38%; width: 17px; height: 17px; }
.space-planet i:nth-child(3) { left: 32%; top: 69%; width: 20px; height: 8px; }
.space-badge { display: inline-block; margin-bottom: 7px; color: #b2e3df; font-size: .73rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.space-note h3 { margin-bottom: 5px; font: 800 clamp(1.5rem, 2.4vw, 2.1rem)/1.1 var(--heading); }
.space-note h3 em { color: var(--sun); font-style: normal; }
.space-note p { max-width: 640px; margin-bottom: 0; color: #d5e7e7; font-size: .92rem; line-height: 1.5; }
.space-stars { padding-right: 2px; color: var(--sun); font-size: 1.5rem; white-space: nowrap; }

/* Friends */
.friends-section { background: #fff9ed; }
.friends-heading { max-width: 850px; margin: 0 auto 54px; text-align: center; }
.friends-heading .display-title { margin-bottom: 18px; }
.friends-heading > p:last-child { max-width: 590px; margin-inline: auto; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.friends-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 20px; }
.friend-card { overflow: hidden; border: 1px solid #eee9d8; border-radius: 28px; background: white; box-shadow: 0 13px 28px rgba(52,71,45,.06); transition: transform .3s ease, box-shadow .3s ease; }
.friend-card:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 24px 39px rgba(52,71,45,.13); }
.friend-picture { position: relative; height: 275px; overflow: hidden; }
.friend-picture img { width: 100%; height: 100%; object-fit: cover; }
.friend-picture--miguel { background: #f9e1a8; }
.friend-picture--miguel img { object-fit: contain; object-position: center bottom; }
.friend-doodle { position: absolute; right: 20px; top: 15px; color: #fff7bf; font-size: 2.7rem; }
.friend-picture--faisca { background: #d9edac url('assets/faisca-poses.webp') left top / 420% auto no-repeat; }
.friend-picture--pocoto { background: #b7e8f2 url('assets/pocoto-poses.webp') 0% 46% / 360% auto no-repeat; }
.friend-picture--pesco { background: #f5c89b; }
.friend-picture--pesco img { object-fit: contain; object-position: center 37%; }
.friend-details { padding: 25px 22px 30px; }
.friend-type { color: #bd7946; font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.friend-details h3 { margin: 6px 0 5px; color: var(--ink); font: 800 2.1rem/1.05 var(--heading); }
.friend-details p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; font-weight: 700; }

/* Future game */
.next-section { position: relative; overflow: hidden; padding-block: 112px; color: #fff; background: radial-gradient(circle at 18% 75%, rgba(65,143,121,.45), transparent 28%), radial-gradient(circle at 85% 18%, rgba(62,132,118,.27), transparent 25%), #123f3c; }
.next-section::before { content: '✦'; position: absolute; top: 30px; left: 7%; color: rgba(255,225,145,.15); font-size: 9rem; }
.next-layout { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 75px; }
.next-copy h2 { max-width: 570px; margin-bottom: 18px; font: 800 clamp(3rem, 4.9vw, 5.1rem)/1 var(--heading); letter-spacing: -.04em; }
.next-copy h2 em { color: var(--sun); font-style: normal; }
.next-copy > p:not(.eyebrow) { max-width: 480px; color: #d4e9dc; font-size: 1.08rem; font-weight: 700; line-height: 1.7; }
.development-pill { display: inline-flex; align-items: center; gap: 11px; margin-top: 18px; padding: 13px 20px; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; color: #e3f3e9; background: rgba(255,255,255,.07); font-size: .83rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.development-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 5px rgba(255,206,80,.15); }
.next-art { position: relative; height: 390px; perspective: 1200px; }
.next-art-card { position: absolute; overflow: hidden; width: 67%; height: 290px; border: 8px solid #fff; border-radius: 22px; background: #c5eec8; box-shadow: 0 25px 50px rgba(0,0,0,.22); }
.next-art-card img { width: 100%; height: 100%; object-fit: cover; }
.next-art-card--back { top: 20px; right: 0; transform: rotate(11deg) scale(.92); }
.next-art-card--middle { top: 85px; left: 9%; transform: rotate(-13deg) scale(.92); }
.next-art-card--front { top: 50px; left: 24%; transform: rotate(2deg); }
.next-art-star { position: absolute; z-index: 2; top: -23px; right: 12%; color: var(--sun); font-size: 6rem; text-shadow: 0 0 23px rgba(255,206,80,.48); animation: twinkle 3s ease-in-out infinite alternate; }

/* Ending and footer */
.closing-section { position: relative; overflow: hidden; padding: 92px 0 100px; text-align: center; background: #ffe7ae; background-image: radial-gradient(circle at 10% 25%, #fff2d4, transparent 26%), radial-gradient(circle at 88% 80%, #f9cb7c, transparent 28%); }
.closing-inner { position: relative; }
.closing-sparkle { display: inline-grid; place-items: center; width: 76px; height: 76px; margin-bottom: 22px; border-radius: 50%; color: #a96032; background: rgba(255,255,255,.62); font-size: 2.7rem; }
.closing-section p { margin-bottom: 10px; font-size: 1.08rem; font-weight: 900; }
.closing-section h2 { max-width: 920px; margin: 0 auto 30px; font: 800 clamp(3.25rem, 6vw, 6rem)/1 var(--heading); letter-spacing: -.045em; }
.closing-section h2 em { color: #e36f48; font-style: normal; }
.button--dark { color: #fff; background: var(--ink); box-shadow: 0 6px 0 #0b2c2b; }
.button--dark:hover { background: #285552; box-shadow: 0 10px 0 #0b2c2b; }
.site-footer { padding: 52px 0 20px; color: #d4e7db; background: #0b3030; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-bottom: 42px; }
.footer-brand { display: flex; align-items: center; gap: 17px; color: #fff; font: 800 1.3rem/1.13 var(--heading); }
.footer-brand img { width: 75px; height: 75px; border-radius: 17px; }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: .89rem; font-weight: 900; }
.footer-top nav a:hover, .footer-bottom a:hover { color: var(--sun); }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding-top: 21px; border-top: 1px solid rgba(255,255,255,.13); }
.footer-bottom small { font-size: .78rem; font-weight: 700; }
.footer-bottom a { color: #fff; font-weight: 900; }

/* World detail dialog */
.world-dialog { position: fixed; inset: 0; width: min(920px, calc(100% - 32px)); max-height: min(88vh, 740px); padding: 0; border: 0; border-radius: 28px; color: var(--ink); background: var(--paper); box-shadow: 0 28px 85px rgba(0,0,0,.3); }
.world-dialog[open] { display: grid; grid-template-columns: 1.1fr .9fr; }
.world-dialog::backdrop { background: rgba(6, 34, 32, .79); backdrop-filter: blur(8px); }
.world-dialog > img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.dialog-content { display: flex; flex-direction: column; justify-content: center; padding: 58px 42px; }
.dialog-content .eyebrow { color: #c67d42; font-size: .71rem; }
.dialog-content h2 { margin-bottom: 13px; font: 800 clamp(2.7rem, 4vw, 4rem)/1 var(--heading); letter-spacing: -.03em; }
.dialog-content > p { color: #60706d; font-size: 1rem; line-height: 1.75; font-weight: 700; }
.dialog-close { position: absolute; z-index: 3; top: 14px; right: 15px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; color: var(--deepest); background: #ffde7d; font-size: 2rem; line-height: 1; cursor: pointer; }
.dialog-return { align-self: flex-start; margin-top: 13px; padding: 0 0 6px; border: 0; border-bottom: 2px solid #e38c48; color: var(--ink); background: transparent; font-weight: 900; cursor: pointer; }
.dialog-return span { margin-left: 8px; }

/* Entrance animation is decorative only; content remains visible without JS. */
.has-js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .75s ease, transform .75s cubic-bezier(.2,.7,.2,1); }
.has-js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@keyframes hero-in { from { transform: scale(1.08); filter: saturate(.85); } to { transform: scale(1); filter: saturate(1); } }
@keyframes content-in { from { opacity: 0; transform: translateY(35px); } to { opacity: 1; transform: translateY(0); } }
@keyframes twinkle { 0% { opacity: .45; transform: scale(.8) rotate(0); } 100% { opacity: 1; transform: scale(1.18) rotate(12deg); } }
@keyframes bob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 1100px) {
  .nav-links { gap: 18px; font-size: .83rem; }
  .brand { min-width: 185px; }
  .world-card { min-height: 310px; }
  .friends-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .friend-picture { height: 300px; }
}

@media (max-width: 800px) {
  .container { width: min(100% - 40px, 680px); }
  .site-header { padding: 12px 0; }
  .nav-wrap { position: relative; }
  .brand { min-width: 0; font-size: 1.08rem; }
  .brand img { width: 52px; height: 52px; border-radius: 15px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 45px; height: 45px; padding: 11px; border: 1px solid rgba(255,255,255,.65); border-radius: 14px; background: rgba(255,255,255,.12); cursor: pointer; }
  .menu-toggle span { width: 100%; height: 2px; border-radius: 3px; background: #fff; }
  .site-header.is-scrolled .menu-toggle { border-color: #bacabd; background: #fff; }
  .site-header.is-scrolled .menu-toggle span { background: var(--ink); }
  .nav-links { position: absolute; top: calc(100% + 13px); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 13px; border: 1px solid #e9ead9; border-radius: 20px; color: var(--ink); background: var(--cream); box-shadow: 0 17px 40px rgba(8,33,27,.18); }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 15px 16px; font-size: .97rem; }
  .nav-links .nav-cta { margin-top: 7px; text-align: center; }
  .hero { min-height: 740px; }
  .hero-shade { background: linear-gradient(90deg, rgba(7,37,33,.93), rgba(7,42,38,.62) 72%, rgba(7,42,38,.24)), linear-gradient(0deg, rgba(7,37,33,.45), transparent 30%); }
  .hero-content { padding-block: 160px 124px; }
  .hero h1 { font-size: clamp(3.65rem, 8vw, 5.5rem); }
  .hero-bottom { width: calc(100% - 40px); }
  .story-layout, .next-layout { grid-template-columns: 1fr; gap: 55px; }
  .story-copy { max-width: 590px; }
  .story-art { max-width: 590px; margin-inline: auto; }
  .section-intro { flex-direction: column; align-items: start; gap: 18px; }
  .section-intro > p { max-width: 600px; }
  .space-note { grid-template-columns: 110px 1fr; padding: 30px; }
  .space-planet { width: 100px; height: 100px; }
  .space-stars { display: none; }
  .next-art { width: min(590px, 100%); margin: 0 auto; }
}

@media (max-width: 580px) {
  .container { width: calc(100% - 32px); }
  .section-pad { padding-block: 78px; }
  .hero { min-height: 740px; min-height: 100svh; }
  .hero-image { object-position: 59% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(6,35,33,.89), rgba(6,35,33,.54)), linear-gradient(0deg, rgba(5,34,30,.8), transparent 36%); }
  .hero-content { align-items: center; padding-block: 140px 124px; }
  .hero h1 { max-width: 530px; font-size: clamp(3.35rem, 12vw, 4.4rem); }
  .hero-lead { font-size: .98rem; line-height: 1.57; }
  .hero-actions { gap: 11px; }
  .button { min-height: 51px; padding: 13px 20px; font-size: .84rem; }
  .hero-bottom { bottom: 18px; width: calc(100% - 32px); }
  .hero-note { max-width: 160px; font-size: .7rem; }
  .scroll-cue span:first-child { display: none; }
  .scroll-line { width: 41px; height: 41px; }
  .hero-sparkle--one { left: 80%; top: 27%; }
  .hero-sparkle--two { display: none; }
  .story-ribbon-track { min-height: 57px; gap: 25px; font-size: 1.3rem; }
  .display-title { font-size: clamp(2.85rem, 10.2vw, 4rem); }
  .ink-underline { white-space: normal; }
  .story-art { padding: 5px 17px 40px 0; }
  .story-image-frame { border-width: 6px; border-bottom-width: 63px; border-radius: 22px; }
  .story-image-frame figcaption { bottom: -48px; font-size: .74rem; }
  .story-sticker { width: 104px; height: 104px; right: -7px; bottom: -8px; padding: 8px; border-width: 4px; font-size: .7rem; }
  .story-sticker strong { font-size: .8rem; }
  .story-sticker span:last-child { margin-top: 3px; }
  .worlds-grid { grid-template-columns: 1fr; gap: 16px; }
  .world-card { min-height: 320px; border-radius: 23px; }
  .world-card-info strong { font-size: 2rem; }
  .world-card-info small { font-size: .79rem; }
  .world-card-info { right: 72px; bottom: 24px; left: 23px; }
  .world-card-number { top: 19px; left: 22px; }
  .world-card-arrow { right: 20px; bottom: 25px; width: 42px; height: 42px; }
  .space-note { grid-template-columns: 1fr; gap: 10px; padding: 30px 25px; }
  .space-planet { width: 85px; height: 85px; margin-bottom: 7px; }
  .space-note h3 { font-size: 1.75rem; }
  .friends-heading { margin-bottom: 38px; }
  .friends-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .friend-card { border-radius: 20px; }
  .friend-picture { height: 190px; }
  .friend-details { padding: 20px 14px 24px; }
  .friend-details h3 { font-size: 1.72rem; }
  .friend-type { font-size: .59rem; }
  .friend-details p { font-size: .78rem; }
  .next-section { padding-block: 82px 55px; }
  .next-copy h2 { font-size: clamp(2.95rem, 11vw, 4.3rem); }
  .next-art { height: 290px; }
  .next-art-card { height: 195px; border-width: 5px; border-radius: 15px; }
  .next-art-card--back { top: 15px; }
  .next-art-card--middle { top: 59px; }
  .next-art-card--front { top: 40px; }
  .next-art-star { font-size: 4rem; }
  .closing-section { padding-block: 70px; }
  .closing-section h2 { font-size: clamp(3.1rem, 12vw, 4.8rem); }
  .footer-top { flex-direction: column; align-items: start; gap: 28px; }
  .footer-top nav { gap: 15px 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .world-dialog[open] { display: flex; flex-direction: column; }
  .world-dialog { max-height: 90vh; overflow-y: auto; border-radius: 23px; }
  .world-dialog > img { height: 265px; min-height: 0; flex: none; }
  .dialog-content { padding: 30px 25px 36px; }
  .dialog-content h2 { font-size: 2.8rem; }
  .dialog-content > p { font-size: .92rem; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 3.1rem; }
  .hero-actions .button { width: 100%; }
  .friend-picture { height: 155px; }
  .friends-grid { gap: 9px; }
  .friend-details { padding-inline: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .has-js [data-reveal] { opacity: 1; transform: none; }
}
