/* =========================================================================
   Tradevine Theme — Design System
   =========================================================================
   Brand identity for a produce brokerage platform.

   Color philosophy:
     • Green (produce vitality) — primary accent, CTAs, success states
     • Navy (trust, banking-grade) — backgrounds, depth, conservative
     • Amber (orange/citrus warmth) — secondary highlights, urgency
     • Earth grays — body text, dividers, cards
   ========================================================================= */

:root {
    /* — Brand colours — */
    --tv-green-50:  #EDF7E6;
    --tv-green-100: #D2EBB7;
    --tv-green-200: #A8D87F;
    --tv-green-400: #8BBA4B;
    --tv-green-500: #6BA32E;
    --tv-green-600: #5A8F23;
    --tv-green-700: #3D6311;
    --tv-green-900: #1A2C07;

    --tv-navy-50:   #EEF2F8;
    --tv-navy-100:  #C9D4E5;
    --tv-navy-400:  #4A6B96;
    --tv-navy-500:  #1F3A5F;
    --tv-navy-700:  #102545;
    --tv-navy-900:  #0A1A33;

    --tv-amber-50:  #FEF5E7;
    --tv-amber-400: #F0A040;
    --tv-amber-500: #D88420;

    --tv-coral-500: #E27154;  /* tomato/persimmon */
    --tv-red-500:   #E04848;

    --tv-cream:     #FBF9F4;  /* the page background — warm off-white */
    --tv-paper:     #FFFFFF;  /* card surfaces */

    --tv-gray-50:   #F7F7F6;
    --tv-gray-100:  #EFEFEC;
    --tv-gray-200:  #DEDEDA;
    --tv-gray-300:  #C8C8C2;
    --tv-gray-500:  #8A8A82;
    --tv-gray-700:  #4A4A45;
    --tv-gray-900:  #1F1F1B;

    /* — Layout tokens — */
    --tv-radius-sm: 6px;
    --tv-radius-md: 10px;
    --tv-radius-lg: 16px;
    --tv-radius-xl: 22px;
    --tv-radius-full: 999px;

    --tv-shadow-sm: 0 1px 2px rgba(15, 30, 50, 0.06);
    --tv-shadow-md: 0 4px 14px rgba(15, 30, 50, 0.08);
    --tv-shadow-lg: 0 12px 40px rgba(15, 30, 50, 0.12);

    --tv-font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --tv-container: 1200px;
}

/* — Reset / base — */
html, body { margin: 0; padding: 0; }
body.tradevine {
    font-family: var(--tv-font);
    color: var(--tv-gray-900);
    background: var(--tv-cream);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.tradevine * { box-sizing: border-box; }
.tradevine img, .tradevine svg { max-width: 100%; height: auto; vertical-align: middle; }
.tradevine a { color: var(--tv-green-600); text-decoration: none; transition: color .15s ease; }
.tradevine a:hover { color: var(--tv-green-700); }
.tradevine h1, .tradevine h2, .tradevine h3, .tradevine h4 {
    font-family: var(--tv-font);
    color: var(--tv-navy-900);
    line-height: 1.2;
    margin: 0 0 .5em;
    letter-spacing: -0.015em;
}
.tradevine h1 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 800; }
.tradevine h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
.tradevine h3 { font-size: 1.3rem; font-weight: 600; }
.tradevine h4 { font-size: 1.1rem; font-weight: 600; }
.tradevine p { margin: 0 0 1em; }

/* — Layout primitives — */
.tv-container { max-width: var(--tv-container); margin: 0 auto; padding: 0 24px; }
.tv-section { padding: 80px 0; }
.tv-section--tight { padding: 56px 0; }

/* =========================================================================
   HEADER
   ========================================================================= */
.tv-header {
    background: var(--tv-paper);
    border-bottom: 1px solid var(--tv-gray-100);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(10px);
}
.tv-header__inner {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 14px 24px;
    max-width: var(--tv-container);
    margin: 0 auto;
}
.tv-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--tv-navy-900);
}
.tv-logo:hover { color: var(--tv-navy-900); }
.tv-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: var(--tv-green-500);
    color: white;
    border-radius: 10px;
    font-size: 18px;
}
.tv-nav { display: flex; gap: 28px; flex: 1; }
.tv-nav a {
    color: var(--tv-gray-700);
    font-weight: 500;
    font-size: 15px;
    transition: color .15s ease;
}
.tv-nav a:hover, .tv-nav a.active { color: var(--tv-navy-900); }
.tv-header__cta { display: flex; gap: 10px; align-items: center; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.tv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--tv-radius-md);
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s ease;
    text-decoration: none;
    line-height: 1;
}
.tv-btn--primary {
    background: var(--tv-green-500);
    color: white;
}
.tv-btn--primary:hover { background: var(--tv-green-600); color: white; transform: translateY(-1px); box-shadow: var(--tv-shadow-md); }
.tv-btn--secondary {
    background: var(--tv-paper);
    color: var(--tv-navy-700);
    border-color: var(--tv-gray-200);
}
.tv-btn--secondary:hover { border-color: var(--tv-navy-500); color: var(--tv-navy-900); }
.tv-btn--ghost {
    background: transparent;
    color: var(--tv-navy-700);
}
.tv-btn--ghost:hover { color: var(--tv-navy-900); background: var(--tv-gray-50); }
.tv-btn--lg { padding: 16px 28px; font-size: 16px; }
.tv-btn--sm { padding: 8px 14px; font-size: 13px; }

