/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-paper: #fdfbf7; /* Warm Rice Paper White */
    --bg-dark: #121212;
    --primary: #c62828; /* Deep Karate Red */
    --primary-dark: #8e0000;
    --saffron: #FF9933; /* Indian Saffron Accent */
    --navy: #000080; /* Indian Chakra Navy */
    --text-main: #212121;
    --text-light: #757575;
    --font-head: 'Oswald', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-art: 'Zhi Mang Xing', cursive;
}

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

body {
    background-color: var(--bg-paper);
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px; /* Subtle dot pattern */
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bg-dark);
}

.highlight {
    color: var(--primary);
}

.highlight-saffron {
    color: var(--saffron);
}

.text-art {
    font-family: var(--font-art);
    font-weight: 400;
}

/* --- HEADER & NAV --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    border-bottom: 3px solid var(--primary); /* Red line border */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.logo-text {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1;
    color: #111;
}

.logo-text span {
    color: var(--primary);
    display: block;
    font-size: 0.9rem;
    letter-spacing: 3px;
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    color: var(--bg-dark);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    position: relative;
    text-transform: uppercase;
    transition: 0.3s;
}

/* Brush stroke hover effect */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--primary);
    transition: 0.3s ease;
    transform: skewX(-20deg);
}

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

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

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end; 
    justify-content: flex-start; 
    text-align: left;
    position: relative;
    padding: 120px 5% 80px; 
    overflow: hidden;
    background-color: #000;
}

/* Hero Background Image */
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('../images/renshi-sir.jpeg');
    background-size: cover;
    background-position: center 5%; 
    background-attachment: scroll;
    opacity: 0.9;
    z-index: 1;
    will-change: transform;
}

/* Overlay Gradient - Fusion of India/Japan colors */
.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.12) 30%,
    rgba(255, 153, 51, 0.18) 70%,
    rgba(0,0,0,0.08) 100%);
  z-index: 2;
}

/* Diagonal Cut at bottom */
.hero-cut {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-paper);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 3;
}

.hero-content {
    z-index: 4;
    max-width: 700px;
    position: relative;
}

/* Japanese Vertical Text Decoration */
.hero-kanji {
    position: absolute;
    right: 5%;
    top: 20%;
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: var(--font-art);
    font-size: 4rem;
    color: rgba(0,0,0,0.8);
    z-index: 4;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.5);
    letter-spacing: 10px;
}

.sub-badge {
    display: inline-block;
    background: var(--saffron);
    color: white;
    padding: 5px 15px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transform: skewX(-15deg);
}

.sub-badge span {
    display: block;
    transform: skewX(15deg);
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 0.9;
    margin-bottom: 20px;
    color: #111;
    font-weight: 800;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.9);
}

.hero h1 span.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

/* Brush stroke under India */
.hero h1 span.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: -5%;
    width: 110%;
    height: 15px;
    background: rgba(255, 153, 51, 0.4); /* Saffron brush */
    z-index: -1;
    border-radius: 20px;
    transform: rotate(-2deg);
}

.hero p {
    margin-bottom: 40px; 
    font-size: 1.3rem; 
    color: #333;
    font-weight: 600;
    border-left: 4px solid var(--primary);
    padding-left: 20px;
}

/* --- BUTTONS --- */
.btn-group {
    display: flex;
    gap: 20px;
}

.btn-main {
    display: inline-block;
    padding: 18px 45px;
    background: var(--primary);
    color: white;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    /* Sword Cut Shape */
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: 0.3s;
    letter-spacing: 1px;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-main:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.2);
}

.btn-secondary {
    display: inline-block;
    padding: 18px 45px;
    background: transparent;
    border: 2px solid var(--bg-dark);
    color: var(--bg-dark);
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: 0.3s;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    background: var(--bg-dark);
    color: white;
    transform: translateY(-3px);
}

/* --- SECTIONS --- */
section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 90px; /* Increased space before cards */
    position: relative;
    z-index: 5;
}

.section-header h2 {
    font-size: 3rem;
    position: relative;
    display: inline-block;
    z-index: 1;
}

/* Brush Stroke Background for Headers */
.section-header h2::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 120%;
    height: 40%;
    background: rgba(198, 40, 40, 0.1); /* Light red wash */
    z-index: -1;
    border-radius: 5px;
}

.section-subtitle {
    font-family: var(--font-art);
    font-size: 2rem;
    color: var(--saffron);
    display: block;
    margin: 8px 0 18px; /* comfortable space above/below script label */
}
/* Branch header spacing tweak */
#branches .section-subtitle {
    margin: 48px 0 24px;
}

/* Diagonal Section Separators */
.separator-top {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 60px;
    background: var(--bg-paper);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
    z-index: 1;
}

.bg-dark-section {
    background-color: #1a1a1a;
    color: white;
    padding-top: 220px; /* space to clear the slant */
    margin-top: 0; /* avoid overlapping previous section */
    clip-path: polygon(0 100px, 100% 0, 100% 100%, 0 100%);
    padding-bottom: 150px;
    position: relative;
    z-index: 1;
}

