/* ==========================================================================
   GREEN LOGISTIC - PUBLIC WEBSITE STYLES
   --------------------------------------------------------------------------
   Loaded after style.css (which holds colours, buttons, form fields, etc).
   This file only styles the public pages.

   Approach: MOBILE FIRST.
   The base rules below are written for phones. Larger screens are handled
   in "min-width" media queries, which add rules as the screen gets wider:

       640px  = large phones / small tablets
       900px  = tablets / laptops (desktop layout begins)
       1100px = wide desktops

   Table of contents
     1.  Page basics (skip link, body spacing for the mobile bar)
     2.  Header and navigation
     3.  Hero
     4.  Generic section layout
     5.  Two-column split (estimate / register / contact)
     6.  Cards, steps, notes
     7.  Estimate result
     8.  Vehicles
     9.  Features
     10. Service area chips
     11. Registration form groups
     12. Contact
     13. Footer
     14. Mobile bottom bar
   ========================================================================== */


/* ==========================================================================
   1. PAGE BASICS
   ========================================================================== */

/* Space at the bottom so the fixed mobile bar never covers the footer */
body.site {
    padding-bottom: 76px;
}

/* "Skip to content" link - only visible when focused with the keyboard */
.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 200;
    padding: 0.6rem 1rem;
    background: var(--green-900);
    color: #fff;
    border-radius: var(--radius-sm);
}
.skip-link:focus {
    top: 12px;
}


/* ==========================================================================
   2. HEADER AND NAVIGATION
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Logo styles (.brand) live in style.css because the admin panel uses them too. */

/* ---- Phone menu (hidden dropdown, opened by main.js) ---- */
.site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.site-header.is-open .site-nav {
    display: flex;
}

.site-nav a:not(.btn) {
    padding: 0.85rem 0.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink-2);
    border-bottom: 1px solid var(--paper);
}
.site-nav a:not(.btn):hover {
    color: var(--green-700);
}

.site-nav__wa {
    margin-top: 0.9rem;
}

/* Header WhatsApp button: hidden on phones (the menu and bottom bar have it) */
.site-header__cta {
    display: none;
}

/* ---- Menu button ---- */
.nav-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: var(--radius-md);
    color: var(--green-800);
}
.nav-toggle .icon {
    width: 24px;
    height: 24px;
}
/* Swap the hamburger for a close icon while the menu is open */
.nav-toggle__close {
    display: none;
}
.site-header.is-open .nav-toggle__open {
    display: none;
}
.site-header.is-open .nav-toggle__close {
    display: block;
}

@media (min-width: 900px) {
    /* Desktop: links sit in a row inside the header */
    .site-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
    }
    .site-nav a:not(.btn) {
        padding: 0.5rem 0.8rem;
        font-size: 0.9375rem;
        border: 0;
        border-radius: var(--radius-sm);
    }
    .site-nav a:not(.btn):hover {
        background: var(--green-50);
    }
    .site-nav__wa {
        display: none;
    }
    .site-header__cta {
        display: inline-flex;
    }
    .nav-toggle {
        display: none;
    }
    .brand {
        margin-right: 1rem;
    }
    /* Nav links after the logo, WhatsApp button far right */
    .site-nav {
        margin-right: auto;
    }
}


/* ==========================================================================
   3. HERO
   Deep green background, headline on the left, truck on the right.
   On phones the truck sits below the text.
   ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 0 3rem;
    background:
        radial-gradient(60% 50% at 85% 10%, rgba(200, 242, 90, 0.16), transparent 70%),
        radial-gradient(70% 60% at 0% 100%, rgba(42, 148, 97, 0.35), transparent 70%),
        var(--green-900);
    color: #fff;
}

.hero__grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.35rem, 9vw, 4.25rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
    max-width: 14ch;                    /* keeps the headline compact and punchy */
    text-wrap: balance;
}

.hero__lead {
    max-width: 34rem;
    margin-top: 1.1rem;
    font-size: 1.125rem;
    color: #cfe5d8;
}

.hero__actions {
    display: flex;
    flex-direction: column;             /* stacked full-width buttons on phones */
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
    margin-top: 1.75rem;
    font-size: 0.9375rem;
    color: #b6d3c3;
}
.hero__facts li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.hero__facts .icon {
    color: var(--lime);
}

