/* ==========================================================
   SWASTH FAMILY — Design tokens
   Palette: deep leaf green (trust/clean) + marigold gold (festive/CTA)
   ========================================================== */
:root {
    --color-bg: #fbf9f3;              /* warm cream, not stark white */
    --color-surface: #ffffff;
    --color-text: #16241c;            /* warm near-black, green family */
    --color-muted: #64766a;           /* sage-grey, ties to green */
    --color-primary: #2a7034;         /* deep leaf green */
    --color-primary-dark: #1f5527;
    --color-accent: #e6b40f;          /* marigold gold */
    --color-accent-dark: #c69709;
    --color-border: #e6e3d6;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-card: 0 1px 2px rgba(22,36,28,.04), 0 8px 24px -12px rgba(22,36,28,.12);
    --font-display: "Baloo 2", "Segoe UI", sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.55;
}

h1, h2, h3, .brand-type {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

a { color: inherit; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: rgba(251, 249, 243, 0.92);
    backdrop-filter: saturate(140%) blur(8px);
    z-index: 40;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--color-text); }
.logo-img { height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.logo span { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.main-nav { display: none; align-items: center; gap: 26px; }
.main-nav a { text-decoration: none; color: var(--color-text); font-size: 15px; font-weight: 500; }
.main-nav a:hover { color: var(--color-primary); }
.nav-highlight {
    background: var(--color-accent);
    color: var(--color-text) !important;
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 700 !important;
}
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 20px 16px;
    border-top: 1px solid var(--color-border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 10px 4px; text-decoration: none; color: var(--color-text); font-weight: 500; border-bottom: 1px solid var(--color-border); }
.mobile-nav a:last-child { border-bottom: none; }

@media (min-width: 860px) {
    .main-nav { display: flex; }
    .nav-toggle { display: none; }
    .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(160deg, #23522b 0%, #2a7034 55%, #3a8a45 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    color: #fff;
}
.hero.has-image { background-image: linear-gradient(0deg, rgba(15, 27, 18, 0.78) 0%, rgba(15, 27, 18, 0.25) 55%, rgba(15, 27, 18, 0.35) 100%), var(--hero-image); }

.hero-inner { position: relative; z-index: 2; padding: 64px 20px 48px; width: 100%; max-width: 1120px; margin: 0 auto; }
.hero-eyebrow { display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); padding: 6px 14px; border-radius: 999px; font-size: 13px; margin-bottom: 18px; }
.hero h1 { font-size: 40px; margin: 0 0 14px; max-width: 14ch; color: #fff; }
.hero p { font-size: 17px; color: rgba(255,255,255,.88); max-width: 42ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (min-width: 700px) {
    .hero h1 { font-size: 56px; }
    .hero p { font-size: 19px; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
    font-family: var(--font-body);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-accent); color: #201800; box-shadow: 0 10px 24px -10px rgba(230,180,15,.55); }
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-secondary { background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
.btn-secondary:hover { background: rgba(255,255,255,.24); }
.btn-danger { background: #c0392b; color: #fff; }
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading::after {
    content: "";
    width: 15px; height: 15px;
    border: 2px solid rgba(0,0,0,.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Outside the hero (light background), secondary/ghost buttons need dark ink */
.container .btn-secondary { background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-border); box-shadow: none; }
.container .btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-surface); }

/* ---------- Cards ---------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 18px;
}

/* ---------- How it works ---------- */
.how-it-works { padding: 56px 0 48px; }
.how-it-works h2 { font-size: 26px; margin: 0 0 28px; }
.how-it-works ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
.how-it-works li { display: flex; align-items: center; gap: 16px; counter-increment: step; }
.how-it-works li::before {
    content: counter(step);
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    color: var(--color-primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700;
}
@media (min-width: 700px) {
    .how-it-works ol { grid-template-columns: repeat(4, 1fr); }
    .how-it-works li { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ---------- Offer teaser band ---------- */
.offer-teaser { padding: 8px 0 40px; }
.offer-teaser .card {
    background: linear-gradient(120deg, #fff8e4 0%, #fdf1cf 100%);
    border-color: #f1dc9a;
}

/* ---------- Scroll reveal (one orchestrated moment) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Forms (public-facing: contact / partner / checkout / login) ---------- */
.form-page { padding: 48px 0 72px; }
.form-page .eyebrow-tag { display: inline-block; background: #eaf3ea; color: var(--color-primary-dark); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.form-page h1 { font-size: 30px; margin: 0 0 8px; }
.form-page .lede { color: var(--color-muted); max-width: 46ch; margin: 0 0 28px; }
.form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 28px;
    max-width: 480px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--color-text); }
.field .hint { font-size: 12px; color: var(--color-muted); }
.field input, .field select, .field textarea {
    padding: 13px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    background: var(--color-bg);
    transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--color-primary);
    background: var(--color-surface);
    outline: none;
}
.field-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 520px) { .field-row.two { grid-template-columns: 1fr 1fr; } }
.form-submit { width: 100%; margin-top: 6px; }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fdecec; color: #a4262c; }
.alert-success { background: #eaf3ea; color: var(--color-primary-dark); }

/* ---------- Product grid / shop ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.product-card {
    text-decoration: none; color: var(--color-text);
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
    padding: 12px; box-shadow: var(--shadow-card);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex; flex-direction: column; gap: 8px;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -16px rgba(22,36,28,.25); }
.product-card img, .product-card-placeholder { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm); background: #eef2ec; transition: transform .3s ease; }
.product-card:hover img { transform: scale(1.04); }
.product-card h3 { font-family: var(--font-body); font-weight: 600; font-size: 15px; margin: 2px 0 0; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--color-primary-dark); font-family: var(--font-display); }
.mrp { text-decoration: line-through; color: var(--color-muted); font-size: 13px; }
.discount-tag { background: #fff4d6; color: #8a6a04; font-size: 12px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }

.product-detail { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 32px 0 56px; }
.product-detail-images img { width: 100%; border-radius: var(--radius-lg); }
.muted { color: var(--color-muted); }

/* ---------- Auth ---------- */
.auth-page { padding: 56px 0; max-width: 420px; }

/* ---------- Errors ---------- */
.error-page { padding: 72px 0; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--color-border); margin-top: 56px; padding: 40px 0 0; background: var(--color-surface); }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
.footer-inner a { display: block; color: var(--color-text); text-decoration: none; margin: 6px 0; font-size: 14px; }
.footer-inner a:hover { color: var(--color-primary); }
.footer-inner h4 { font-family: var(--font-display); font-size: 14px; margin: 0 0 6px; color: var(--color-muted); }
.footer-bottom { border-top: 1px solid var(--color-border); padding: 16px 20px; text-align: center; color: var(--color-muted); font-size: 13px; }

@media (min-width: 700px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
    .product-detail { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
}
