/* ==========================================================================
   1. Core Structural Design
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #f4f6f8;
    color: #2b2d42;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

header {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Flexbox wrapper to align logo on left, nav on right */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Layout */
.logo-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
}

/* Hid text because the new crane logo already contains "NIPPON NEST" text */
.logo-text {
    display: none;
}

/* Navigation Links */
nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.6rem 1.1rem;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover {
    color: #e63946;
    background-color: #fff5f5;
}

nav a.active {
    color: #e63946;
    background-color: #ffeef0;
    font-weight: 600;
}

/* ==========================================================================
   2. Main Container
   ========================================================================== */
main {
    flex: 1;
    max-width: 900px;
    width: calc(100% - 2rem);
    margin: 2.5rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
}

main h2 {
    color: #1d3557;
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

main p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* ==========================================================================
   3. Buttons & Form Layouts
   ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #475569;
}

input, textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #e63946;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.12);
}

.btn-submit, .btn-primary {
    background-color: #e63946;
    color: #ffffff;
    border: none;
    padding: 0.8rem 1.75rem;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
    transition: all 0.2s ease;
}

.btn-submit:hover, .btn-primary:hover {
    background-color: #d62839;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(230, 57, 70, 0.3);
}

.btn-submit:active, .btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    padding: 0.8rem 1.75rem;
    font-size: 0.95rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.toggle-text {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
}

.toggle-text a {
    color: #e63946;
    text-decoration: none;
    font-weight: 600;
}

.toggle-text a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   4. Feature & Service Grids
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 1.75rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
    transition: all 0.25s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.04);
    border-color: #e2e8f0;
}

.service-card h3 {
    color: #1d3557;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Hero Section Layout overrides */
.hero-container {
    text-align: center;
    padding: 4rem 2rem;
}

.hero-container h1 {
    font-size: 2.5rem;
    color: #1d3557;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ==========================================================================
   5. Footer Layout
   ========================================================================== */
footer {
    text-align: center;
    padding: 1.75rem;
    background-color: #1d3557;
    color: #f8fafc;
    font-size: 0.85rem;
    margin-top: auto;
    letter-spacing: 0.3px;
    opacity: 0.95;
}

/* ==========================================================================
   6. Mobile / Responsive Adjustments
   ========================================================================== */
@media (max-width: 680px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    header {
        padding: 1rem;
    }

    nav {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.25rem;
    }

    nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    main {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .hero-container h1 {
        font-size: 2rem;
    }
}
/* ==========================================================================
   7. Japan IP Access Lock Screen
   ========================================================================== */
.hide-content main, 
.hide-content header, 
.hide-content footer {
    opacity: 0 !important;
    pointer-events: none !important;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loader-content {
    text-align: center;
    max-width: 450px;
}

/* Crimson Sonar Pulse */
.sonar-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background-color: #e63946;
    border-radius: 50%;
    animation: sonarPulse 1.2s infinite ease-in-out;
}

.loader-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1d3557;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.loader-subtext {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

@keyframes sonarPulse {
    0% { transform: scale(0.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}
