@font-face {
    font-family: 'Satoshi';
    src: url('../fonts/Satoshi/Satoshi-Variable.woff2') format('woff2-variations'),
        url('../fonts/Satoshi/Satoshi-Variable.woff2') format('woff2');
    font-weight: 300 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Satoshi';
    src: url('../fonts/Satoshi/Satoshi-VariableItalic.woff2') format('woff2-variations'),
        url('../fonts/Satoshi/Satoshi-VariableItalic.woff2') format('woff2');
    font-weight: 300 900;
    font-display: swap;
    font-style: italic;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --primary-orange: #f25622;
    --primary-orange-hover: #d74312;
    --text-primary: #000000;
    --text-secondary: #444444;
    --bg-page: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.45);
    --bg-card-hover: rgba(255, 255, 255, 0.65);
    --btn-home-bg: rgba(255, 255, 255, 0.45);
    --btn-home-hover: rgba(255, 255, 255, 0.7);
    --font-family: 'Satoshi', 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --border-radius-card: 24px;
    --border-radius-btn: 14px;
    --transition-speed: 0.3s;

    /* Light Glassmorphism & Shadow Properties */
    --card-border: 1px solid rgba(0, 0, 0, 0.06);
    --card-border-hover: rgba(0, 0, 0, 0.15);
    --backdrop-blur: blur(20px);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-primary);
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Background Video Styles */
.bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0;
    z-index: -2;
    object-fit: cover;
    pointer-events: none;
    transition: transform 2s cubic-bezier(0.16, 1, 0.3, 1), opacity 2s ease;
    background: url('../images/bg-image.jpg') no-repeat center center;
    background-size: cover;
}

body.loaded .bg-video {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Blur & White Gradient Overlay */
.bg-overlay {
    position: fixed;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.25) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.9) 100%);
    transition: opacity 1.5s ease, backdrop-filter 2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.loaded .bg-overlay {
    opacity: 0.4;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


/* Full Viewport App Container */
.app-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 2.5rem 5rem;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-image {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    opacity: 0;
}

body.loaded .logo-image {
    animation: logoEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--btn-home-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    border: var(--card-border);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease, transform 0.2s ease;
    opacity: 0;
}

body.loaded .btn-home {
    animation: navEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.2s;
}

.btn-home:hover {
    background-color: var(--btn-home-hover);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-home:active {
    transform: translateY(0);
}

.icon-home {
    stroke-width: 2.2px;
}

/* Main Hero Styles */
.main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    text-align: center;
    padding: 2rem 0;
}

.hero-card {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-title {
    font-size: clamp(2.25rem, 4.75vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.08;
    opacity: 0;
}

body.loaded .hero-title {
    animation: fadeIn 0.8s ease-out both;
    animation-delay: 0.3s;
}

.js-enabled .hero-title {
    opacity: 1;
}

.js-enabled body.loaded .hero-title {
    animation: none;
}

.js-enabled .hero-title .word-wrapper {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.js-enabled .hero-title .word {
    display: inline-block;
    transform: translateY(40px);
    opacity: 0;
}

.js-enabled body.loaded .hero-title .word {
    animation: revealWord 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: var(--text-primary);
    max-width: 680px;
    line-height: 1.4;
    font-weight: 400;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
}

body.loaded .hero-subtitle {
    animation: subtitleEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.5s;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 2.2rem;
    background-color: var(--primary-orange);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--border-radius-btn);
    box-shadow: 0 4px 15px rgba(242, 86, 34, 0.25);
    transition: background-color var(--transition-speed) ease, transform 0.2s ease, box-shadow var(--transition-speed) ease;
    margin-top: 1rem;
    opacity: 0;
}

body.loaded .btn-login {
    animation: btnLoginEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.7s;
}

.btn-login:hover {
    background-color: var(--primary-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 86, 34, 0.35);
}

.btn-login:active {
    transform: translateY(-0.5px);
}

.icon-login {
    transition: transform var(--transition-speed) ease;
}

.btn-login:hover .icon-login {
    transform: translateX(4px);
}

/* Footer / Features Section */
.footer {
    width: 100%;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    width: 100%;
}

.feature-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-card);
    border: var(--card-border);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    padding: 2.2rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: transform var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1),
        background-color var(--transition-speed) ease,
        border-color var(--transition-speed) ease;
    cursor: pointer;
    opacity: 0;
}

