/* ============================================= */
/* DuraFungi – Final Site Stylesheet (Jan 2026) */
/* Single source of truth: /assets/css/style.css */
/* Brand-consistent | Mobile-safe | Legacy-ready | Bulletproof */
/* ============================================= */

/* --------------------------------------------- */
/* 1) Tokens: Brand + Semantic + Legacy Aliases */
/* --------------------------------------------- */
:root {
    /* Brand palette */
    --brand-black: #000000;
    --brand-charcoal: #1F1F1F;
    --brand-white: #F5F5F5;
    --brand-beige: #D8C3A5;
    --brand-green: #3B7A57;
    --brand-olive: #6E7F5D;
    --brand-olive-light: #8C997C;
    --brand-rust: #8B5E3C;
    --brand-rust-light: #A47D5F;
    --brand-silver: #C0C0C0;

    /* Semantic tokens (use these in all new CSS) */
    --color-primary: var(--brand-rust);
    --color-primary-hover: var(--brand-rust-light);
    --color-secondary: var(--brand-olive);
    --color-secondary-hover: var(--brand-olive-light);
    --color-text: var(--brand-charcoal);
    --color-text-light: #666666;
    --color-bg: var(--brand-white);
    --color-bg-neutral: var(--brand-beige);
    --color-border: var(--brand-silver);
    --color-success: var(--brand-green);

    /* Neutral grays */
    --gray-100: #f9f9f9;
    --gray-200: #eeeeee;
    --gray-300: #cccccc;
    --gray-400: #999999;
    --gray-500: #666666;
    --gray-600: #444444;

    /* Legacy aliases → all old pages continue working perfectly */
    --black: var(--brand-black);
    --charcoal: var(--brand-charcoal);
    --white: var(--brand-white);
    --beige: var(--brand-beige);
    --green: var(--brand-green);
    --olive: var(--brand-olive);
    --rust: var(--brand-rust);
    --silver: var(--brand-silver);
    --accent: var(--color-primary);
    --hover: var(--color-secondary);
    --text-dark: var(--color-text);
    --bg-light: var(--color-bg);
    --bg-neutral: var(--color-bg-neutral);
}

/* --------------------------------------------- */
/* 2) Base Reset + Global Behavior */
/* --------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    max-width: 100%;
    /* extra mobile safety net */
    /* iOS safe areas */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Safer word-breaking — only in content regions */
.container,
.wholesale-container,
.guide-section,
.product-layout,
.card-body,
.form-section,
.contact-section,
.contact-form-section,
p,
li {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Sticky sidebar works even if someone adds overflow later */
.product-layout {
    overflow: visible !important;
}

/* --------------------------------------------- */
/* 3) Header + Navigation */
/* --------------------------------------------- */
header {
    background: var(--color-bg-neutral);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 2px solid var(--color-secondary);
    position: relative;
}

header img {
    height: clamp(64px, 10vw, 100px);
    width: auto;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.nav-toggle-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: 0.3s;
}

nav.topnav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

nav.topnav a {
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.3s ease;
    white-space: nowrap;
}

nav.topnav a:hover {
    color: var(--color-primary);
}

/* --------------------------------------------- */
/* 4) Hero */
/* --------------------------------------------- */
.hero {
    text-align: center;
    padding: 6rem 1.5rem 4.5rem;
    background:
        linear-gradient(to bottom, rgba(31, 31, 31, 0.92), rgba(31, 31, 31, 0.82) 40%, rgba(31, 31, 31, 0.72)),
        url("https://s3.ap-southeast-2.amazonaws.com/durafungi.com/assets/img/lions_mane_pride_01.jpg") center bottom / cover no-repeat;
    color: #fff;
    min-height: 100svh;
}

@supports (height: 100dvh) {
    .hero {
        min-height: 100dvh;
    }
}

.hero h1 {
    font-size: 2.2rem;
    margin: 0;
}

.hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0.5rem auto 0;
}

.hero-cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* --------------------------------------------- */
/* 5) Shared UI Components */
/* --------------------------------------------- */
.btn {
    padding: 0.9rem 1.9rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--color-bg);
    color: var(--color-text);
    border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
    background-color: var(--gray-100);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.card {
    background: var(--color-bg-neutral);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
    border: 1px solid var(--color-secondary);
    will-change: transform;
}

.card:hover {
    transform: scale(1.02);
}

.buy {
    background: var(--color-primary);
    color: var(--color-bg);
    padding: 0.75rem;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    border-top: 1px solid var(--color-secondary);
    transition: background 0.3s;
}

.buy:hover {
    background: var(--color-secondary);
}

