/* ==========================================================================
   Hucomlogix Custom Design System - v1.0 (Vanilla Mode)
   ========================================================================== */

/* --- Import Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Noto+Sans+JP:wght@300;400;700&display=swap');

:root {
    /* Colors */
    --main-color: #003366;
    --accent-color: #EDBE0E;
    --base-color: #ffffff;
    --footer-bg: #333333;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --bg-light: #f4f7f6;
    
    /* Typography */
    --font-primary: 'Outfit', 'Noto Sans JP', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--base-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

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

/* --- Layout --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

.grid {
    display: grid;
    gap: 30px;
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-center { text-align: center; }
.section-title {
    font-size: 2.5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}
.section-subtitle {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* --- Components --- */
.btn {
    display: inline-block;
    padding: 12px 15px !important;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
}



.btn-primary {
    background-color: var(--main-color);
    color: white;
}
.btn-primary:hover {
    background-color: #002244;
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--main-color);
}
.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* --- Animations --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }

/* --- Shared Components (Extracted from common-components.js) --- */
#site-header { padding: 20px 0; transition: all 0.3s ease; width: 100%; position: fixed; top: 0; z-index: 1000; }
#site-header.scrolled, #site-header.is-sub-page { background: white; box-shadow: 0 5px 20px rgba(0,0,0,0.1); padding: 10px 0; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo { display: block; z-index: 2001; }
.logo img { 
    height: 50px; 
    width: auto; 
    display: block; 
    transition: opacity 0.3s ease;
}
.logo .logo-color { display: none; }
#site-header.scrolled .logo .logo-white, #site-header.is-sub-page .logo .logo-white { display: none; }
#site-header.scrolled .logo .logo-color, #site-header.is-sub-page .logo .logo-color { display: block; }

