/* ============================================
   Compute66 — Dedicated GPU Infrastructure
   Arctic Datastream Design System
   ============================================ */

/* --- Variables --- */
:root {
    --bg-primary: #0c1a2f;
    --bg-secondary: #0f1e35;
    --bg-footer: #091525;
    --bg-card: rgba(15, 127, 233, 0.04);
    --bg-card-hover: rgba(15, 127, 233, 0.08);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-card: rgba(15, 127, 233, 0.1);
    --border-card-hover: rgba(15, 127, 233, 0.25);

    --blue: #0f7fe9;
    --blue-light: #3d9af0;
    --blue-glow: rgba(15, 127, 233, 0.35);

    --text-primary: #e8eaf0;
    --text-secondary: #8b8fa3;
    --text-tertiary: #505368;

    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle noise texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea {
    font-family: inherit;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 7rem 0;
    position: relative;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blue);
    background: rgba(15, 127, 233, 0.1);
    border: 1px solid rgba(15, 127, 233, 0.15);
    padding: 0.375rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-lg {
    padding: 0.9375rem 2.25rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 0 0 rgba(15, 127, 233, 0);
}

.btn-primary:hover {
    background: var(--blue-light);
    box-shadow: 0 0 30px var(--blue-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--blue-light);
    border: 1px solid rgba(15, 127, 233, 0.3);
}

.btn-outline:hover {
    background: rgba(15, 127, 233, 0.08);
    border-color: rgba(15, 127, 233, 0.5);
    transform: translateY(-2px);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav.scrolled {
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 0;
}

.nav.scrolled .nav-link {
    color: var(--text-secondary);
}

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo-img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #8b8fa3;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #e8eaf0;
    background: rgba(255, 255, 255, 0.04);
}

.nav-cta {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.7);
}

.hero-aurora {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 600px 400px at 30% 40%, rgba(15, 127, 233, 0.15), transparent),
        radial-gradient(ellipse 500px 600px at 70% 25%, rgba(15, 127, 233, 0.08), transparent),
        radial-gradient(ellipse 400px 300px at 50% 75%, rgba(15, 127, 233, 0.1), transparent),
        radial-gradient(ellipse 800px 500px at 15% 80%, rgba(8, 60, 140, 0.12), transparent);
    animation: aurora-drift 20s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
    0%   { transform: translate(0%, 0%) rotate(0deg); }
    25%  { transform: translate(5%, -3%) rotate(1deg); }
    50%  { transform: translate(-3%, 5%) rotate(-0.5deg); }
    75%  { transform: translate(4%, 2%) rotate(0.5deg); }
    100% { transform: translate(-2%, -4%) rotate(-0.5deg); }
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 127, 233, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 127, 233, 0.035) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(2.75rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #e8eaf0;
}

.hero-sub {
    font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
    color: #c8cad2;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-tertiary);
    animation: bounce-down 2.5s ease-in-out infinite;
}

@keyframes bounce-down {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
    50%      { transform: translateX(-50%) translateY(8px); opacity: 0.8; }
}

/* ============================================
   Features
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.35s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(15, 127, 233, 0.08);
}

.feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 127, 233, 0.08);
    border: 1px solid rgba(15, 127, 233, 0.15);
    border-radius: 12px;
    color: var(--blue);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.1875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================================
   Why Us — Stats
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.stat-block {
    text-align: center;
    padding: 2rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.015);
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* --- Advantages --- */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.advantage-card {
    padding: 2rem;
    border-left: 3px solid var(--blue);
    background: rgba(15, 127, 233, 0.025);
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
}

.advantage-card:hover {
    background: rgba(15, 127, 233, 0.05);
    border-left-color: var(--blue-light);
}

.advantage-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.advantage-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ============================================
   Contact
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info .section-label {
    text-align: left;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 1.25rem;
}

.contact-desc {
    font-size: 1.0625rem;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 440px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.contact-detail svg {
    color: var(--blue);
    flex-shrink: 0;
}

.contact-detail:hover {
    color: var(--text-primary);
}

/* --- Form --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-optional {
    color: var(--text-tertiary);
    font-weight: 400;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input:focus {
    border-color: var(--blue);
    background: rgba(15, 127, 233, 0.04);
    box-shadow: 0 0 0 3px rgba(15, 127, 233, 0.1);
}

.form-input.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    width: 100%;
    margin-top: 0.5rem;
    border: none;
    cursor: pointer;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border-subtle);
    padding: 3.5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 3rem;
    align-items: start;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.footer-logo {
    height: 32px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-company {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.footer-address {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact a {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--blue-light);
}

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* ============================================
   Toast
   ============================================ */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(15, 127, 233, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transform: translateX(calc(100% + 2rem));
    transition: transform 0.5s var(--ease-out-expo);
    z-index: 200;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.toast svg {
    color: #34d399;
    flex-shrink: 0;
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.4);
}

.toast-error svg {
    color: #ef4444;
}

.toast.visible {
    transform: translateX(0);
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s var(--ease-out-expo),
        transform 0.7s var(--ease-out-expo);
    transition-delay: var(--delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantages-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4.5rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Nav mobile */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-subtle);
        padding: 1rem 2rem 1.5rem;
        flex-direction: column;
        gap: 0.25rem;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-link {
        padding: 0.75rem 0;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-block {
        padding: 1.5rem 1rem;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info .section-title {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Hero */
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .hero-title {
        font-size: clamp(2.25rem, 8vw, 3rem);
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .toast {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
}
