/* ==========================================================================
   AGREECULTURE TECH NIGERIA LTD - CSS DESIGN SYSTEM
   Theme: Precision Technical Dark (Stripe / Vercel / Linear inspired)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Variables & Font Definitions
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --bg-primary: #08090a;
    --bg-secondary: #0d0f12;
    --bg-tertiary: #13161c;
    --bg-card: #0d0f12;
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Technical Accent - Modern Nigerian Green */
    --accent-color: #00f59b;
    --accent-color-rgb: 0, 245, 155;
    --accent-hover: #00d485;
    --accent-subtle: rgba(0, 245, 155, 0.08);
    
    /* Borders */
    --border-color: #1e2230;
    --border-color-hover: #31374a;
    --border-accent: rgba(0, 245, 155, 0.25);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    
    /* Spacing & Layout */
    --max-width: 1100px;
    --header-height: 72px;
    --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.15s ease;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --------------------------------------------------------------------------
   2. Layout & Global Elements
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Custom Technical Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: center center;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 65%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 65%, transparent 100%);
    z-index: 1;
}

/* Typography elements */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
}

.text-highlight {
    color: var(--text-primary);
    font-weight: 500;
}

.monospace-value {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --------------------------------------------------------------------------
   3. Header Navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(8, 9, 10, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.header-container {
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wordmark {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
    display: inline-flex;
    align-items: center;
}

.accent-dot {
    color: var(--accent-color);
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.status-indicator-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
    animation: status-pulse 2s infinite ease-in-out;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   4. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    position: relative;
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 70px;
    z-index: 2;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-color);
    border: 1px solid rgba(0, 245, 155, 0.2);
    background-color: var(--accent-subtle);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1.1;
    max-width: 850px;
    margin-bottom: 28px;
    font-weight: 700;
    letter-spacing: -0.035em;
    background: linear-gradient(180deg, #ffffff 0%, #a3a3a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 720px;
}

/* --------------------------------------------------------------------------
   5. Company Credentials Block (Centerpiece)
   -------------------------------------------------------------------------- */
.credentials-section {
    position: relative;
    padding-bottom: 80px;
    z-index: 2;
}

.credentials-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
    position: relative;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.8);
    transition: var(--transition-smooth);
}

.credentials-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.9),
        0 0 24px -12px var(--accent-subtle);
}

/* Card Technical Corners styling */
.card-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    border-style: solid;
    border-color: var(--text-muted);
    opacity: 0.4;
    pointer-events: none;
}

.card-corner.top-left {
    top: 12px;
    left: 12px;
    border-width: 1px 0 0 1px;
}
.card-corner.top-right {
    top: 12px;
    right: 12px;
    border-width: 1px 1px 0 0;
}
.card-corner.bottom-left {
    bottom: 12px;
    left: 12px;
    border-width: 0 0 1px 1px;
}
.card-corner.bottom-right {
    bottom: 12px;
    right: 12px;
    border-width: 0 1px 1px 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.card-pretitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 4px;
    letter-spacing: -0.02em;
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(0, 245, 155, 0.05);
    border: 1px solid rgba(0, 245, 155, 0.25);
    padding: 6px 16px;
    border-radius: 4px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
}

.badge-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.05em;
}

/* Grid Layout for Credentials Card */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 40px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grid-item.span-full {
    grid-column: span 2;
}

.item-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.item-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.item-value.text-bold {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.address-layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.address-value {
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: 600px;
}

/* Copy interaction details */
.monospace-value {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.03);
}

.copy-icon {
    width: 16px;
    height: 16px;
}

.copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -6px) scale(0.9);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    pointer-events: none;
    opacity: 0;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease;
    white-space: nowrap;
}

.copy-btn:hover .copy-tooltip {
    opacity: 1;
    transform: translate(-50%, -6px) scale(1);
}

.credential-link {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 245, 155, 0.3);
    transition: var(--transition-fast);
}

.credential-link:hover {
    color: var(--accent-hover);
    border-bottom-style: solid;
}

/* White Underlined Numbers & Interactive Transitions */
.underline-animate {
    color: #ffffff !important;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    display: inline-block;
    cursor: pointer;
    transition: var(--transition-fast);
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.35);
    transform: scaleX(0.75);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.underline-animate:hover {
    color: var(--accent-color) !important;
}

.underline-animate:hover::after {
    transform: scaleX(1);
    background-color: var(--accent-color);
}

/* Safe overrides to disable mobile OS auto-linking blue */
a[href^="tel"], 
a[href^="mailto"], 
.monospace-value span, 
.credentials-grid a,
.credentials-grid span {
    color: #ffffff !important;
}

a[href^="tel"]:hover, 
a[href^="mailto"]:hover,
.credentials-grid a:hover {
    color: var(--accent-color) !important;
}

/* --------------------------------------------------------------------------
   6. About Section
   -------------------------------------------------------------------------- */
.about-section {
    position: relative;
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
    z-index: 2;
}

