:root {
    /* Palette ispirata all'inchiostro Sumi e all'Indigo Aizome */
    --sumi-black: #1a1a1a;
    --sumi-deep: #2d2d2d;
    --sumi-charcoal: #3a3a3a;
    --ai-indigo: #264653;
    --ai-deep: #1d3557;
    --washi-cream: #f5f1eb;
    --washi-warm: #ebe5da;
    --tatami-beige: #c4b7a6;
    --bamboo-green: #4a5240;
    --torii-red: #9d2235;
    --gold-accent: #c9a227;
    --fog-white: rgba(245, 241, 235, 0.85);

    /* Typography Scale - Aurea */
    --font-display: 'Zen Antique', serif;
    --font-jp: 'Noto Serif JP', serif;
    --font-body: 'Cormorant Garamond', serif;

    /* Spacing - Ma (間) */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --space-xxl: 12rem;
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--washi-cream);
    color: var(--sumi-black);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Texture Overlay - Washi Paper Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' 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: -1;
}

/* Decorative Vertical Lines - Shoji Screen Inspiration */
.shoji-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.08;
}

.shoji-lines::before,
.shoji-lines::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 1px;
    background: var(--sumi-black);
}

.shoji-lines::before {
    left: 15%;
}

.shoji-lines::after {
    right: 15%;
}

/* Custom Cursor - Always Red Dot (Desktop Only) */
@media (pointer: fine) {
    * {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='6' fill='%239d2235'/%3E%3Ccircle cx='16' cy='16' r='6' fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.5'/%3E%3C/svg%3E") 16 16, auto !important;
    }

    a, button, .btn, input, textarea {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='8' fill='%239d2235'/%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E") 16 16, pointer !important;
    }
}

/* Mobile Touch Optimization */
@media (pointer: coarse) {
    * {
        cursor: default !important;
    }

    a, button, .btn {
        cursor: pointer !important;
    }
}

/* Language Selector */
.lang-selector {
    position: fixed;
    top: var(--space-md);
    right: var(--space-lg);
    z-index: 200;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.lang-selector a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-decoration: none;
    color: var(--washi-cream);
    padding: 6px 12px;
    border: 1px solid rgba(245, 241, 235, 0.3);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.lang-selector a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--washi-cream);
    transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.lang-selector a:hover::before {
    left: 0;
}

.lang-selector a:hover {
    color: var(--sumi-black);
    border-color: var(--washi-cream);
}

.lang-selector a.active {
    background: var(--washi-cream);
    color: var(--sumi-black);
    border-color: var(--washi-cream);
}

.lang-divider {
    color: rgba(245, 241, 235, 0.3);
    font-size: 0.7rem;
}

/* Scrolled state for language selector */
.lang-selector.scrolled a {
    color: var(--sumi-black);
    border-color: rgba(26, 26, 26, 0.2);
}

.lang-selector.scrolled a::before {
    background: var(--sumi-black);
}

.lang-selector.scrolled a:hover {
    color: var(--washi-cream);
    border-color: var(--sumi-black);
}

.lang-selector.scrolled a.active {
    background: var(--sumi-black);
    color: var(--washi-cream);
}

.lang-selector.scrolled .lang-divider {
    color: rgba(26, 26, 26, 0.3);
}

/* Navigation - Minimal & Elegant */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scrolled Navigation State */
.nav.scrolled {
    padding: 0.5rem var(--space-lg);
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mix-blend-mode: normal;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    font-family: var(--font-jp);
    font-size: 1.5rem;
    color: var(--washi-cream);
    text-decoration: none;
    letter-spacing: 0.2em;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scrolled Logo State */
.nav.scrolled .nav-logo {
    font-size: 1rem;
}

.nav.scrolled .nav-logo span:first-child {
    font-size: 1.3rem !important;
}

.nav.scrolled .nav-logo span:last-child {
    font-size: 0.55rem !important;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    margin-right: 120px;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--washi-cream);
    text-decoration: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: all 0.3s ease;
}

