/* ========================================
   prototype.rs - Swiss HUD + Art Deco Design
   Colors: #8a4a0a #1a1208 #6a5a4a #f0c030 #d4720a #f0a050 #faf0e0 #f8d4b0
   Fonts: Poiret One, Josefin Sans, Share Tech Mono
   ======================================== */

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

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

body {
    font-family: 'Josefin Sans', sans-serif;
    background-color: #1a1208;
    color: #faf0e0;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---------- Typography ---------- */
.art-deco {
    font-family: 'Poiret One', cursive;
    letter-spacing: 0.1em;
    font-weight: 400;
}

.hud-label {
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

/* ---------- HUD Scanline ---------- */
.hud-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4720a, transparent);
    z-index: 9999;
    animation: scanline 4s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* ---------- HUD Corner Brackets ---------- */
.hud-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 10;
}

.hud-corner-tl {
    top: 20px;
    left: 20px;
    border-top: 2px solid #d4720a;
    border-left: 2px solid #d4720a;
}

.hud-corner-tr {
    top: 20px;
    right: 20px;
    border-top: 2px solid #d4720a;
    border-right: 2px solid #d4720a;
}

.hud-corner-bl {
    bottom: 20px;
    left: 20px;
    border-bottom: 2px solid #d4720a;
    border-left: 2px solid #d4720a;
}

.hud-corner-br {
    bottom: 20px;
    right: 20px;
    border-bottom: 2px solid #d4720a;
    border-right: 2px solid #d4720a;
}

/* ---------- HUD Bracket Mixin ---------- */
.hud-bracket {
    position: relative;
}

.hud-bracket::before,
.hud-bracket::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

.hud-bracket::before {
    top: -2px;
    left: -2px;
    border-top: 2px solid #d4720a;
    border-left: 2px solid #d4720a;
}

.hud-bracket::after {
    bottom: -2px;
    right: -2px;
    border-bottom: 2px solid #d4720a;
    border-right: 2px solid #d4720a;
}

.hud-bracket:hover::before,
.hud-bracket:hover::after {
    width: 20px;
    height: 20px;
    border-color: #f0c030;
}

/* ---------- HUD Tag ---------- */
.hud-tag {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid #8a4a0a;
    color: #d4720a;
    font-size: 0.7rem;
    margin-bottom: 16px;
    background: rgba(138, 74, 10, 0.1);
}

/* ---------- Border Animate ---------- */
.border-animate {
    position: relative;
    overflow: hidden;
}

.border-animate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #f0c030;
    transition: width 0.6s ease;
}

.border-animate:hover::after {
    width: 100%;
}

.border-line {
    width: 80px;
    height: 2px;
    background: #8a4a0a;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.border-line.border-animate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #d4720a;
    transition: width 1s ease;
}

.border-line.border-animate.visible::after {
    width: 100%;
}

/* ---------- Navigation ---------- */
.hud-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 40px;
    background: rgba(26, 18, 8, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(138, 74, 10, 0.3);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-text {
    font-family: 'Poiret One', cursive;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: #faf0e0;
}

.logo-dot {
    color: #d4720a;
}

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

.nav-link {
    color: #6a5a4a;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 6px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4720a;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #f0a050;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    background: transparent;
    border: 1px solid #8a4a0a;
    color: #d4720a;
    padding: 8px 20px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: rgba(212, 114, 10, 0.15);
    border-color: #d4720a;
    color: #f0c030;
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 40px 80px;
    position: relative;
    background: linear-gradient(135deg, #1a1208 0%, #2a1a08 40%, #1a1208 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(138, 74, 10, 0.03) 2px,
            rgba(138, 74, 10, 0.03) 4px
        );
    pointer-events: none;
}

.hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    color: #faf0e0;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #faf0e0, #f0a050);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.1rem;
    color: #6a5a4a;
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 480px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, #8a4a0a, #d4720a);
    border: none;
    color: #faf0e0;
    padding: 14px 28px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d4720a, #f0a050);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 114, 10, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #6a5a4a;
    color: #6a5a4a;
    padding: 14px 28px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #f0a050;
    color: #f0a050;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

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

.stat-value {
    font-size: 1.5rem;
    color: #f0c030;
    font-weight: 400;
}

.stat-label {
    font-size: 0.7rem;
    color: #6a5a4a;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    margin-top: 4px;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.isometric-cube-container {
    width: 100%;
    max-width: 400px;
}

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

.iso-cube {
    animation: float 6s ease-in-out infinite;
}

.iso-cube-1 { animation-delay: 0s; }
.iso-cube-2 { animation-delay: -2s; }
.iso-cube-3 { animation-delay: -4s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(0, -10px); }
}

