/* ========================================
   JOUFUJI TEMPLE - COMMON STYLES
   ======================================== */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors - EDIT: Adjust color scheme here */
    --bg-primary: #0a0e1a;
    --bg-secondary: #141824;
    --bg-card: #1a1f2e;
    
    --accent-vermilion: #d84315;
    --accent-gold: #ffa726;
    --accent-light: #ffb74d;
    
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    
    /* Glows */
    --glow-vermilion: 0 0 20px rgba(216, 67, 21, 0.4);
    --glow-gold: 0 0 30px rgba(255, 167, 38, 0.3);
    --glow-soft: 0 0 40px rgba(255, 183, 77, 0.2);
    
    /* Typography */
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    
    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
    cursor: none;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: none;
    font-family: inherit;
}

/* ===== CUSTOM CURSOR ===== */
.custom-cursor,
.custom-cursor-ring {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
}

.custom-cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    box-shadow: var(--glow-gold);
}

.custom-cursor-ring {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s;
    opacity: 0.5;
}

body.cursor-hover .custom-cursor {
    width: 16px;
    height: 16px;
    background: var(--accent-vermilion);
    box-shadow: var(--glow-vermilion);
}

body.cursor-hover .custom-cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--accent-vermilion);
    opacity: 0.8;
}

/* ===== CONTAINER ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ===== NAVIGATION ===== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 167, 38, 0.1);
    transition: var(--transition-fast);
}

.main-nav.scrolled {
    background: rgba(10, 14, 26, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    flex-direction: column;
}

.logo-kanji {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: var(--glow-gold);
}

.logo-romaji {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-top: -4px;
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-fast);
    position: relative;
}

.nav-jp {
    font-size: 15px;
    font-weight: 500;
}

.nav-en {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 2px;
}

.nav-link:hover .nav-jp {
    color: var(--accent-gold);
    text-shadow: var(--glow-gold);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    transition: transform 0.4s ease;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.hamburger span {
    width: 28px;
    height: 2px;
    background: var(--accent-gold);
    transition: var(--transition-fast);
    box-shadow: var(--glow-gold);
}

/* ===== SECTIONS ===== */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--accent-gold), transparent);
    opacity: 0.3;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.title-jp {
    font-family: var(--font-serif);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: var(--glow-gold);
}

.title-en {
    font-size: clamp(12px, 1.5vw, 16px);
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.section-desc {
    margin-top: 20px;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== BUTTONS ===== */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--accent-vermilion), var(--accent-gold));
    color: white;
    font-size: 16px;
    font-weight: 500;
    border-radius: 50px;
    transition: var(--transition-fast);
    box-shadow: var(--glow-vermilion);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(216, 67, 21, 0.6);
}

.cta-arrow {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.secondary-button:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
    box-shadow: var(--glow-gold);
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 167, 38, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 40px;
}

.footer-logo .logo-kanji {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: var(--glow-gold);
}

.footer-logo .logo-desc {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: 8px;
}

.footer-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.footer-nav li {
    margin: 0;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition-fast);
    position: relative;
}

.footer-nav a:hover {
    color: var(--accent-gold);
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.footer-nav a:hover::after {
    width: 100%;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 167, 38, 0.1);
    position: relative;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-vermilion), var(--accent-gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(255, 167, 38, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 167, 38, 0.6);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-3px);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }
    
    .container {
        padding: 0 30px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }
    
    body {
        cursor: auto;
    }
    
    .custom-cursor,
    .custom-cursor-ring {
        display: none;
    }
    
    .container {
        padding: 0 20px;
    }
    
    /* Navigation */
    .nav-container {
        padding: 15px 20px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition-fast);
        pointer-events: none;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-menu li {
        padding: 20px 0;
        border-bottom: 1px solid rgba(255, 167, 38, 0.1);
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-nav {
        order: 2;
    }
    
    .footer-nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-info {
        text-align: center;
        order: 3;
    }
    
    .footer-logo {
        order: 1;
    }
    
    /* Back to Top Button */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}
}

/* Small Mobile */
@media (max-width: 480px) {
    .cta-button {
        padding: 15px 30px;
    }
}