/* Pixely Media: styles modelled on the original Cortex theme settings */
:root {
  --pink: #ff2c54;
  --teal: #41ebdf;
  --plum: #41294a;
  --navy: #0d5382;
  --ink: #151515;
  --side-w: 400px;
  --ease-out: cubic-bezier(.15, .7, .54, .99);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 16px; line-height: 25px; font-weight: 300;
  color: var(--ink); background: #fff;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; }
h1, h2 { margin: 0; }
section[id] { scroll-margin-top: 65px; }

/* Page pushes left when the side menu opens */
.page { position: relative; left: 0; transition: left .2s ease; }
body.menu-open .page { left: calc(-1 * var(--side-w)); }

/* ---------- Header ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30; height: 120px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 44px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font-weight: 800; font-size: 22px; letter-spacing: .05em; text-transform: uppercase; }
.brand-name b { color: var(--pink); font-weight: 800; }
.menu-btn { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--pink); font-size: 30px; line-height: 0; transition: color .15s; }
.menu-btn:hover { color: var(--plum); }

.sticky-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 65px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 44px;
  background: #fff; border-bottom: 1px solid #d5d5d5;
  transform: translateY(-100%); transition: transform .3s ease, left .2s ease, right .2s ease;
}
body.menu-open .sticky-header { left: calc(-1 * var(--side-w)); right: var(--side-w); }
body.menu-open .back-to-top { opacity: 0; visibility: hidden; }
.sticky-header.show { transform: translateY(0); }
.sticky-header .brand-name { font-size: 18px; }
.sticky-header .menu-btn { color: #000; font-size: 26px; }
.sticky-header .menu-btn:hover { color: var(--pink); }

/* ---------- Side menu ---------- */
.side-panel {
  position: fixed; top: 0; right: calc(-1 * var(--side-w)); width: var(--side-w); height: 100%; z-index: 9999;
  background: rgba(65,41,74,.95); color: #fff; padding: 74px 49px 30px; text-align: center;
  transition: right .2s ease, visibility .2s; overflow-y: auto; visibility: hidden;
}
body.menu-open .side-panel { right: 0; visibility: visible; }
.side-panel p { color: #fff; font-size: 16px; line-height: 26px; }
.side-logo { margin: 0 auto 10px; background: #fff; border-radius: 50%; padding: 12px; width: 96px; }
.side-panel nav { display: grid; gap: 14px; margin: 30px 0; }
.side-panel nav a { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .05em; transition: color .15s ease-out; }
.side-panel nav a:hover { color: var(--pink); }
.side-small { font-size: 14px !important; }
.side-small a { color: var(--teal); transition: color .15s; }
.side-small a:hover { color: var(--pink); }
.close-btn {
  position: absolute; top: 46px; right: 54px; background: none; border: 0; cursor: pointer;
  color: var(--pink); font-size: 27px; line-height: 0; padding: 0; transition: transform .5s ease;
}
.close-btn:hover { transform: rotate(180deg); }
.scrim { position: fixed; inset: 0; z-index: 9998; display: none; cursor: pointer; }
body.menu-open .scrim { display: block; }

/* ---------- Buttons (layered pink and teal shadows) ---------- */
.btn {
  position: relative; display: inline-block; margin: 5px; text-decoration: none;
  font-weight: 700; font-size: 14px; line-height: 1.5em; letter-spacing: .03em; text-transform: uppercase;
  background: var(--plum); color: #fff; transition: background-color .15s ease-out;
}
.btn-text { position: relative; z-index: 2; display: block; padding: 16px 52px; background: inherit; }
.btn-top, .btn-bottom { position: absolute; width: calc(100% + 5px); height: calc(100% + 5px); }
.btn-top { left: -5px; top: -5px; background: var(--pink); z-index: 1; transition: transform .4s ease-out; }
.btn-bottom { right: -5px; bottom: -5px; background: var(--teal); transition: transform .6s ease-out .1s; }
.btn:hover { background: var(--pink); }
.btn:hover .btn-top { transform: translate(5px, 5px); }
.btn:hover .btn-bottom { transform: translate(-5px, -5px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 620px; max-height: 1000px;
  overflow: hidden; background: #fff;
}
.layer { position: absolute; inset: 0; pointer-events: none; transition: transform 1.2s cubic-bezier(.215,.61,.355,1); will-change: transform; }
.layer > * { position: absolute; }
.hero-bg {
  /* full bleed: the painting covers the whole hero */
  left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  animation: fadeIn 1.5s .9s cubic-bezier(.16,1,.3,1) both;
}
.hero-burst {
  /* original: 563x545 on a 1300x868 grid, scaled to fit the screen */
  width: min(563px, 43.3vw, 64.9vh); left: 50%; top: 50%; transform: translate(-55.5%, -47.6%);
  animation: fadeIn .3s .06s both;
}
.hero-word-wrap > .imagine {
  --w: min(909px, 69.9vw, 104.7vh);
  width: var(--w); left: 50%; top: 50%; margin-left: calc(var(--w) / -2); margin-top: calc(var(--w) * -0.115);
}
.i1 { animation: elasticUp 1s .81s both; }
.i3 { animation: elasticUp 1s .9s both; }
.i4 { animation: elasticDown 1s .81s both; }
.hero-tag {
  left: 0; right: 0; top: calc(50% + min(110px, 13vw)); text-align: center;
  color: var(--pink); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1;
  animation: slideUp .7s 1.1s cubic-bezier(.215,.61,.355,1) both;
}
.hero-star { width: min(155px, 15vw); left: 13%; top: 12%; animation: fromRight .7s .81s cubic-bezier(.16,1,.3,1) both; }
.hero-cloud { width: min(331px, 26vw); right: -2%; top: 34%; animation: fromRight .7s 1s cubic-bezier(.16,1,.3,1) both; }
.hero-lola { width: min(228px, 20vw); left: 8%; bottom: 3%; animation: fromLeft .7s 1.2s cubic-bezier(.16,1,.3,1) both; }
.hero-star .wave { animation: wave 14s linear infinite 1.6s; }
.hero-cloud .wave { animation: wave 16s linear infinite 1.8s reverse; }
.hero-lola .wave { animation: wave 18s linear infinite 2s; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 30px; width: 34px; margin-left: -17px; z-index: 5;
  animation: dropIn .8s .81s cubic-bezier(.16,1,.3,1) both;
}
.scroll-cue img { animation: slideLoop 1.6s ease-in-out infinite 1.7s; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes elasticUp {
  0% { opacity: 0; transform: translateY(50px); }
  40% { opacity: 1; transform: translateY(-12px); }
  60% { transform: translateY(5px); }
  80% { transform: translateY(-2px); }
  100% { transform: none; }
}
@keyframes elasticDown {
  0% { opacity: 0; transform: translateY(-50px); }
  40% { opacity: 1; transform: translateY(12px); }
  60% { transform: translateY(-5px); }
  80% { transform: translateY(2px); }
  100% { transform: none; }
}
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } }
@keyframes fromRight { from { opacity: 0; transform: translateX(60vw); } }
@keyframes fromLeft { from { opacity: 0; transform: translateX(-60vw); } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-60vh); } }
@keyframes slideLoop { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(14px); } }
@keyframes wave {
  0% { transform: rotate(0deg) translateX(var(--r, 18px)) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(var(--r, 18px)) rotate(-360deg); }
}

