/* 
   Lexsphere Website Styles
   Based on design specifications with Inter as primary typeface
   Color palette: deep blue/navy (primary), teal/light blue (accent), light gray (neutral)
*/

:root {
    /* Color Variables */
    --primary-color: #0a2540; /* Deep blue/navy */
    --accent-color: #00b8d4; /* Teal/light blue */
    --neutral-color: #f5f7fa; /* Light gray */
    --text-color: #333333;
    --light-text: #ffffff;
    --dark-gray: #4a4a4a;
    --light-gray: #e0e0e0;
    --gradient-start: #0a2540;
    --gradient-end: #0f4c81;
    
    /* Spacing Variables */
    --section-padding: 100px;
    --element-spacing: 32px;
    --card-padding: 28px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
}

h1 {
    font-size: 56px;
    line-height: 1.1;
}

h2 {
    font-size: 40px;
}

h3 {
    font-size: 28px;
}

p {
    margin-bottom: 20px;
    font-weight: 400;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
}

.btn-primary:hover {
    background-color: #0f3a5f;
    color: var(--light-text);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(10, 37, 64, 0.1);
}

/* Header & Navigation */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 32px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 160px 0 var(--section-padding);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--light-text);
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.hero .subheadline {
    font-size: 18px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.hero-cta .btn-secondary {
    color: var(--light-text);
    border-color: var(--light-text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.hero-image {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 80%;
    width: auto;
    height: auto;
    margin: 0 auto;
}

/* Problem Statement Section */
.problem-statement {
    padding: var(--section-padding) 0;
    background-color: var(--neutral-color);
}

.feature-list {
    list-style: none;
    margin-top: 30px;
}

.feature-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 18px;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Coverage Map Section */
.coverage-map {
    padding: var(--section-padding) 0;
    text-align: center;
}

.map-container {
    margin: 40px 0;
    height: 400px;
    background-color: var(--neutral-color);
    border-radius: 8px;
    position: relative;
}

.us-map {
    width: 100%;
    height: 100%;
    background-image: url('../images/us-map.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 40px 0;
}

.stat-item {
    padding: 0 20px;
    margin-bottom: 20px;
}

.stat-item h3 {
    font-size: 36px;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.center-cta {
    text-align: center;
    margin-top: 40px;
}

/* Periodic Table Style Layout */
.periodic-coverage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin: 2rem 0;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.state-element {
    aspect-ratio: 1/1;
    border-radius: 4px;
    padding: 0.5rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

.state-element:hover {
    transform: scale(1.03);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    z-index: 2;
}

.state-symbol {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.state-name {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.1;
}

.state-note {
    font-size: 0.6rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    line-height: 1.1;
}

.state-element.special {
    grid-column: span 2;
}

/* Circuit Legend */
.circuit-legend {
    margin-bottom: 1.5rem;
    text-align: center;
}

.circuit-legend h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.legend-item {
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
}

.legend-item:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* Circuit Colors */
.circuit-1, .legend-item.circuit-1 {
    background-color: #5c8db8;
}

.circuit-2, .legend-item.circuit-2 {
    background-color: #6a9c78;
}

.circuit-3, .legend-item.circuit-3 {
    background-color: #8a7090;
}

.circuit-4, .legend-item.circuit-4 {
    background-color: #a06b64;
}

.circuit-5, .legend-item.circuit-5 {
    background-color: #b38867;
}

.circuit-6, .legend-item.circuit-6 {
    background-color: #5e8c85;
}

.circuit-7, .legend-item.circuit-7 {
    background-color: #96735a;
}

.circuit-8, .legend-item.circuit-8 {
    background-color: #7a6989;
}

.circuit-9, .legend-item.circuit-9 {
    background-color: #4f7a9c;
}

.circuit-10, .legend-item.circuit-10 {
    background-color: #5a8772;
}

.circuit-11, .legend-item.circuit-11 {
    background-color: #8c6b67;
}

.circuit-dc, .legend-item.circuit-dc {
    background-color: #6e7476;
}

.circuit-fc, .legend-item.circuit-fc {
    background-color: #3d4e5e;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 2rem 0;
    gap: 1rem;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    min-width: 150px;
}

.stat-item h3 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.center-cta {
    text-align: center;
    margin-top: 2rem;
}

/* State Tooltip */
.state-tooltip {
    position: absolute;
    z-index: 1000;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    max-width: 300px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.state-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.state-tooltip h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.state-tooltip p {
    margin: 5px 0;
    color: #555;
}

.state-tooltip .circuit-details {
    margin: 10px 0;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #3a5a8c;
}

.state-tooltip .circuit-details p {
    margin: 4px 0;
    font-size: 13px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f9f9f9;
    padding: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 6px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.tooltip-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 6px 0;
    background-color: #4a6fa5;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.tooltip-link:hover {
    background-color: #3a5a8c;
}

.state-tooltip .close-tooltip {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666;
}

.state-tooltip .close-tooltip:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Circuit Info Panel */
.circuit-info-panel {
    margin: 1.5rem auto;
    max-width: 800px;
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: none;
    position: relative;
}

.circuit-info-panel.active {
    display: block;
}

.circuit-info-panel .close-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.circuit-info-panel .close-info:hover {
    color: #333;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .periodic-coverage {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .state-symbol {
        font-size: 1.25rem;
    }
    
    .state-name {
        font-size: 0.65rem;
    }
    
    .legend-items {
        gap: 0.5rem;
    }
    
    .legend-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .periodic-coverage {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.4rem;
    }
    
    .state-symbol {
        font-size: 1rem;
    }
    
    .state-name {
        font-size: 0.6rem;
    }
    
    .state-element {
        padding: 0.5rem 0.25rem;
    }
}

/* Solutions Overview Section */
.solutions-overview {
    padding: var(--section-padding) 0;
    background-color: var(--neutral-color);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.solution-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: var(--card-padding);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.solution-icon {
    margin-bottom: 20px;
}

.solution-icon img {
    width: 60px;
    height: 60px;
}

.learn-more {
    display: inline-block;
    margin-top: 15px;
    font-weight: 500;
    color: var(--accent-color);
}

/* Products & APIs Section */
.products-apis {
    padding: var(--section-padding) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background-color: var(--neutral-color);
    border-radius: 8px;
    padding: var(--card-padding);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Data Freshness Section */
.data-freshness {
    padding: var(--section-padding) 0;
    background-color: var(--neutral-color);
    text-align: center;
}

.pipeline-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.pipeline-step {
    text-align: center;
    margin: 0 10px;
    opacity: 1;
    animation: pipelineFlow 8s ease-in-out infinite;
}

.pipeline-step:nth-child(1) { animation-delay: 0s; }
.pipeline-step:nth-child(3) { animation-delay: 0.4s; }
.pipeline-step:nth-child(5) { animation-delay: 0.8s; }
.pipeline-step:nth-child(7) { animation-delay: 1.2s; }
.pipeline-step:nth-child(9) { animation-delay: 1.6s; }

.step-icon {
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px;
    font-weight: bold;
    font-size: 20px;
    transform: scale(1);
    animation: iconPulse 8s ease-in-out infinite;
}

.pipeline-step:nth-child(1) .step-icon { animation-delay: 0.2s; }
.pipeline-step:nth-child(3) .step-icon { animation-delay: 0.6s; }
.pipeline-step:nth-child(5) .step-icon { animation-delay: 1.0s; }
.pipeline-step:nth-child(7) .step-icon { animation-delay: 1.4s; }
.pipeline-step:nth-child(9) .step-icon { animation-delay: 1.8s; }

.pipeline-arrow {
    font-size: 24px;
    color: var(--accent-color);
    margin: 0 5px;
    display: flex;
    align-items: center;
    opacity: 1;
    animation: arrowFlow 8s ease-in-out infinite;
}

.pipeline-arrow:nth-child(2) { animation-delay: 0.5s; }
.pipeline-arrow:nth-child(4) { animation-delay: 0.9s; }
.pipeline-arrow:nth-child(6) { animation-delay: 1.3s; }
.pipeline-arrow:nth-child(8) { animation-delay: 1.7s; }

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes slideInArrow {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pipelineFlow {
    0% {
        opacity: 0.3;
        transform: translateY(0) scale(0.9);
    }
    12.5% {
        opacity: 1;
        transform: translateY(0) scale(1.1);
    }
    25% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    87.5% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0.3;
        transform: translateY(0) scale(0.9);
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
        background-color: var(--accent-color);
    }
    12.5% {
        transform: scale(1.2);
        background-color: #ff6b35;
    }
    25% {
        transform: scale(1);
        background-color: var(--accent-color);
    }
    87.5% {
        transform: scale(1);
        background-color: var(--accent-color);
    }
    100% {
        transform: scale(1);
        background-color: var(--accent-color);
    }
}

@keyframes arrowFlow {
    0% {
        opacity: 0.3;
        transform: translateX(0) scale(0.8);
    }
    12.5% {
        opacity: 1;
        transform: translateX(5px) scale(1.1);
    }
    25% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    87.5% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0.3;
        transform: translateX(0) scale(0.8);
    }
}

.freshness-copy {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 18px;
}

/* Proof / Credibility Section */
.proof-credibility {
    padding: var(--section-padding) 0;
    text-align: center;
}

.logo-row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 40px 0;
}

.client-logo {
    padding: 20px;
    margin: 10px;
    background-color: var(--neutral-color);
    border-radius: 8px;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: var(--dark-gray);
}

.testimonial {
    max-width: 800px;
    margin: 0 auto;
}

blockquote {
    font-size: 20px;
    font-style: italic;
    margin-bottom: 20px;
}

cite {
    font-style: normal;
    font-weight: 500;
}

/* Final Call to Action */
.final-cta {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--light-text);
    text-align: center;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.final-cta .btn-primary {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: #ffffff;
    color: var(--primary-color);
}

.final-cta .btn-primary:hover {
    background-color: #f0f0f0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.final-cta .btn-secondary {
    color: var(--light-text);
    border-color: var(--light-text);
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.final-cta .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    background-color: var(--primary-color);
    color: var(--light-text);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.footer-logo {
    margin-bottom: 30px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
}

.footer-column {
    margin-right: 60px;
    margin-bottom: 30px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-column ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 1366px) {
    :root {
        --section-padding: 80px;
    }
    
    h1 {
        font-size: 48px;
    }
    
    h2 {
        font-size: 36px;
    }
}

@media (max-width: 1024px) {
    :root {
        --section-padding: 70px;
        --card-padding: 24px;
    }
    
    h1 {
        font-size: 40px;
    }
    
    h2 {
        font-size: 32px;
    }
    
    h3 {
        font-size: 24px;
    }
    
    .stats-row {
        flex-wrap: wrap;
    }
    
    .stat-item {
        width: 33.33%;
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    :root {
        --section-padding: 50px;
        --element-spacing: 20px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    h3 {
        font-size: 22px;
    }
    
    p, .btn {
        font-size: 16px;
    }
    
    .navbar {
        padding: 15px 0;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        padding: 120px 0 var(--section-padding);
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .solutions-grid, .products-grid {
        grid-template-columns: 1fr;
    }
    
    .pipeline-diagram {
        flex-direction: column;
    }
    
    .pipeline-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .stat-item {
        width: 50%;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        margin-top: 20px;
        justify-content: center;
    }
}
