/* Custom CSS for ArcoNorte Nexus Landing Page */

/* Base Design Tokens & Theme Variables */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Dark Theme (Default) */
    --bg-primary: #0F1316;
    --bg-secondary: #1C2329;
    --bg-card: rgba(28, 35, 41, 0.7);
    --bg-navbar: rgba(15, 19, 22, 0.85);
    --text-primary: #F4F1E8;
    --text-secondary: #A0A5A9;
    --border-color: rgba(244, 241, 232, 0.12);
    --grid-color: rgba(244, 241, 232, 0.03);
    
    --accent-green: #34A853;
    --accent-green-rgb: 52, 168, 83;
    --accent-cyan: #2680EB;
    --accent-cyan-rgb: 38, 128, 235;
    --accent-yellow: #F4A261;
    --accent-yellow-rgb: 244, 162, 97;
    --accent-red: #E74C3C;
    --accent-red-rgb: 231, 76, 60;
    
    --prediction-shade: rgba(52, 168, 83, 0.15);
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 12px 40px 0 rgba(52, 168, 83, 0.15);
    
    --transition-speed: 0.3s;
    color-scheme: dark;
}

/* Light Theme Override */
html[data-theme="light"] {
    --bg-primary: #F4F1E8;
    --bg-secondary: #E0DCCD;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-navbar: rgba(244, 241, 232, 0.85);
    --text-primary: #1C2329;
    --text-secondary: #4E5961;
    --border-color: rgba(28, 35, 41, 0.15);
    --grid-color: rgba(28, 35, 41, 0.05);
    
    --accent-cyan: #115D8C;
    --accent-cyan-rgb: 17, 93, 140;
    --accent-green: #336B4D;
    --accent-green-rgb: 51, 107, 77;
    --accent-yellow: #B8860B;
    --accent-yellow-rgb: 184, 134, 11;
    
    --prediction-shade: rgba(51, 107, 77, 0.1);
    --shadow-card: 0 8px 32px 0 rgba(28, 35, 41, 0.08);
    --shadow-hover: 0 12px 40px 0 rgba(17, 93, 140, 0.12);
    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

/* Typography Utilities */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.text-accent {
    color: var(--accent-cyan);
}

.text-accent-green {
    color: var(--accent-green);
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    border-radius: 16px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

/* Navbar Layout */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-navbar);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-icon {
    color: var(--accent-cyan);
    animation: pulse-slow 4s infinite linear;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-item:hover {
    color: var(--text-primary);
}

.portfolio-link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.portfolio-link-btn:hover {
    background: transparent;
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Toggle Sun/Moon visibility based on HTML attribute */
html[data-theme="dark"] .sun-icon { display: block; }
html[data-theme="dark"] .moon-icon { display: none; }
html[data-theme="light"] .sun-icon { display: none; }
html[data-theme="light"] .moon-icon { display: block; }

/* Hero Section */
.hero-section {
    padding: 140px 0 80px 0;
    background: radial-gradient(circle at 80% 20%, rgba(var(--accent-cyan-rgb), 0.08) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(var(--accent-green-rgb), 0.05) 0%, transparent 50%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

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

.badge {
    background: rgba(var(--accent-cyan-rgb), 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 40%, rgba(var(--accent-cyan-rgb), 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 36px;
    max-width: 540px;
    text-align: center;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, rgba(var(--accent-cyan-rgb), 0.7) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--accent-cyan-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-cyan-rgb), 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Illustration (Tech Card representation) */
.hero-illustration {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.tech-card {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    border: 1px solid var(--border-color);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease-out;
}

.tech-card:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.tech-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    position: relative;
}

.status-indicator.live::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid var(--accent-green);
    animation: pulse-ring 1.5s infinite;
}

.tech-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    flex-grow: 1;
}

.tech-card-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tech-card-visual {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.02);
    margin-bottom: 20px;
}

.graph-svg {
    width: 100%;
    height: auto;
}

/* Graph Line drawing Animation */
.graph-svg path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw-line 3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.graph-svg path[stroke-dasharray="6 4"] {
    animation: draw-line-dashed 3s forwards cubic-bezier(0.4, 0, 0.2, 1);
    animation-delay: 1.5s;
}

.graph-svg path[fill] {
    opacity: 0;
    animation: fade-in 1.5s forwards;
    animation-delay: 2.5s;
}

.tech-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
}

/* Section Common Styles */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

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

.section-badge {
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 16px;
    line-height: 1.25;
}

.section-subtitle {
    font-size: 1rem;
    line-height: 1.6;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 36px 28px;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-cyan);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(var(--accent-cyan-rgb), 0.1);
    color: var(--accent-cyan);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card-desc {
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Interactive Simulator Section */
.simulator-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px;
    border: 1px solid var(--border-color);
}

.simulator-inputs, .simulator-outputs {
    display: flex;
    flex-direction: column;
}

.box-subtitle {
    font-size: 1.4rem;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.slider-group {
    margin-bottom: 32px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.slider-header label {
    font-weight: 600;
    font-size: 0.95rem;
}

.slider-val {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: 1.1rem;
}

/* Custom Range Input */
.custom-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    transition: background 0.3s;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.5);
    transition: transform 0.1s, background-color 0.2s;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.custom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.5);
    transition: transform 0.1s, background-color 0.2s;
}

.custom-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.slider-bounds {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Gauge styling */
.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 24px;
}

.gauge-svg {
    margin-bottom: -15px;
}

.gauge-fill-path {
    transition: stroke-dashoffset 0.4s ease-out, stroke var(--transition-speed);
}

#gauge-needle {
    transform-origin: 100px 110px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.gauge-metrics {
    text-align: center;
    margin-top: 8px;
    z-index: 5;
}

.ipe-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
}

.ipe-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* Status Diagnostic Card */
.status-card {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(var(--accent-green-rgb), 0.05);
    transition: all 0.3s ease;
}

.status-card.warning {
    background: rgba(var(--accent-yellow-rgb), 0.05);
    border-color: rgba(var(--accent-yellow-rgb), 0.4);
}

.status-card.danger {
    background: rgba(var(--accent-red-rgb), 0.05);
    border-color: rgba(var(--accent-red-rgb), 0.4);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.status-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    transition: background 0.3s, box-shadow 0.3s;
}

.status-card.warning .status-bullet {
    background: var(--accent-yellow);
    box-shadow: 0 0 8px var(--accent-yellow);
}

.status-card.danger .status-bullet {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.status-title {
    font-size: 1.05rem;
    font-weight: 600;
    transition: color 0.3s;
}

.status-card.warning .status-title {
    color: var(--accent-yellow);
}

.status-card.danger .status-title {
    color: var(--accent-red);
}

.status-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    transition: color 0.3s;
}

/* Roadmap timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-primary);
    border: 3px solid var(--border-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: border-color 0.3s, background-color 0.3s;
}

.timeline-item.completed::after {
    border-color: var(--accent-green);
    background-color: var(--accent-green);
}

.timeline-item.active::after {
    border-color: var(--accent-cyan);
    background-color: var(--bg-primary);
}

/* Timeline marker custom graphic element */
.timeline-marker {
    position: absolute;
    top: 22px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timeline-item.completed .timeline-marker {
    right: -12px;
    color: #fff;
}

.timeline-item.active .timeline-marker {
    right: -12px;
}

.pulse-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(var(--accent-cyan-rgb), 0.2);
    display: inline-block;
    position: relative;
}

.pulse-marker::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    position: absolute;
    top: 7px;
    left: 7px;
    animation: pulse-ring 1.5s infinite;
}