/* ---------- Parallax call to action ---------- */
.pcta {
  position: relative; z-index: 0; overflow: hidden;
  padding: 300px 8vw 200px; color: var(--navy);
}
.pcta-content { position: relative; will-change: transform; }
.pcta-title { max-width: 70%; color: inherit; font-size: min(7.8vmax, 10vw, 130px); font-weight: 700; line-height: 1em; letter-spacing: -.04em; }
.pcta-sep { display: block; width: 3px; height: 113px; margin: 15px 0 15px 110px; background: #cdcdcd; }
.pcta-text { max-width: 34vmax; color: inherit; font-size: 24px; font-weight: 500; line-height: 1.4; margin: 0 0 40px; }
.pcta-images { position: absolute; top: 50%; right: 4vw; width: 40%; transform: translateY(-50%); z-index: -1; }
.pcta-images img { will-change: transform; }
.pcta-main { width: 100%; height: auto; }
.pcta-main.rounded { border-radius: 10px; box-shadow: 0 25px 60px rgba(0,0,0,.35); }
.pcta-extra { position: absolute; left: -17%; bottom: -18%; width: 55%; z-index: -1; }
.pcta-photo { color: #fff; background: url(images/digital-bg.jpg) center / cover no-repeat; }
.pcta-photo::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(20,12,30,.55), rgba(20,12,30,.15)); }
.pcta-photo .pcta-sep { background: rgba(255,255,255,.6); }