body.loaded .feature-card {
    animation: cardEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.loaded #card-server {
    animation-delay: 0.9s;
}

body.loaded #card-domains {
    animation-delay: 1.05s;
}

body.loaded #card-hosting {
    animation-delay: 1.2s;
}

.feature-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--card-border-hover);
    transform: translateY(-6px);
}

.feature-icon-wrapper {
    color: var(--primary-orange);
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 280px;
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(-15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes navEntrance {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealWord {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtitleEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes btnLoginEntrance {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles for Smaller Screens */
@media (max-width: 1200px) {
    .app-container {
        padding: 2rem 3rem;
    }

    .features-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .app-container {
        padding: 1.8rem 2.2rem;
    }

    .features-grid {
        gap: 1.2rem;
    }

    .feature-card {
        padding: 1.5rem 1rem;
    }

    .feature-title {
        font-size: 1.15rem;
    }

    .feature-desc {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    html {
        overflow-x: hidden;
    }

    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .app-container {
        padding: 2.5rem 1.5rem;
        height: auto !important;
        min-height: 100vh !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 3rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 500px;
        width: 100%;
        margin: 0 auto;
    }

    .feature-card {
        padding: 2rem 1.5rem;
        gap: 0.6rem;
    }

    .icon-feature {
        width: 26px;
        height: 26px;
    }

    .feature-title {
        font-size: 1.25rem;
    }

    .feature-desc {
        font-size: 0.9rem;
        max-width: 100%;
        display: block;
    }

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

    .hero-subtitle {
        font-size: 1.05rem;
        max-width: 500px;
    }

    .btn-login {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 1.5rem 1rem;
        gap: 2rem;
    }

    .header {
        height: 60px;
    }

    .logo-image {
        max-height: 36px;
        max-width: 140px;
        width: auto;
        height: auto;
    }

    .btn-home {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .main-content {
        padding: 1rem 0;
    }

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

    .hero-subtitle {
        font-size: 0.9rem;
        max-width: 280px;
        line-height: 1.35;
    }

    .btn-login {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
        border-radius: 12px;
    }

    .features-grid {
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem 1.2rem;
        gap: 0.5rem;
        border-radius: 18px;
    }

    .icon-feature {
        width: 24px;
        height: 24px;
    }

    .feature-title {
        font-size: 1.15rem;
    }

    .feature-desc {
        display: block;
        font-size: 0.85rem;
        max-width: 100%;
    }
}

/* Height-based media queries to prevent vertical overflow on short screens */
@media (max-height: 720px) and (min-width: 769px) {
    .app-container {
        padding: 1.5rem;
    }

    .main-content {
        padding: 1rem 0;
    }

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

    .btn-login {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
        margin-top: 0.5rem;
    }

    .feature-card {
        padding: 1.2rem 0.8rem;
        gap: 0.4rem;
    }

    .feature-desc {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

@media (max-height: 580px) and (min-width: 769px) {
    .hero-subtitle {
        display: none;
        /* Hide subtitle on ultra-short screens to fit everything */
    }

    .feature-desc {
        display: none;
        /* Hide feature description on ultra-short screens */
    }

    .main-content {
        padding: 0.5rem 0;
    }
}

/* Preloader Splash Screen */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: all;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader-logo {
    max-height: 85px;
    width: auto;
    object-fit: contain;
    animation: preloaderLogoIntro 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes preloaderLogoIntro {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}