/* ---- Vehicle stage ---- */
.hero__stage {
    position: relative;
    padding: 1.25rem 1rem 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-xl);
}

.hero__truck {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.35));
    /* The ONE entrance animation on the page: the truck drives in */
    animation: truck-drive-in 1s var(--ease) both;
}

@keyframes truck-drive-in {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Dashed "route" line under the truck */
.hero__route {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: -0.4rem 0.25rem 1rem;
}
.hero__route-line {
    flex: 1;
    height: 0;
    border-top: 3px dashed rgba(200, 242, 90, 0.55);
}
.hero__route-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 5px rgba(200, 242, 90, 0.2);
}
.hero__route-dot--end {
    background: transparent;
    border: 3px solid var(--lime);
    box-shadow: none;
}

.hero__caption {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(6, 36, 26, 0.55);
    border-radius: var(--radius-md);
}
.hero__caption strong {
    font-family: var(--font-display);
    font-size: 1.1875rem;
    font-weight: 700;
}
.hero__caption p {
    margin-top: 0.2rem;
    font-size: 0.875rem;
    color: #b6d3c3;
}
.hero__caption-link {
    flex: none;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--lime);
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (min-width: 640px) {
    .hero__actions {
        flex-direction: row;
    }
}

@media (min-width: 900px) {
    .hero {
        padding: 5rem 0 5.5rem;
    }
    .hero__grid {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 3.5rem;
    }
    .hero__stage {
        padding: 2rem 1.75rem 1.25rem;
    }
}


/* ==========================================================================
   4. GENERIC SECTION LAYOUT
   ========================================================================== */
.section {
    padding: 3.5rem 0;
}

/* Background colour variants */
.section--paper { background: var(--paper); }
.section--mint  { background: var(--green-50); }
.section--dark  {
    background: var(--green-900);
    color: #fff;
}

.section__head {
    max-width: 44rem;
    margin-bottom: 2rem;
}

.section__title {
    font-size: clamp(1.75rem, 5.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.section__lead {
    margin-top: 0.9rem;
    max-width: 38rem;
    font-size: 1.0625rem;
    color: var(--muted);
}
.section--dark .section__lead {
    color: #b6d3c3;
}

/* Friendly text shown when a list is empty */
.empty {
    padding: 1.25rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    color: var(--muted);
}

@media (min-width: 900px) {
    .section {
        padding: 5.5rem 0;
    }
    .section__head {
        margin-bottom: 2.75rem;
    }
}


/* ==========================================================================
   5. TWO-COLUMN SPLIT
   Text on one side, a form card on the other. Stacks on phones.
   ========================================================================== */
.split {
    display: grid;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 900px) {
    .split {
        grid-template-columns: 1fr 1.05fr;
        gap: 4rem;
    }
    /* Intro text stays visible while the longer form scrolls */
    .split__intro {
        position: sticky;
        top: calc(var(--header-h) + 2rem);
    }
}


/* ==========================================================================
   6. CARDS, STEPS, NOTES
   ========================================================================== */
.card {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.card--form {
    color: var(--ink);                  /* keeps text dark inside dark sections */
}

.card__title {
    margin-bottom: 1.25rem;
    font-size: 1.375rem;
}

@media (min-width: 640px) {
    .card {
        padding: 2rem;
    }
}

/* ---- Numbered steps (a real sequence) ---- */
.steps {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.75rem;
}
.steps__item {
    display: flex;
    gap: 1rem;
}
.steps__num {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
}
.steps__item strong {
    display: block;
    font-weight: 700;
}
.steps__item p {
    color: var(--muted);
    font-size: 0.9375rem;
}

/* ---- Info note ---- */
.note {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.75rem;
    padding: 0.9rem 1rem;
    background: var(--green-50);
    border-left: 4px solid var(--green-600);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.875rem;
    color: var(--ink-2);
}
.note .icon {
    margin-top: 0.1rem;
    color: var(--green-600);
}

/* ---- Checklist (registration section) ---- */
.checklist {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-weight: 500;
}
.checklist .icon {
    flex: none;
    width: 24px;
    height: 24px;
    padding: 4px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
    stroke-width: 3;
}


/* ==========================================================================
   7. ESTIMATE RESULT
   main.js writes: <strong>Approx. ₹1,234</strong><small>Estimated fare</small>
   ========================================================================== */
.result {
    margin-top: 1.25rem;
    padding: 1.1rem 1.25rem;
    background: var(--green-50);
    border: 1px solid var(--green-200);
    border-radius: var(--radius-md);
    color: var(--green-800);
    text-align: center;
}
.result strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.result small {
    color: var(--muted);
}
/* Error message styling (main.js adds .result--error) */
.result--error {
    background: var(--danger-bg);
    border-color: #f1c2bd;
    color: var(--danger-text);
    font-weight: 600;
}

#estimateWhatsApp {
    margin-top: 0.75rem;
}


/* ==========================================================================
   8. VEHICLES
   ========================================================================== */
.vehicle-list {
    display: grid;
    gap: 1.25rem;
}

.vehicle {
    display: grid;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.vehicle__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--green-50);
    color: var(--green-600);
}
.vehicle__icon .icon {
    width: 34px;
    height: 34px;
}

.vehicle__name {
    margin: 0.6rem 0 0.3rem;
    font-size: 1.375rem;
}

.vehicle__text {
    color: var(--muted);
}

.specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.specs li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.875rem;
    color: var(--ink-2);
}
.specs .icon {
    width: 1rem;
    height: 1rem;
    color: var(--green-600);
}

