/* Base Variables */
:root {
    --bg-color: #0f0f0f;
    --text-color: #f0f0f0;
    --accent-color: #d4af37;
    /* Metallic Gold */
    --accent-hover: #b4941f;
    --secondary-bg: #1a1a1a;
    --font-heading: 'Cinzel', 'Noto Serif JP', serif;
    --font-body: 'Shippori Mincho', serif;
    --transition: all 0.4s ease;
}

.nowrap {
    white-space: nowrap;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 400;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    transition: var(--transition);
}

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

.logo {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    font-family: var(--font-heading);
}

.nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav a {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: var(--transition);
}

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

.nav a:hover::after {
    width: 100%;
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--text-color);
    position: absolute;
    transition: var(--transition);
}

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

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

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

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    transform: scale(1.05);
    z-index: -1;
    opacity: 0;
    animation: heroFadeIn 3s ease-out forwards;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: scale(1.1);
        filter: brightness(0);
    }

    100% {
        opacity: 1;
        transform: scale(1.05);
        filter: brightness(0.4);
    }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    /* Adjusted for impact */
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title .accent {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    opacity: 0.8;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: floating 2s infinite ease-in-out;
}

.scroll-down span {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-down .arrow {
    width: 1px;
    height: 50px;
    background: var(--text-color);
}

@keyframes floating {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 10px);
    }
}

/* Sections Common */
.section {
    padding: 100px 0;
}

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

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-subtitle {
    display: block;
    color: var(--accent-color);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.5rem;
    letter-spacing: 0.1em;
}

/* About */
.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 2em;
    font-size: 1.05rem;
    text-align: justify;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    filter: sepia(0.2);
}

/* Master Profile */
.master {
    background: var(--secondary-bg);
}

.master-layout {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    /* Image on right */
    gap: 60px;
}

.master-image {
    flex: 0.8;
}

.image-frame {
    position: relative;
    padding: 10px;
    border: 1px solid var(--accent-color);
}

.master-info {
    flex: 1.2;
}

.master-info .role {
    color: var(--accent-color);
    display: block;
    margin-bottom: 15px;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.master-info .name {
    font-size: 2rem;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.master-info .name .en {
    font-size: 1rem;
    margin-left: 15px;
    opacity: 0.6;
    font-family: var(--font-body);
}

.master-desc {
    font-size: 0.95rem;
    line-height: 2;
    margin-bottom: 30px;
}

.message {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 40px;
}

.btn-instagram {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-instagram:hover {
    background: var(--accent-color);
    color: #000;
}

/* Special */
/* Special */
/* .special-menu { } */

.special-layout {
    display: flex;
    align-items: center;
    gap: 60px;
}

.special-image {
    flex: 1;
}

.special-image img {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.special-text {
    flex: 1;
}

.special-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

/* Infinite Marquee Gallery */
.gallery-marquee {
    width: 100%;
    overflow: hidden;
    padding: 20px 0 60px;
    display: flex;
    /* gap removed to handle spacing via track padding */
}

.gallery-track {
    display: flex;
    gap: 30px;
    width: max-content;
    flex-shrink: 0;
    padding-right: 30px;
    /* seamless loop spacing */
    animation: marquee 40s linear infinite;
}

.gallery-card {
    width: 300px;
    height: 400px;
    flex-shrink: 0;
    transition: transform 0.4s ease;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }

    /* Note: Since we have 2 duplicates in .gallery-marquee flex container, 
       we actually need to animate each .gallery-track? 
       No, usually we wrap them in a mover or animate the track itself.
       Wait, if I have:
       <div marquee>
          <div track>...</div>
          <div track>...</div>
       </div>
       I should probably animate the tracks?
       No, easier:
       .gallery-track { animation: marquee ... } 
       Both tracks move?
       Yes, if they are siblings, they will both move left. BUT the second one will follow the first.
       
       Better approach:
       .gallery-marquee { display: flex; }
       .gallery-track { flex-shrink: 0; animation: marquee 60s linear infinite; }
       
       If transform: translateX(-100%) moves the track entirely to the left, 
       and we have 2 tracks, 
       Track 1 moves from 0 to -100% (disappears).
       Track 2 moves from 0 to -100% (moves into Track 1's spot, then disappears).
       
       Wait, they need to stick together.
       If both have `animation`, they move in sync relative to their initial position.
       So Track 1 starts at 0, moves to -width.
       Track 2 starts at width, moves to 0. (If strict sync).
       
       Yes, `transform: translateX(-100%)` on the element moves it so its right edge touches where its left edge was.
       So both tracks moving -100% works perfectly if they are identical width.
    */
}

.gallery-card {
    width: 300px;
    height: 400px;
    flex-shrink: 0;
    transition: transform 0.4s ease;
    border: 1px solid rgba(212, 175, 55, 0.3);
    /* faint gold border */
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.5) brightness(0.8);
    transition: all 0.5s ease;
}

.gallery-card:hover {
    transform: translateY(-10px);
}

.gallery-card:hover img {
    filter: grayscale(0) brightness(1.1);
}

/* Access */
.access {
    background: var(--secondary-bg);
    text-align: center;
}

.access-content {
    display: flex;
    justify-content: center;
}

.access-info dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    text-align: left;
    gap: 20px;
    margin-bottom: 40px;
}

.access-info dt {
    color: var(--accent-color);
    font-weight: bold;
    letter-spacing: 0.05em;
}

.access-info dd {
    margin: 0;
}

.btn-map {
    display: inline-block;
    padding: 12px 40px;
    background: var(--accent-color);
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    font-weight: bold;
}

.btn-map:hover {
    background: var(--accent-hover);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
    background: #000;
}

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

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

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 15px;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #111;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 1000;
    }

    .nav.active {
        right: 0;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-content,
    .master-layout,
    .special-layout {
        flex-direction: column;
        gap: 40px;
    }

    .master-layout {
        flex-direction: column;
        /* Revert reverse on mobile for logical flow */
    }

    .about-text,
    .special-text {
        order: 1;
    }

    .about-image,
    .special-image {
        order: 2;
    }

    .sp-only {
        display: block;
    }
}

@media (min-width: 769px) {
    .sp-only {
        display: none;
    }
}