/* ---------- Books ---------- */
.books { padding: 60px 30px 25px; background: #fff; }
.amazon {
  display: block; width: 300px; max-width: 80%; margin: 0 auto 50px;
  border: 10px solid #fff; border-radius: 10px; box-shadow: 0 0 0 1px #eee;
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.amazon:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.book-grid {
  display: grid; gap: 20px; max-width: 1400px; margin: 0 auto;
  grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 2 / 1;
}
.book { position: relative; overflow: hidden; }
.book-tall { grid-row: span 2; }
.book-img { position: absolute; inset: 0; transition: transform .5s var(--ease-out); }
.book-img img { width: 100%; height: 100%; object-fit: cover; }
.book:hover .book-img { transform: scale(1.1); }
.book-overlay {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: zoom-in; padding: 0;
  background: rgba(65,41,74,.8); opacity: 0; transition: opacity .4s;
  display: grid; place-items: center; color: var(--pink); font-size: 56px;
}
.book-overlay svg { transform: translate3d(-20px, 20px, 0) scale(.3); transition: transform .25s cubic-bezier(.78,.33,.54,.99); }
.book:hover .book-overlay, .book-overlay:focus-visible { opacity: 1; }
.book:hover .book-overlay svg, .book-overlay:focus-visible svg { transform: none; }

/* Reveal on scroll (zoomIn, like animate.css) */
.js .reveal, .js .zoom-in { opacity: 0; }
.reveal.in, .zoom-in.in { animation: zoomIn .9s cubic-bezier(.16,1,.3,1) both; }
@keyframes zoomIn { from { opacity: 0; transform: scale3d(.3,.3,.3); } 50% { opacity: 1; } to { opacity: 1; transform: none; } }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1fr 2fr; align-items: center;
  padding: 149px 4vw 155px; background: #f2f2f2 url(images/colorful-1.png) center / cover no-repeat;
  color: #fff; overflow: hidden;
}
.contact-art { will-change: opacity; }
.contact-art img { width: min(353px, 100%); margin: 0 auto; border-radius: 5px; }
.contact-text { text-align: center; padding-top: 120px; }
.contact h2 { font-size: clamp(36px, 4.2vw, 60px); font-weight: 700; letter-spacing: -.04em; line-height: 1em; }
.subtitle { display: block; max-width: 32%; min-width: 300px; margin: 45px auto 40px; color: #fff; font-size: 21px; line-height: 30px; font-weight: 400; letter-spacing: -.01em; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px;
  padding: 30px 4vw; background: var(--plum); color: #fff; font-size: 14px;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--teal); transition: color .15s; }
.site-footer a:hover { color: var(--pink); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 44px; bottom: 65px; width: 44px; height: 44px; z-index: 900;
  opacity: 0; visibility: hidden; transform: translateY(30px); transition: all .35s var(--ease-out);
}
.back-to-top.on { opacity: 1; visibility: visible; transform: none; }
.btt-icon { position: relative; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; background: var(--plum); color: #fff; font-size: 24px; }
.btt-top, .btt-bottom { position: absolute; width: calc(100% + 3px); height: calc(100% + 3px); }
.btt-top { left: -3px; top: -3px; background: var(--pink); z-index: 1; transition: transform .4s ease-out; }
.btt-bottom { right: -3px; bottom: -3px; background: var(--teal); transition: transform .6s ease-out .1s; }
.back-to-top:hover .btt-top { transform: translate(3px, 3px); }
.back-to-top:hover .btt-bottom { transform: translate(-3px, -3px); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 10001; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; gap: 20px; padding: 40px;
  animation: fadeIn .3s;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1100px, 80vw); text-align: center; }
.lightbox img { max-height: 76vh; width: auto; margin: 0 auto; border: 8px solid #fff; animation: zoomIn .4s both; }
.lightbox figcaption { color: #fff; margin-top: 16px; font-weight: 500; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.lb-buy { color: var(--teal); font-weight: 700; }
.lb-buy:hover { color: var(--pink); }
.lb-buy[hidden] { display: none; }
.lb-count { color: #aaa; }
.lightbox button { background: none; border: 0; color: #fff; cursor: pointer; font-size: 40px; line-height: 0; padding: 8px; transition: color .15s, transform .5s; }
.lightbox button:hover { color: var(--pink); }
.lb-close { position: absolute; top: 20px; right: 24px; font-size: 32px !important; }
.lb-close:hover { transform: rotate(180deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pcta { padding: 200px 6vw 100px; }
  .subtitle { max-width: 60%; }
}
@media (max-width: 768px) {
  :root { --side-w: 300px; }
  .site-header { height: 90px; padding: 0 20px; }
  .sticky-header { padding: 0 20px; }
  .brand-name { font-size: 18px; }
  .brand img { width: 40px; height: auto; }
  .hero { min-height: 560px; }
  .hero-lola { width: 28vw; left: 4%; }
  .hero-cloud { width: 32vw; top: 22%; }
  .hero-star { width: 18vw; left: 6%; top: 16%; }
  .pcta { padding: 120px 7vw 80px; display: flex; flex-direction: column; }
  .pcta-title { max-width: none; font-size: 13vw; }
  .pcta-sep { height: 70px; margin-left: 60px; }
  .pcta-text { font-size: 20px; max-width: none; }
  .pcta-images { position: relative; top: auto; right: auto; transform: none; width: 80%; margin: 80px auto 40px; }
  .book-grid { grid-template-columns: 1fr; grid-template-rows: none; aspect-ratio: auto; }
  .book { aspect-ratio: 2 / 1; }
  .book-tall { grid-row: auto; aspect-ratio: 1; }
  .contact { grid-template-columns: 1fr; padding: 90px 7vw; }
  .contact-text { padding-top: 30px; }
  .contact-art img { width: 60%; }
  .subtitle { max-width: none; min-width: 0; }
  .back-to-top { right: 20px; bottom: 24px; }
  .lightbox { padding: 16px; gap: 4px; }
  .lightbox figure { max-width: 86vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal, .js .zoom-in { opacity: 1; }
}