.iso-cube-1 { animation: float1 6s ease-in-out infinite; }
.iso-cube-2 { animation: float2 7s ease-in-out infinite; }
.iso-cube-3 { animation: float3 5s ease-in-out infinite; }

@keyframes float1 {
    0%, 100% { transform: translate(200px, 120px); }
    50% { transform: translate(200px, 108px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(130px, 220px); }
    50% { transform: translate(130px, 210px); }
}

@keyframes float3 {
    0%, 100% { transform: translate(280px, 250px); }
    50% { transform: translate(280px, 238px); }
}

.data-node {
    animation: pulse 3s ease-in-out infinite;
}

.data-node:nth-child(even) {
    animation-delay: -1.5s;
}

@keyframes pulse {
    0%, 100% { opacity: 1; r: 4; }
    50% { opacity: 0.5; r: 6; }
}

/* ---------- Sections Common ---------- */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #faf0e0;
}

/* ---------- Features Section ---------- */
.features {
    padding: 120px 40px;
    background: #1a1208;
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a4a0a, transparent);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: rgba(138, 74, 10, 0.06);
    border: 1px solid rgba(138, 74, 10, 0.2);
    padding: 36px 28px;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    background: rgba(138, 74, 10, 0.12);
    border-color: #d4720a;
    transform: translateY(-4px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.iso-icon {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8d4b0;
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 0.9rem;
    color: #6a5a4a;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 300;
}

.feature-bar {
    height: 3px;
    background: rgba(138, 74, 10, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.feature-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #8a4a0a, #d4720a, #f0c030);
    border-radius: 2px;
    transition: width 1.2s ease;
}

.feature-card.visible .feature-bar-fill {
    width: var(--bar-width, 0%);
}

/* ---------- Modules Section ---------- */
.modules {
    padding: 120px 40px;
    background: linear-gradient(180deg, #1a1208, #1e1610, #1a1208);
    position: relative;
}

.modules::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a4a0a, transparent);
}

.modules-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.module-card {
    padding: 32px 28px;
    border: 1px solid rgba(138, 74, 10, 0.2);
    background: rgba(26, 18, 8, 0.8);
    transition: all 0.4s ease;
}

.module-card:hover {
    border-color: #d4720a;
    transform: translateY(-4px);
}

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

.module-badge {
    padding: 3px 10px;
    border: 1px solid #d4720a;
    color: #d4720a;
    font-size: 0.65rem;
}

.module-version {
    color: #6a5a4a;
    font-size: 0.7rem;
}

.module-title {
    font-size: 1.6rem;
    color: #f8d4b0;
    margin-bottom: 12px;
}

.module-desc {
    font-size: 0.85rem;
    color: #6a5a4a;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 300;
}

/* Code block */
.module-code {
    margin-bottom: 20px;
    background: rgba(26, 18, 8, 0.9);
    border: 1px solid rgba(138, 74, 10, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.code-block {
    padding: 16px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.7;
    color: #f8d4b0;
    overflow-x: auto;
}

.code-keyword { color: #f0c030; }
.code-type { color: #f0a050; }
.code-fn { color: #d4720a; }

.module-stats {
    display: flex;
    gap: 24px;
}

.module-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.module-stat-val {
    font-size: 1.1rem;
    color: #f0c030;
}

.module-stat-key {
    font-size: 0.7rem;
    color: #6a5a4a;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
}

/* Module metrics */
.module-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-row {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    gap: 12px;
    align-items: center;
}

.metric-label {
    font-size: 0.65rem;
    color: #6a5a4a;
}

.metric-bar {
    height: 4px;
    background: rgba(138, 74, 10, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, #8a4a0a, #d4720a);
    border-radius: 2px;
    width: 0;
    transition: width 1s ease;
}

.metric-value {
    font-size: 0.7rem;
    color: #f0a050;
    text-align: right;
}

/* Module features list */
.module-features-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.module-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #f8d4b0;
    font-weight: 300;
}

.mf-dot {
    width: 6px;
    height: 6px;
    background: #d4720a;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---------- Metrics Section ---------- */
.metrics {
    padding: 120px 40px;
    background: #1a1208;
    position: relative;
}

.metrics::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a4a0a, transparent);
}

.metrics-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.metric-card {
    padding: 28px;
    border: 1px solid rgba(138, 74, 10, 0.2);
    background: rgba(138, 74, 10, 0.04);
    transition: all 0.4s ease;
}

.metric-card:hover {
    border-color: #d4720a;
    background: rgba(138, 74, 10, 0.08);
}

.metric-card-header {
    color: #6a5a4a;
    font-size: 0.7rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(138, 74, 10, 0.15);
}

.metric-chart {
    margin-bottom: 16px;
}

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

.chart-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2s ease;
}

.metric-card.visible .chart-line {
    stroke-dashoffset: 0;
}

.metric-card-value {
    font-size: 2.5rem;
    color: #f8d4b0;
    margin-bottom: 4px;
}

.metric-card-delta {
    color: #d4720a;
    font-size: 0.7rem;
}

/* ---------- Contact Section ---------- */
.contact {
    padding: 120px 40px;
    position: relative;
    background: linear-gradient(135deg, #1a1208, #2a1608);
    text-align: center;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a4a0a, transparent);
}

.contact-inner {
    max-width: 640px;
    margin: 0 auto;
}

.contact-title {
    font-size: 3rem;
    color: #faf0e0;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #faf0e0, #f0a050);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-desc {
    color: #6a5a4a;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 40px;
    font-weight: 300;
}

.contact-install {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(26, 18, 8, 0.9);
    border: 1px solid #8a4a0a;
    margin-bottom: 40px;
}

.install-code {
    color: #f0a050;
    font-size: 0.85rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #6a5a4a;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.copy-btn:hover {
    color: #f0c030;
}

.copy-btn.copied {
    color: #f0c030;
}

.contact-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    color: #6a5a4a;
    text-decoration: none;
    padding: 10px 24px;
    border: 1px solid rgba(138, 74, 10, 0.3);
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.contact-link:hover {
    border-color: #d4720a;
    color: #f0a050;
    background: rgba(212, 114, 10, 0.1);
}

/* ---------- Footer ---------- */
.footer {
    padding: 24px 40px;
    border-top: 1px solid rgba(138, 74, 10, 0.2);
    background: #1a1208;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    color: #6a5a4a;
    font-size: 0.75rem;
}

.footer-copy {
    color: #6a5a4a;
    font-size: 0.75rem;
    font-weight: 300;
}

.footer-status {
    color: #8a4a0a;
    font-size: 0.7rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero-visual {
        order: -1;
    }

    .features-grid,
    .modules-grid,
    .metrics-dashboard {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 100px 20px 60px;
    }

    .features,
    .modules,
    .metrics,
    .contact {
        padding: 80px 20px;
    }

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

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

    .hero-actions {
        flex-direction: column;
    }

    .contact-install {
        flex-direction: column;
        gap: 12px;
    }

    .metric-row {
        grid-template-columns: 60px 1fr 40px;
    }
}
