/* ============================================================
   Paw Chronicles custom styles
   Palette: orange #ff923c, coral accent #ff6a3d, soft cream #fffaf3
   Fonts: Poppins for body, Caveat for handwritten accents
   Animations are transform/opacity-only and respect
   prefers-reduced-motion. Scroll-hidden states are gated behind
   html.js so content stays visible without JavaScript.
   ============================================================ */

:root {
    --pc-orange: #ff923c;
    --pc-orange-dark: #f07725;
    --pc-coral: #ff6a3d;
    --pc-yellow: #ffd340;
    --pc-cream: #fffaf3;
    --pc-ink: #2b2118;
    --pc-muted: #6b6258;
    --pc-border: #f1e6d6;
    --pc-plum: #54387c;
    --pc-shadow: 0 10px 30px -12px rgba(255, 146, 60, 0.35);
    --pc-shadow-soft: 0 4px 20px -8px rgba(40, 30, 20, 0.12);
    --pc-radius: 18px;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--pc-ink);
    background: var(--pc-cream);
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pc-ink);
}

.handwritten {
    font-family: "Caveat", "Brush Script MT", cursive;
    font-weight: 700;
    letter-spacing: 0;
}

a {
    color: var(--pc-coral);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--pc-orange-dark);
}

:focus-visible {
    outline: 3px solid rgba(240, 119, 37, 0.65);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Inline SVG icons (replaces the Bootstrap Icons font) */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    fill: currentColor;
    flex-shrink: 0;
}

/* Anchored sections shouldn't hide their heading under the fixed navbar */
section[id] {
    scroll-margin-top: 84px;
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
    position: fixed;
    top: -60px;
    left: 12px;
    z-index: 1200;
    background: var(--pc-ink);
    color: #fff;
    padding: .6rem 1.1rem;
    border-radius: 0 0 12px 12px;
    font-weight: 600;
    transition: top .25s ease;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1100;
    background: linear-gradient(90deg, var(--pc-yellow), var(--pc-orange), var(--pc-coral));
    transform: scaleX(var(--sp, 0));
    transform-origin: 0 50%;
    pointer-events: none;
}

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(255, 250, 243, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid rgba(255, 146, 60, 0.12);
    padding: 0.6rem 0;
    transition: box-shadow .25s ease, padding .25s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 18px -10px rgba(40, 30, 20, 0.15);
    padding: 0.4rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-family: "Caveat", cursive;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--pc-ink) !important;
    line-height: 1;
}

.navbar-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.navbar-brand:hover img {
    transform: rotate(-10deg) scale(1.08);
}

.nav-link {
    font-weight: 500 !important;
    font-size: 1rem !important;
    color: var(--pc-ink) !important;
    padding: .5rem 1rem !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: .35rem;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--pc-orange);
    border-radius: 2px;
    transition: width .25s, left .25s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
    left: 20%;
}

.navbar-toggler {
    border: 0;
    padding: .25rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.btn-nav-buy {
    background: linear-gradient(135deg, var(--pc-yellow), var(--pc-orange));
    color: #fff !important;
    border-radius: 999px;
    padding: .5rem 1.1rem !important;
    font-weight: 600 !important;
    box-shadow: var(--pc-shadow);
    transition: transform .2s, box-shadow .2s;
}

.btn-nav-buy:hover {
    transform: translateY(-1px);
    color: #fff !important;
    box-shadow: 0 14px 30px -10px rgba(255, 106, 61, 0.55);
}

.btn-nav-buy::after {
    display: none;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 999px;
    padding: .7rem 1.6rem;
    font-weight: 600;
    transition: transform .2s, box-shadow .25s, background .25s;
}

.btn-primary,
.btn.btn-primary {
    background: linear-gradient(135deg, var(--pc-yellow) 0%, var(--pc-orange) 55%, var(--pc-coral) 100%);
    background-size: 200% 200%;
    border: 0;
    color: #fff;
    box-shadow: var(--pc-shadow);
}

.btn-primary:hover,
.btn.btn-primary:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -10px rgba(255, 106, 61, 0.5);
    color: #fff;
}

.btn-outline-dark {
    border: 2px solid var(--pc-ink);
    color: var(--pc-ink);
}

.btn-outline-dark:hover {
    background: var(--pc-ink);
    color: #fff;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
    border: 0;
}

.btn-whatsapp:hover {
    background: #1ebe5a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(37, 211, 102, 0.55);
}

.btn-amazon {
    background: #ff9900;
    color: #111;
    border: 0;
}

.btn-amazon:hover {
    background: #e88b00;
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(255, 153, 0, 0.55);
}

/* Shine sweep on key CTAs */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 55%;
    background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, 0.45) 50%, transparent 82%);
    transform: translateX(-180%) skewX(-14deg);
    pointer-events: none;
}

.btn-shine:hover::after {
    animation: shineSweep .85s ease;
}

/* The hero CTA gets a gentle automatic shine to draw the eye */
.hero .btn-primary.btn-shine::after {
    animation: shineAuto 5.5s ease 2.2s infinite;
}

@keyframes shineSweep {
    to { transform: translateX(340%) skewX(-14deg); }
}

@keyframes shineAuto {
    0%   { transform: translateX(-180%) skewX(-14deg); }
    16%  { transform: translateX(340%) skewX(-14deg); }
    100% { transform: translateX(340%) skewX(-14deg); }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4.5rem;
    background: linear-gradient(135deg, #fff6e8 0%, #fff1dc 50%, #ffe7c6 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("../images/hero-1920.webp");
    background-size: cover;
    background-position: center right;
    opacity: .35;
    z-index: 0;
    transform: translate3d(0, var(--hero-py, 0px), 0) scale(1.12);
    will-change: transform;
}

@media (max-width: 767.98px) {
    .hero::before {
        background-image: url("../images/hero-960.webp");
    }
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255, 250, 243, 0.95) 0%, rgba(255, 250, 243, 0.7) 40%, rgba(255, 250, 243, 0.2) 80%);
    z-index: 1;
}

