/* ===================================
   Ki-Aikido Prato - Global Styles
   =================================== */

:root {
    --ink-black: #1a1a1a;
    --paper-cream: #f5f0e8;
    --vermillion: #c73e1d;
    --vermillion-dark: #a33218;
    --gold-accent: #c9a959;
    --gold-dark: #a68a3a;
    --stone-gray: #6b6b6b;
    --light-gray: #9a9a9a;
    --deep-shadow: rgba(26, 26, 26, 0.15);
    --light-cream: #faf8f4;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    background: var(--paper-cream);
    color: var(--ink-black);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Paper texture overlay */
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: 1000;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    line-height: 1.3;
}

a {
    color: var(--vermillion);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--vermillion-dark);
}

/* ===================================
   Navigation
   =================================== */

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    z-index: 500;
    background: linear-gradient(180deg, var(--paper-cream) 0%, rgba(245, 240, 232, 0.98) 80%, rgba(245, 240, 232, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--ink-black);
}

.nav-logo-enso {
    width: 36px;
    height: 36px;
}

.nav-logo-enso svg {
    width: 100%;
    height: 100%;
}

.nav-logo-enso .enso-circle {
    fill: none;
    stroke: var(--ink-black);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 300;
    stroke-dashoffset: 30;
}

.nav-logo-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-menu a {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--ink-black);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--vermillion);
    background: rgba(199, 62, 29, 0.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink-black);
    transition: all 0.3s ease;
}

/* Mobile menu */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--paper-cream);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        box-shadow: -4px 0 20px var(--deep-shadow);
        transition: right 0.4s ease;
    }

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

    .nav-menu a {
        padding: 1rem;
        border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* ===================================
   Page Header
   =================================== */

.page-header {
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--paper-cream) 0%, rgba(245, 240, 232, 0) 100%);
}

.page-header .enso {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.page-header .enso svg {
    width: 100%;
    height: 100%;
}

.page-header .enso-circle {
    fill: none;
    stroke: var(--ink-black);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawEnso 2s ease-out 0.3s forwards;
}

@keyframes drawEnso {
    to { stroke-dashoffset: 30; }
}

.page-header h1 {
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
    animation: fadeIn 1s ease-out 0.3s both;
}

.page-header .subtitle {
    font-size: 1rem;
    color: var(--stone-gray);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: fadeIn 1s ease-out 0.5s both;
}

.divider {
    width: 60px;
    height: 2px;
    background: var(--vermillion);
    margin: 2rem auto;
    animation: expandLine 1s ease-out 0.7s both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes expandLine {
    from { width: 0; }
    to { width: 60px; }
}

/* ===================================
   Main Content
   =================================== */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--vermillion);
}

.section-title.gold {
    border-bottom-color: var(--gold-accent);
}

/* ===================================
   Cards & Boxes
   =================================== */

.card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--deep-shadow);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--deep-shadow);
}

.card-header {
    background: var(--ink-black);
    color: var(--white);
    padding: 1rem 1.25rem;
    font-family: 'Noto Serif JP', serif;
    font-size: 1rem;
    font-weight: 500;
}

.card-header.vermillion {
    background: var(--vermillion);
}

.card-header.gold {
    background: var(--gold-accent);
    color: var(--ink-black);
}

.card-content {
    padding: 1.5rem;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--vermillion);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--vermillion-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--ink-black);
    border: 1px solid rgba(26, 26, 26, 0.2);
}

.btn-outline:hover {
    border-color: var(--vermillion);
    color: var(--vermillion);
}

.btn-gold {
    background: var(--gold-accent);
    color: var(--ink-black);
}

.btn-gold:hover {
    background: var(--gold-dark);
}

/* ===================================
   Forms
   =================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-black);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 1rem;
    color: var(--ink-black);
    background: var(--white);
    border: 1px solid rgba(26, 26, 26, 0.15);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--vermillion);
    box-shadow: 0 0 0 3px rgba(199, 62, 29, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===================================
   Footer
   =================================== */

.main-footer {
    background: var(--ink-black);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    color: var(--gold-accent);
    letter-spacing: 0.1em;
}

.footer-section p,
.footer-section a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--white);
}

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

.footer-nav li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===================================
   Utilities
   =================================== */

.text-center { text-align: center; }
.text-vermillion { color: var(--vermillion); }
.text-gold { color: var(--gold-accent); }
.text-gray { color: var(--stone-gray); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ===================================
   Animations
   =================================== */

.fade-in {
    animation: fadeIn 0.8s ease-out both;
}

.slide-up {
    animation: slideUp 0.8s ease-out both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    animation: slideUp 0.6s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.8s; }

/* ===================================
   Video Modal
   =================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--vermillion);
    border-color: var(--vermillion);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2;
}

.modal-video {
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
    border-radius: 4px;
}

.modal-title {
    color: white;
    font-family: 'Noto Serif JP', serif;
    font-size: 1.25rem;
    font-weight: 300;
    margin-top: 1.5rem;
    text-align: center;
}
