/* ============================================================
   HOMELAND BRANDS – Mobile Responsive + Bottom Nav + Animations
   ============================================================ */

/* ── AOS Animation System ─────────────────────────────────── */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.65s;
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
[data-aos].aos-animate   { opacity: 1; transform: none !important; }
[data-aos="fade-up"]     { transform: translateY(40px); }
[data-aos="fade-down"]   { transform: translateY(-40px); }
[data-aos="fade-right"]  { transform: translateX(-40px); }
[data-aos="fade-left"]   { transform: translateX(40px); }
[data-aos="zoom-in"]     { transform: scale(0.88); }
[data-aos="flip-up"]     { transform: perspective(600px) rotateX(-25deg); }

[data-aos][data-aos-delay="100"]  { transition-delay: 0.10s; }
[data-aos][data-aos-delay="150"]  { transition-delay: 0.15s; }
[data-aos][data-aos-delay="200"]  { transition-delay: 0.20s; }
[data-aos][data-aos-delay="250"]  { transition-delay: 0.25s; }
[data-aos][data-aos-delay="300"]  { transition-delay: 0.30s; }
[data-aos][data-aos-delay="350"]  { transition-delay: 0.35s; }
[data-aos][data-aos-delay="400"]  { transition-delay: 0.40s; }
[data-aos][data-aos-delay="500"]  { transition-delay: 0.50s; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  [data-aos] { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── Hover Effects – Cards ────────────────────────────────── */
.product-card,
.category-card,
.recipe-card,
.why-card,
.office-card,
.team-card,
.job-card,
.khanti-feature {
  will-change: transform;
}

/* Shimmer effect on image hover */
.product-card__img-wrap::after,
.category-card__img-wrap::after,
.recipe-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0s;
}
.product-card:hover .product-card__img-wrap::after,
.category-card:hover .category-card__img-wrap::after,
.recipe-card:hover .recipe-card__img::after {
  transform: translateX(200%);
  transition: transform 0.6s ease;
}

/* Floating animation for USP stats */
.usp-stat {
  animation: floatCard 4s ease-in-out infinite;
}
.usp-stat:nth-child(2) { animation-delay: .5s; }
.usp-stat:nth-child(3) { animation-delay: 1s; }
.usp-stat:nth-child(4) { animation-delay: 1.5s; }

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

/* Pulse on CTA buttons */
.btn--primary:not(:hover) {
  animation: subtlePulse 3s ease-in-out infinite;
}
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,134,10,0); }
  50%       { box-shadow: 0 0 0 6px rgba(200,134,10,.18); }
}

/* Typewriter cursor on hero eyebrow */
.hero__eyebrow::after {
  content: '|';
  animation: blink 1.2s step-end infinite;
  margin-left: 2px;
  color: var(--clr-primary-light);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Section entrance – staggered children */
.why-us__grid .why-card:nth-child(1)  { transition-delay: .00s; }
.why-us__grid .why-card:nth-child(2)  { transition-delay: .10s; }
.why-us__grid .why-card:nth-child(3)  { transition-delay: .20s; }
.why-us__grid .why-card:nth-child(4)  { transition-delay: .30s; }
.why-us__grid .why-card:nth-child(5)  { transition-delay: .40s; }
.why-us__grid .why-card:nth-child(6)  { transition-delay: .50s; }

.products-grid .product-card:nth-child(1)  { transition-delay: .00s; }
.products-grid .product-card:nth-child(2)  { transition-delay: .08s; }
.products-grid .product-card:nth-child(3)  { transition-delay: .16s; }
.products-grid .product-card:nth-child(4)  { transition-delay: .24s; }

/* ── Mobile Bottom Navigation Bar ────────────────────────── */
.bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -4px 24px rgba(0,0,0,.10);
    z-index: 998;
    align-items: stretch;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px 4px;
    font-size: 10px;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    letter-spacing: .02em;
    position: relative;
    transition: color .2s;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav__item i {
    font-size: 1.25rem;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1);
    display: block;
  }

  .bottom-nav__item span {
    font-size: 9px;
    line-height: 1;
  }

  /* Active state */
  .bottom-nav__item.active,
  .bottom-nav__item:hover {
    color: #c8860a;
  }
  .bottom-nav__item.active i,
  .bottom-nav__item:hover i {
    transform: translateY(-4px) scale(1.15);
  }

  /* Active indicator dot */
  .bottom-nav__item.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    background: #c8860a;
    border-radius: 50%;
  }

  /* Center special FAB-style button (Recipe Zone) */
  .bottom-nav__item--fab {
    position: relative;
    margin-top: -20px;
  }
  .bottom-nav__item--fab i {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #c8860a, #a36808);
    color: #fff;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem !important;
    box-shadow: 0 4px 16px rgba(200,134,10,.45);
    transform: none !important;
    transition: box-shadow .25s, transform .25s !important;
  }
  .bottom-nav__item--fab:hover i,
  .bottom-nav__item--fab.active i {
    transform: scale(1.08) !important;
    box-shadow: 0 6px 24px rgba(200,134,10,.6);
  }
  .bottom-nav__item--fab span { color: #c8860a; font-weight: 700; }

  /* Push page content above bottom nav */
  body {
    padding-bottom: 62px;
  }
}