/* Desktop Navigation */
.nav-menu { display: flex; gap: 2rem; align-items: center; }
.nav-menu a { font-weight: 600; font-size: 0.95rem; color: white; }
.nav-menu .btn-accent { color: #292929 !important; }
#site-header.scrolled .nav-menu a:not(.btn), #site-header.is-sub-page .nav-menu a:not(.btn) { color: #292929; }
.nav-menu a:not(.btn):hover { color: #EDBE0E !important; }

@media (max-width: 991px) {
    .nav-menu { display: none; }
}

#site-footer { background: #333; color: white; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-info .footer-logo { margin-bottom: 20px; }
.footer-info .footer-logo img { height: 52px; width: auto; }
.footer-info p { color: #bbb; font-size: 0.9rem; margin-bottom: 5px; }
.footer-links h4 { font-size: 1.1rem; margin-bottom: 20px; color: #EDBE0E; position: relative; padding-bottom: 10px; }
.footer-links h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: #EDBE0E; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a { color: #bbb; font-size: 0.9rem; }
.footer-links ul li a:hover { color: white; padding-left: 5px; }
.footer-bottom { border-top: 1px solid #444; padding-top: 20px; text-align: center; }
.footer-bottom p { color: #777; font-size: 0.8rem; }

@media (max-width: 767px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* --- Sub-page Common Layout --- */
.page-hero { padding: 180px 0 80px; background: #f8f9fa; border-bottom: 1px solid #eee; }
.breadcrumbs { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumbs a:hover { color: var(--accent-color); }

.check-list { margin-top: 20px; }
.check-list li { position: relative; padding-left: 25px; margin-bottom: 10px; font-weight: 500; }
.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-color); font-weight: bold; }

.image-with-shadow {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.image-with-shadow:hover {
    transform: scale(1.02);
}

/* --- Premium Mobile Navigation (Overlay) --- */
.nav-toggle {
    display: none;
    position: relative;
    z-index: 2001;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.nav-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--main-color);
    transition: var(--transition-base);
}

.nav-toggle span:nth-child(1) { top: 0; width: 80%; }
.nav-toggle span:nth-child(2) { bottom: 0; }

.nav-toggle.active span:nth-child(1) { 
    top: 50%; 
    width: 100%; 
    transform: translateY(-50%) rotate(45deg); 
}
.nav-toggle.active span:nth-child(2) { 
    bottom: 50%; 
    transform: translateY(50%) rotate(-45deg); 
}

#site-header:not(.scrolled):not(.is-sub-page) .nav-toggle:not(.active) span {
    background: white;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from center to prevent cutoff */
    align-items: center;
    overflow-y: auto; /* Enable scrolling for long content */
    padding: 120px 0 60px; /* Top padding to avoid logo overlap */
    visibility: hidden;
    opacity: 0;
    transition: var(--transition-slow);
}

.nav-overlay.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu {
    text-align: center;
    width: 100%;
}

.mobile-menu li {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-slow);
}

.nav-overlay.active .mobile-menu li {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered load for menu items */
.nav-overlay.active .mobile-menu li:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay.active .mobile-menu li:nth-child(2) { transition-delay: 0.2s; }
.nav-overlay.active .mobile-menu li:nth-child(3) { transition-delay: 0.3s; }
.nav-overlay.active .mobile-menu li:nth-child(4) { transition-delay: 0.4s; }
.nav-overlay.active .mobile-menu li:nth-child(5) { transition-delay: 0.5s; }
.nav-overlay.active .mobile-menu li:nth-child(6) { transition-delay: 0.6s; }
.nav-overlay.active .mobile-menu li:nth-child(7) { transition-delay: 0.7s; }

.nav-toggle.active span {
    background: var(--main-color) !important;
}

.mobile-menu a {
    color: var(--main-color);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.mobile-menu a span.en {
    font-size: 0.7rem;
    color: var(--accent-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
}

.mobile-menu a:hover {
    color: var(--accent-color);
}

.mobile-contact-info {
    margin-top: 40px;
    text-align: center;
    color: rgba(0,0,0,0.6);
    font-size: 0.8rem;
    opacity: 0;
    transition: var(--transition-slow);
    transition-delay: 0.8s;
}

.nav-overlay.active .mobile-contact-info {
    opacity: 1;
}

@media (max-width: 991px) {
    .nav-toggle { display: block; }
}

#footer {
    background-color: var(--footer-bg);
    color: white;
    padding: 80px 0 20px;
}

/* --- Business Section (Agent Grow Style) --- */
.business-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

/* Vertical Title Overlay */
.vertical-title-wrapper {
    position: absolute;
    left: 20px;
    top: 120px;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.vertical-title {
    writing-mode: vertical-rl;
    font-size: 8rem;
    font-weight: 800;
    color: rgba(0, 51, 102, 0.05); /* Very light main color */
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (max-width: 1200px) {
    .vertical-title { font-size: 5rem; }
}

.category-tag {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: block;
}

/* Business Block */
.business-block {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 120px;
}

.business-block:nth-child(even) {
    flex-direction: row-reverse;
}

.business-content {
    flex: 1;
    position: relative;
    padding: 40px;
}

.business-image {
    flex: 1.2;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.business-image img {
    width: 100%;
    height: auto;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.business-block:hover .business-image img {
    transform: scale(1.05);
}



.business-content h3 {
    font-size: 2.2rem;
    color: var(--main-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.business-content p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* Slanted Background Shape */
.slanted-bg {
    position: absolute;
    top: 20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: #f8f9fa;
    transform: skewY(-10deg);
    z-index: -1;
}

@media (max-width: 991px) {
    .business-block, .business-block:nth-child(even) {
        flex-direction: column;
        gap: 40px;
        margin-bottom: 80px;
    }
    .business-content { padding: 0; }
    .vertical-title-wrapper { display: none; }
    .business-content h3 { font-size: 1.8rem; }
}

/* --- Outdoor Sub-brands --- */
.business-sub-grid {
    display: flex;
    gap: 40px;
    margin-top: 60px;
    grid-column: 1 / -1;
}

.sub-brand-card {
    flex: 1;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 25px;
    transition: var(--transition-base);
}

.sub-brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.sub-brand-info {
    flex: 1;
}

.sub-brand-info h4 {
    font-size: 1.6rem;
    color: var(--main-color);
    margin-bottom: 15px;
}

.sub-brand-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.sub-brand-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 10px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-brand-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

@media (max-width: 991px) {
    .business-sub-grid {
        flex-direction: column;
        gap: 30px;
        margin-top: 40px;
    }
}

/* --- Top Page Specific (Extracted from index.html) --- */
#hero {
    height: 100vh;
    position: relative;
    color: white;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 30, 60, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    line-height: 1.3;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 0;
    opacity: 0.9;
    font-weight: 500;
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.5 !important;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
    background: var(--accent-color) !important;
}

.swiper-button-next, .swiper-button-prev {
    color: white !important;
    transition: var(--transition-base);
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    color: var(--accent-color) !important;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    letter-spacing: 2px;
    z-index: 20;
}

.scroll-down .line {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.scroll-down .line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

.swiper-slide .fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-slide-active .fade-up {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.bg-light {
    background-color: var(--bg-light);
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid transparent;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--main-color);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.read-more {
    font-weight: 600;
    color: var(--main-color);
    font-size: 0.9rem;
}

.news-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    gap: 20px;
}

.news-item time {
    font-size: 0.9rem;
    color: var(--text-muted);
    min-width: 100px;
}

.news-item .category {
    background: var(--main-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 3px;
}

.news-title {
    flex: 1;
    font-weight: 500;
}

.news-title:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px 0;
    }
    
    .news-item time {
        min-width: auto;
        font-size: 0.8rem;
    }
    
    .news-item .category {
        margin-bottom: 2px;
    }
    
    .news-title {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

#cta {
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

#cta h2 {
    font-size: 2.5rem;
    color: var(--main-color);
}

@media (max-width: 768px) {
    .hero-content h2 { font-size: 2.2rem; }
    .hero-content p { font-size: 1.1rem; }
}

/* --- Page Specific Utilities & Components --- */

/* Hosting */
.hosting-feature { margin-top: 2.5rem; }
.hosting-feature h3 { font-size: 1.3rem; margin-bottom: 0.8rem; color: var(--main-color); position: relative; padding-left: 15px; }
.hosting-feature h3::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent-color); border-radius: 2px; }
.hosting-feature p { font-size: 1rem; color: #444; line-height: 1.8; margin-bottom: 0; }
.hosting-feature small { display: block; margin-top: 5px; color: #888; font-size: 0.85rem; }

/* DTP & Portfolio */
.category-block h4 { font-size: 0.9rem; color: var(--main-color); margin-bottom: 15px; padding-left: 10px; border-left: 3px solid var(--accent-color); letter-spacing: 0.1em; }
.tag-container { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item { background: #f0f4f8; color: var(--main-color); padding: 6px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; border: 1px solid #e1e8ed; transition: all 0.3s ease; }
.tag-item:hover { background: var(--main-color); color: white; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 51, 102, 0.2); }

/* News */
.news-content { flex: 1; }
.news-title { font-weight: 600; font-size: 1.1rem; margin-bottom: 10px; color: var(--main-color); display: block; }
.news-desc { font-size: 0.95rem; line-height: 1.6; color: #666; }
.news-desc a { color: var(--accent-color); font-weight: 600; text-decoration: underline; margin-left: 5px; }

/* Company */
.company-table { width: 100%; border-collapse: collapse; margin-top: 40px; }
.company-table th { width: 30%; text-align: left; padding: 20px; border-bottom: 1px solid #eee; background: #fafafa; color: var(--main-color); }
.company-table td { padding: 20px; border-bottom: 1px solid #eee; line-height: 1.8; }
@media (max-width: 767px) {
    .company-table th, .company-table td { display: block; width: 100%; }
    .company-table th { border-bottom: none; padding-bottom: 5px; }
}

/* Contact & Policy */
.max-700 { max-width: 700px; margin: 0 auto; }
.max-800 { max-width: 800px; margin: 0 auto; }
.contact-card { background: white; padding: 40px; border-radius: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 15px; color: var(--main-color); }
.email { font-size: 1.5rem; font-weight: 700; color: var(--main-color); margin-bottom: 5px; }

/* General Content */
main h3 { color: var(--main-color); margin-top: 30px; }

/* --- Tool Interface Styles --- */
.tool-container {
    padding: 20px 0;
}

.tool-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.tool-section {
    margin-bottom: 30px;
}

.tool-section h3 {
    font-size: 1.1rem;
    color: var(--main-color);
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.input-small {
    width: 80px;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    transition: var(--transition-base);
}

.input-small:focus {
    border-color: var(--main-color);
    outline: none;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.note-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #555;
    margin: 20px 0;
}

.tool-textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition-base);
}

.tool-textarea:focus {
    border-color: var(--main-color);
    outline: none;
}

.tool-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
}

.btn-large {
    padding: 15px 40px !important;
    font-size: 1.1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid #dee2e6;
    color: #666;
}

.btn-outline:hover {
    background: #eee;
    border-color: #ccc;
}

/* --- Image Overlay Styles --- */
.image-overlay-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.image-overlay-wrapper .image-with-shadow {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: none; /* Shadow is now on the wrapper */
}

.logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    max-width: 260px;
    min-width: 156px;
    height: auto;
    z-index: 10;
    filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    pointer-events: none;
    transition: var(--transition-base);
}

.image-overlay-wrapper:hover .logo-overlay {
    transform: translate(-50%, -55%);
}

@media (max-width: 575px) {
    .logo-overlay {
        width: 60%;
        max-width: 180px;
        min-width: 120px;
    }
}
