@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Sawarabi+Mincho&family=Yuji+Syuku&display=swap');

:root {
    --primary-color: #c62828;
    /* Dojo Red */
    --secondary-color: #1a1a1a;
    /* Rich Black */
    --accent-color: #d4af37;
    /* Dojo Gold */
    --text-color: #333333;
    --light-text: #666666;
    --bg-light: #fcfcfc;
    --bg-white: #ffffff;
    --bg-gray: #f5f5f5;
    --font-main: 'Noto Sans JP', sans-serif;
    --font-heading: 'Sawarabi Mincho', serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --header-height: 80px;
}

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

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--bg-light);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    position: relative;
    z-index: 2;
}

.section-padding {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.1rem;
    margin-bottom: 15px;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 15px auto 0;
}

.section-title p {
    color: var(--light-text);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

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

/* Header */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    max-height: 60px;
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo img {
    max-height: 50px;
}

.logo span {
    color: var(--primary-color);
}

header.scrolled .logo {
    color: var(--secondary-color);
}

/* Nav Desktop */
nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
    color: #ffffff;
}

header.scrolled nav ul li a {
    color: var(--secondary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hamburger Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
    z-index: 1100;
    transition: var(--transition);
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: var(--transition);
    border-radius: 2px;
}

header.scrolled .mobile-menu-btn span {
    background-color: var(--secondary-color);
}

.mobile-menu-btn.active span {
    background-color: var(--secondary-color);
}

/* Active State for Button */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

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

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('../img/karate.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    color: #fff;
    line-height: 1.7;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

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

.btn-full {
    width: 100%;
    cursor: pointer;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 20px;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 20px 20px 0 var(--accent-color);
}

/* Classes Section */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.class-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid #eee;
}

.class-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.class-img {
    height: 250px;
    overflow: hidden;
}

.class-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.class-card:hover .class-img img {
    transform: scale(1.1);
}

.class-content {
    padding: 30px;
}

.class-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.class-content p {
    font-size: 0.95rem;
    color: var(--light-text);
}

/* Fees Section */
.fees-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 40px;
}

.fees-table th,
.fees-table td {
    padding: 20px;
    border: 1px solid #eee;
    text-align: center;
}

.fees-table th {
    background: var(--secondary-color);
    color: #fff;
    font-family: var(--font-heading);
}

.fees-table tr:nth-child(even) {
    background: #f9f9f9;
}

.fees-note {
    margin-top: 20px;
    text-align: center;
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Instructor Section */
.instructor-profile {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    background: var(--bg-white);
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.instructor-img {
    flex-shrink: 0;
    width: 300px;
}

.instructor-img img {
    border-radius: 15px;
}

.instructor-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.instructor-info .title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 20px;
    display: block;
}

.instructor-info .bio {
    margin-bottom: 30px;
}

.instructor-achievements {
    font-size: 0.95rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-flow {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.contact-flow h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.flow-step {
    display: flex;
    gap: 20px;
    position: relative;
}

.flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 20px;
    width: 2px;
    height: calc(100% - 15px);
    background: #eee;
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    z-index: 1;
}

.step-content h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--light-text);
}

/* Contact Button */
.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 40px 0;
}

.btn-mail,
.btn-tel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: var(--transition);
}

.btn-mail {
    background: var(--secondary-color);
    color: #fff;
}

.btn-tel {
    background: var(--primary-color);
    color: #fff;
}

.btn-mail:hover,
.btn-tel:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

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

.btn-mail svg,
.btn-tel svg {
    width: 24px;
    height: 24px;
}

.map-container {
    height: 100%;
    min-height: 400px;
    border-radius: 15px;
    overflow: hidden;
    background: #eee;
}

.map-container iframe {
    border: 0;
}

.contact-details {
    margin-top: 25px;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: #fff;
    padding: 60px 20px 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-item h4 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-item p {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-logo {
    color: #fff;
    margin-bottom: 20px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: #888;
}

/* Decorations */
.bg-kanji {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    font-size: 25rem;
    font-family: 'Yuji Syuku', serif;
    color: var(--secondary-color);
    opacity: 0.06;
    /* 不透明度を0.02から0.06に上げ、視認性を高めました */
    pointer-events: none;
    z-index: 1;
    line-height: 1.1;
}

/* 右側に配置する場合の追加クラス */
.bg-kanji.right {
    left: auto;
    right: 30px;
}

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s all ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Media Queries ----- */
@media (max-width: 992px) {
    .classes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .instructor-profile {
        flex-direction: column;
    }

    .instructor-img {
        width: 100%;
    }
}

@media (max-width: 767px) {
    :root {
        --header-height: 70px;
    }

    .section-padding {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    /* Mobile Nav */
    .mobile-menu-btn {
        display: flex;
    }

    header.scrolled .logo img {
        max-height: 40px;
    }

    /* Mask overlay when menu is open */
    .nav-mask {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .nav-mask.active {
        display: block;
    }

    #nav {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-white);
        z-index: 1050;
        padding: 100px 40px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    #nav.active {
        right: 0;
    }

    #nav ul {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    #nav ul li a {
        font-size: 1.2rem;
        color: var(--secondary-color);
    }

    .classes-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .contact-flow {
        padding: 30px 20px;
    }
}