/* ── Core Mobile Responsive Fixes ────────────────────────── */

/* Topbar – hide on very small screens */
@media (max-width: 480px) {
  .topbar { display: none; }
}

/* Header */
@media (max-width: 1024px) {
  .header__cta { display: none; }
}

@media (max-width: 600px) {
  :root {
    --header-h: 58px;
    --space-3xl: 3.5rem;
  }
  .header__inner { padding-inline: 1rem; }
  .header__logo-img { height: 36px; }
}

/* Hero */
@media (max-width: 768px) {
  .hero {
    height: 88vh;
    min-height: 460px;
  }
  .hero__content {
    padding-block: 3rem 5rem;
    padding-inline: 1.25rem;
  }
  .hero__title { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  .hero__subtitle { font-size: 0.95rem; }
  .hero__eyebrow { font-size: 0.7rem; }
  .hero__actions { gap: 0.5rem; }
  .hero__actions .btn { padding: .6rem 1.2rem; font-size: .83rem; }
  .hero__arrow { display: none; }
  .hero__scroll-cue { display: none; }
}

/* Trust Strip */
@media (max-width: 640px) {
  .trust-strip__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
  }
  .trust-item { padding: .6rem .75rem; border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
  .trust-item:nth-child(even) { border-right: none; }
  .trust-item:nth-child(3),
  .trust-item:nth-child(4) { border-bottom: none; }
  .trust-item__icon { font-size: 1.2rem; }
  .trust-item__text strong { font-size: 0.8rem; }
  .trust-item__text span { font-size: 0.7rem; }
}

/* About Intro */
@media (max-width: 900px) {
  .about-intro__inner { grid-template-columns: 1fr; gap: 2rem; }
  .about-intro__media { order: -1; }
  .about-intro__badge { padding: .75rem 1rem; }
  .about-intro__badge-num { font-size: 2rem; }
}
@media (max-width: 600px) {
  .about-intro__lead { font-size: 1rem; }
  .about-intro__pillars { gap: 1rem; }
  .pillar { flex-direction: row; align-items: flex-start; }
}

/* Categories Grid */
@media (max-width: 900px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .category-card__img-wrap { height: 150px; }
  .category-card__title { font-size: 1rem; }
  .category-card__desc { display: none; }
}
@media (max-width: 380px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
}

/* Products Grid */
@media (max-width: 900px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .product-card__img-wrap { height: 160px; }
  .product-card__body { padding: .7rem .8rem; }
  .product-card__title { font-size: .9rem; }
  .product-card__desc { display: none; }
  .product-card__price { font-size: 1rem; }
  .product-card__footer { flex-direction: column; gap: .4rem; align-items: flex-start; }
  .product-card__footer .btn { width: 100%; justify-content: center; }
}

/* Brand USP */
@media (max-width: 900px) {
  .brand-usp__inner { grid-template-columns: 1fr; gap: 2rem; }
  .brand-usp__stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 540px) {
  .usp-stat__num { font-size: 2rem; }
  .stats-row__grid { grid-template-columns: repeat(2,1fr); gap: .75rem; }
}

/* Why Us */
@media (max-width: 900px) {
  .why-us__grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 540px) {
  .why-us__grid { grid-template-columns: 1fr; gap: .75rem; }
  .why-card { padding: 1.25rem 1rem; text-align: left; display: flex; align-items: flex-start; gap: 1rem; }
  .why-card__icon { width: 46px; height: 46px; flex-shrink: 0; margin: 0; font-size: 1.1rem; }
  .why-card h3 { font-size: .95rem; margin-bottom: .25rem; }
  .why-card p { font-size: .82rem; }
}

/* Testimonials */
@media (max-width: 600px) {
  .testimonial-card { padding: 1.5rem 1.1rem; }
  .testimonial-card__quote { font-size: .93rem; }
}

/* CTA Banner */
@media (max-width: 600px) {
  .cta-banner { padding-block: 3rem; background-attachment: scroll; }
  .cta-banner__title { font-size: 1.6rem; }
  .cta-banner__subtitle { font-size: .9rem; }
  .cta-banner__actions { flex-direction: column; align-items: center; }
  .cta-banner__actions .btn { width: 100%; max-width: 320px; justify-content: center; }
}

/* Page Banners */
@media (max-width: 600px) {
  .page-banner { min-height: 200px; }
  .page-banner__title { font-size: 1.6rem; }
  .breadcrumb__item { font-size: .78rem; }
}

/* Products Sidebar Page */
@media (max-width: 900px) {
  .products-page__inner { grid-template-columns: 1fr; gap: 1.25rem; }
  .products-sidebar { position: static; }
  .products-sidebar__toggle { display: flex; }
  .products-sidebar__panel { display: none; }
  .products-sidebar__panel.is-open { display: block; }
}
@media (max-width: 540px) {
  .products-toolbar { flex-wrap: wrap; gap: .5rem; }
  .products-toolbar__count { font-size: .8rem; }
}

/* Product Detail */
@media (max-width: 900px) {
  .product-detail__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .product-gallery__main { height: 300px; }
}
@media (max-width: 540px) {
  .product-gallery__main { height: 250px; }
  .product-info__title { font-size: 1.4rem; }
  .product-info__price-amount { font-size: 2rem; }
  .product-info__actions { flex-direction: column; }
  .product-info__actions .btn { width: 100%; justify-content: center; }
  .product-tabs__tab { padding: .6rem .8rem; font-size: .8rem; }
  .usage-grid { grid-template-columns: 1fr; }
}

/* Contact */
@media (max-width: 900px) {
  .contact-form-section__inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .offices-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .offices-grid { grid-template-columns: 1fr; }
}

/* About Page */
@media (max-width: 900px) {
  .about-main__inner { grid-template-columns: 1fr; }
  .brand-essence__grid { grid-template-columns: 1fr; }
  .mvv-grid { grid-template-columns: 1fr; }
  .chairperson-inner { grid-template-columns: 1fr; }
  .chairperson-img-wrap { max-width: 300px; }
}
@media (max-width: 640px) {
  .team-grid { grid-template-columns: repeat(2,1fr); gap: 1rem; }
  .team-card__img-wrap { height: 180px; }
  .team-card__body { padding: .9rem; }
  .team-card__name { font-size: .95rem; }
}
@media (max-width: 420px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* Recipe Zone */
@media (max-width: 900px) {
  .recipe-detail-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .recipe-grid { grid-template-columns: repeat(2,1fr); gap: .75rem; }
  .recipe-card__img { height: 160px; }
  .recipe-card__body { padding: .7rem .8rem; }
  .recipe-card__title { font-size: .9rem; }
}
@media (max-width: 440px) {
  .recipe-grid { grid-template-columns: 1fr; }
  .submit-type-toggle { gap: .4rem; }
  .submit-type-btn { font-size: .78rem; padding: .5rem .9rem; }
}

/* Khanti & Career */
@media (max-width: 640px) {
  .khanti-features-grid { grid-template-columns: 1fr; }
  .khanti-process { flex-direction: column; align-items: center; gap: 1.5rem; }
  .khanti-step { max-width: 100%; }
  .jobs-grid { gap: .9rem; }
  .job-card { flex-direction: column; padding: 1.1rem; }
  .job-card__icon { width: 44px; height: 44px; font-size: 1.1rem; }
  .benefit-cards { grid-template-columns: repeat(2,1fr); gap: .75rem; }
}
@media (max-width: 420px) {
  .benefit-cards { grid-template-columns: 1fr; }
  .khanti-products-grid { grid-template-columns: repeat(2,1fr); }
}

/* Footer */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col--brand { grid-column: span 2; }
}
@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__col--brand { grid-column: span 1; }
  .footer__newsletter-inner { flex-direction: column; gap: 1rem; }
  .newsletter-form__group { flex-wrap: wrap; }
  .newsletter-form__input { min-width: 100%; }
  .footer__bottom-inner { flex-direction: column; text-align: center; gap: .6rem; }
  .footer__copyright { text-align: center; line-height: 1.6; }
  .footer__main { padding-block: 2.5rem; }
}