.bg-dark-section h2, .bg-dark-section h4 {
    color: white;
}

/* --- CARDS (Doujo Style) with 3D --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px; /* Increased gap */
    perspective: 1000px; /* Enable 3D space */
}

.dojo-card {
    background: white;
    padding: 40px 30px;
    position: relative;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-bottom: 4px solid var(--saffron); /* Indian touch */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transform-style: preserve-3d;
}

.dojo-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(-2deg); /* 3D Tilt */
    box-shadow: 20px 20px 60px rgba(0,0,0,0.15), 
                -5px -5px 20px rgba(255,255,255,0.1); /* Deep shadow */
    border-bottom-color: var(--primary);
    z-index: 10;
}

.card-number {
    font-family: var(--font-head);
    font-size: 4rem;
    color: rgba(0,0,0,0.05);
    position: absolute;
    top: 10px;
    right: 20px;
    font-weight: 700;
}

.dojo-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.dojo-card p {
    color: var(--text-light);
    font-size: 1.05rem;
}

.dojo-card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: 0.3s;
}

.dojo-card:hover .dojo-card-icon {
     transform: translateZ(20px); /* Pop out icon in 3D */
}

/* --- LEGACY SECTION --- */
.legacy-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
    padding-bottom: 80px; /* more space to prevent overlap with next slanted section */
    position: relative;
    z-index: 5;
    padding-top: 24px;
}

.legacy-image {
    flex: 1;
    min-width: 300px;
    position: relative;
    margin: 16px 0;
}

/* Frame effect */
.legacy-image img {
    width: 100%;
    display: block;
    border: 10px solid white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.legacy-image::before {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 100px; height: 100px;
    border-top: 5px solid var(--primary);
    border-left: 5px solid var(--primary);
    z-index: 1;
}

.legacy-image::after {
    content: '';
    position: absolute;
    bottom: -20px; right: -20px;
    width: 100px; height: 100px;
    border-bottom: 5px solid var(--saffron);
    border-right: 5px solid var(--saffron);
    z-index: 1;
}

.legacy-text {
    flex: 1;
    min-width: 300px;
}

/* --- MASTERS (Dojo Plaque Style) --- */
.masters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    perspective: 1000px;
}

.masters-slider-wrap {
    position: relative;
}
.masters-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scroll-padding-inline: 12px;
    cursor: grab;
    margin-top: 12px;
    padding-bottom: 12px;
}
.masters-slider::-webkit-scrollbar { display: none; }
.masters-slider-wrap::before,
.masters-slider-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 2;
}
.masters-slider-wrap::before {
    left: 0;
    background: linear-gradient(to right, rgba(253,251,247,1), rgba(253,251,247,0));
}
.masters-slider-wrap::after {
    right: 0;
    background: linear-gradient(to left, rgba(253,251,247,1), rgba(253,251,247,0));
}

.master-card {
    background: #252525;
    overflow: hidden;
    transition: all 0.5s ease;
    position: relative;
    transform-style: preserve-3d;
    min-width: clamp(260px, 26vw, 320px);
    scroll-snap-align: start;
}

.master-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 30px 50px rgba(0,0,0,0.4);
    z-index: 10;
}

.master-img {
    height: 320px;
    width: 100%;
    overflow: hidden;
}

.master-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: 0.5s;
    filter: grayscale(20%);
}

.master-card:hover .master-img img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.master-info {
    padding: 20px;
    text-align: center;
    background: #252525;
    position: relative;
    transform: translateZ(10px); /* Text pops out slightly */
}

/* Triangle up indicator */
.master-info::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #252525;
}

.master-info h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.master-info span {
    color: var(--saffron);
    font-weight: 700;
    font-size: 0.85rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.master-card.chief {
    border: 2px solid var(--primary);
}

.master-card.chief .master-info {
    background: var(--primary);
}
.master-card.chief .master-info h4 {
     color: white;
}
.master-card.chief .master-info span {
    color: #ffccbc;
}
.master-card.chief .master-info::before {
     border-bottom-color: var(--primary);
}

/* --- STATS --- */
.stats-section {
    background: var(--primary);
    color: white;
    padding: 100px 0;
    /* Slanted edges */
    clip-path: polygon(0 0, 100% 10%, 100% 100%, 0 90%);
    margin: 80px 0;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 4rem;
    color: white;
    margin-bottom: 5px;
    line-height: 1;
    font-family: var(--font-head);
}

.stat-item p {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
}

/* --- BRANCHES (Carousel) --- */
.branch-slider-wrap {
    position: relative;
}
.branch-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scroll-padding-inline: 12px;
    cursor: grab;
    margin-top: 12px;
    padding-bottom: 12px;
}
.branch-slider::-webkit-scrollbar { display: none; }
.branch-slider-wrap::before,
.branch-slider-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 2;
}
.branch-slider-wrap::before {
    left: 0;
    background: linear-gradient(to right, rgba(253,251,247,1), rgba(253,251,247,0));
}
.branch-slider-wrap::after {
    right: 0;
    background: linear-gradient(to left, rgba(253,251,247,1), rgba(253,251,247,0));
}

