*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blush:       #FBE8F3;
    --blush-light: #FEF5FA;
    --pink:        #D4237A;
    --pink-light:  #F5C2DE;
    --pink-pale:   #FCE8F3;
    --dark:        #2A1520;
    --text:        #5C3D50;
    --text-light:  #9A7080;
    --white:       #FFFFFF;
    --border:      #F0C8E0;
}

/* iOS standalone paints the safe areas (Dynamic Island strip, home indicator)
   with the ROOT canvas colour. Without this, body's white propagates up. */
html {
    background: var(--blush);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--white);
    /* html now owns the canvas, so body must cover the viewport itself
       or short pages would show blush under the footer */
    min-height: 100vh;
    line-height: 1.6;
}

/* Home-screen app on iPhone: newer iOS colours the strip behind the Dynamic Island from
   the BODY background, not the root canvas — so in the app the body is blush too, and the
   page-level areas that used to borrow body's white paint their own. Browser tabs are
   untouched (this only matches when launched from the home-screen icon). */
@media (display-mode: standalone) {
    body { background: var(--blush); }
    body > .section-head, body > .cat-grid, body > .order-body, body > .cakes-wrap, body > svg { background: var(--white); }
}

/* ── NAVIGATION ── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251,232,243,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 2.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    transition: padding 0.3s ease;
}

/* Left: logo image only */
.nav-logo {
    text-decoration: none;
    line-height: 0;
    display: block;
    justify-self: start;
}

.nav-logo img,
.nav-logo svg {
    height: 52px;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

/* Centre: brand name — truly centred in nav */
.nav-brand {
    text-decoration: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05rem;
    justify-self: center;
}

.nav-brand-name {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--pink);
    line-height: 1;
    white-space: nowrap;
    transition: font-size 0.3s ease;
}

.nav-brand-sub {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--text);
    transition: font-size 0.3s ease;
}

/* Right: links + CTA + toggle */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-self: end;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { color: var(--pink); }

.nav-cta { white-space: nowrap; flex-shrink: 0; }

.nav-links li.mobile-order { display: none; }

.nav.scrolled { padding: 0.35rem 2.5rem; }
.nav.scrolled .nav-logo img,
.nav.scrolled .nav-logo svg { height: 36px; }
.nav.scrolled .nav-brand-name { font-size: 1.7rem; }
.nav.scrolled .nav-brand-sub { font-size: 0.5rem; }

/* ── BUTTONS ── */
.btn-pink {
    display: inline-block;
    background: var(--pink);
    color: white;
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.25s;
}
.btn-pink:hover { background: var(--dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,35,122,0.3); }

.btn-outline-pink {
    display: inline-block;
    border: 2px solid var(--pink);
    color: var(--pink);
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.25s;
}
.btn-outline-pink:hover { background: var(--pink); color: white; transform: translateY(-1px); }

.btn-white {
    display: inline-block;
    background: white;
    color: var(--pink);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.25s;
}
.btn-white:hover { background: var(--dark); color: white; transform: translateY(-1px); }

.btn-large { padding: 1rem 2.5rem; font-size: 0.88rem; }

/* ── SECTION HEADER ── */
.section-head {
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem) 2rem clamp(1.5rem, 2.5vw, 2.5rem);
}
.section-head .eyebrow {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: var(--pink);
    display: block;
    margin-bottom: 0.4rem;
}
.section-head h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.section-head p {
    font-size: 0.92rem;
    color: var(--text-light);
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ── FOOTER ── */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.75);
    padding: 4rem 4rem 2.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}
.brand-name {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    color: var(--pink-light);
    display: block;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.brand-tagline { font-size: 0.83rem; line-height: 1.8; opacity: 0.6; }

footer h4 {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pink-light);
    margin-bottom: 1.25rem;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: 0.55rem; }
footer ul a {
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.87rem;
    transition: color 0.2s;
}
footer ul a:hover { color: var(--pink-light); }

.footer-bottom {
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    padding: 1.25rem;
    font-size: 0.76rem;
    color: rgba(255,255,255,0.3);
}

