/* =========================================
   Variables & Base Settings
   ========================================= */
:root {
    --bg-main: #fbfbfd; 
    --text-main: #1d1d1f; 
    --text-muted: #86868b; 
    --accent-blue: #0066cc; 
    --border-color: #d2d2d7;
    --card-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    letter-spacing: -0.015em;
}

/* =========================================
   Loading Screen Animation (Upgraded)
   ========================================= */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; 
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    visibility: visible;
    opacity: 1;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 50%; 
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

/* Added pulsing/floating movement to the logo */
.loader-logo {
    width: 65px;
    height: auto;
    z-index: 2;
    position: relative;
    animation: logoFloat 1.5s infinite ease-in-out;
}

@keyframes logoFloat {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
    100% { transform: translateY(0px) scale(1); }
}

/* Enhanced dynamic wave movement */
.wave-animation {
    position: absolute;
    bottom: -10px;
    left: -50%;
    width: 200%;
    height: 120%;
    background: linear-gradient(to top, rgba(0, 102, 204, 0.25) 0%, rgba(0, 102, 204, 0.05) 50%, transparent 80%);
    animation: waveMove 1.2s infinite cubic-bezier(0.36, 0.45, 0.63, 0.53);
    z-index: 1;
    border-radius: 40%;
}

@keyframes waveMove {
    0% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(25%) rotate(180deg); }
    100% { transform: translateX(50%) rotate(360deg); }
}
@keyframes waveMove {
    0% { transform: translateX(0) translateY(10px); }
    50% { transform: translateX(-25%) translateY(0px); }
    100% { transform: translateX(-50%) translateY(10px); }
}

/* =========================================
   Navigation
   ========================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.7;
}

.nav-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
}

nav h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent-blue);
}

.nav-btn {
    background: var(--text-main);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 980px;
}
.nav-btn:hover {
    background: #000;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    text-align: center;
    padding: 8rem 5% 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.hero h2 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 3rem;
}

.btn, .submit-btn {
    background: var(--text-main);
    color: #fff;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 980px; 
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, transform 0.2s;
}

.btn:hover, .submit-btn:hover {
    background: #000;
    transform: scale(1.02);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.05);
    display: block;
}

/* =========================================
   General Sections
   ========================================= */
.section {
    padding: 8rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.alt-bg {
    background-color: #ffffff;
    max-width: 100%;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* =========================================
   Our Process Grid
   ========================================= */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.process-step {
    text-align: center;
}

.step-number {
    background: var(--text-main);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem auto;
}

.process-step h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.process-step p {
    color: var(--text-muted);
}

/* =========================================
   Portfolio Grid (Forced 3 Columns)
   ========================================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.portfolio-item {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.portfolio-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Pricing Grid
   ========================================= */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    transform: translateY(-5px);
}

.pricing-card.highlight {
    border: 2px solid var(--text-main);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.pricing-card.minimal {
    padding: 2.5rem;
    text-align: center;
}

.pricing-card h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.pricing-card .price span {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.feature-list {
    list-style: none;
    flex-grow: 1;
}

.feature-list li {
    font-size: 1rem;
    color: var(--text-main);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 1.8rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: bold;
}

/* =========================================
   Server Management Grid (Forced 3 Columns)
   ========================================= */
.server-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* =========================================
   FAQ Section
   ========================================= */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 950px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
}

.faq-item h4 {
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Inquiry Form
   ========================================= */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    transition: border 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--text-main);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

/* =========================================
   Footer
   ========================================= */
footer {
    background: var(--text-main);
    color: white;
    padding: 4rem 5% 2rem 5%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* =========================================
   Premium Scroll Animations (Apple Style)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), 
                transform 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delays for cascading grid items */
.pricing-card:nth-child(1), .portfolio-item:nth-child(1), .process-step:nth-child(1) { transition-delay: 0.1s; }
.pricing-card:nth-child(2), .portfolio-item:nth-child(2), .process-step:nth-child(2) { transition-delay: 0.2s; }
.pricing-card:nth-child(3), .portfolio-item:nth-child(3), .process-step:nth-child(3) { transition-delay: 0.3s; }

/* =========================================
   Mobile Responsiveness (Fixes the Squishing)
   ========================================= */
@media (max-width: 1024px) {
    /* If the screen is tablet-sized or smaller, let the 3-column layouts stack */
    .portfolio-grid, .server-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 3rem;
    }
    .faq-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    .footer-links a {
        margin: 0 1rem;
    }
}