.section-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 40px;
    align-items: start;
}

.section-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-title {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 600;
}

.about-lead {
    font-size: 1.2rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   7. Products Section
   -------------------------------------------------------------------------- */
.products-section {
    position: relative;
    padding: 80px 0 100px;
    border-top: 1px solid var(--border-color);
    z-index: 2;
}

.section-header-centered {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px;
}

.section-header-centered .section-title {
    font-size: 2rem;
    margin: 12px 0 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.5;
}

.products-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.product-block {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 48px;
    transition: var(--transition-smooth);
}

.product-block:hover {
    border-color: var(--border-color-hover);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.7);
}

.product-visual {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-svg {
    width: 120px;
    height: 120px;
    display: block;
    transition: var(--transition-smooth);
}

.product-block:hover .product-svg {
    transform: scale(1.05);
}

/* Custom SVG Animations (Continuous for Mobile & Desktop) */
@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Node pulse animation - runs continuously, fast speed by default */
@keyframes node-pulse {
    0%, 100% { fill: rgba(0, 245, 155, 0.15); stroke: var(--accent-color); }
    50% { fill: rgba(0, 245, 155, 0.45); stroke: var(--accent-color); }
}

.node-pulse-1 { animation: node-pulse 1.2s infinite 0.1s ease-in-out; }
.node-pulse-2 { animation: node-pulse 1.2s infinite 0.3s ease-in-out; }
.node-pulse-3 { animation: node-pulse 1.2s infinite 0.5s ease-in-out; }
.node-pulse-4 { animation: node-pulse 1.2s infinite 0.7s ease-in-out; }

/* RAnA Network Path Data Flow Animation - green and fast by default */
.rana-path {
    stroke: var(--accent-color);
    stroke-dasharray: 4 6;
    animation: rana-flow-pulse 1.8s linear infinite;
    opacity: 0.75;
}

@keyframes rana-flow-pulse {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -20; }
}

/* Zero Loop Rotating Animation - green and fast by default */
@keyframes rotate-loop {
    0% { transform: rotate(0deg); transform-origin: 71px 60px; }
    100% { transform: rotate(360deg); transform-origin: 71px 60px; }
}

.automation-loop {
    stroke: var(--accent-color);
    animation: rotate-loop 8s linear infinite;
}

/* Zero Wave Pulse Animation - green and fast by default */
.zero-wave {
    stroke: var(--accent-color);
    animation: zero-wave-pulse 1.8s ease-in-out infinite;
}

@keyframes zero-wave-pulse {
    0%, 100% { stroke: rgba(0, 245, 155, 0.3); }
    50% { stroke: var(--accent-color); }
}

/* Zero Wave Outer Rotating Ring - green and fast by default */
.zero-wave-outer {
    stroke: var(--accent-color);
    stroke-dasharray: 5 4;
    animation: zero-outer-rotate 12s linear infinite;
    transform-origin: 60px 60px;
    opacity: 0.8;
}

@keyframes zero-outer-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.product-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.product-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-color);
    background-color: var(--accent-subtle);
    border: 1px solid rgba(0, 245, 155, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.product-name {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.product-tagline {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.product-description {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.product-spec {
    border-top: 1px solid var(--border-color);
    width: 100%;
    padding-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.spec-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.spec-value {
    font-size: 0.8rem;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px;
    position: relative;
    z-index: 2;
}

.footer-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-wordmark {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    display: inline-block;
    margin-bottom: 16px;
}

.footer-description {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 320px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-info-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    display: block;
}

.footer-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.85rem;
}

.info-tag {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.75rem;
    width: 80px;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.regulatory-note {
    font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   9. Scroll Animation & Responsive Adjustments
   -------------------------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Entrance of Children */
.reveal-child {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.revealed .reveal-child {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries */

/* Tablet & Mobile Landscape */
@media (max-width: 900px) {
    .section-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-block {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px;
    }
    
    .product-visual {
        height: 180px;
    }
    
    .footer-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Mobile Portrait */
@media (max-width: 640px) {
    :root {
        --header-height: 64px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .site-header {
        padding: 0;
    }
    
    .header-container {
        padding: 0 16px;
    }
    
    .hero-section {
        padding-top: calc(var(--header-height) + 40px);
        padding-bottom: 50px;
    }
    
    .credentials-card {
        padding: 24px 20px;
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .grid-item.span-full {
        grid-column: span 1;
    }
    
    .address-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .copy-btn {
        padding: 2px;
    }
    
    .section-header-centered {
        text-align: left;
        margin-bottom: 40px;
    }
    
    .section-header-centered .section-title {
        font-size: 1.6rem;
    }
    
    .products-container {
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Respect Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .status-indicator-dot,
    .badge-dot,
    .node-pulse-1,
    .node-pulse-2,
    .node-pulse-3,
    .node-pulse-4,
    .automation-loop,
    .product-svg,
    .credentials-card {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