/* Scrolled Nav Links State */
.nav.scrolled .nav-links a {
    font-size: 0.8rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--washi-cream);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--sumi-black);
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    z-index: 9998;
    transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    color: var(--washi-cream);
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    padding: var(--space-md) var(--space-sm);
    border-bottom: 1px solid rgba(245, 241, 235, 0.1);
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu a:active,
.mobile-menu a:focus {
    background: rgba(245, 241, 235, 0.1);
    color: var(--gold-accent);
}

.mobile-menu a.active {
    color: var(--gold-accent);
    font-weight: 500;
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(245, 241, 235, 0.3);
    margin: var(--space-md) 0;
}

.mobile-menu-lang {
    display: flex;
    gap: 0;
    margin-top: var(--space-sm);
}

.mobile-menu-lang a {
    flex: 1;
    text-align: center;
    border: 1px solid rgba(245, 241, 235, 0.3);
    font-size: 0.95rem;
    padding: var(--space-sm);
}

.mobile-menu-lang a:first-child {
    border-right: none;
}

.mobile-menu-lang a.active {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--gold-accent);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Hero Section - 間 Ma: The Power of Empty Space */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(180deg, var(--sumi-black) 0%, var(--ai-deep) 50%, var(--sumi-deep) 100%);
    overflow: hidden;
}

/* Sumi Ink Wash Background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 50% 50%, transparent 0%, var(--sumi-black) 100%),
        radial-gradient(circle at 20% 80%, rgba(38, 70, 83, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(29, 53, 87, 0.4) 0%, transparent 40%);
    opacity: 0.8;
}

/* Animated Fog/Mist Effect */
.mist {
    position: absolute;
    width: 200%;
    height: 100%;
    background:
        linear-gradient(90deg, transparent 0%, rgba(245,241,235,0.03) 50%, transparent 100%);
    animation: mistFlow 20s ease-in-out infinite;
}

@keyframes mistFlow {
    0%, 100% { transform: translateX(-25%); }
    50% { transform: translateX(0%); }
}

/* Katana Silhouette */
.katana-line {
    position: absolute;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gold-accent) 20%,
        var(--washi-cream) 50%,
        var(--gold-accent) 80%,
        transparent 100%);
    opacity: 0.4;
    transform: rotate(-5deg);
    top: 55%;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--space-md);
}

/* Japanese Kanji - Main Title */
.hero-kanji {
    font-family: var(--font-jp);
    font-size: clamp(5rem, 20vw, 15rem);
    font-weight: 200;
    color: var(--washi-cream);
    letter-spacing: 0.3em;
    margin-bottom: var(--space-sm);
    text-shadow: 0 0 80px rgba(201, 162, 39, 0.2);
    animation: fadeInKanji 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

@keyframes fadeInKanji {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        letter-spacing: 0.5em;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: 0.3em;
    }
}

.hero-title-romaji {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    color: var(--gold-accent);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    animation: fadeIn 2s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    color: var(--tatami-beige);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    animation: fadeIn 2s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: rgba(245, 241, 235, 0.7);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    animation: fadeIn 2s 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    animation: fadeIn 2s 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

.scroll-text {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--tatami-beige);
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--tatami-beige), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* Section Styling */
section {
    padding: var(--space-xxl) var(--space-lg);
    position: relative;
}

/* Saya no Uchi Section */
.saya-section {
    background: linear-gradient(135deg, var(--sumi-deep) 0%, var(--ai-deep) 100%);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    color: var(--washi-cream);
}

.saya-content {
    max-width: 900px;
    margin: 0 auto;
}

.saya-kanji {
    font-family: var(--font-jp);
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--gold-accent);
    margin-bottom: var(--space-md);
    letter-spacing: 0.2em;
}

.saya-quote {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.6;
    margin: var(--space-lg) 0;
    color: var(--washi-cream);
}

.saya-romaji {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: var(--tatami-beige);
    margin-bottom: var(--space-lg);
}

