/* =========================================================
   RK TIFFIN CENTER — HEADER + GLOBAL BASE
   File : /assets/css/header.css
   Theme: Kumkum red · Marigold · Curry-leaf green · Cream
========================================================= */

/* ---------- DESIGN TOKENS (poori site mein use honge) ---------- */
:root{
    /* Kumkum red — buttons, highlights */
    --rk-brand:        #B42318;
    --rk-brand-dark:   #8F1B12;
    --rk-brand-soft:   #FDEDEA;
    /* Marigold — accents, badges */
    --rk-accent:       #E9A019;
    --rk-accent-soft:  #FDF4DE;
    /* Curry-leaf green — trust, ticks */
    --rk-leaf:         #1E6B52;
    --rk-leaf-dark:    #155240;
    --rk-leaf-soft:    #E7F2EE;
    --rk-whatsapp:     #25D366;

    --rk-cream:        #FBF7EF;
    --rk-white:        #FFFFFF;
    --rk-ink:          #1F1A17;
    --rk-ink-2:        #45403B;
    --rk-muted:        #736B63;
    --rk-border:       #ECE3D4;

    --rk-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --rk-font-body:    'DM Sans', 'Segoe UI', Arial, sans-serif;

    --rk-radius-sm: 8px;
    --rk-radius-md: 12px;
    --rk-radius-lg: 18px;

    --rk-shadow-sm: 0 2px 10px rgba(31,26,23,.06);
    --rk-shadow-md: 0 14px 30px -14px rgba(180,35,24,.30);
    --rk-shadow-lg: 0 30px 60px -24px rgba(31,26,23,.28);

    --rk-header-h: 76px;
}

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

html{
    scroll-behavior:smooth;
    -webkit-text-size-adjust:100%;
}

body{
    font-family:var(--rk-font-body);
    font-size:16px;
    line-height:1.6;
    color:var(--rk-ink);
    background:var(--rk-cream);
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
}

body.menu-open{ overflow:hidden; }

img{
    max-width:100%;
    height:auto;
    display:block;
}

a{
    color:inherit;
    text-decoration:none;
}

button{
    border:none;
    background:none;
    font:inherit;
    color:inherit;
    cursor:pointer;
}

::selection{
    background:var(--rk-brand);
    color:#fff;
}

:focus-visible{
    outline:2px solid var(--rk-brand);
    outline-offset:3px;
    border-radius:6px;
}

/* ---------- SKIP LINK ---------- */
.skip-link{
    position:absolute;
    left:12px;
    top:-60px;
    z-index:100000;
    background:var(--rk-ink);
    color:#fff;
    padding:10px 16px;
    border-radius:8px;
    font-size:14px;
    font-weight:600;
    transition:top .2s ease;
}
.skip-link:focus{ top:12px; }

/* =========================================================
   TOP BAR
========================================================= */
.topbar{
    background:var(--rk-leaf-dark);
    color:#E9F3EF;
    font-size:13px;
}

.topbar-inner{
    max-width:1240px;
    margin:0 auto;
    padding:8px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.topbar-note{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:500;
}

.topbar-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--rk-leaf);
    box-shadow:0 0 0 3px rgba(30,107,82,.3);
    animation:rk-pulse 2s ease-in-out infinite;
    flex-shrink:0;
}

@keyframes rk-pulse{
    0%,100%{ box-shadow:0 0 0 3px rgba(30,107,82,.3); }
    50%    { box-shadow:0 0 0 6px rgba(30,107,82,0); }
}

.topbar-meta{
    display:flex;
    align-items:center;
    gap:22px;
}

.topbar-time,
.topbar-phone{
    display:inline-flex;
    align-items:center;
    gap:7px;
    white-space:nowrap;
}

