:root {
    --primary-color: #2D3436;
    --accent-color: #6C5CE7;
    --bg-color: #DFE6E9;
    --text-color: #2D3436;
    --white: #FFFFFF;
    --font-jp: 'Zen Kaku Gothic New', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-jp);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8;
    /* Increased line-height */
    letter-spacing: 0.05em;
    /* Added letter-spacing */
    overscroll-behavior-y: none;
    /* Prevent pull-to-refresh on mobile */
}

/* Utilities */
.only-pc {
    display: block;
}

.only-sp {
    display: none;
}

@media (max-width: 1024px) {
    .only-pc {
        display: none;
    }

    .only-sp {
        display: block;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo img {
    height: 30px;
    width: auto;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 90vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align to left to balance character */
    text-align: left;
    position: relative;
    overflow: hidden;
    padding-top: 50px;
    background: #4e38e9;
    /* Medium-vibrancy brand purple */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
    opacity: 0.6;
    /* Balanced visibility */
    pointer-events: none;
    z-index: 1;
}

.bg-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: scrollVertical 60s linear infinite;
}

.bg-column.reverse {
    animation: scrollVerticalReverse 55s linear infinite;
}

.bg-column:nth-child(3) {
    animation-duration: 70s;
}

@keyframes scrollVertical {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes scrollVerticalReverse {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}

.iframe-wrapper {
    width: 360px;
    /* Enlarged from 280px */
    height: 580px;
    /* Enlarged from 450px */
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.bg-column iframe {
    width: 400%;
    /* PC View scale-out */
    height: 400%;
    transform: scale(0.25);
    transform-origin: 0 0;
    border: none;
    pointer-events: none;
    /* Block interaction in bg */
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* More neutral but tinted gradient to maintain vibrant purple feel */
    background: radial-gradient(circle, rgba(78, 56, 233, 0.1) 0%, rgba(18, 12, 62, 0.4) 100%);
    z-index: 1;
}

.hero-character {
    position: absolute;
    bottom: 0;
    right: 3%;
    height: 50%;
    /* Reduced from 75% */
    z-index: 5;
    pointer-events: none;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* Floating animation removed per user request */


.hero-content {
    z-index: 4;
    padding: 5rem 2rem;
    width: 65%;
    /* Not full width for more dynamic composition */
    max-width: 1000px;
    margin-right: auto;
    /* Push to left to balance character */
    margin-left: 5%;
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 40px;
    /* Rounded but large */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    text-align: left;
    /* Alignment change for balance */
    opacity: 0;
    transform: translateX(-30px);
    animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-content>* {
    opacity: 0;
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-label {
    animation-delay: 0.2s;
}

.hero-title {
    animation-delay: 0.4s;
}

.hero-divider {
    animation-delay: 0.6s;
}

.hero-subtitle {
    animation-delay: 0.8s;
}

.btn-hero {
    animation-delay: 1s;
}

.hero-title {
    font-size: 4rem;
    /* Slightly larger */
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.1;
    /* Sophisticated 3-color shimmer gradient */
    background: linear-gradient(to right, #ffffff 20%, #e0e0e0 40%, #ffffff 60%, #e0e0e0 80%, #ffffff 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: shimmer 10s linear infinite, heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.hero-title.only-sp {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 1.2rem;
    font-weight: 800;
}

.hero-divider {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.2) 100%);
    margin: 0 0 2.5rem;
    border-radius: 4px;
}

.hero-label {
    display: inline-block;
    font-size: 0.95rem;
    /* More elegant smaller size */
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    letter-spacing: 0.25em;
    padding: 0.6rem 1.8rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 3.5rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
    .hero {
        height: auto;
        min-height: 80vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 120px;
        padding-bottom: 10px;
        /* Reduced from 40px */
        background: radial-gradient(circle at top right, #5a45e9, #1c145a);
    }

    .hero-bg {
        opacity: 0.2;
        /* Slightly reduced for more text focus */
        gap: 4px;
    }

    .iframe-wrapper {
        width: 120px;
        height: 200px;
        border-radius: 12px;
    }

    .hero-content {
        width: 95% !important;
        /* Slightly reduced from 100% */
        max-width: none !important;
        margin: 5px auto 0 !important;
        /* Centered with top margin */
        padding: 2.5rem 1.5rem !important;
        /* Restored lateral padding */
        border-radius: 24px !important;
        /* Restored rounded corners */
        text-align: center;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(35px);
        -webkit-backdrop-filter: blur(35px);
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        /* Full border */
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
        transform: none !important;
        animation: none !important;
        opacity: 1 !important;
    }

    .hero-character {
        position: relative;
        right: auto;
        bottom: auto;
        width: 60%;
        max-width: 240px;
        height: auto;
        margin: 20px auto 0px;
        /* Specified bottom margin as 0px */
        display: block;
        filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.3));
    }
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: transform 0.2s, background 0.2s;
}

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

.btn-hero {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}


.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.4);
}

/* Header Button Specifics */
.nav .btn-hero {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.contact-cta {
    text-align: center;
}

/* Section General */
.section {
    padding: 8rem 0;
    /* Increased padding */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    /* Removed positioning hack */
    /* position: relative; */
    /* display: inline-block; */
    /* left: 50%; */
    /* transform: translateX(-50%); */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .hero-title {
        font-size: 1.8rem;
        /* Consistency with only-sp */
    }

    .hero-subtitle {
        font-size: 1rem;
        /* Reduced from 1.1rem */
        line-height: 1.7;
        margin-bottom: 2rem;
    }

    .hero-divider {
        margin-bottom: 1rem;
        opacity: 0.6;
    }

    .hero-label {
        font-size: 0.85rem;
        /* Slightly smaller */
        padding: 0.35rem 1.2rem;
        margin-bottom: 1rem;
    }
}

/* Case Studies */
#cases {
    background: #fff;
}

/* Gallery Grid (Vertical Scroll Style) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
    /* Larger gap */
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-item {
    background: transparent;
    /* Clean look */
    /* Removed card background/shadow usually for cleaner gallery */
    /* border-radius: 8px; */
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: auto;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-thumb {
    width: 100%;
    height: 450px;
    /* Vertical Height */
    background: #dfe6e9;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Placeholder text centering */
.gallery-thumb span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.gallery-thumb iframe {
    width: 400%;
    height: 400%;
    transform: scale(0.25);
    transform-origin: 0 0;
    border: none;
    display: block;
    pointer-events: auto;
    background: #fff;
}

.gallery-caption {
    padding: 1.2rem 0.5rem;
    /* Less padding, transparent bg */
    text-align: left;
}

.gallery-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.gallery-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: #fff;
    background: #b2bec3;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-en);
}

/* Service Flow */
.bg-light {
    background: #f8f9fa;
}

.flow-list {
    max-width: 1000px;
    margin: 0 auto;
}

.flow-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.flow-item::after {
    content: '';
    position: absolute;
    left: 45px;
    top: 80px;
    bottom: -40px;
    width: 2px;
    background: #dfe6e9;
    z-index: 0;
}

.flow-item:last-child::after {
    display: none;
}

.flow-number {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    z-index: 1;
}

.flow-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.flow-content p {
    color: #636e72;
}

/* Pricing */
.grid-pricing {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pricing-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 100%;
    max-width: 400px;
    border: 1px solid #dfe6e9;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

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

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: var(--font-en);
    margin-bottom: 0.5rem;
}

.currency {
    font-size: 1.2rem;
    font-weight: 500;
}

.price-note {
    font-size: 0.9rem;
    color: #b2bec3;
    margin-bottom: 2rem;
}

.price-features {
    list-style: none;
    text-align: left;
    padding-top: 2rem;
    border-top: 1px solid #dfe6e9;
}

.price-features li {
    padding: 0.5rem 0;
    color: var(--text-color);
    position: relative;
    padding-left: 1.5rem;
}

.price-features li::before {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: 700;
}

.btn-pricing {
    margin-top: 2rem;
    display: inline-block;
    padding: 0.8rem 2rem;
    text-decoration: none;
    width: 80%;
}

/* Profile */
.profile-grid {
    display: flex;
    /* Switched to Flexbox */
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.profile-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    flex: 1 1 300px;
    /* Flex align */
    max-width: 900px;
}

.profile-image {
    width: 150px;
    height: 150px;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b2bec3;
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    color: var(--primary-color);
}

.en-name {
    font-size: 0.9rem;
    font-family: var(--font-en);
    color: #b2bec3;
    font-weight: 400;
    margin-left: 0.5rem;
}

.role {
    color: var(--accent-color);
    font-family: var(--font-en);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.profile-text {
    text-align: left;
    font-size: 0.95rem;
    color: #636e72;
    line-height: 1.8;
    max-width: 100%;
}

/* Contact */
.contact-container {
    text-align: center;
}

.contact-desc {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 3.5rem;
    color: var(--text-color);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    /* Centered as requested */
    background: transparent;
    /* Removed card background */
    padding: 0;
    border: none;
}

.contact-desc p {
    margin: 0;
}

.btn-contact {
    font-size: 1.3rem;
    padding: 1.2rem 4rem;
}

.contact-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #b2bec3;
}

/* Hearing Form Integrated Styles */
.hearing-form-wrapper {
    max-width: 850px;
    /* Slightly wider for complex fields */
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 4rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hearing-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.4;
}

.form-group label span {
    font-size: 0.7rem;
    background: #ff4757;
    color: #fff;
    padding: 0.1rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
}

.field-note {
    font-size: 0.85rem;
    color: #636e72;
    line-height: 1.6;
    margin-bottom: 0.3rem;
    background: rgba(90, 69, 233, 0.05);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

/* Error Styles */
.error-message {
    color: #ff4757;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    display: none;
}

.error-message.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-group input.is-invalid,
.form-group textarea.is-invalid,
.form-group input[type="date"].is-invalid {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.radio-group label,
.checkbox-label {
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.radio-group input[type="radio"],
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
}

.form-group input,
.form-group textarea,
.form-group input[type="date"] {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.8);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-color);
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(90, 69, 233, 0.1);
}

.btn-submit {
    border: none;
    cursor: pointer;
    font-weight: 700;
    margin-top: 1.5rem;
    width: 100%;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .contact-desc {
        padding: 0 1rem;
        font-size: 0.95rem;
    }

    .hearing-form-wrapper {
        padding: 2.5rem 1.2rem;
        border-radius: 20px;
    }

    .hearing-form {
        gap: 2.2rem;
        /* More space between fields */
    }

    .form-group label {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group input[type="date"] {
        font-size: 1rem;
        /* 16px equivalent for better readability */
        padding: 1rem;
    }

    .field-note {
        font-size: 0.85rem;
        padding: 0.8rem;
    }

    .radio-group {
        gap: 1.2rem;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.4);
        padding: 1rem;
        border-radius: 12px;
    }

    .radio-group label,
    .checkbox-label {
        font-size: 1rem;
        padding: 0.5rem 0;
        /* Larger tap target */
    }

    .radio-group input[type="radio"],
    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}


/* Footer */
.footer {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.case-card,
.pricing-card,
.profile-card {
    transition: transform 0.3s, opacity 0.3s;
}

/* Mobile Menu Styles */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
}

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .nav {
        display: flex;
        /* Override previous display: none */
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        justify-content: center;
        transition: right 0.3s ease-in-out;
        z-index: 999;
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        margin: 1.5rem 0;
    }
}