/* ==========================================================================
   SwapnRaj — layout.css
   Fixed navigation, section scaffolding, section dots, footer, and floating
   WhatsApp button.
   ========================================================================== */

/* Fixed navigation */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.4s, padding 0.4s;
}
.nav-fixed.scrolled {
    /* No header on scroll: transparent, no blur, no shadow — the coin and
       cart button simply float over each section's own background, so
       scrolling never reveals a painted band. */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0.75rem 2rem;
    box-shadow: none;
}

.nav-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.nav-logo__mark {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--forest-green), var(--forest-light));
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(45, 90, 61, 0.3);
    transition: transform 0.3s var(--transition-bounce);
    overflow: hidden;
    flex: none; /* never let the logo coin shrink in the navbar row */
}
/* Company sticker logo fills the round mark. The asset is pre-cropped from
   the source artwork (raj-kokan-logo.jpg) so the sticker already sits
   centered inside a green circle — no runtime zoom needed. */
.nav-logo__mark-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.nav-logo:hover .nav-logo__mark { transform: scale(1.1) rotate(-5deg); }
/* Official SwapnRaj label logo — now beside the Order Now coin in the header's
   right corner. Height drives the size; auto width keeps the oval proportions.
   Kept clearly smaller than the Raj Kokan coin (64px) so the company mark
   stays the bigger brand element. */
.nav-actions__wordmark { display: block; height: 42px; width: auto; }
.nav-logo__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--kokum-deep); }
/* Clicking the logo coin opens the large-preview dialog (see logo-preview.js). */
.nav-logo__mark { cursor: pointer; }

.nav-menu {
    /* Desktop navigation moved to the right-side icon rail (see .section-dots).
       This list still drives the mobile hamburger dropdown. */
    display: none;
    gap: 0.5rem;
    list-style: none;
}
.nav-menu__link {
    display: block;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: 100px;
    transition: all 0.3s;
}
.nav-menu__link:hover { color: var(--kokum-brown); }
.nav-menu__link.active {
    background: var(--kokum-brown);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 58, 42, 0.3);
}

/* Right-hand cluster holding the CTA and the mobile hamburger. */
.nav-fixed__actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 52px;
    height: 52px;
    padding: 0;
    /* Align the coin's center with the right icon rail: rail center sits at
       right 20px + 21px = 41px from the edge; the coin's right edge must sit
       at 41 - 26 = 15px, i.e. 17px left of the header's 2rem padding.
       Reset to 0 on small screens (rail hidden there). */
    margin-right: -17px;
    background: var(--kokum-brown);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s var(--transition-bounce);
    box-shadow: 0 4px 16px rgba(107, 58, 42, 0.25);
}
.nav-cta svg { width: 22px; height: 22px; }
/* Tooltip chip, same pattern as the side rail. */
.nav-cta::before {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 0.6rem);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--kokum-deep);
    background: rgba(255, 252, 247, 0.95);
    padding: 0.35rem 0.8rem;
    border-radius: 100px;
    box-shadow: 0 4px 14px rgba(44, 36, 22, 0.15);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.nav-cta:hover::before,
.nav-cta:focus-visible::before { opacity: 1; }
.nav-cta:hover {
    background: var(--kokum-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 58, 42, 0.35);
}

/* Hamburger toggle (only visible on small screens, see responsive.css) */
.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--kokum-brown);
    border-radius: 2px;
    transition: transform 0.3s var(--transition-smooth), opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Section dots */
/* Right-side section rail: rounded icon buttons with slide-out labels.
   Replaces the top nav pill on desktop; hidden on smaller screens where the
   hamburger menu takes over. The active icon fills with brand maroon. */
.section-dots {
    position: fixed;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.section-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 252, 247, 0.92);
    color: var(--kokum-brown);
    border: 1px solid rgba(107, 58, 42, 0.12);
    box-shadow: 0 4px 14px rgba(44, 36, 22, 0.1);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.3s var(--transition-bounce);
    position: relative;
    padding: 0;
}
.section-dot svg { width: 20px; height: 20px; display: block; }
.section-dot::before {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 0.6rem);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--kokum-deep);
    background: rgba(255, 252, 247, 0.95);
    padding: 0.35rem 0.8rem;
    border-radius: 100px;
    box-shadow: 0 4px 14px rgba(44, 36, 22, 0.15);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.section-dot:hover::before,
.section-dot:focus-visible::before { opacity: 1; }
/* No size/position change on hover — the icons must stay in a perfectly
   straight column (a hover scale made them look staggered in Firefox).
   Hover is shown with color and shadow only. */
.section-dot:hover { border-color: rgba(107, 58, 42, 0.35); box-shadow: 0 6px 18px rgba(44, 36, 22, 0.18); }
.section-dot.active {
    background: var(--kokum-brown);
    color: white;
    border-color: var(--kokum-brown);
    box-shadow: 0 6px 18px rgba(107, 58, 42, 0.35);
}
.section-dot:focus-visible { outline: 2px solid var(--kokum-brown); outline-offset: 2px; }

/* Full-page sections */
.section {
    min-height: 100vh;
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.section__container { width: min(92%, 1200px); margin: 0 auto; padding: 6rem 0 4rem; }

/* Footer */
.footer {
    background: #1a1410;
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
    /* The footer is shorter than a full page and is not a section, so it was
       outside the scroll-snap sequence. With mandatory snapping the browser
       then kept fighting for the last section's snap point, yanking the page
       away from the footer. Joining the sequence with align:end gives the
       footer its own resting position (footer bottom == screen bottom). */
    scroll-snap-align: end;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer__brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.footer__brand .nav-logo__mark { width: 40px; height: 40px; font-size: 1rem; }
.footer__brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: white; }
.footer__about { font-size: 0.9rem; line-height: 1.7; opacity: 0.8; margin-bottom: 1.25rem; }
.footer__socials { display: flex; gap: 0.75rem; }
.footer__social {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: white;
    transition: background 0.3s, transform 0.3s;
}
.footer__social:hover { background: var(--kokum-brown); transform: translateY(-3px); }
.footer__heading {
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
}
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 0.75rem; }
.footer__links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.footer__links a:hover { color: var(--sand); }
.footer__fssai { margin-top: 1rem; }
.footer__fssai a { text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* WhatsApp float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 5rem;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 1.6rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: transform 0.3s var(--transition-bounce), box-shadow 0.3s;
}
.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}