/* Back to top – position above bottom nav on mobile */
@media (max-width: 1024px) {
  .back-to-top {
    bottom: calc(62px + 12px);
    right: 14px;
    width: 40px; height: 40px;
    font-size: .85rem;
  }
}

/* ── Typography scaling ───────────────────────────────────── */
@media (max-width: 600px) {
  .section-title { font-size: clamp(1.4rem, 5vw, 2rem); }
  .section-subtitle { font-size: .9rem; }
  .section { padding-block: 2.5rem; }
  .section-head { margin-bottom: 1.5rem; }
}

/* ── Touch improvements ───────────────────────────────────── */
@media (hover: none) {
  .product-card:hover,
  .category-card:hover,
  .recipe-card:hover,
  .why-card:hover,
  .office-card:hover,
  .team-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  .btn:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ── Skeleton loading pulse (for images) ────────────────────── */
img[loading="lazy"]:not([src*="data:"]) {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Smooth page transitions ──────────────────────────────── */
.page-transition {
  animation: pageIn .4s ease forwards;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section divider wave ─────────────────────────────────── */
.wave-divider {
  display: block;
  width: 100%;
  height: 60px;
  overflow: hidden;
  line-height: 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Product card – quick view ripple on tap ──────────────── */
.product-card {
  overflow: hidden;
  position: relative;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(200,134,10,.08);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: width .4s ease, height .4s ease, opacity .4s ease;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}
.product-card:active::before {
  width: 300px; height: 300px;
  opacity: 1;
  transition-duration: .15s;
}

/* ── Mobile menu improved ──────────────────────────────────── */
@media (max-width: 1024px) {
  .mobile-menu {
    /* Topbar is hidden on mobile — only offset for sticky header */
    padding-top: calc(var(--header-h) + 0.75rem);
    border-radius: 0;
  }
  .mobile-menu__link {
    padding: .8rem 1rem;
    font-size: .95rem;
    border-radius: 8px;
    margin: 1px 0;
  }
  .mobile-submenu__link {
    padding: .6rem 1rem .6rem 1.5rem;
    font-size: .88rem;
  }
}

/* ── Accessibility – focus ring mobile ────────────────────── */
@media (max-width: 1024px) {
  :focus-visible {
    outline: 2px solid var(--clr-primary);
    outline-offset: 2px;
  }
}

/* ── Bottom nav safe area for notched phones ──────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 1024px) {
    .bottom-nav {
      padding-bottom: env(safe-area-inset-bottom);
      height: calc(62px + env(safe-area-inset-bottom));
    }
    body {
      padding-bottom: calc(62px + env(safe-area-inset-bottom));
    }
    .mobile-menu {
      height: calc(100% - 62px - env(safe-area-inset-bottom));
    }
  }
}

/* ── Desktop: remove bottom nav padding from body ─────────── */
@media (min-width: 1025px) {
  body {
    padding-bottom: 0 !important;
  }
  .bottom-nav {
    display: none !important;
  }
}

/* ── Prigrow credit line ───────────────────────────────────── */
.footer__prigrow {
  text-align: center;
  padding: .5rem 1rem;
  font-size: .72rem;
  color: rgba(255,255,255,.35);
  border-top: 1px solid rgba(255,255,255,.06);
  letter-spacing: .03em;
}
.footer__prigrow a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .2s;
}
.footer__prigrow a:hover { color: var(--clr-primary-light); }
