/* General Body Styles */
body {
    background-image: url('img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* スクロールしても背景を固定 */
    color: #f5f5f5; /* Light gray text for readability */
    font-family: 'Noto Sans JP', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    line-height: 1.8;
    position: relative; /* For stacking context */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -2;
}

/* Star Particles */
#star-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* 背景より手前、コンテンツより後ろ */
}

.star {
    position: absolute;
    opacity: 0; /* アニメーション開始前の初期状態を透明にする */
    animation: twinkle 2s infinite;
}

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


/* Header and Logo */
header {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 1.5rem;
    animation: mystical-glow 4s ease-in-out infinite;
}

@keyframes mystical-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }
    50% {
        filter: drop-shadow(0 0 25px rgb(255, 255, 255)) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }
}

.letter {
    animation: breathing 5s infinite;
    opacity: 0.6; /* Start slightly visible */
}

@keyframes breathing {
    0%, 100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.7));
    }
}

#logo #letters-group path:nth-of-type(1) { animation-delay: 0s; }
#logo #letters-group path:nth-of-type(2) { animation-delay: 0.2s; }
#logo #letters-group path:nth-of-type(3) { animation-delay: 0.4s; }
#logo #letters-group path:nth-of-type(4) { animation-delay: 0.6s; }
#logo #letters-group path:nth-of-type(5) { animation-delay: 0.8s; }
#logo #letters-group path:nth-of-type(6) { animation-delay: 1.0s; }


/* Navigation Menu Buttons */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin: 0 10px;
}

nav a {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px; /* Pill-shaped buttons */
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

nav a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Main Content & Sections */
main {
    padding: 2rem 1rem;
}

section {
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Headings */
h2, h3 {
    font-family: 'Playfair Display', serif;
    color: #ffffff; /* White headings */
}

#hero h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

#about p {
    text-align: left;
    background: rgba(255, 255, 255, 0.6);
    padding: 1.5rem;
    border-radius: 8px;
    color: #212529; /* Dark text for readability on light background */
}

/* Portfolio Section */
#portfolio .portfolio-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#portfolio .portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

#portfolio .portfolio-item img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

#portfolio .portfolio-item h4 {
    color: #012a4a;
    margin-bottom: 0.5rem;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.7rem;
}

#portfolio .portfolio-item p {
    font-size: 1rem;
    color: #334e68;
}

/* General Button Style */
.btn {
    display: inline-block;
    background: transparent;
    color: #012a4a;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    border: 2px solid #012a4a;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #012a4a;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: transparent;
    border-top: 1px solid #b3e5fc;
}

.legal-links {
    margin-top: 20px;
    font-size: 0.9em;
    color: #6c757d;
}

.legal-links a {
    color: #007bff;
    text-decoration: none;
}

.legal-links a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: transparent;
    border-top: 1px solid #b3e5fc;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #f5f5f5;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}


.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.qr-code {
    width: 200px;
    height: 200px;
}

.kuku-ss {
    height: 200px;
    width: auto;
    border-radius: 8px;
}



/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Set a consistent base font size for mobile */
        line-height: 1.7;
    }

    header {
        flex-direction: column;
        padding: 1.5rem 1rem;
    }

    nav ul li {
        display: block;
        margin: 10px 0;
    }

    main {
        padding: 1.5rem 1rem;
    }

    section {
        margin-bottom: 3rem;
    }

    #hero h2 {
        font-size: 2.2rem;
    }

    h3 {
        font-size: 1.8rem;
    }

    #portfolio .portfolio-item h4 {
        font-size: 1.4rem;
    }

    #portfolio .portfolio-item {
        padding: 1.5rem;
    }
}

/* Static Page Styles (Privacy, Company, etc.) */
.main-container {
    padding: 2rem;
    margin: 4rem auto;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background for readability */
    border-radius: 8px;
    color: #f5f5f5; /* Light text */
}

.main-container h1,
.main-container h2 {
    color: #ffffff; /* White headings */
    border-bottom: 1px solid #b3e5fc;
    padding-bottom: 10px;
}

.main-container p {
    text-align: left;
}

/* Table styles for static pages */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    color: #f5f5f5; /* Light text for table content */
}

.info-table th, 
.info-table td {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px;
    text-align: left;
}

.info-table th {
    background-color: rgba(255, 255, 255, 0.1);
    width: 30%;
}

/* Back to top link as a button */
.main-container .btn {
    display: inline-block; /* override block from contact form */
    width: auto; /* override 100% from contact form */
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.main-container .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: #ffffff;
}


/* Contact Form Specific Styles */
#contact form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 8px;
}

#contact input,
#contact textarea {
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

#contact button {
    padding: 1rem;
    border: none;
    border-radius: 4px;
    background-color: #012a4a;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

#contact button:hover {
    background-color: #013d6b;
}