.branch-item {
    background: white;
    padding: 30px;
    border-left: 5px solid var(--bg-dark);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    min-width: clamp(320px, 28vw, 380px);
    scroll-snap-align: start;
}

.branch-item:hover {
    border-left-color: var(--primary);
    padding-left: 35px;
    transform: translateX(5px) rotateY(-3deg);
    box-shadow: 0 30px 50px rgba(0,0,0,0.2);
}

.branch-item h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.branch-controls {
    display: none;
}
/* Extra bottom padding to avoid footer slant clipping */
#branches {
    padding-bottom: 160px;
}

.section-whyus {
    padding-top: 160px;
}
.section-promise .section-header {
    margin-bottom: 40px;
}
.section-promise {
    padding-bottom: 220px;
}

/* --- FOOTER --- */
footer {
    background: #111;
    color: white;
    padding: 80px 0 30px;
    /* Top slant */
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
    margin-top: -50px;
    padding-top: 100px;
}

.footer-col h3 {
    color: white;
    border-left: 4px solid var(--saffron);
    padding-left: 15px;
    margin-bottom: 25px;
}

.contact-info p {
    color: #aaa;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-info i {
    color: var(--primary);
    margin-top: 5px;
}

input, textarea {
    background: #222;
    border: 1px solid #333;
    color: white;
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    font-family: var(--font-body);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    .mobile-menu-btn { display: block; color: #111; }
    .hero h1 { font-size: 3.2rem; }
    .hero-cut { height: 40px; }
    .bg-dark-section { clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%); padding-top: 120px; margin-top: 0;}
    section { padding: 80px 0; }
    .hero-kanji { display: none; }
    .section-subtitle { margin: 10px 0 14px; }
    #branches .section-subtitle { margin: 24px 0 16px; }
    .branch-slider { gap: 16px; }
    .branch-item { min-width: 85vw; }
    .masters-slider { gap: 16px; }
    .master-card { min-width: 85vw; }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
 .history-card {
     transform-style: preserve-3d;
     transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
     will-change: transform;
     backface-visibility: hidden;
 }
 .history-tiles {
     perspective: 1000px;
 }

.belts-page {
    perspective: 1200px;
    margin-top: 20px;
}
.belts-hanger {
    position: relative;
    height: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.hanger-rod {
    width: 360px;
    height: 8px;
    background: linear-gradient(#cfcfcf, #9e9e9e);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.hanger-hook {
    position: absolute;
    top: -8px;
    width: 26px;
    height: 26px;
    border: 4px solid #9e9e9e;
    border-left: none;
    border-bottom: none;
    border-radius: 50%;
    transform: rotate(35deg);
    right: calc(50% - 12px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.belts-strip {
    transform-origin: top;
    transform: scaleY(0.001);
    transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    padding: 18px;
}
.belts-strip.open {
    transform: scaleY(1);
}
.belt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    border-radius: 8px;
    margin: 10px 0;
    padding: 0 16px;
    box-shadow: inset 0 -6px 12px rgba(0,0,0,0.12), inset 0 6px 12px rgba(255,255,255,0.25), 0 10px 20px rgba(0,0,0,0.08);
    transform-style: preserve-3d;
    transition: transform 400ms ease, box-shadow 400ms ease, filter 400ms ease;
    filter: saturate(1.05);
    opacity: 0;
    transform: translateY(-14px) rotateX(6deg);
}
.belts-strip.open .belt-item {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}
.belt-item:hover {
    transform: translateY(-4px) rotateX(4deg) rotateY(-2deg);
    box-shadow: inset 0 -6px 12px rgba(0,0,0,0.15), inset 0 6px 12px rgba(255,255,255,0.3), 0 18px 40px rgba(0,0,0,0.16);
}
.belt-label {
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #111;
}
.belt-stripes {
    display: inline-block;
    height: 18px;
    border-radius: 2px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.stripes-1 { width: 18px; background: #fff; }
.stripes-2 { width: 40px; background: linear-gradient(to right, #fff 0 18px, transparent 18px 22px, #fff 22px 40px); }
.stripes-3 { width: 62px; background: linear-gradient(to right, #fff 0 18px, transparent 18px 22px, #fff 22px 40px, transparent 40px 44px, #fff 44px 62px); }
.belt-white { background: linear-gradient(#fff, #eaeaea); }
.belt-yellow { background: linear-gradient(#FFEB3B, #F9A825); }
.belt-orange { background: linear-gradient(#FF9800, #EF6C00); color: white; }
.belt-purple { background: linear-gradient(#7E57C2, #5E35B1); color: white; }
.belt-green { background: linear-gradient(#2E7D32, #1B5E20); color: white; }
.belt-brown { background: linear-gradient(#8D6E63, #6D4C41); color: white; }
.belt-black { background: linear-gradient(#212121, #000); color: white; }
.belt-redwhite { background: repeating-linear-gradient(90deg, #c62828 0 22px, #fff 22px 44px); color: #111; }

.link-belts { display: none; }
@media (max-width: 768px) {
  .nav-links.active .link-belts { display: block; }
} 