.saya-explanation {
    font-size: 1.1rem;
    line-height: 2;
    color: rgba(245, 241, 235, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

/* Philosophy Section - 心 Kokoro */
.philosophy {
    background: var(--washi-warm);
    text-align: center;
    padding: var(--space-xxl) 15%;
    position: relative;
    z-index: 2;
}

.philosophy-content {
    max-width: 900px;
    margin: 0 auto;
}

.section-number {
    font-family: var(--font-jp);
    font-size: 0.8rem;
    color: var(--torii-red);
    letter-spacing: 0.3em;
    margin-bottom: var(--space-sm);
    display: block;
}

.section-title {
    font-family: var(--font-jp);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--sumi-black);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.section-title-jp {
    font-size: 0.4em;
    color: var(--ai-indigo);
    display: block;
    margin-top: var(--space-xs);
    letter-spacing: 0.2em;
}

.section-text {
    font-size: 1.1rem;
    color: var(--sumi-charcoal);
    line-height: 2;
    margin-bottom: var(--space-md);
}

/* Ensō Circle Decoration */
.enso-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-lg);
}

.enso {
    width: 300px;
    height: 300px;
    border: 3px solid var(--sumi-black);
    border-radius: 50%;
    position: relative;
    opacity: 0.15;
}

.enso::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 30px;
    width: 40px;
    height: 20px;
    background: var(--washi-cream);
}

.enso-text {
    position: absolute;
    font-family: var(--font-jp);
    font-size: 4rem;
    color: var(--sumi-black);
}

/* Principles Section - 三心 The Three Minds */
.principles {
    background: var(--sumi-black);
    color: var(--washi-cream);
}

.principles-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.principles-header .section-title {
    color: var(--washi-cream);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.principle-card {
    padding: var(--space-lg);
    border: 1px solid rgba(245, 241, 235, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.principle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.principle-card:hover::before {
    opacity: 1;
}

.principle-card:hover {
    border-color: var(--gold-accent);
    transform: translateY(-10px);
}

.principle-kanji {
    font-family: var(--font-jp);
    font-size: 5rem;
    color: var(--gold-accent);
    margin-bottom: var(--space-md);
    line-height: 1;
}

.principle-name {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: var(--space-xs);
    letter-spacing: 0.1em;
}

.principle-romaji {
    font-size: 0.9rem;
    color: var(--tatami-beige);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.principle-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(245, 241, 235, 0.8);
}

/* Training Section */
.training {
    background: var(--washi-warm);
    position: relative;
    padding: var(--space-xxl) 15%;
    z-index: 2;
}

/* Pattern rimosso - sfondo uniforme */

.training-content {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.quote-block {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    position: relative;
}

.quote-block::before,
.quote-block::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px solid var(--sumi-black);
    opacity: 0.2;
}

.quote-block::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.quote-block::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.quote-text {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-style: italic;
    font-weight: 300;
    color: var(--sumi-black);
    line-height: 1.6;
}

.quote-author {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--ai-indigo);
}

/* Dojo Preview Section */
.dojo-preview {
    background: linear-gradient(135deg, var(--sumi-deep) 0%, var(--ai-deep) 100%);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    color: var(--washi-cream);
}

.dojo-preview-content {
    max-width: 900px;
    margin: 0 auto;
}

/* CTA Section */
.cta {
    background: var(--washi-warm);
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-xxl) 15%;
    z-index: 2;
}

.cta::before {
    content: '道';
    position: absolute;
    font-family: var(--font-jp);
    font-size: 40vw;
    color: var(--sumi-black);
    opacity: 0.02;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-family: var(--font-jp);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    margin-bottom: var(--space-md);
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--sumi-charcoal);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Button Styles */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--sumi-black);
    color: var(--sumi-black);
    background: transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--sumi-black);
    transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.btn:hover {
    color: var(--washi-cream);
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background: var(--sumi-black);
    color: var(--washi-cream);
}

.btn-primary::before {
    background: var(--torii-red);
}

