/* GrainChain Landing Page CSS */
/* Scope everything strictly to .agrohub-landing so it doesn't leak into dashboard */

.agrohub-landing {
    --bg-base: #0A0F1A;
    --bg-card: #111827;
    --bg-elevated: #1A2333;
    --border: #1F2D40;
    --border-light: #2A3F5A;
    --green-primary: #22C55E;
    --green-dark: #16A34A;
    --green-subtle: #14532D;
    --green-glow: rgba(34,197,94,0.12);
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #4B6278;
    --amber: #F59E0B;
    --white: #FFFFFF;
    
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
}

html.light-mode .agrohub-landing {
    --bg-base:        #F0F4F8;
    --bg-card:        #FFFFFF;
    --bg-elevated:    #E8F0FE;
    --border:         #D1DCE8;
    --border-light:   #B8CADE;
    --text-primary:   #0F172A;
    --text-secondary: #334155;
    --text-muted:     #64748B;
    --green-primary:  #16A34A;
    --green-dark:     #15803D;
    --green-subtle:   #DCFCE7;
    --green-glow:     rgba(22,163,74,0.10);
    --white:          #FFFFFF;
}

/* ── Navbar ── */
html.light-mode .ah-navbar {
    background: rgba(240,244,248,0.95);
    border-bottom-color: #D1DCE8;
    box-shadow: 0 1px 12px rgba(0,0,0,0.07);
}
html.light-mode .ah-nav-brand-top { color: #0F172A; }
html.light-mode .ah-nav-links a { color: #475569; }
html.light-mode .ah-nav-links a:hover { color: #16A34A; }
html.light-mode .ah-btn-ghost {
    color: #475569;
    border-color: #B8CADE;
    background: #FFFFFF;
}
html.light-mode .ah-btn-ghost:hover { border-color: #16A34A; color: #16A34A; }

/* ── Hero ── */
html.light-mode .ah-hero { background: linear-gradient(160deg, #EEF6FF 0%, #F0F9F4 100%); }
html.light-mode .ah-hero-title { color: #0F172A; }
html.light-mode .ah-hero-title span {
    background: linear-gradient(135deg, #16A34A, #4ADE80);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
html.light-mode .ah-hero-subtitle { color: #475569; }
html.light-mode .ah-hero-badge {
    background: #DCFCE7;
    border-color: rgba(22,163,74,0.25);
    color: #15803D;
}
html.light-mode .ah-trust-item { color: #64748B; }
html.light-mode .ah-trust-bar { border-top-color: #D1DCE8; }
html.light-mode .ah-stat-number { color: #0F172A; }
html.light-mode .ah-stat-col:not(:last-child)::after { background-color: #D1DCE8; }

/* ── Mission ── */
html.light-mode .ah-mission { background: #FFFFFF; }
html.light-mode .ah-mission-title { color: #0F172A; }
html.light-mode .ah-mission-text { color: #475569; }
html.light-mode .ah-mission-visual {
    background: linear-gradient(135deg, #F0F9F4, #EEF6FF);
    border-color: #B8CADE;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
html.light-mode .ah-flow-role { color: #0F172A; }
html.light-mode .ah-flow-desc { color: #475569; }
html.light-mode .ah-flow-escrow { border-top-color: #D1DCE8; }
html.light-mode .ah-escrow-box {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    color: #065F46;
    font-weight: 600;
}
html.light-mode .ah-m-stat-box-1 { border-right-color: #D1DCE8; }

/* ── Features ── */
html.light-mode .ah-features { background: #F0F4F8; }
html.light-mode .ah-section-title { color: #0F172A; }
html.light-mode .ah-section-subtitle { color: #475569; }
html.light-mode .ah-feature-card {
    background: #FFFFFF;
    border-color: #D1DCE8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
html.light-mode .ah-feature-card:hover {
    background: #F0F9F4;
    border-color: #16A34A;
    box-shadow: 0 8px 24px rgba(22,163,74,0.10);
}
html.light-mode .ah-fc-icon { background: #DCFCE7; }
html.light-mode .ah-fc-title { color: #0F172A; }
html.light-mode .ah-fc-desc { color: #475569; }

/* ── Domains ── */
html.light-mode .ah-domains { background: #FFFFFF; }
html.light-mode .ah-domain-card {
    background: linear-gradient(135deg, #F8FAFC, #F0F4F8);
    border-color: #D1DCE8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
html.light-mode .ah-domain-card:hover {
    border-color: #16A34A;
    box-shadow: 0 8px 28px rgba(22,163,74,0.12);
}
html.light-mode .ah-dc-title { color: #0F172A; }
html.light-mode .ah-dc-desc { color: #475569; }
html.light-mode .ah-dc-list li { color: #475569; }
html.light-mode .ah-dc-badge { background: #DCFCE7; color: #15803D; }

/* ── How it Works ── */
html.light-mode .ah-how { background: #F0F4F8; }
html.light-mode .ah-step { background: #F0F4F8; }
html.light-mode .ah-step-num {
    background: #FFFFFF;
    color: #16A34A;
    border-color: #16A34A;
    box-shadow: 0 2px 8px rgba(22,163,74,0.15);
}
html.light-mode .ah-step-title { color: #0F172A; }
html.light-mode .ah-step-desc { color: #475569; }
html.light-mode .ah-steps::before { border-top-color: #B8CADE; }

/* ── CTA Final ── */
html.light-mode .ah-cta-final {
    background: linear-gradient(135deg, #D1FAE5 0%, #EEF6FF 100%);
    border-top-color: #B8CADE;
}
html.light-mode .ah-cta-title { color: #0F172A; }
html.light-mode .ah-cta-subtitle { color: #475569; }
html.light-mode .ah-cta-login { color: #64748B; }
html.light-mode .ah-cta-login a { color: #16A34A; }

/* ── Footer ── */
html.light-mode .ah-footer {
    background: #1A2333;
    border-top-color: #2A3F5A;
}
html.light-mode .ah-footer-logo { color: #F1F5F9; }
html.light-mode .ah-footer-tagline { color: #94A3B8; }
html.light-mode .ah-footer-desc { color: #94A3B8; }
html.light-mode .ah-footer-col-title { color: #F1F5F9; }
html.light-mode .ah-footer-link { color: #94A3B8; }
html.light-mode .ah-footer-link:hover { color: #4ADE80; }
html.light-mode .ah-footer-contact { color: #94A3B8; }
html.light-mode .ah-footer-contact i { color: #4ADE80; }
html.light-mode .ah-footer-divider { border-top-color: #2A3F5A; }
html.light-mode .ah-footer-bottom { color: #64748B; }
html.light-mode .ah-social-btn {
    background: #2A3F5A;
    border-color: #3A5570;
    color: #94A3B8;
}
html.light-mode .ah-social-btn:hover { color: #4ADE80; }

/* Reset constraints to avoid bleeding from main styles */
.agrohub-landing a {
    text-decoration: none;
    color: inherit;
}
.agrohub-landing * {
    box-sizing: border-box;
}
.agrohub-landing section {
    width: 100%;
    margin: 0;
}
.agrohub-landing .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography Overrides inside Landing */
.agrohub-landing h1, 
.agrohub-landing h2, 
.agrohub-landing h3, 
.agrohub-landing h4, 
.agrohub-landing h5, 
.agrohub-landing h6 {
    margin: 0;
    font-weight: 700;
}
.agrohub-landing p {
    margin: 0;
}

/* Navbar */
.ah-navbar {
    height: 64px;
    background: rgba(10,15,26,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
}
.ah-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.ah-nav-brand {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.ah-nav-brand-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}
.ah-nav-brand-top svg {
    width: 18px;
    height: 18px;
}
.ah-nav-brand-tagline {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.ah-nav-links {
    display: flex;
    gap: 32px;
}
.ah-nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 150ms ease;
    font-weight: 500;
}
.ah-nav-links a:hover {
    color: var(--white);
}

.ah-nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Buttons */
.ah-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 150ms ease;
    cursor: pointer;
    background: transparent;
}
.ah-btn-ghost:hover {
    border-color: var(--green-primary);
    color: var(--white);
}

.ah-btn-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    background-color: var(--green-primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: all 150ms ease;
    cursor: pointer;
}
.ah-btn-solid:hover {
    background-color: var(--green-dark);
    transform: scale(1.01);
}

.ah-btn-lg {
    height: 48px;
    padding: 0 28px;
    font-size: 16px;
    border-radius: 10px;
}
.ah-btn-xl {
    height: 52px;
    padding: 0 36px;
    font-size: 16px;
    border-radius: 10px;
}
.ah-btn-secondary-lg {
    height: 48px;
    padding: 0 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    border: 1.5px solid var(--border-light);
    color: var(--text-secondary);
    background: transparent;
    transition: all 150ms ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ah-btn-secondary-lg:hover {
    border-color: var(--green-primary);
    color: var(--white);
}

/* Labels */
.ah-label {
    display: inline-block;
    color: var(--green-primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Animations */
.ah-fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}
.ah-fade-in-up.ah-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Sections */
.ah-hero {
    padding: 120px 0 96px;
    text-align: center;
}
.ah-hero-inner {
    max-width: 780px;
    margin: 0 auto;
}
.ah-hero-badge {
    display: inline-block;
    background: var(--green-subtle);
    border: 1px solid rgba(34,197,94,0.3);
    color: var(--green-primary);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.ah-hero-title {
    font-size: 52px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
}
.ah-hero-title span {
    background: linear-gradient(135deg, var(--green-primary), #86EFAC);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease infinite;
}
.ah-hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
}
.ah-hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}
.ah-trust-bar {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}
.ah-trust-item {
    font-size: 13px;
    color: var(--text-muted);
}
.ah-stats-row {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.ah-stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
    position: relative;
}
.ah-stat-col:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 1px;
    background-color: var(--border);
}
.ah-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
}
.ah-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Mission Section */
.ah-mission {
    background-color: var(--bg-card);
    padding: 96px 0;
}
.ah-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.ah-mission-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    margin-bottom: 20px;
}
.ah-mission-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}
.ah-mission-stats {
    display: flex;
    margin-top: 32px;
}
.ah-m-stat-box {
    display: flex;
    flex-direction: column;
}
.ah-m-stat-box-1 {
    padding-right: 32px;
    border-right: 1px solid var(--border);
}
.ah-m-stat-box-2 {
    padding-left: 32px;
}
.ah-m-stat-val-red {
    font-size: 28px;
    font-weight: 700;
    color: #EF4444;
}
.ah-m-stat-val-green {
    font-size: 28px;
    font-weight: 700;
    color: var(--green-primary);
}
.ah-m-stat-lbl {
    font-size: 13px;
    color: var(--text-muted);
}
.ah-mission-visual {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
}
.ah-flow-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}
.ah-flow-emoji {
    font-size: 24px;
}
.ah-flow-text {
    display: flex;
    flex-direction: column;
}
.ah-flow-role {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
}
.ah-flow-desc {
    font-size: 13px;
    color: var(--text-secondary);
}
.ah-flow-arrow {
    padding-left: 28px;
    color: var(--green-primary);
    font-size: 12px;
}
.ah-flow-escrow {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}
.ah-escrow-box {
    background: var(--green-subtle);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #86EFAC;
    font-weight: 500;
}

/* Features */
.ah-features {
    padding: 96px 0;
}
.ah-section-header {
    text-align: center;
    margin-bottom: 56px;
}
.ah-section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}
.ah-section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
}
.ah-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.ah-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    transition: all 200ms ease;
}
.ah-feature-card:hover {
    border-color: rgba(34,197,94,0.4);
    background: #13201A;
    transform: translateY(-2px);
}
.ah-fc-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--green-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}
.ah-fc-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}
.ah-fc-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Domains */
.ah-domains {
    background: var(--bg-card);
    padding: 96px 0;
}
.ah-domains-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.ah-domain-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    transition: all 200ms ease;
}
.ah-domain-card:hover {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.2);
    transform: translateY(-2px);
}
.ah-dc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.ah-dc-emoji {
    font-size: 40px;
}
.ah-dc-badge {
    background: var(--green-subtle);
    color: var(--green-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
}
.ah-dc-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}
.ah-dc-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}
.ah-dc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.ah-dc-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.ah-dc-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green-primary);
    border-radius: 50%;
}
.ah-dc-link {
    font-size: 13px;
    color: var(--green-primary);
    font-weight: 500;
    transition: opacity 150ms ease;
}
.ah-dc-link:hover {
    opacity: 0.8;
}

/* How it Works */
.ah-how {
    padding: 96px 0;
}
.ah-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 64px;
    gap: 24px;
}
.ah-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 1px;
    border-top: 1px dashed var(--border);
    z-index: 1;
}
.ah-step {
    flex: 1;
    position: relative;
    z-index: 2;
    background: var(--bg-base);
    padding-top: 0;
}
.ah-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--green-primary);
    background: var(--bg-base);
    color: var(--green-primary);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.ah-step-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}
.ah-step-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Final */
.ah-cta-final {
    background: linear-gradient(135deg, #0D2A18 0%, #111827 100%);
    border-top: 1px solid var(--border);
    padding: 80px 0;
    text-align: center;
}
.ah-cta-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}
.ah-cta-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
}
.ah-cta-login {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}
.ah-cta-login a {
    color: var(--text-secondary);
}

/* Footer */
.ah-footer {
    background: #070C14;
    border-top: 1px solid var(--border);
    padding: 64px 0 40px;
}
.ah-footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}
.ah-footer-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}
.ah-footer-logo svg {
    width: 18px;
    height: 18px;
}
.ah-footer-tagline {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}
.ah-footer-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 240px;
    margin-top: 16px;
}
.ah-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.ah-social-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
    cursor: pointer;
}
.ah-social-btn:hover {
    color: var(--white);
}

.ah-footer-col-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
}
.ah-footer-link {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: color 150ms ease;
}
.ah-footer-link:hover {
    color: var(--text-secondary);
}
.ah-footer-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.ah-footer-contact i {
    color: var(--green-subtle);
    font-size: 14px;
}

.ah-footer-divider {
    border-top: 1px solid var(--border);
    margin-bottom: 24px;
}
.ah-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .ah-features-grid, .ah-domains-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ah-steps {
        flex-wrap: wrap;
    }
    .ah-step {
        flex: 1 1 calc(50% - 24px);
    }
    .ah-steps::before {
        display: none;
    }
    .ah-footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ah-nav-links {
        display: none;
    }
    .ah-nav-actions .ah-btn-ghost {
        display: none; /* Hide login button on mobile if needed, or keep it */
    }
    .ah-hero-title {
        font-size: 32px;
    }
    .ah-section-title {
        font-size: 26px;
    }
    .ah-hero-cta {
        flex-direction: column;
    }
    .ah-hero-cta button {
        width: 100%;
    }
    .ah-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 0;
    }
    .ah-stat-col:nth-child(2)::after {
        display: none; /* remove right border of 2nd col on mobile */
    }
    .ah-mission-grid {
        grid-template-columns: 1fr;
    }
    .ah-features-grid, .ah-domains-grid {
        grid-template-columns: 1fr;
    }
    .ah-steps {
        flex-direction: column;
    }
    .ah-step {
        flex: 1 1 100%;
        padding-left: 56px;
    }
    .ah-step-num {
        position: absolute;
        left: 0;
        top: -4px;
    }
    .ah-footer-top {
        grid-template-columns: 1fr;
    }
    .ah-footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