.hero > .container {
    position: relative;
    z-index: 3;
}

/* Ambient floating paw prints (decorative, parallax-driven) */
.hero-ambient {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* Soft aurora glows that breathe behind the hero */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(52px);
    animation: glowDrift 12s ease-in-out infinite alternate;
}

.hg-1 {
    width: 520px;
    height: 520px;
    right: -4%;
    top: 4%;
    background: radial-gradient(circle at 38% 35%, rgba(255, 211, 64, 0.55) 0%, rgba(255, 106, 61, 0.3) 45%, transparent 70%);
}

.hg-2 {
    width: 420px;
    height: 420px;
    left: -8%;
    bottom: -12%;
    background: radial-gradient(circle at 60% 40%, rgba(224, 104, 139, 0.32) 0%, rgba(255, 146, 60, 0.22) 50%, transparent 72%);
    animation-delay: -6s;
}

@keyframes glowDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(0, -34px, 0) scale(1.12); }
}

.float-paw {
    position: absolute;
    width: var(--s, 48px);
    height: var(--s, 48px);
    color: var(--pc-orange);
    opacity: .13;
    fill: currentColor;
    animation: pawDrift var(--d, 10s) ease-in-out infinite alternate;
}

.fp-1 { --s: 64px; top: 16%; left: 5%;  --d: 11s; --r: -18deg; }
.fp-2 { --s: 38px; top: 64%; left: 13%; --d: 8s;  --r: 14deg; }
.fp-3 { --s: 92px; top: 7%;  right: 31%; --d: 13s; --r: 8deg; opacity: .07; }
.fp-4 { --s: 44px; bottom: 11%; right: 39%; --d: 9s; --r: -10deg; }
.fp-5 { --s: 54px; top: 36%; right: 5%; --d: 10s; --r: 20deg; }

@keyframes pawDrift {
    from { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); }
    to   { transform: translate3d(0, -16px, 0) rotate(calc(var(--r, 0deg) + 7deg)); }
}

.hero-eyebrow {
    display: inline-block;
    padding: .35rem .85rem;
    background: rgba(255, 146, 60, 0.14);
    color: var(--pc-orange-dark);
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .04em;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    line-height: 1;
    color: var(--pc-ink);
    margin-bottom: 1rem;
}

.hero h1 .hw {
    display: inline-block;
}

.hero h1 em {
    color: var(--pc-coral);
    font-style: normal;
    position: relative;
    white-space: nowrap;
}

/* Hand-drawn flourish that writes itself under "memories."
   bottom accounts for the .22em paint padding the gradient-ink rule
   adds to the em, keeping the flourish visually under the word. */
.hw-underline {
    position: absolute;
    left: 0;
    bottom: .1em;
    width: 100%;
    height: .26em;
    color: var(--pc-orange);
    opacity: .9;
    overflow: visible;
}

.hw-underline path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: drawLine .9s ease-out 1.1s forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* Hero entrance: staggered rise-in (CSS-only, works without JS) */
.rise {
    animation: riseIn .85s cubic-bezier(.2, .7, .3, 1) both;
}

.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .14s; }
.rise-3 { animation-delay: .24s; }
.rise-4 { animation-delay: .34s; }
.rise-5 { animation-delay: .44s; }
.rise-6 { animation-delay: .58s; }
.rise-7 { animation-delay: .72s; }
.rise-8 { animation-delay: .86s; }

@keyframes riseIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
}

.hero-lead {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: var(--pc-muted);
    margin-bottom: 2rem;
    max-width: 32em;
}

.hero-cta {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}

.hero-meta {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--pc-muted);
    font-size: .95rem;
}

.hero-meta strong {
    color: var(--pc-ink);
    font-weight: 700;
}

/* ---------- Floating book cover ---------- */
.hero-cover {
    position: relative;
    display: inline-block;
    padding-bottom: 38px;
}

/* Flat cover with a gentle bob: simple 2D transforms only, since 3D
   constructions proved unreliable across GPU compositors. */
.book-float {
    animation: bookFloat 7s ease-in-out infinite;
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-13px); }
}

.book-3d {
    position: relative;
    width: min(302px, 68vw);
    margin: 0 auto;
}

.book-3d picture {
    display: contents;
}

.book-front {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 24px 45px -18px rgba(40, 25, 10, 0.4);
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.book-3d:hover .book-front {
    transform: translateY(-6px) rotate(-1deg) scale(1.015);
}

.book-shadow {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 78%;
    height: 28px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(40, 25, 10, 0.32) 0%, transparent 65%);
    filter: blur(5px);
    animation: shadowPulse 7s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 100% { transform: translateX(-50%) scaleX(1); opacity: .9; }
    50%      { transform: translateX(-50%) scaleX(.82); opacity: .55; }
}

