/* ========================================
   Base Styles & Reset
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #003d82;
    --secondary-color: #0056b3;
    --accent-color: #ff6b35;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    overflow-x: hidden;
    cursor: none;
}

/* ========================================
   Loading Screen
======================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    text-align: center;
}

.loader-logo {
    animation: pulse 2s infinite;
}

.star-path {
    animation: rotate 3s linear infinite;
    transform-origin: center;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 1.2rem;
    animation: fade 1.5s infinite;
}

@keyframes fade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   Custom Cursor
======================================== */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.1s;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    background: rgba(0, 61, 130, 0.1);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.2s;
    z-index: 9998;
}

/* ========================================
   Header Styles
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: var(--bg-white);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--primary-color);
}

.company-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-desktop ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    width: 30px;
    height: 24px;
    cursor: pointer;
    position: relative;
}

.hamburger-menu span {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.hamburger-menu span:nth-child(1) {
    top: 0;
}

.hamburger-menu span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-menu span:nth-child(3) {
    bottom: 0;
}

.hamburger-menu.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Mobile Navigation */
.nav-mobile {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-white);
    transition: left 0.3s;
    overflow-y: auto;
}

.nav-mobile.active {
    left: 0;
}

.nav-mobile ul {
    list-style: none;
    padding: 2rem;
}

.nav-link-mobile {
    display: block;
    padding: 1rem 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.nav-link-mobile:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

/* ========================================
   Hero Section
======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: -2;
}

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

.hero-content {
    text-align: center;
    color: white;
    padding: 0 2rem;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.title-line1,
.title-line2 {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.title-line2 {
    animation-delay: 0.2s;
}

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

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s 0.4s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: white;
    margin: 0.5rem auto;
    position: relative;
    animation: scroll 2s infinite;
}

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

/* ========================================
   Sections
======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.title-en {
    display: block;
    font-size: 0.875rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.title-ja {
    display: block;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
}

/* Strengths Section */
.strengths {
    background: var(--bg-light);
}

.strength-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.strength-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.strength-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    margin-bottom: 1.5rem;
}

.strength-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.strength-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Services Overview */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}


.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.service-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.service-link:hover {
    gap: 0.5rem;
}

/* Company Intro */
.company-intro {
    background: var(--bg-light);
}

.intro-content {
    text-align: center;
}

.intro-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.company-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}


/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-call,
.btn-contact {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-call {
    background: white;
    color: var(--primary-color);
}

.btn-contact {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-call:hover,
.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Footer
======================================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo h3 {
    font-size: 1.25rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: white;
    padding-left: 5px;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info a {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   Responsive Design
======================================== */

/* 〜320px: スマートフォン（標準） */
@media (max-width: 320px) {
    html {
        font-size: 14px;
    }
    
    .header-container {
        padding: 0.75rem 1rem;
    }
    
    .company-name {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .section-title .title-ja {
        font-size: 1.5rem;
    }
    
    .strength-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* 321px〜480px: スマートフォン（大型）〜タブレット（縦） */
@media (min-width: 321px) and (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .strength-cards {
        grid-template-columns: 1fr;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* 481px〜767px: タブレット（標準） */
@media (min-width: 481px) and (max-width: 767px) {
    .nav-desktop {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .strength-cards {
        grid-template-columns: 1fr;
    }
    
    .service-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* 768px〜1024px: タブレット（横）〜小型PC */
@media (min-width: 768px) and (max-width: 1024px) {
    .nav-desktop {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .strength-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1025px〜1279px: PC・デスクトップ（標準） */
@media (min-width: 1025px) and (max-width: 1279px) {
    .container {
        max-width: 1100px;
    }
    
    .strength-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 1280px〜1440px: PC・デスクトップ（ワイド） */
@media (min-width: 1280px) and (max-width: 1440px) {
    .container {
        max-width: 1280px;
    }
}

/* 1441px〜1919px: ウルトラワイドモニター */
@media (min-width: 1441px) and (max-width: 1919px) {
    .container {
        max-width: 1440px;
    }
    
    html {
        font-size: 17px;
    }
}

/* 1920px以上 */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    html {
        font-size: 18px;
    }
}

/* モバイルデバイス向け調整 */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .custom-cursor,
    .cursor-follower {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .hero {
        min-height: 500px;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 250px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-call,
    .btn-contact {
        width: 100%;
        max-width: 300px;
    }
}

/* タッチデバイス対応 */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor,
    .cursor-follower {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .nav-link:hover::after {
        width: 0;
    }
    
    .nav-link.active::after {
        width: 100%;
    }
}