/* Horizon Heights Service Gateway Styles */

:root {
    /* Colors - Updated from Logo */
    --color-midnight: #001F3F;
    /* Navy Blue */
    --color-gold: #FF851B;
    /* Orange/Gold from Logo */
    --color-gold-light: #FFB057;
    /* Lighter Orange for hover */
    --color-white: #ffffff;
    --color-gray-light: #e0e0e0;

    /* Typography */
    --font-primary: 'Outfit', 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;

    /* Transitions */
    --transition-smooth: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-midnight);
    color: var(--color-white);
    overflow: hidden;
    /* Prevent scrolling on desktop */
    height: 100vh;
    width: 100vw;
}

/* Brand Overlay (Logo) */
.brand-overlay {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through */
    text-align: center;
}

/* 3D Logo Styles */
.logo-3d {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 0.9;
    letter-spacing: 2px;
    transform: perspective(500px) rotateX(10deg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    animation: logoFloat 6s ease-in-out infinite;
}

.logo-text-main {
    font-size: 3.5rem;
    background: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 50%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0px 1px 0px #999,
        0px 2px 0px #888,
        0px 3px 0px #777,
        0px 4px 0px #666,
        0px 5px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
}

.logo-text-sub {
    font-size: 2.5rem;
    color: var(--color-gold);
    background: linear-gradient(to bottom, #FF851B 0%, #FFB057 50%, #CC6600 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0px 1px 0px #cc6600,
        0px 2px 0px #aa5500,
        0px 3px 0px #884400,
        0px 4px 10px rgba(0, 0, 0, 0.4);
    margin-top: -5px;
    position: relative;
    z-index: 1;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: perspective(500px) rotateX(10deg) translateY(0);
    }

    50% {
        transform: perspective(500px) rotateX(10deg) translateY(-10px);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .brand-overlay {
        top: 1rem;
        left: auto;
        right: 1rem;
        transform: none;
        text-align: right;
    }

    .logo-3d {
        transform: perspective(300px) rotateX(5deg);
        align-items: flex-end;
    }

    .logo-text-main {
        font-size: 1.8rem;
    }

    .logo-text-sub {
        font-size: 1.2rem;
    }
}

/* Service Gateway Grid */
.service-gateway {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 100vh;
    width: 100vw;
}

.service-panel {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
    z-index: 1;
}

.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.4);
    transition: background 0.5s ease;
    z-index: 2;
}

.panel-content {
    position: relative;
    z-index: 3;
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.panel-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.panel-content p {
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-open-modal {
    padding: 0.8rem 2rem;
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.btn-open-modal:hover {
    background: var(--color-gold);
    color: var(--color-midnight);
}

/* Hover Effects */
.service-panel:hover .panel-bg {
    transform: scale(1.1);
}

.service-panel:hover .panel-overlay {
    background: rgba(10, 10, 10, 0.7);
    /* Darken on hover to make text pop */
}

.service-panel:hover .panel-content {
    transform: translateY(0);
}

.service-panel:hover .panel-content p,
.service-panel:hover .btn-open-modal {
    opacity: 1;
    transform: translateY(0);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid var(--color-gold);
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    border-radius: 4px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    /* Fix for mobile scrolling */
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Logo inside modal */
.modal-content .logo-3d {
    transform: none;
    animation: none;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.modal-content .logo-text-main {
    font-size: 2rem;
}

.modal-content .logo-text-sub {
    font-size: 1.4rem;
}

.modal-backdrop.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-gold);
}

.modal-content h3 {
    font-family: var(--font-heading);
    color: var(--color-gold);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-gray-light);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    font-family: var(--font-primary);
    border-radius: 2px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Checkbox Styles */
.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-gray-light);
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: var(--color-gold);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--color-gold);
    color: var(--color-midnight);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.btn-submit:hover {
    background: var(--color-gold-light);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        /* Allow scroll on mobile */
        height: auto;
    }

    .service-gateway {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 300px);
        /* Fixed height per panel */
        height: auto;
    }

    .panel-content p,
    .btn-open-modal {
        opacity: 1;
        /* Always visible on mobile */
        transform: translateY(0);
    }

    .panel-overlay {
        background: rgba(10, 10, 10, 0.5);
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }

    /* Mobile Logo Fixes */
    .brand-overlay {
        position: absolute;
        /* Scroll with page */
        top: 1rem;
        right: 1rem;
        left: auto;
        transform: none;
        /* Remove centering */
        width: auto;
        text-align: right;
    }

    .logo-img {
        max-width: 80px;
        /* Small badge size */
        border-radius: 4px;
        /* Soften the white box edges */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }
}