/* Little hearts drifting up beside the book */
.hero-hearts {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.heart-float {
    position: absolute;
    width: 18px;
    height: 18px;
    color: var(--pc-coral);
    fill: currentColor;
    opacity: 0;
    animation: heartRise 5.5s ease-in infinite;
}

.hf-1 { right: 6%;  bottom: 34%; }
.hf-2 { right: -3%; bottom: 48%; width: 13px; height: 13px; color: var(--pc-orange); animation-delay: 1.8s; }
.hf-3 { left: -2%;  bottom: 40%; width: 15px; height: 15px; color: #ffb45c; animation-delay: 3.5s; }

@keyframes heartRise {
    0%   { opacity: 0; transform: translateY(0) scale(.6); }
    12%  { opacity: .85; }
    60%  { opacity: .45; }
    100% { opacity: 0; transform: translateY(-110px) scale(1.1) rotate(10deg); }
}

/* Sparkles twinkling around the book */
.book-sparkle {
    position: absolute;
    width: 22px;
    height: 22px;
    color: var(--pc-yellow);
    fill: currentColor;
    opacity: 0;
    animation: sparkleTwinkle 3.6s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 211, 64, 0.8));
}

.bs-1 { top: 6%; right: 4%; }
.bs-2 { top: 32%; left: -4%; width: 15px; height: 15px; animation-delay: 1.7s; }

@keyframes sparkleTwinkle {
    0%, 100% { opacity: 0; transform: scale(.5) rotate(0deg); }
    50%      { opacity: 1;  transform: scale(1) rotate(28deg); }
}

/* Scroll cue: paw prints stepping downward */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 3;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

@media (min-width: 992px) {
    .scroll-cue { display: flex; }
}

.cue-paw {
    width: 16px;
    height: 16px;
    color: var(--pc-orange-dark);
    fill: currentColor;
    opacity: 0;
    animation: cueStep 2.2s ease-in-out infinite;
}

.cue-1 { transform: rotate(172deg) translateX(-4px); }
.cue-2 { transform: rotate(188deg) translateX(4px); animation-delay: .35s; }
.cue-3 { transform: rotate(172deg) translateX(-4px); animation-delay: .7s; }

@keyframes cueStep {
    0%       { opacity: 0; }
    25%      { opacity: .9; }
    55%, 100% { opacity: 0; }
}