/* Alternating directions for timeline items */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -12px;
}

.timeline-content {
    padding: 24px;
    position: relative;
    border-radius: 12px;
}

.timeline-item:hover .timeline-content {
    border-color: var(--accent-cyan);
}

.timeline-item.completed:hover .timeline-content {
    border-color: var(--accent-green);
}

.phase-number {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 6px;
}

.timeline-item.completed .phase-number {
    color: var(--accent-green);
}

.timeline-item.active .phase-number {
    color: var(--accent-cyan);
}

.phase-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.phase-desc {
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Footer styling */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 64px 0 24px 0;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    gap: 32px;
}

.footer-info {
    max-width: 400px;
}

.footer-desc {
    font-size: 0.9rem;
    margin-top: 16px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.contact-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.contact-link {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 0 24px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Core Keyframes Animation Definitions */
@keyframes pulse-ring {
    0% {
        transform: scale(0.65);
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes pulse-slow {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes draw-line {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes draw-line-dashed {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

/* Responsiveness adjustments (Media Queries) */

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }

    .hero-content {
        align-items: center;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        max-width: 550px;
        margin: 0 auto;
    }

    .simulator-box {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
        text-align: left !important;
    }

    .timeline-item::after {
        left: 23px;
        right: auto;
    }

    .timeline-item.completed .timeline-marker,
    .timeline-item.active .timeline-marker {
        left: 19px;
        right: auto;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 32px;
    }

    .footer-contact {
        align-items: center;
    }
}

@media (max-width: 576px) {
    .nav-links {
        display: none; /* Hide navigation links on small mobiles for clean page style */
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .simulator-box {
        padding: 20px;
    }
}