/* =========================================================================
   HERO
   ========================================================================= */
.tv-hero {
    position: relative;
    padding: 90px 0 100px;
    background: linear-gradient(180deg, var(--tv-cream) 0%, var(--tv-paper) 100%);
    overflow: hidden;
}
.tv-hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    max-width: var(--tv-container);
    margin: 0 auto;
    padding: 0 24px;
}
.tv-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--tv-radius-full);
    background: var(--tv-green-50);
    color: var(--tv-green-700);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}
.tv-hero h1 {
    margin-bottom: 20px;
}
.tv-hero h1 em { font-style: normal; color: var(--tv-green-600); }
.tv-hero__lede {
    font-size: 1.2rem;
    color: var(--tv-gray-700);
    margin-bottom: 32px;
    max-width: 540px;
    line-height: 1.55;
}
.tv-hero__actions { display: flex; gap: 14px; align-items: center; }
.tv-hero__visual {
    position: relative;
    aspect-ratio: 1;
    background: var(--tv-green-50);
    border-radius: var(--tv-radius-xl);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The produce illustration grid — six product cards arranged inside the hero panel */
.tv-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 14px;
    width: 90%;
    height: 90%;
    padding: 20px;
}
.tv-product-card {
    background: var(--tv-paper);
    border-radius: var(--tv-radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--tv-shadow-sm);
    transition: transform .25s ease;
}
.tv-product-card:hover { transform: translateY(-3px); box-shadow: var(--tv-shadow-md); }
.tv-product-card__icon {
    font-size: 28px;
    line-height: 1;
}
.tv-product-card__meta { margin-top: auto; }
.tv-product-card__name { font-size: 13px; font-weight: 600; color: var(--tv-navy-900); }
.tv-product-card__origin { font-size: 11px; color: var(--tv-gray-500); }

/* =========================================================================
   TRUST BAR
   ========================================================================= */