@media (min-width: 900px) {
    .vehicle {
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 1.75rem;
        padding: 1.75rem;
    }
    .vehicle__icon {
        width: 84px;
        height: 84px;
    }
}


/* ==========================================================================
   9. FEATURES ("Why Green Logistic")
   ========================================================================== */
.features {
    display: grid;
    gap: 1.75rem;
}
.feature {
    display: flex;
    gap: 1rem;
}
.feature__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--green-600);
    color: #fff;
}
.feature h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1875rem;
}
.feature p {
    color: var(--ink-2);
}

@media (min-width: 640px) {
    .features {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 3rem;
    }
}
@media (min-width: 1100px) {
    .features {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    .feature {
        flex-direction: column;
    }
}


/* ==========================================================================
   10. SERVICE AREA CHIPS
   ========================================================================== */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9375rem;
}
.chip .icon {
    width: 1rem;
    height: 1rem;
    color: var(--green-600);
}
.chip__pin {
    color: var(--muted);
    font-weight: 500;
}


/* ==========================================================================
   11. REGISTRATION FORM GROUPS
   ========================================================================== */
.form-group {
    min-width: 0;
    margin: 0 0 1.25rem;
    padding: 0;
    border: 0;
}
.form-group legend {
    padding: 0;
    margin-bottom: 0.9rem;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--green-700);
}


/* ==========================================================================
   12. CONTACT
   ========================================================================== */
.contact-list {
    display: grid;
    gap: 1rem;
    margin: 1.75rem 0 2rem;
    color: #d7eadf;
}
.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.contact-list .icon {
    margin-top: 0.15rem;
    color: var(--lime);
}
.contact-list a {
    font-weight: 700;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ==========================================================================
   13. FOOTER
   ========================================================================== */
.site-footer {
    background: var(--green-950);
    color: #a9c4b5;
}
.site-footer__inner {
    display: grid;
    gap: 1.5rem;
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
}
.site-footer__brand p {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
}
.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.9375rem;
}
.site-footer__links a:hover {
    color: #fff;
}
.site-footer__legal {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer__legal small {
    color: #7f9c8c;
}

@media (min-width: 900px) {
    .site-footer__inner {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}


/* ==========================================================================
   14. MOBILE BOTTOM BAR
   Fixed to the bottom on phones. Hidden from 900px (desktop has the header).
   ========================================================================== */
.mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(12, 58, 39, 0.08);
}

.mobile-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 54px;
    border-radius: var(--radius-md);
    background: var(--green-50);
    color: var(--green-800);
    font-size: 0.75rem;
    font-weight: 700;
}
.mobile-bar__item .icon {
    width: 22px;
    height: 22px;
}
.mobile-bar__item--wa {
    background: var(--wa);
    color: var(--green-950);
}
.mobile-bar__item--main {
    background: var(--green-600);
    color: #fff;
}

@media (min-width: 900px) {
    .mobile-bar {
        display: none;
    }
    body.site {
        padding-bottom: 0;
    }
}