.topbar-phone{
    color:var(--rk-accent);
    font-weight:600;
    transition:color .2s ease;
}
.topbar-phone:hover{ color:#fff; }

.topbar svg{
    width:15px;
    height:15px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

/* =========================================================
   HEADER
========================================================= */
.header{
    position:sticky;
    top:0;
    z-index:9990;
    background:rgba(255,255,255,.96);
    backdrop-filter:saturate(160%) blur(10px);
    -webkit-backdrop-filter:saturate(160%) blur(10px);
    border-bottom:1px solid var(--rk-border);
    transition:box-shadow .25s ease;
}

.header::after{
    /* patli masala-stripe neeche */
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:-1px;
    height:3px;
    background:repeating-linear-gradient(90deg,var(--rk-accent) 0 18px,transparent 18px 26px);
    opacity:.9;
}

.header.scrolled{
    box-shadow:0 8px 24px -12px rgba(31,26,23,.18);
}

.header-inner{
    max-width:1240px;
    height:var(--rk-header-h);
    margin:0 auto;
    padding:0 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
}

/* ---------- LOGO ---------- */
.logo{
    display:flex;
    align-items:center;
    gap:12px;
    flex-shrink:0;
}

.logo-mark{
    width:46px;
    height:46px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:14px;
    background:linear-gradient(135deg,var(--rk-brand),var(--rk-accent));
    box-shadow:0 8px 18px -8px rgba(180,35,24,.6);
    transition:transform .3s ease;
}

.logo:hover .logo-mark{ transform:rotate(-6deg) scale(1.04); }

.logo-mark svg{
    width:30px;
    height:30px;
    fill:none;
    stroke:#fff;
    stroke-width:2.4;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.logo-text{
    display:flex;
    flex-direction:column;
    line-height:1.05;
}

.logo-text strong{
    font-family:var(--rk-font-display);
    font-size:23px;
    font-weight:800;
    color:var(--rk-ink);
    letter-spacing:-.2px;
}

.logo-text strong em{
    font-style:normal;
    color:var(--rk-brand);
}

.logo-text small{
    margin-top:3px;
    font-size:11px;
    font-weight:600;
    letter-spacing:.6px;
    text-transform:uppercase;
    color:var(--rk-leaf);
}

/* ---------- NAV ---------- */
.nav{
    display:flex;
    align-items:center;
    gap:4px;
}

.nav > a{
    position:relative;
    padding:9px 14px;
    border-radius:999px;
    font-size:14.5px;
    font-weight:500;
    color:var(--rk-ink-2);
    transition:color .2s ease, background .2s ease;
}

.nav > a:hover{
    color:var(--rk-brand);
    background:var(--rk-brand-soft);
}

.nav > a.active{
    color:var(--rk-brand-dark);
    background:var(--rk-brand-soft);
    font-weight:600;
}

.nav > a.active::after{
    content:"";
    position:absolute;
    left:50%;
    bottom:3px;
    width:5px;
    height:5px;
    margin-left:-2.5px;
    border-radius:50%;
    background:var(--rk-brand);
}

/* sirf mobile drawer mein dikhne wale hisse */
.nav-head,
.nav-cta{ display:none; }

/* ---------- RIGHT BUTTONS ---------- */
.header-right{
    display:flex;
    align-items:center;
    gap:10px;
    flex-shrink:0;
}

.call-btn,
.order-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    height:44px;
    padding:0 18px;
    border-radius:999px;
    font-size:14px;
    font-weight:600;
    white-space:nowrap;
    transition:transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.call-btn{
    color:var(--rk-leaf-dark);
    background:var(--rk-leaf-soft);
    border:1px solid rgba(30,107,82,.25);
}

.call-btn:hover{
    background:var(--rk-leaf);
    border-color:var(--rk-leaf);
    color:#fff;
}

.call-btn svg{
    width:18px;
    height:18px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.order-btn{
    color:#fff;
    background:linear-gradient(135deg,var(--rk-brand),#D9381E);
    box-shadow:0 10px 22px -10px rgba(180,35,24,.7);
}

.order-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 26px -10px rgba(180,35,24,.8);
}

.order-btn svg{
    width:19px;
    height:19px;
}

/* ---------- HAMBURGER ---------- */
.menu-toggle{
    display:none;
    position:relative;
    width:44px;
    height:44px;
    border-radius:12px;
    background:var(--rk-ink);
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    flex-shrink:0;
}

.menu-toggle span{
    display:block;
    width:20px;
    height:2px;
    border-radius:2px;
    background:#fff;
    transition:transform .25s ease, opacity .2s ease;
}

.menu-toggle.is-open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2){ opacity:0; }
.menu-toggle.is-open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ---------- OVERLAY ---------- */
.nav-overlay{
    position:fixed;
    inset:0;
    z-index:9989;   /* header (9990) ke neeche, taaki drawer upar dikhe */
    background:rgba(31,26,23,.45);
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
}
.nav-overlay[hidden]{ display:none; }

/* =========================================================
   TABLET — nav thoda tight
========================================================= */
@media (max-width:1150px){
    .nav > a{ padding:8px 10px; font-size:14px; }
    .call-btn .btn-text{ display:none; }
    .call-btn{ width:44px; padding:0; }
}

/* =========================================================
   MOBILE DRAWER
========================================================= */
@media (max-width:960px){

    :root{ --rk-header-h:66px; }

    /* backdrop-filter fixed drawer ko header ke andar band kar deta hai — mobile par hataya */
    .header{
        background:#fff;
        backdrop-filter:none;
        -webkit-backdrop-filter:none;
    }

    .logo{ min-width:0; }

    .header-inner{ padding:0 16px; gap:12px; }

    .menu-toggle{ display:flex; }

    .nav{
        position:fixed;
        top:0;
        right:0;
        z-index:9995;
        width:min(320px,86vw);
        height:100vh;
        height:100dvh;
        flex-direction:column;
        align-items:stretch;
        gap:4px;
        padding:0 18px 24px;
        background:var(--rk-white);
        box-shadow:-12px 0 40px rgba(31,26,23,.18);
        overflow-y:auto;
        transform:translateX(105%);
        visibility:hidden;
        transition:transform .3s ease, visibility 0s linear .3s;
    }

    .nav.active{
        transform:translateX(0);
        visibility:visible;
        transition:transform .3s ease, visibility 0s;
    }

    .nav-head{
        display:flex;
        align-items:center;
        justify-content:space-between;
        height:var(--rk-header-h);
        margin:0 -18px 10px;
        padding:0 18px;
        border-bottom:1px solid var(--rk-border);
        font-family:var(--rk-font-display);
        font-size:20px;
        font-weight:700;
        color:var(--rk-ink);
    }

    .nav-close{
        width:40px;
        height:40px;
        border-radius:10px;
        background:var(--rk-brand-soft);
        color:var(--rk-brand-dark);
        font-size:18px;
        font-weight:700;
    }

    .nav > a{
        padding:13px 14px;
        border-radius:12px;
        font-size:15.5px;
    }

    .nav > a.active::after{
        left:auto;
        right:16px;
        top:50%;
        bottom:auto;
        width:8px;
        height:8px;
        margin:-4px 0 0;
    }

    .nav-cta{
        display:flex;
        flex-direction:column;
        gap:10px;
        margin-top:auto;
        padding-top:22px;
    }

    .nav-cta .call-btn,
    .nav-cta .order-btn{
        width:100%;
        height:48px;
        font-size:15px;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */
@media (max-width:600px){

    .topbar-note{ display:none; }
    .topbar-inner{ justify-content:center; padding:7px 14px; }
    .topbar-meta{ gap:16px; font-size:12.5px; }

    .logo{ gap:9px; }
    .logo-mark{ width:40px; height:40px; border-radius:12px; }
    .logo-mark svg{ width:26px; height:26px; }
    .logo-text strong{ font-size:19px; }
    .logo-text small{ font-size:9.5px; letter-spacing:.4px; }

    .header-right{ gap:8px; }
    .header-right .call-btn{ display:none; }   /* drawer + topbar mein call hai */

    .order-btn{ height:40px; padding:0 14px; font-size:13px; }
    .menu-toggle{ width:40px; height:40px; border-radius:10px; }
}

@media (max-width:420px){
    .header-inner{ gap:8px; }
    .header-right .order-btn .btn-text{ display:none; }
    .header-right .order-btn{ width:40px; padding:0; }
}

@media (max-width:360px){
    .topbar-time{ display:none; }
    .logo-text small{ display:none; }
}

/* =========================================================
   REDUCED MOTION
========================================================= */
/* =========================================================
   LOGO IMAGE (600x200 — "RK Tiffin Center" image mein likha hai)
   Image na ho to purana icon + text wala .logo chalta hai
========================================================= */
.logo--image{
    display:flex;
    align-items:center;
    flex-shrink:0;
    line-height:0;
    border-radius:10px;
}

.logo--image .logo-img{
    display:block;
    height:60px;            /* desktop par logo ki oonchai */
    width:auto;
    max-width:240px;
    object-fit:contain;
    transition:transform .25s ease;
}

.logo--image:hover .logo-img{ transform:scale(1.02); }

@media (max-width:1150px){
    .logo--image .logo-img{ height:54px; max-width:210px; }
}

@media (max-width:960px){
    .logo--image .logo-img{ height:50px; max-width:190px; }
}

@media (max-width:600px){
    .logo--image .logo-img{ height:44px; max-width:160px; }
}

@media (max-width:380px){
    .logo--image .logo-img{ height:38px; max-width:130px; }
}

@media (prefers-reduced-motion:reduce){
    html{ scroll-behavior:auto; }
    *,
    *::before,
    *::after{
        animation:none !important;
        transition:none !important;
    }
}