.tv-trust-bar {
    padding: 36px 0;
    background: var(--tv-paper);
    border-top: 1px solid var(--tv-gray-100);
    border-bottom: 1px solid var(--tv-gray-100);
}
.tv-trust-bar__inner {
    max-width: var(--tv-container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: center;
}
.tv-stat {
    text-align: center;
}
.tv-stat__num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--tv-navy-900);
    line-height: 1;
    letter-spacing: -0.02em;
}
.tv-stat__label {
    font-size: 13px;
    color: var(--tv-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 6px;
}

/* =========================================================================
   FEATURE GRID
   ========================================================================= */
.tv-features {
    background: var(--tv-cream);
}
.tv-section__title {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}
.tv-section__title h2 { margin-bottom: 12px; }
.tv-section__title p { font-size: 1.1rem; color: var(--tv-gray-700); }

.tv-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--tv-container);
    margin: 0 auto;
    padding: 0 24px;
}
.tv-feature {
    background: var(--tv-paper);
    padding: 32px 28px;
    border-radius: var(--tv-radius-lg);
    border: 1px solid var(--tv-gray-100);
}
.tv-feature__icon {
    width: 52px; height: 52px;
    background: var(--tv-green-50);
    color: var(--tv-green-700);
    border-radius: var(--tv-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}
.tv-feature h3 { margin-bottom: 10px; }
.tv-feature p { color: var(--tv-gray-700); margin: 0; }

/* Alternative icon palette — for category variation */
.tv-feature__icon--amber { background: var(--tv-amber-50); color: var(--tv-amber-500); }
.tv-feature__icon--navy  { background: var(--tv-navy-50); color: var(--tv-navy-500); }
.tv-feature__icon--coral { background: #FCEBE6; color: var(--tv-coral-500); }

/* =========================================================================
   HOW IT WORKS — Process timeline
   ========================================================================= */
.tv-process {
    background: var(--tv-navy-900);
    color: white;
    padding: 90px 0;
}
.tv-process h2 { color: white; }
.tv-process__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: var(--tv-container);
    margin: 56px auto 0;
    padding: 0 24px;
    position: relative;
}
.tv-process__step {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--tv-radius-lg);
    padding: 28px 24px;
    position: relative;
}
.tv-process__step-num {
    position: absolute;
    top: -18px;
    left: 24px;
    width: 36px; height: 36px;
    background: var(--tv-green-500);
    border-radius: var(--tv-radius-full);
    color: white;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tv-process__step h4 { color: white; margin: 12px 0 8px; }
.tv-process__step p { color: rgba(255,255,255,0.75); margin: 0; font-size: 14px; }

/* =========================================================================
   PRICING TIERS
   ========================================================================= */
.tv-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--tv-container);
    margin: 0 auto;
    padding: 0 24px;
    align-items: stretch;
}
.tv-tier {
    background: var(--tv-paper);
    border: 1px solid var(--tv-gray-100);
    border-radius: var(--tv-radius-lg);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.tv-tier--featured {
    border: 2px solid var(--tv-green-500);
    transform: scale(1.02);
    z-index: 1;
}
.tv-tier__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tv-green-500);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--tv-radius-full);
    letter-spacing: 0.02em;
}
.tv-tier h3 { margin-bottom: 6px; }
.tv-tier__price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--tv-navy-900);
    margin: 20px 0 6px;
    line-height: 1;
}
.tv-tier__price small {
    font-size: 1rem;
    font-weight: 500;
    color: var(--tv-gray-500);
}
.tv-tier__desc {
    color: var(--tv-gray-700);
    font-size: 14px;
    margin-bottom: 24px;
}
.tv-tier__features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    flex: 1;
}
.tv-tier__features li {
    padding: 8px 0;
    color: var(--tv-gray-700);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.tv-tier__features li::before {
    content: '✓';
    color: var(--tv-green-500);
    font-weight: 700;
    margin-top: 1px;
    flex-shrink: 0;
}
.tv-tier__features li.tv-tier__features--off {
    color: var(--tv-gray-300);
    text-decoration: line-through;
}
.tv-tier__features li.tv-tier__features--off::before {
    content: '×';
    color: var(--tv-gray-300);
}

/* =========================================================================
   CONTACT
   ========================================================================= */
.tv-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: var(--tv-container);
    margin: 0 auto;
    padding: 0 24px;
    align-items: start;
}
.tv-contact__info h2 { margin-bottom: 16px; }
.tv-contact__info p { color: var(--tv-gray-700); }
.tv-contact__info ul { list-style: none; padding: 0; margin: 28px 0; }
.tv-contact__info li { padding: 12px 0; display: flex; align-items: flex-start; gap: 14px; }
.tv-contact__info li .tv-contact__icon {
    width: 40px; height: 40px;
    background: var(--tv-green-50);
    color: var(--tv-green-700);
    border-radius: var(--tv-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.tv-contact__info li strong { display: block; color: var(--tv-navy-900); }
.tv-contact__info li span { color: var(--tv-gray-700); font-size: 14px; }
.tv-contact__form {
    background: var(--tv-paper);
    border: 1px solid var(--tv-gray-100);
    border-radius: var(--tv-radius-lg);
    padding: 36px 32px;
}
.tv-form-row { margin-bottom: 16px; }
.tv-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tv-navy-900);
    margin-bottom: 6px;
}
.tv-form-row input,
.tv-form-row textarea,
.tv-form-row select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--tv-gray-200);
    border-radius: var(--tv-radius-md);
    font-family: var(--tv-font);
    font-size: 15px;
    transition: border-color .15s ease;
}
.tv-form-row input:focus,
.tv-form-row textarea:focus,
.tv-form-row select:focus {
    outline: none;
    border-color: var(--tv-green-500);
    box-shadow: 0 0 0 3px var(--tv-green-50);
}

/* =========================================================================
   CTA BANNER
   ========================================================================= */
.tv-cta-banner {
    background: var(--tv-green-700);
    color: white;
    text-align: center;
    padding: 80px 24px;
    border-radius: var(--tv-radius-xl);
    max-width: var(--tv-container);
    margin: 80px auto;
}
.tv-cta-banner h2 { color: white; margin-bottom: 14px; }
.tv-cta-banner p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 28px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.tv-footer {
    background: var(--tv-navy-900);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
    margin-top: 80px;
}
.tv-footer__inner {
    max-width: var(--tv-container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}
.tv-footer h5 {
    color: white;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 18px;
    font-weight: 600;
}
.tv-footer ul { list-style: none; padding: 0; margin: 0; }
.tv-footer li { padding: 6px 0; }
.tv-footer a { color: rgba(255,255,255,0.7); font-size: 14px; }
.tv-footer a:hover { color: white; }
.tv-footer__brand p { margin-top: 14px; font-size: 14px; max-width: 280px; }
.tv-footer__bottom {
    max-width: var(--tv-container);
    margin: 50px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================================================
   RESPONSIVE — mobile-first reductions
   ========================================================================= */
@media (max-width: 900px) {
    .tv-hero__inner,
    .tv-contact { grid-template-columns: 1fr; }
    .tv-feature-grid,
    .tv-pricing-grid,
    .tv-process__steps,
    .tv-trust-bar__inner { grid-template-columns: repeat(2, 1fr); }
    .tv-footer__inner { grid-template-columns: 1fr 1fr; }
    .tv-nav { display: none; }
    .tv-hero { padding: 60px 0; }
    .tv-section { padding: 56px 0; }
    .tv-tier--featured { transform: none; }
}
@media (max-width: 560px) {
    .tv-feature-grid,
    .tv-pricing-grid,
    .tv-process__steps { grid-template-columns: 1fr; }
    .tv-trust-bar__inner { grid-template-columns: repeat(2, 1fr); }
    .tv-product-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
    .tv-hero h1 { font-size: 2rem; }
}
