/* CSS Reset & Basics */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #FAFAFA;
    --text-color: #111111;
    --accent-color: #333333;
    --font-serif: "Noto Serif JP", serif;
    --font-sans: "Zen Kaku Gothic New", sans-serif;
    --easing: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

/* Loading Screen */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo-img {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 1s var(--easing) forwards;
}

.loader-line {
    width: 0;
    height: 2px;
    background-color: var(--text-color);
    animation: lineExtend 1.5s var(--easing) 0.5s forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineExtend {
    to {
        width: 100px;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    transition: padding 0.3s;
}

.nav-logo-img {
    height: 80px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 60px;
}

.hero-logo-img {
    width: 150px;
    height: auto;
    margin-bottom: 30px;
}

.main-title {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.1;
}

/* Adjust title size for smaller screens or generally to fit logo */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
}

.tagline {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: #555;
    margin-top: 1rem;
}

/* Common Section Styles */
.section {
    padding: 120px 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background-color: var(--text-color);
    margin: 20px auto 0;
}

/* About Typesetting */
.profile-card {
    text-align: center;
}

.profile-info h3 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: #555;
}

.name {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.name .en {
    display: block;
    font-size: 1rem;
    font-family: var(--font-sans);
    margin-top: 5px;
    color: #777;
    letter-spacing: 0.1em;
}

.description {
    max-width: 600px;
    margin: 0 auto;
    color: #444;
}

/* Services */
.dark-bg {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.text-white::after {
    background-color: var(--bg-color);
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-item {
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s var(--easing), background-color 0.4s;
}

.service-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.02);
}

.service-item h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.service-item p {
    font-size: 0.85rem;
    opacity: 0.6;
    letter-spacing: 0.05em;
}



/* Contact */
.contact-section {
    text-align: center;
    padding-bottom: 150px;
}

.contact-info.center-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    text-align: center;
}

.contact-message {
    font-size: 1.1rem;
    color: #333;
}

.btn-contact {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--text-color);
    color: #fff;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--text-color);
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background-color: transparent;
    color: var(--text-color);
}

/* Footer */
footer {
    padding: 40px 0;
    background-color: #f5f5f5;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--easing), transform 1s var(--easing);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    nav {
        justify-content: center;
    }

    .service-list {
        grid-template-columns: 1fr;
    }
}

/* Contact Form Styles */
.contact-section {
    background-color: #fafafa;
}

.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.contact-intro {
    text-align: left;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-form {
    text-align: left;
    background: #fff;
    padding: 40px;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

/* Form Groups */
.form-group {
    margin-bottom: 35px;
}

.label-heading {
    display: block;
    font-family: var(--font-sans);
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 500;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.required {
    color: #e74c3c;
    margin-left: 5px;
    font-size: 0.8rem;
    vertical-align: super;
}

.input-help {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
}

/* Inputs & Textarea */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 1px solid #ddd;
    background-color: #fcfcfc;
    border-radius: 4px;
    transition: border-color 0.3s, background-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #fff;
}

/* Radios & Checkboxes */
.radio-group label,
.checkbox-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 5px 0;
}

.radio-group input,
.checkbox-group input {
    margin-right: 10px;
    transform: scale(1.2);
    /* 少し大きくして押しやすく */
    accent-color: var(--text-color);
    /* ブラウザ標準の色を変更 */
}

/* Submit Button Area */
.form-submit {
    margin-top: 50px;
    text-align: center;
}

.btn-contact {
    min-width: 250px;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-form {
        padding: 20px;
        border: none;
        box-shadow: none;
        background: transparent;
    }
}