.social-links a {
    display: inline-block;
    width: 50px;
    height: 50px;
    transition: transform 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.right-content {
    align-self: flex-start;
    position: sticky;
    top: 20px;
    background: var(--gray-100);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

/* --------------------------------------------- */
/* 6) Footer */
/* --------------------------------------------- */
footer {
    background: var(--color-bg-neutral);
    color: var(--color-text);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid var(--color-border);
}

/* --------------------------------------------- */
/* 7) Accessibility + Mobile Safety */
/* --------------------------------------------- */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

@media (hover: none) and (pointer: coarse) {

    button,
    a,
    input[type="button"],
    input[type="submit"],
    input[type="reset"] {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (max-width: 768px) {

    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .nav-toggle {
        display: block;
    }

    nav.topnav {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        background: var(--color-bg-neutral);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
    }

    nav.topnav.open {
        display: flex;
    }

    nav.topnav a {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid var(--color-secondary);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================= */
/* READY! You can now paste all your existing   */
/* page-specific styles (grid, forms, tables,   */
/* grow guides, etc.) below this line if you    */
/* want everything in one file.                 */
/* ============================================= */

/* ===================================================== */
/* INDEX PAGE LAYER — Match "Original" Layout (LOCK)     */
/* Applies only to: body.page-home                        */
/* ===================================================== */

/* ---------- Header: horizontal + sticky like original ---------- */
body.page-home header {
    background: linear-gradient(to bottom, var(--brand-beige) 0%, var(--brand-white) 100%);
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;

    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: none;
    /* override base header rule */
}

/* Logo size like original */
body.page-home header img {
    height: 48px;
    width: auto;
}

/* Nav in a single row on desktop */
body.page-home nav.topnav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 1.75rem;
    margin-top: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Desktop link styling */
body.page-home nav.topnav a {
    color: var(--brand-charcoal);
}

/* Home link highlight (green) */
body.page-home nav.topnav a[aria-current="page"] {
    color: var(--brand-green);
}

/* Hamburger button style (match original) */
body.page-home .nav-toggle {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ---------- Promo banner: full-width green bar ---------- */
body.page-home .promo-banner {
    background: var(--brand-green);
    color: #fff;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* ---------- Hero: use your LOCK hero but match spacing ---------- */
body.page-home .hero {
    text-align: center;
    padding: 6rem 1.5rem 4.5rem;
}

/* ---------- Mode toggle: pill UI like original ---------- */
body.page-home .mode-toggle-wrap {
    display: flex;
    justify-content: center;
    margin: 1.75rem 0 1.5rem;
}

body.page-home .mode-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.60);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.30);
}

body.page-home .mode-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 2);
    border-radius: 9999px;
    background: var(--brand-green);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

/* slide right when subscription is active */
body.page-home .mode-toggle[data-active="subscription"] .mode-slider {
    transform: translateX(100%);
}

body.page-home .mode-btn {
    position: relative;
    z-index: 1;
    padding: 0.85rem 1.75rem;
    min-width: 160px;

    font-weight: 800;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);

    background: transparent;
    border: none;
    cursor: pointer;
}

body.page-home .mode-btn.active {
    color: #fff;
}

/* ---------- Hero CTA buttons: match original look ---------- */
body.page-home .hero-cta-group .btn {
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.20);
}

body.page-home .hero-cta-group .btn.btn-secondary {
    background: #fff;
    border-color: transparent;
}

body.page-home .hero-cta-group .btn.btn-primary {
    background: var(--brand-green);
    border-color: transparent;
}

/* Hero note line */
body.page-home .hero-note {
    margin-top: 1.75rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

body.page-home .hero-note a {
    color: #fff;
    text-decoration: underline;
}

/* ---------- Mobile menu behavior: use existing LOCK open class ---------- */
@media (max-width: 768px) {
    body.page-home nav.topnav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.10);
        z-index: 999;
    }

    body.page-home nav.topnav.open {
        display: flex;
    }

    body.page-home nav.topnav a {
        padding: 1rem 0;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        text-align: left;
    }

    body.page-home .mode-btn {
        min-width: 140px;
        padding: 0.85rem 1rem;
    }
}

.promo-banner {
    background: var(--brand-green) !important;
    color: #fff !important;
}
/* ============================================= */
/* INDEX PAGE LAYER (Jan 2026)                    */
/* Applies to: index.html (body.page-home)        */
/* ============================================= */

.page-home .promo-banner{
  background: var(--brand-green);
  color:#fff;
  text-align:center;
  padding:0.75rem 1rem;
  font-weight:800;
  font-size:0.95rem;
  letter-spacing:0.4px;
}

.page-home .hero{
  text-align:center;
}

.page-home .hero h1{
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight:800;
  margin:0 0 0.75rem 0;
}

.page-home .hero p{
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  max-width: 820px;
  margin:0 auto 1.25rem auto;
  color: rgba(255,255,255,0.92);
}

.page-home .mode-toggle{
  position:relative;
  display:inline-flex;
  align-items:center;
  padding:4px;
  border:1px solid rgba(255,255,255,0.35);
  border-radius:9999px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
  margin: 1.25rem 0 1rem 0;
}

.page-home .mode-slider{
  position:absolute;
  top:4px;
  bottom:4px;
  left:4px;
  width: calc((100% - 8px)/2);
  border-radius:9999px;
  background: var(--brand-green);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index:0;
}

.page-home .mode-toggle[data-active="subscription"] .mode-slider{
  transform: translateX(100%);
}

.page-home .mode-btn{
  position:relative;
  z-index:1;
  padding:0.85rem 1.35rem;
  font-weight:800;
  background:transparent;
  border:none;
  cursor:pointer;
  color: rgba(255,255,255,0.85);
  transition: transform 0.1s ease, color 0.15s ease;
  font-size:0.95rem;
  min-width: 150px;
}

.page-home .mode-btn.active{
  color:#fff;
}

.page-home .mode-btn:active{
  transform: scale(0.98);
}

.page-home .hero-cta{
  display:flex;
  gap:1rem;
  justify-content:center;
  flex-wrap:wrap;
  margin-top: 1.25rem;
}

.page-home .btn-pill{
  display:inline-block;
  padding: 0.95rem 1.75rem;
  border-radius: 9999px;
  font-weight:800;
  text-decoration:none;
  transition: transform 0.12s ease, filter 0.12s ease;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}

.page-home .btn-pill:active{
  transform: scale(0.98);
}

.page-home .btn-pill.white{
  background:#fff;
  color: var(--brand-charcoal);
  border: 2px solid rgba(255,255,255,0.8);
}

.page-home .btn-pill.green{
  background: var(--brand-green);
  color:#fff;
  border: 2px solid rgba(255,255,255,0.15);
}

.page-home .hero-links{
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
}

.page-home .hero-links a{
  color: rgba(255,255,255,0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-home .section{
  padding: 4rem 1.25rem;
}

.page-home .section.alt{
  background: var(--gray-100);
}

.page-home .container-wide{
  max-width: 1200px;
  margin: 0 auto;
}

.page-home .section-title{
  text-align:center;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 2.25rem 0;
  font-weight: 900;
  color: var(--brand-charcoal);
}

.page-home .farm-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
}

.page-home .farm-card{
  background: #fff;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
  text-decoration:none;
  color: var(--brand-charcoal);
  transform: translateY(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.page-home .farm-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.14);
}

.page-home .farm-card img{
  width:100%;
  height: 180px;
  object-fit: cover;
}

.page-home .farm-card .pad{
  padding: 1.2rem 1.1rem;
}

.page-home .farm-card h3{
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.page-home .farm-card p{
  margin: 0;
  color: #555;
  font-weight: 600;
  font-size: 0.95rem;
}

.page-home .guide-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.page-home .guide-card{
  background:#fff;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.page-home .guide-card img{
  width:100%;
  height: 190px;
  object-fit: cover;
}

.page-home .guide-card .pad{
  padding: 1.25rem;
}

.page-home .tag{
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-rust);
}

.page-home .guide-card h3{
  margin: 0.4rem 0 0.6rem 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.page-home .guide-card p{
  margin: 0 0 1rem 0;
  color: #555;
}

.page-home .btn-block{
  width:100%;
  border:none;
  cursor:pointer;
  padding: 0.95rem 1rem;
  border-radius: 9999px;
  font-weight: 900;
  background: var(--brand-green);
  color:#fff;
}

.page-home .btn-block:active{
  transform: scale(0.99);
}

.page-home .guide-footer{
  text-align:center;
  margin-top: 2.25rem;
}

.page-home .guide-footer a{
  color: var(--brand-green);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-home .quote{
  max-width: 900px;
  margin: 0 auto;
  text-align:center;
  color: #333;
}

.page-home .quote p{
  font-size: 1.15rem;
  line-height: 1.8;
  font-style: italic;
}

.page-home .badge-row{
  margin-top: 1.6rem;
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap: 1.25rem;
  opacity: 0.7;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* Dropdowns (desktop hover + mobile click open) */
.dropdown{ position: relative; }
.dropdown > a{ display:flex; align-items:center; gap:0.35rem; }
.dropdown-content{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  min-width: 220px;
  background:#fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  padding: 0.4rem;
  z-index: 2000;
}
.dropdown:hover > .dropdown-content{ display:block; }
.dropdown-content a{
  display:block;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
}
.dropdown-content a:hover{
  background: rgba(59,122,87,0.12);
}

/* Responsive */
@media (max-width: 1024px){
  .page-home .farm-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px){
  .dropdown:hover > .dropdown-content{ display:none; }
  .dropdown.open > .dropdown-content{ display:block; position: static; box-shadow:none; padding-left: 0.5rem; }
  .page-home .guide-grid{ grid-template-columns: 1fr; }
  .page-home .farm-grid{ grid-template-columns: 1fr; }
  .page-home .mode-btn{ min-width: 135px; font-size: 0.9rem; padding: 0.85rem 1.1rem; }
}