/* ---------- Marquee ribbon ---------- */
.marquee {
    position: relative;
    z-index: 4;
    background: linear-gradient(110deg, var(--pc-orange) 0%, var(--pc-coral) 30%, #c2557f 62%, var(--pc-orange) 100%);
    background-size: 220% 100%;
    transform: rotate(-1.2deg) scale(1.02);
    margin: -1.6rem 0 0;
    box-shadow: 0 14px 34px -18px rgba(194, 85, 127, 0.6);
    overflow: hidden;
    animation: marqueeHue 14s linear infinite;
}

@keyframes marqueeHue {
    to { background-position: 220% 0; }
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeMove 32s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-group {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    padding: .85rem 1.1rem .95rem;
    flex: 0 0 auto;
}

.marquee-group span {
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    white-space: nowrap;
    letter-spacing: .02em;
}

.marquee-group .mq-script {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: .01em;
}

.marquee-group .icon {
    width: 15px;
    height: 15px;
    color: rgba(255, 255, 255, 0.75);
}

@keyframes marqueeMove {
    to { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Sections ---------- */
section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title .eyebrow {
    display: inline-block;
    padding: .35rem .85rem;
    background: rgba(255, 146, 60, 0.12);
    color: var(--pc-orange-dark);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-title h2 {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.05;
    margin-bottom: .6rem;
}

.section-title h2 span {
    color: var(--pc-coral);
}

/* Animated gradient ink on highlighted words.
   The padding (offset by negative margins, so layout is unchanged)
   grows the paint box: background-clip: text renders nothing outside
   it, which used to clip Caveat's trailing swashes and descenders. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .section-title h2 span,
    .hero h1 em {
        background: linear-gradient(90deg, var(--pc-coral), var(--pc-orange), #e0688b, var(--pc-coral));
        background-size: 280% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        animation: inkFlow 7s linear infinite;
        padding: .08em .18em .22em;
        margin: -.08em -.18em -.22em;
    }
}

@keyframes inkFlow {
    to { background-position: 280% 0; }
}

.section-title p {
    color: var(--pc-muted);
    max-width: 42rem;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ---------- Features ---------- */
.features {
    background-color: #fff;
    /* faint paw-print wallpaper */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 24 24'%3E%3Cg fill='%23ff923c' fill-opacity='0.045'%3E%3Cellipse cx='7.2' cy='7.8' rx='2' ry='2.7' transform='rotate(-18 7.2 7.8)'/%3E%3Cellipse cx='16.8' cy='7.8' rx='2' ry='2.7' transform='rotate(18 16.8 7.8)'/%3E%3Cellipse cx='3.6' cy='12.6' rx='1.7' ry='2.3' transform='rotate(-34 3.6 12.6)'/%3E%3Cellipse cx='20.4' cy='12.6' rx='1.7' ry='2.3' transform='rotate(34 20.4 12.6)'/%3E%3Cpath d='M12 11.2c3.2 0 5.9 2.4 5.9 5.1 0 2.1-1.6 3.7-3.6 3.7-.85 0-1.6-.26-2.3-.57-.7.31-1.45.57-2.3.57-2 0-3.6-1.6-3.6-3.7 0-2.7 2.7-5.1 5.9-5.1z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 140px 140px;
    padding-top: 6rem;
}

/* Each feature carries one of the book's colour-coded tab colours */
.features .row > div:nth-child(1) { --acc: #4fb3c2; --acc2: #8fd5e0; }  /* details teal */
.features .row > div:nth-child(2) { --acc: #b65aa4; --acc2: #d68cc7; }  /* journal magenta */
.features .row > div:nth-child(3) { --acc: #e0a52e; --acc2: #f0cd6b; }  /* vet gold */
.features .row > div:nth-child(4) { --acc: #68b760; --acc2: #9ed694; }  /* safety green */
.features .row > div:nth-child(5) { --acc: #f08f5c; --acc2: #ffba91; }  /* routines orange */
.features .row > div:nth-child(6) { --acc: #ff6a3d; --acc2: #ff9d7e; }  /* memories coral */

.feature-card {
    background: var(--pc-cream);
    border-radius: var(--pc-radius);
    padding: 2rem 1.5rem;
    height: 100%;
    border: 1px solid var(--pc-border);
    border-top: 4px solid var(--acc, var(--pc-orange));
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px -18px var(--acc, rgba(40, 30, 20, 0.25));
    border-color: var(--acc, rgba(255, 146, 60, 0.35));
}

.feature-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--acc2, var(--pc-yellow)), var(--acc, var(--pc-orange)));
    color: #fff;
    display: grid;
    place-items: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 18px -8px var(--acc, rgba(255, 146, 60, 0.5));
}

.feature-icon .icon {
    width: 26px;
    height: 26px;
}

.feature-card:hover .feature-icon {
    animation: wiggle .5s ease;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(-8deg) scale(1.07); }
    70%      { transform: rotate(7deg) scale(1.07); }
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.feature-card p {
    color: var(--pc-muted);
    font-size: .95rem;
    margin-bottom: 0;
}

/* ---------- Story timeline ---------- */
.story {
    background: linear-gradient(180deg, #fff 0%, var(--pc-cream) 16%, var(--pc-cream) 100%);
    overflow: hidden;
}

.story-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 0 .5rem;
}

.story-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: #f3e7d4;
    border-radius: 4px;
    overflow: hidden;
}

.story-line-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--pc-yellow), var(--pc-orange) 55%, var(--pc-coral));
    transform: scaleY(var(--story-p, 0));
    transform-origin: 50% 0;
}

html:not(.js) .story-line-fill {
    transform: none;
}

.story-chapter {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 84px 1fr;
    align-items: center;
    padding: 2.4rem 0;
}

.chapter-marker {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #eedfc8;
    color: #d9c6a8;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 18px -8px rgba(40, 30, 20, 0.18);
    transform: scale(.62);
    transition: transform .5s cubic-bezier(.34, 1.56, .64, 1),
                background .35s, color .35s, border-color .35s;
    z-index: 1;
}

.chapter-marker .icon {
    width: 26px;
    height: 26px;
}

.story-chapter.active .chapter-marker {
    transform: scale(1);
    background: linear-gradient(135deg, var(--pc-yellow), var(--pc-orange));
    color: #fff;
    border-color: #fff;
}

html:not(.js) .chapter-marker {
    transform: scale(1);
    background: linear-gradient(135deg, var(--pc-yellow), var(--pc-orange));
    color: #fff;
}

.chapter-card {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    text-align: right;
    max-width: 380px;
}

.chapter-visual {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
}

.story-chapter:nth-of-type(even) .chapter-card {
    grid-column: 3;
    justify-self: start;
    text-align: left;
}

.story-chapter:nth-of-type(even) .chapter-visual {
    grid-column: 1;
    justify-self: end;
}

.chapter-eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pc-coral);
    margin-bottom: .35rem;
}

.chapter-card h3 {
    font-family: "Caveat", cursive;
    font-size: 2rem;
    margin-bottom: .4rem;
}

.chapter-card p {
    color: var(--pc-muted);
    font-size: .95rem;
    margin: 0;
}

/* "In the diary" chips link each chapter to the page gallery below */
.chapter-links {
    margin-top: .9rem;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
    justify-content: flex-end;
}

.story-chapter:nth-of-type(even) .chapter-links {
    justify-content: flex-start;
}

.chapter-links-label {
    width: 100%;
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--pc-muted);
    line-height: 1;
}

.page-chip {
    border: 0;
    border-radius: 999px;
    padding: .32rem .85rem .32rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: var(--chip, var(--pc-orange));
    box-shadow: 0 6px 14px -7px var(--chip, var(--pc-orange));
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.page-chip::after {
    content: ' ↓';
    opacity: .8;
}

.page-chip:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow: 0 10px 20px -8px var(--chip, var(--pc-orange));
}

.page-chip:active {
    transform: scale(.96);
}

.chip-details { --chip: #4fb3c2; }
.chip-info    { --chip: #68b760; }
.chip-journal { --chip: #b65aa4; }
.chip-vet     { --chip: #cfa320; }
.chip-memory  { --chip: #f08f5c; }

/* Illustrated chapter scenes (replace page photos so the gallery below
   stays the only place that shows real diary pages) */
.chapter-scene {
    position: relative;
    width: 216px;
    height: 216px;
    transform: scale(.9);
    opacity: .8;
    transition: transform .6s cubic-bezier(.34, 1.56, .64, 1), opacity .4s ease;
}

.story-chapter.active .chapter-scene,
html:not(.js) .chapter-scene {
    transform: scale(1);
    opacity: 1;
}

.scene-disc {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 -14px 30px rgba(0, 0, 0, 0.12), 0 22px 44px -18px var(--glow, rgba(255, 146, 60, 0.55));
    animation: discBreathe 6s ease-in-out infinite;
}

@keyframes discBreathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.035); }
}

.scene-home    .scene-disc { --glow: rgba(255, 154, 60, 0.6);  background: linear-gradient(140deg, #ffd76b 0%, #ff9a3c 100%); }
.scene-grow    .scene-disc { --glow: rgba(63, 182, 168, 0.55); background: linear-gradient(140deg, #9fd86b 0%, #3fb6a8 100%); }
.scene-care    .scene-disc { --glow: rgba(90, 142, 224, 0.55); background: linear-gradient(140deg, #5bc0d8 0%, #5a8ee0 100%); }
.scene-forever .scene-disc { --glow: rgba(138, 90, 168, 0.6);  background: linear-gradient(150deg, #8a5aa8 0%, #c45a83 55%, #ff7a59 100%); }

.scene-main {
    position: absolute;
    width: 44%;
    height: 44%;
    left: 28%;
    top: 28%;
    color: #fff;
    fill: currentColor;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.22));
    animation: sceneBob 5s ease-in-out infinite;
}

@keyframes sceneBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

.scene-rainbow {
    width: 52%;
    height: 52%;
    left: 24%;
    top: 18%;
}

/* growing paw steps */
.scene-step {
    position: absolute;
    color: #fff;
    fill: currentColor;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
    opacity: 0;
    animation: stepPop 4.2s ease-in-out infinite;
}

.st-1 { width: 17%; height: 17%; left: 18%; bottom: 18%; transform: rotate(-14deg); }
.st-2 { width: 25%; height: 25%; left: 38%; bottom: 32%; transform: rotate(4deg);  animation-delay: .5s; }
.st-3 { width: 35%; height: 35%; left: 56%; bottom: 48%; transform: rotate(18deg); animation-delay: 1s; }

@keyframes stepPop {
    0%        { opacity: 0; }
    12%, 78%  { opacity: 1; }
    92%, 100% { opacity: 0; }
}

/* sonar care rings */
.scene-ring {
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.75);
    opacity: 0;
    animation: ringPing 3s ease-out infinite;
}

.sr-2 { animation-delay: 1.5s; }

@keyframes ringPing {
    0%   { opacity: 0;   transform: scale(.55); }
    18%  { opacity: .85; }
    100% { opacity: 0;   transform: scale(1.18); }
}

/* mini decorations */
.scene-mini {
    position: absolute;
    color: #fff;
    fill: currentColor;
    opacity: .92;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

.sm-heart-1 { width: 13%; height: 13%; right: 12%; top: 20%;  color: #ffe1e1; animation: heartRise 4.6s ease-in infinite; }
.sm-heart-2 { width: 9%;  height: 9%;  right: 24%; top: 34%;  color: #fff;    animation: heartRise 4.6s ease-in 2.1s infinite; }
.sm-paw-1   { width: 15%; height: 15%; left: 16%;  bottom: 16%; opacity: .55; transform: rotate(-22deg); }
.sm-paw-2   { width: 16%; height: 16%; left: 42%;  bottom: 14%; opacity: .9; }
.sm-stars-1 { width: 16%; height: 16%; right: 14%; top: 16%;  animation: sparkleTwinkle 3.4s ease-in-out infinite; }
.sm-stars-2 { width: 14%; height: 14%; right: 16%; top: 22%;  animation: sparkleTwinkle 3.8s ease-in-out 1.2s infinite; }

.scene-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    animation: twinkle 3.8s ease-in-out infinite;
}

.ss-1 { top: 12%;  left: 18%; }
.ss-2 { bottom: 16%; right: 14%; animation-delay: 1.3s; }
.ss-3 { top: 38%;  right: 4%;  animation-delay: 2.2s; width: 4px; height: 4px; }

/* ---------- Stats band ---------- */
.stats {
    background: linear-gradient(135deg, var(--pc-plum) 0%, #93537c 30%, #e0686b 55%, var(--pc-orange) 80%, #ffc56f 100%);
    color: #fff;
    padding: 7.5rem 0 8rem;
    overflow: hidden;
}

/* A second sunset layer cross-fades over the first so the whole band
   slowly "lives" (opacity-only, so it stays cheap to composite). */
.stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6d3a8c 0%, #c2557f 35%, #ff7a59 65%, #ffb84d 100%);
    opacity: 0;
    animation: sunsetBreathe 11s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes sunsetBreathe {
    to { opacity: 1; }
}

.stats .container,
.stats-ambient {
    position: relative;
    z-index: 1;
}

/* waves keep their absolute placement from .wave; just lift them above
   the ::before overlay */
.stats .wave {
    z-index: 1;
}

.shooting-star {
    position: absolute;
    top: 16%;
    left: -8%;
    width: 110px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95));
    opacity: 0;
    animation: shoot 9s ease-in 3s infinite;
}

@keyframes shoot {
    0%        { opacity: 0; transform: translate3d(0, 0, 0) rotate(16deg); }
    3%        { opacity: .95; }
    11%       { opacity: 0; transform: translate3d(70vw, 19vw, 0) rotate(16deg); }
    100%      { opacity: 0; transform: translate3d(70vw, 19vw, 0) rotate(16deg); }
}

.wave {
    position: absolute;
    left: 0;
    width: 100%;
    height: 56px;
    display: block;
    pointer-events: none;
}

.wave-top { top: -1px; }
.wave-top path { fill: var(--pc-cream); }

.wave-bottom { bottom: -1px; }
.wave-bottom path { fill: #ffffff; }

.stats-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.stats .float-paw {
    color: #fff;
    opacity: .08;
}

.sp-1 { --s: 110px; top: 14%; left: 4%; --d: 12s; --r: -14deg; }
.sp-2 { --s: 70px; bottom: 10%; right: 6%; --d: 9s; --r: 16deg; }

.spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    animation: twinkle 4.2s ease-in-out infinite;
}

.sk-1 { top: 22%; left: 22%; }
.sk-2 { top: 60%; left: 38%; animation-delay: .9s; width: 4px; height: 4px; }
.sk-3 { top: 30%; right: 24%; animation-delay: 1.7s; }
.sk-4 { top: 70%; right: 14%; animation-delay: 2.6s; width: 5px; height: 5px; }
.sk-5 { top: 14%; right: 44%; animation-delay: 3.3s; width: 4px; height: 4px; }

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(.4); }
    50%      { opacity: .85; transform: scale(1); }
}

.stat {
    padding: .5rem 0;
}

.stat-num {
    display: block;
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(3.2rem, 7vw, 4.6rem);
    line-height: 1;
    text-shadow: 0 3px 18px rgba(50, 20, 45, 0.3);
}

.stat-label {
    display: block;
    font-size: .95rem;
    font-weight: 500;
    opacity: .94;
    letter-spacing: .02em;
    margin-top: .3rem;
}

/* ---------- Inside the book (grid) ---------- */
.inside-book {
    background: linear-gradient(180deg, #fff 0%, #fffaf3 100%);
}

.page-card {
    background: #fff;
    border-radius: var(--pc-radius);
    overflow: hidden;
    border: 1px solid var(--pc-border);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .35s ease, box-shadow .35s ease;
}

.page-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pc-shadow-soft);
}

.page-card .page-img-wrap {
    background: #f7efe2;
    aspect-ratio: 5.5 / 8.5;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.page-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.page-card:hover img {
    transform: scale(1.04);
}

.page-card .page-body {
    padding: 1.25rem 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page-card .page-tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    padding: .2rem .65rem;
    border-radius: 999px;
    margin-bottom: .6rem;
    align-self: flex-start;
}

.tag-details { background: #4fb3c2; }
.tag-info    { background: #68b760; }
.tag-journal { background: #b65aa4; }
.tag-vet     { background: #e5c037; color: #4a3f0a; }
.tag-memory  { background: #f08f5c; }

.page-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .4rem;
}

.page-card p {
    color: var(--pc-muted);
    font-size: .92rem;
    margin: 0;
}

/* ---------- Category pills (all viewports) ---------- */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
    margin-bottom: 2rem;
}

.category-pill {
    flex: 0 0 auto;
    padding: .5rem 1.05rem;
    border-radius: 999px;
    border: 1.5px solid var(--pc-border);
    background: #fff;
    color: var(--pc-ink);
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.category-pill:hover {
    border-color: rgba(255, 146, 60, 0.5);
    transform: translateY(-1px);
}

.category-pill:active {
    transform: scale(.96);
}

.category-pill.active {
    background: linear-gradient(135deg, var(--pc-yellow), var(--pc-orange));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(255, 146, 60, 0.55);
}

/* Active pills take on the book's tab colour for their category */
.category-pill[data-category="details"].active { background: #4fb3c2; box-shadow: 0 6px 16px -6px #4fb3c2; }
.category-pill[data-category="info"].active    { background: #68b760; box-shadow: 0 6px 16px -6px #68b760; }
.category-pill[data-category="journal"].active { background: #b65aa4; box-shadow: 0 6px 16px -6px #b65aa4; }
.category-pill[data-category="vet"].active     { background: #cfa320; box-shadow: 0 6px 16px -6px #cfa320; }
.category-pill[data-category="memory"].active  { background: #f08f5c; box-shadow: 0 6px 16px -6px #f08f5c; }

/* Page cards glow in their category colour on hover */
.page-card-col[data-category="details"] .page-card:hover { border-color: #4fb3c2; box-shadow: 0 14px 30px -16px #4fb3c2; }
.page-card-col[data-category="info"] .page-card:hover    { border-color: #68b760; box-shadow: 0 14px 30px -16px #68b760; }
.page-card-col[data-category="journal"] .page-card:hover { border-color: #b65aa4; box-shadow: 0 14px 30px -16px #b65aa4; }
.page-card-col[data-category="vet"] .page-card:hover     { border-color: #e5c037; box-shadow: 0 14px 30px -16px #e5c037; }
.page-card-col[data-category="memory"] .page-card:hover  { border-color: #f08f5c; box-shadow: 0 14px 30px -16px #f08f5c; }

/* Fade cards while filtering */
.page-card-col {
    transition: opacity .28s ease, transform .28s ease;
}

.page-card-col.filtering-out,
.js .reveal.in.filtering-out {
    opacity: 0;
    transform: scale(.93);
}

@media (max-width: 767.98px) {
    .category-pills {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* Match Bootstrap .container's mobile gutter exactly so the row
           extends to the viewport edges but not past them. */
        margin: 0 -.75rem 1.25rem;
        /* Vertical padding gives the active pill's box-shadow room to
           breathe; horizontal padding keeps the first pill's rounded
           edge (and its shadow) clear of the viewport edge. */
        padding: .5rem 1rem;
        scroll-padding-left: 1rem;
        scroll-snap-type: x proximity;
    }
    .category-pills::-webkit-scrollbar { display: none; }

    .category-pill {
        scroll-snap-align: start;
    }

    .inside-book .page-gallery {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 1rem;
        margin: 0 -1rem;
        padding: .25rem 1rem 1.25rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
        gap: 1rem;
        mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
    }
    .inside-book .page-gallery::-webkit-scrollbar { display: none; }

    .inside-book .page-gallery > .page-card-col {
        flex: 0 0 82%;
        max-width: 82%;
        scroll-snap-align: start;
        padding-left: 0;
        padding-right: 0;
    }

    .inside-book .page-gallery > .page-card-col[hidden] {
        display: none !important;
    }
}

/* ---------- Buy section ---------- */
.buy {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 24 24'%3E%3Cg fill='%23ff923c' fill-opacity='0.045'%3E%3Cellipse cx='7.2' cy='7.8' rx='2' ry='2.7' transform='rotate(-18 7.2 7.8)'/%3E%3Cellipse cx='16.8' cy='7.8' rx='2' ry='2.7' transform='rotate(18 16.8 7.8)'/%3E%3Cellipse cx='3.6' cy='12.6' rx='1.7' ry='2.3' transform='rotate(-34 3.6 12.6)'/%3E%3Cellipse cx='20.4' cy='12.6' rx='1.7' ry='2.3' transform='rotate(34 20.4 12.6)'/%3E%3Cpath d='M12 11.2c3.2 0 5.9 2.4 5.9 5.1 0 2.1-1.6 3.7-3.6 3.7-.85 0-1.6-.26-2.3-.57-.7.31-1.45.57-2.3.57-2 0-3.6-1.6-3.6-3.7 0-2.7 2.7-5.1 5.9-5.1z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 140px 140px;
}

/* Animated conic-gradient ring around the buy card (graceful static
   fallback in browsers without @property support). */
@property --bca {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.buy-card {
    border-radius: var(--pc-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--pc-cream), var(--pc-cream)) padding-box,
        conic-gradient(from var(--bca, 0deg), var(--pc-yellow), var(--pc-orange), var(--pc-coral), #ffb84d, var(--pc-yellow)) border-box;
    animation: ringSpin 6s linear infinite;
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@keyframes ringSpin {
    to { --bca: 360deg; }
}

.buy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pc-shadow-soft);
}

.buy-card .buy-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    margin: 0 auto 1.25rem;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--pc-yellow), var(--pc-orange));
}

.buy-card .buy-icon .icon {
    width: 32px;
    height: 32px;
}

.buy-card h3 {
    font-family: "Caveat", cursive;
    font-size: 2rem;
    font-weight: 700;
    color: var(--pc-coral);
    margin-bottom: .5rem;
}

.buy-card p {
    color: var(--pc-muted);
    margin-bottom: 1.25rem;
}

.buy-facts {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .55rem;
    padding: 0;
    margin: 0 0 1.5rem;
}

.buy-facts li {
    background: rgba(255, 146, 60, 0.12);
    color: var(--pc-orange-dark);
    border-radius: 999px;
    padding: .28rem .9rem;
    font-size: .85rem;
    font-weight: 600;
}

.buy-card .btn {
    width: 100%;
    margin-top: .5rem;
}

/* ---------- Malta section (individual + wholesale) ---------- */
.malta {
    background: linear-gradient(180deg, #fffaf3 0%, #fff1dc 100%);
}

.malta-card {
    background: #fff;
    border-radius: var(--pc-radius);
    padding: 2rem 1.75rem;
    height: 100%;
    border: 1px solid var(--pc-border);
    box-shadow: var(--pc-shadow-soft);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .25s, box-shadow .25s;
}

.malta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -16px rgba(255, 106, 61, 0.28);
}

.malta-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--pc-yellow), var(--pc-orange));
}

.malta-icon .icon {
    width: 28px;
    height: 28px;
}

.malta-card h3 {
    font-family: "Caveat", cursive;
    font-size: 1.95rem;
    font-weight: 700;
    color: var(--pc-coral);
    margin-bottom: .5rem;
}

.malta-card p {
    color: var(--pc-muted);
    margin-bottom: 1.5rem;
}

.malta-price {
    margin: 0 0 1rem !important;
}

.malta-price .price-num {
    display: block;
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: 3.4rem;
    line-height: .95;
    color: var(--pc-coral);
}

.malta-price .price-note {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--pc-muted);
    margin-top: .2rem;
}

.malta-card .phone-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--pc-ink);
    text-decoration: none;
    padding: .35rem 0;
}

.malta-card .phone-link:hover {
    color: var(--pc-coral);
}

/* ---------- FAQ ---------- */
.faq {
    background: #fff;
}

.faq-accordion .accordion-item {
    background: var(--pc-cream);
    border: 1px solid var(--pc-border);
    border-radius: 14px !important;
    margin-bottom: .8rem;
    overflow: hidden;
}

.faq-accordion .accordion-button {
    background: transparent;
    font-weight: 600;
    color: var(--pc-ink);
    padding: 1.1rem 1.25rem;
    font-size: 1.05rem;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: rgba(255, 146, 60, 0.08);
    color: var(--pc-orange-dark);
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.faq-accordion .accordion-body {
    color: var(--pc-muted);
    padding-top: 0;
}

/* ---------- Footer ---------- */
footer {
    position: relative;
    background: linear-gradient(135deg, var(--pc-orange), var(--pc-coral));
    color: #fff;
    padding: 3rem 0 1.5rem;
    margin-top: 0;
}

footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130' viewBox='0 0 24 24'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Cellipse cx='7.2' cy='7.8' rx='2' ry='2.7' transform='rotate(-18 7.2 7.8)'/%3E%3Cellipse cx='16.8' cy='7.8' rx='2' ry='2.7' transform='rotate(18 16.8 7.8)'/%3E%3Cellipse cx='3.6' cy='12.6' rx='1.7' ry='2.3' transform='rotate(-34 3.6 12.6)'/%3E%3Cellipse cx='20.4' cy='12.6' rx='1.7' ry='2.3' transform='rotate(34 20.4 12.6)'/%3E%3Cpath d='M12 11.2c3.2 0 5.9 2.4 5.9 5.1 0 2.1-1.6 3.7-3.6 3.7-.85 0-1.6-.26-2.3-.57-.7.31-1.45.57-2.3.57-2 0-3.6-1.6-3.6-3.7 0-2.7 2.7-5.1 5.9-5.1z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 130px 130px;
    pointer-events: none;
}

footer .container {
    position: relative;
}

footer a {
    color: #fff;
    opacity: .9;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
    opacity: 1;
}

footer .footer-brand {
    font-family: "Caveat", cursive;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .75rem;
}

footer .footer-brand img {
    width: 44px;
    height: 44px;
    filter: brightness(0) invert(1);
}

footer p.tagline {
    opacity: .85;
    margin-bottom: 1rem;
}

footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

footer .footer-social {
    display: flex;
    gap: .6rem;
    justify-content: flex-start;
    margin-top: .75rem;
}

@media (min-width: 768px) {
    footer .footer-social {
        justify-content: flex-end;
    }
}

footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    line-height: 1;
    opacity: 1;
    transition: background .2s ease, transform .2s ease;
}

footer .footer-social .icon {
    width: 18px;
    height: 18px;
}

footer .footer-social a:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

footer hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 2rem 0 1rem;
}

footer .copy {
    text-align: center;
    font-size: .88rem;
    opacity: .9;
    margin: 0;
}

/* ---------- Floating WhatsApp ---------- */
.fab-whatsapp {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.5);
    z-index: 900;
    transition: transform .25s;
}

.fab-whatsapp .icon {
    width: 26px;
    height: 26px;
}

.fab-whatsapp::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    z-index: -1;
    animation: fabPulse 2.8s ease-out infinite;
}

@keyframes fabPulse {
    0%   { transform: scale(1); opacity: .45; }
    70%  { transform: scale(1.55); opacity: 0; }
    100% { transform: scale(1.55); opacity: 0; }
}

.fab-whatsapp:hover {
    color: #fff;
    transform: scale(1.05) rotate(-8deg);
}

/* ---------- Malta-only reveal ---------- */
[data-malta-only] {
    animation: maltaFadeIn .6s ease;
}

@keyframes maltaFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Reveal on scroll (gated behind html.js) ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.2, .7, .3, 1), transform .8s cubic-bezier(.2, .7, .3, 1);
    transition-delay: var(--rd, 0s);
}

.js .reveal[data-reveal="left"]  { transform: translateX(-38px); }
.js .reveal[data-reveal="right"] { transform: translateX(38px); }
.js .reveal[data-reveal="zoom"]  { transform: scale(.92) translateY(14px); }

.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }

    .scroll-cue,
    .heart-float,
    .spark,
    .book-sparkle,
    .shooting-star,
    .scene-spark,
    .scene-ring,
    .sm-heart-1,
    .sm-heart-2 {
        display: none;
    }

    .float-paw {
        animation: none;
        transform: rotate(var(--r, 0deg));
    }

    .scene-step,
    .sm-stars-1,
    .sm-stars-2 {
        animation: none;
        opacity: 1;
    }

    .stats::before {
        animation: none;
    }

    .marquee,
    .marquee .marquee-track {
        animation: none;
    }

    .marquee {
        transform: none;
    }

    .chapter-scene {
        transform: none;
        opacity: 1;
    }

    .story-line-fill {
        transform: none;
    }

    .chapter-marker {
        transform: scale(1);
        background: linear-gradient(135deg, var(--pc-yellow), var(--pc-orange));
        color: #fff;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 1rem 0 .5rem;
    }

    .navbar-nav .nav-link {
        padding: .75rem .25rem !important;
    }

    /* Anchor the active/hover underline to the left of the text so it
       doesn't look like it's floating in the middle of the row on mobile. */
    .navbar-nav .nav-link::after {
        left: .25rem;
    }
    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
        width: 1.75rem;
        left: .25rem;
    }

    /* Buy the Diary pill: restore its own padding (the .nav-link override
       above collapses it to .25rem on the sides) and centre the text so
       it doesn't hug the rounded edge of the pill. */
    .navbar-nav .nav-link.btn-nav-buy {
        padding: .6rem 1.25rem !important;
        text-align: center;
    }

    .hero {
        min-height: auto;
        padding: 5.5rem 0 3.5rem;
        text-align: center;
    }

    .hero-cover {
        margin-top: 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-meta {
        justify-content: center;
    }

    section {
        padding: 4rem 0;
    }

    .stats {
        padding: 6rem 0 6.5rem;
    }
}

@media (max-width: 767.98px) {
    /* Timeline collapses to a left rail */
    .story-line {
        left: 26px;
        transform: none;
    }

    .story-chapter {
        grid-template-columns: 52px 1fr;
        align-items: start;
        padding: 1.8rem 0;
    }

    .chapter-marker {
        grid-column: 1;
        width: 44px;
        height: 44px;
        margin-top: .2rem;
    }

    .chapter-marker .icon {
        width: 21px;
        height: 21px;
    }

    .story-chapter .chapter-card,
    .story-chapter:nth-of-type(even) .chapter-card {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
        text-align: left;
        padding-left: .5rem;
    }

    .story-chapter .chapter-visual,
    .story-chapter:nth-of-type(even) .chapter-visual {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        padding: 1.1rem 0 0 .5rem;
    }

    .chapter-scene {
        width: 165px;
        height: 165px;
    }

    .chapter-links,
    .story-chapter:nth-of-type(even) .chapter-links {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .hero h1 {
        font-size: 3rem;
    }

    .malta-card {
        padding: 1.75rem 1.25rem;
    }

    .buy-card {
        padding: 2rem 1.25rem;
    }

    .fab-whatsapp {
        width: 50px;
        height: 50px;
        right: 1rem;
        bottom: 1rem;
    }

    .stat-label {
        font-size: .85rem;
    }
}