/* Footer */
.footer {
    background: var(--sumi-black);
    color: var(--washi-cream);
    padding: var(--space-lg) var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    font-family: var(--font-jp);
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.footer-text {
    font-size: 0.875rem;
    color: rgba(245, 241, 235, 0.7);
    line-height: 1.6;
}

.footer-title {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-accent);
    margin-bottom: var(--space-sm);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-links a {
    color: rgba(245, 241, 235, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--washi-cream);
}

.footer-bottom {
    border-top: 1px solid rgba(245, 241, 235, 0.1);
    margin-top: var(--space-lg);
    padding-top: var(--space-sm);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(245, 241, 235, 0.5);
}

/* Decorative Elements */
.decorative-line {
    width: 60px;
    height: 1px;
    background: var(--sumi-black);
    margin: var(--space-md) 0;
}

.decorative-line.light {
    background: var(--washi-cream);
}

.decorative-line.center {
    margin: var(--space-md) auto;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 1px;
    background: var(--washi-cream);
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .philosophy {
        grid-template-columns: 1fr;
    }

    .enso-container {
        order: -1;
    }

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

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

    .lang-selector {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --space-xs: 0.4rem;
        --space-sm: 0.8rem;
        --space-md: 1.5rem;
        --space-lg: 2rem;
        --space-xl: 4rem;
        --space-xxl: 6rem;
    }

    html {
        font-size: 15px;
    }

    .nav {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
        z-index: 9999;
        position: relative;
    }

    .hero {
        min-height: 100vh;
        padding: var(--space-md);
    }

    .hero-kanji {
        letter-spacing: 0.15em;
        font-size: clamp(3.5rem, 15vw, 8rem) !important;
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 4vw, 1.3rem);
        letter-spacing: 0.2em;
    }

    .hero-tagline {
        font-size: 1rem;
        padding: 0 var(--space-md);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .lang-selector {
        display: none;
    }

    .lang-selector a {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    section {
        padding: var(--space-xl) var(--space-md);
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .section-text {
        font-size: 1rem;
        line-height: 1.7;
    }

    .btn {
        font-size: 0.85rem;
        padding: var(--space-sm) var(--space-md);
        letter-spacing: 0.15em;
    }

    /* Better touch targets */
    a, button {
        min-height: 44px;
    }

    .principle-card {
        padding: var(--space-md);
    }

    .principle-kanji {
        font-size: 3.5rem;
    }

    .philosophy {
        padding: var(--space-xl) var(--space-md);
        grid-template-columns: 1fr;
    }

    .philosophy-content {
        max-width: 100%;
    }

    .enso {
        width: 200px;
        height: 200px;
    }

    .enso-text {
        font-size: 3rem;
    }

    /* Sensei page: single column layout on mobile */
    .philosophy-content > div[style*="grid-template-columns: 1fr 2fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-lg) !important;
    }

    /* Ensure photo container takes full width on mobile */
    .philosophy-content > div[style*="grid-template-columns: 1fr 2fr"] > div:first-child {
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }

    /* Stack buttons vertically on mobile (practica, dojo pages) */
    div[style*="margin-top"] > .btn + .btn {
        margin-left: 0 !important;
        margin-top: var(--space-sm) !important;
        display: block !important;
        width: 100% !important;
    }

    /* Container for buttons on mobile */
    div[style*="margin-top"]:has(> .btn) {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-sm) !important;
    }

    div[style*="margin-top"] > .btn {
        width: 100% !important;
        margin-left: 0 !important;
        text-align: center !important;
    }
}

/* Extra small devices (phones) */
@media (max-width: 480px) {
    .nav {
        padding: var(--space-sm) var(--space-sm);
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .menu-toggle {
        padding: 5px;
        margin-right: 0;
    }

    .menu-toggle span {
        width: 22px;
    }

    html {
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    * {
        max-width: 100%;
    }

    /* Reduce horizontal padding on small phones */
    .philosophy,
    .training,
    .cta {
        padding: var(--space-xl) var(--space-sm);
    }
}