/* ── HAMBURGER ── */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.38s cubic-bezier(.65,0,.35,1), opacity 0.2s ease, width 0.3s ease;
}
.nav-toggle span:nth-child(2) { width: 16px; margin-left: auto; }
.nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: translateX(8px); }
.nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE ── */
@media (max-width: 900px) {
    .nav {
        padding: 0.5rem 1.25rem;
        gap: 0.5rem;
        /* Equal side columns, so "Merrivane" sits dead centre whatever is on either side. */
        grid-template-columns: 1fr auto 1fr;
    }
    .nav.scrolled { padding: 0.3rem 1.25rem; }
    .nav-logo img, .nav-logo svg { height: 40px; }
    .nav-brand-name { font-size: 1.55rem; }
    .nav-brand-sub { display: none; }
    .nav.scrolled .nav-logo img, .nav.scrolled .nav-logo svg { height: 30px; }
    .nav.scrolled .nav-brand-name { font-size: 1.25rem; }

    .nav-toggle { display: flex; }
    .btn-pink.nav-cta { display: none; }

    /* The dropdown unrolls from the top bar instead of appearing at once: it's always
       laid out, hidden with clip-path/opacity, and the links drop in one after another. */
    .nav-links {
        display: flex;
        visibility: hidden;
        pointer-events: none;
        opacity: 0;
        clip-path: inset(0 0 100% 0 round 0 0 18px 18px);
        transform: translateY(-6px);
        transition: clip-path 0.34s cubic-bezier(.4,0,.2,1), opacity 0.25s ease 0.05s, transform 0.34s cubic-bezier(.4,0,.2,1), visibility 0s linear 0.34s;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        /* Solid, not frosted: a blurred box inside the (blurred) sticky nav loses its own
           background in Chrome/Android, and the page showed straight through the menu. */
        background: var(--blush);
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        z-index: 200;
    }
    .nav.nav-open .nav-links {
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
        clip-path: inset(0 0 -40px 0 round 0 0 18px 18px);
        transform: none;
        transition: clip-path 0.48s cubic-bezier(.2,.8,.2,1), opacity 0.2s ease, transform 0.48s cubic-bezier(.2,.8,.2,1), visibility 0s;
    }
    .nav-links li { opacity: 0; transform: translateY(-8px); transition: opacity 0.18s ease, transform 0.18s ease; }
    .nav.nav-open .nav-links li { opacity: 1; transform: none; transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,.8,.2,1); }
    .nav.nav-open .nav-links li:nth-child(1) { transition-delay: 0.06s; }
    .nav.nav-open .nav-links li:nth-child(2) { transition-delay: 0.10s; }
    .nav.nav-open .nav-links li:nth-child(3) { transition-delay: 0.14s; }
    .nav.nav-open .nav-links li:nth-child(4) { transition-delay: 0.18s; }
    .nav.nav-open .nav-links li:nth-child(5) { transition-delay: 0.22s; }
    .nav.nav-open .nav-links li:nth-child(6) { transition-delay: 0.26s; }
    .nav.nav-open .nav-links li:nth-child(7) { transition-delay: 0.30s; }
    .nav-links { border-radius: 0 0 18px 18px; }
    .nav-links li { border-bottom: 1px solid var(--border); }
    .nav-links li:last-child { border-bottom: none; }
    .nav-links a { display: block; padding: 1rem 1.5rem; font-size: 0.9rem; transition: color 0.2s, background 0.2s, padding-left 0.25s ease; }
    .nav-links a:active { background: rgba(212,35,122,0.06); padding-left: 1.8rem; }

    .nav-links li.mobile-order { display: block; }
    .nav-links li.mobile-order a { color: var(--pink); font-weight: 600; }

    .section-head { padding: 2.5rem 1.25rem 1.5rem; }

    footer { grid-template-columns: 1fr; padding: 2.5rem 1.5rem 2rem; gap: 2rem; }
}

/* ── SCROLL REVEAL ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ── STATS BAR ── */
.stats-bar {
    background: var(--dark);
    color: rgba(255,255,255,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1.25rem, 3.5vw, 3.5rem);
    padding: 0.95rem 2rem;
    flex-wrap: wrap;
}
.stats-bar-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}
.stats-bar-dot {
    width: 5px; height: 5px;
    background: var(--pink-light);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── HOW TO ORDER ── */
.how-section {
    padding: clamp(3.5rem, 6vw, 6rem) clamp(1.5rem, 5vw, 5rem);
    background: var(--white);
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 860px;
    margin: 2.5rem auto 0;
}
.how-step {
    text-align: center;
    padding: 2.25rem 1.5rem 2rem;
    background: var(--blush-light);
    border-radius: 22px;
    border: 1px solid var(--border);
}
.how-step-num {
    width: 40px; height: 40px;
    background: var(--pink);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.how-step-icon { font-size: 2.4rem; margin-bottom: 0.75rem; display: block; }
.how-step h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 0.4rem; }
.how-step p { font-size: 0.8rem; color: var(--text-light); line-height: 1.65; font-weight: 300; }

/* ── TESTIMONIALS ── */
.testimonials-section {
    background: var(--blush-light);
    padding: clamp(3.5rem, 6vw, 6rem) clamp(1.5rem, 5vw, 4rem);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 980px;
    margin: 2.5rem auto 0;
}
.testimonial-card {
    background: var(--white);
    border-radius: 18px;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(212,35,122,0.05);
    display: flex;
    flex-direction: column;
}
.testimonial-stars { color: #F59E0B; font-size: 1rem; letter-spacing: 0.05em; margin-bottom: 0.85rem; display: block; }
.testimonial-text {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.85;
    margin-bottom: 1.25rem;
    font-style: italic;
    font-weight: 300;
    flex: 1;
}
/* Name, location and what they ordered all sit in the signature pink. The three are
   kept apart by weight and the pill rather than by colour, so the name still leads. */
.testimonial-author { font-size: 0.78rem; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: 0.06em; }
.testimonial-location { font-size: 0.72rem; color: var(--pink); opacity: 0.62; margin-top: 0.15rem; font-weight: 400; }
.testimonial-ordered {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    color: var(--pink);
    background: var(--pink-pale);
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.85rem;
}
.testimonials-grid.single { grid-template-columns: 1fr; max-width: 560px; }
/* Rotating testimonials: JS toggles .fading around each swap (400ms, matches FADE in index.html) */
.testimonials-grid { transition: opacity 0.4s ease; }
.testimonials-grid.fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    .testimonials-grid { transition: none; }
}

/* ── MENU PAGE: TAB FADE ── */
.menu-section { transition: opacity 0.25s ease; }
.menu-section.fade-out { opacity: 0; }

@media (max-width: 900px) {
    .how-grid { grid-template-columns: 1fr 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; max-width: 480px; margin: 2rem auto 0; }
}
@media (max-width: 600px) {
    .how-grid { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; }
    .stats-bar { padding: 0.85rem 1.25rem; gap: 0.75rem; }
    .stats-bar-dot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .nav-links, .nav.nav-open .nav-links, .nav-links li, .nav.nav-open .nav-links li, .nav-toggle span { transition-duration: 0.01s !important; transition-delay: 0s !important; }
}
