/* ============================================ */
/* CUSTOM STYLES FOR KYOTO OO SAKABA */
/* ============================================ */

/* Vertical Text Utility */
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-feature-settings: "palt";
}

/* Vertical Japanese Text (Natural Japanese Vertical Layout) */
.vertical-japanese {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-feature-settings: "palt";
    letter-spacing: 0.15em;
    line-height: 2.2;
    text-align: center;
    height: auto;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments for vertical text */
@media (max-width: 768px) {
    .vertical-japanese {
        font-size: 1.75rem;
        min-height: 250px;
        letter-spacing: 0.1em;
    }
}

/* ============================================ */
/* MODERN MINIMALIST STYLES (SAKEICE inspired) */
/* ============================================ */

/* Fade in up animation - Always visible by default */
.fade-in-up {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Animation keyframes (optional, can be enabled later) */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation when page is loaded (disabled for now) */
/*
body.loaded .fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

.fade-in-up.delay-200,
.delay-200 {
    animation-delay: 0.3s;
}

.fade-in-up.delay-400,
.delay-400 {
    animation-delay: 0.5s;
}
*/

/* Vertical Text (Mixed Orientation) */
.writing-vertical-rl {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Hide Scrollbar for Cleaner Look */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Screen Reader Only (Accessibility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid #f4450b;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ============================================ */
/* SCROLL INDICATOR ANIMATION */
/* ============================================ */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(8px);
        opacity: 1;
    }
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* ============================================ */
/* FORM INPUT UNDERLINE ANIMATION */
/* ============================================ */
.group:focus-within .absolute.bottom-0 {
    width: 100% !important;
}

/* ============================================ */
/* TRANSITION HEADLINE CENTERING */
/* ============================================ */
section[data-section="transition"] h2 {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ============================================ */
/* HISTORY SECTION - REFINED DESIGN */
/* ============================================ */

/* History text content spacing */
.history-text-content {
    padding-left: 0;
}

@media (min-width: 1024px) {
    .history-text-content {
        padding-left: 228px;
    }
}

/* Fade in section animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

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

.fade-in-section.delay-100 {
    transition-delay: 0.1s;
}

.fade-in-section.delay-200 {
    transition-delay: 0.2s;
}

.fade-in-section.delay-300 {
    transition-delay: 0.3s;
}

.fade-in-section.delay-400 {
    transition-delay: 0.4s;
}

.fade-in-section.delay-500 {
    transition-delay: 0.5s;
}

/* Letter spacing utility */
.letter-spacing-wider {
    letter-spacing: 0.4em;
}

/* Refined image hover effect */
.history-section .group img {
    filter: grayscale(100%) contrast(1.05) brightness(0.98);
    transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-section .group:hover img {
    filter: grayscale(0%) contrast(1) brightness(1);
}

/* Enhanced typography for history section */
.history-section p {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle text reveal animation */
@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle parallax effect on scroll */
@media (prefers-reduced-motion: no-preference) {
    .history-section .group {
        transition: transform 0.3s ease-out;
    }
}

/* ============================================ */
/* CONCEPT SECTION - REFINED DESIGN */
/* ============================================ */

/* Concept section specific styles */
.concept-section p {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Vertical text styling */
.concept-section .writing-vertical-rl {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.2em;
}

/* Decorative seal hover effect */
.concept-section .transform.rotate-3 {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Concept emphasis styling */
.concept-section .concept-emphasis,
.concept-section .concept-emphasis-strong {
    position: relative;
    display: inline-block;
    font-weight: 300;
}

.concept-section .concept-emphasis .absolute,
.concept-section .concept-emphasis-strong .absolute {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left;
}

.concept-section .fade-in-section.is-visible .concept-emphasis .absolute,
.concept-section .fade-in-section.is-visible .concept-emphasis-strong .absolute {
    transform: scaleX(1);
}

/* Emphasis underline */
.concept-section .concept-emphasis .absolute {
    background: linear-gradient(to right, rgba(244, 69, 11, 0.3), rgba(244, 69, 11, 0.1));
    height: 2px;
}

/* Strong emphasis underline */
.concept-section .concept-emphasis-strong .absolute {
    background: linear-gradient(to right, rgba(244, 69, 11, 0.4), rgba(244, 69, 11, 0.2));
    height: 2px;
}

/* ============================================ */
/* FUTURE SECTION - TIMELINE DESIGN */
/* ============================================ */

/* Future section specific styles */
.future-section p {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Timeline card hover effects */
.future-card {
    transition: transform 0.3s ease-out;
}

.future-card:hover {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .future-card:hover {
        transform: none;
    }
}

/* Timeline line animation */
.future-card .w-px {
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.future-card.in-view .w-px {
    animation: timelineGrow 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes timelineGrow {
    0% {
        height: 0;
    }
    100% {
        height: 100%;
    }
}

/* Timeline dot pulse effect */
.future-card .rounded-full {
    position: relative;
}

.future-card .rounded-full::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid transparent;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.future-card:hover .rounded-full::before {
    opacity: 1;
    border-color: rgba(244, 69, 11, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.1;
    }
}

/* ============================================ */
/* FUTURE SECTION - ENHANCED STYLING */
/* ============================================ */

/* Future emphasis styling */
.future-section .future-emphasis,
.future-section .future-emphasis-strong {
    position: relative;
    display: inline-block;
    font-weight: 300;
}

.future-section .future-emphasis .absolute,
.future-section .future-emphasis-strong .absolute {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left;
}

.future-section .fade-in-section.is-visible .future-emphasis .absolute,
.future-section .fade-in-section.is-visible .future-emphasis-strong .absolute {
    transform: scaleX(1);
}

/* Emphasis underline */
.future-section .future-emphasis .absolute {
    background: linear-gradient(to right, rgba(244, 69, 11, 0.3), rgba(244, 69, 11, 0.1));
    height: 2px;
}

/* Strong emphasis underline */
.future-section .future-emphasis-strong .absolute {
    background: linear-gradient(to right, rgba(244, 69, 11, 0.4), rgba(244, 69, 11, 0.2));
    height: 2px;
}

/* Sakaba item hover effect */
.future-sakaba-item {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease-out;
}

.future-sakaba-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .future-sakaba-item:hover {
        transform: none;
    }
}

/* ============================================ */
/* CONTACT SECTION - REFINED DESIGN */
/* ============================================ */

/* Contact section specific styles */
.contact-section p {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contact option card hover effects */
.contact-option {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-option:hover {
    transform: translateY(-8px);
}

@media (max-width: 768px) {
    .contact-option:hover {
        transform: none;
    }
}

/* Contact card border animation */
.contact-option .border {
    transition: border-color 0.5s ease-out,
                box-shadow 0.5s ease-out;
}

.contact-option:hover .border {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Icon container animation */
.contact-option .rounded-full {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-option:hover .rounded-full {
    transform: scale(1.05);
}

/* CTA Button enhancement */
.contact-option a {
    position: relative;
    overflow: hidden;
}

.contact-option a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease-out;
}

.contact-option a:hover::before {
    left: 100%;
}

/* ============================================ */
/* ATTENTION SECTION - PHOTO GALLERY DESIGN */
/* ============================================ */

/* Attention section specific styles */
.attention-section p {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Photo gallery grid animations */
.attention-section .group {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.attention-section .group:hover {
    transform: translateY(-4px);
}

@media (max-width: 768px) {
    .attention-section .group:hover {
        transform: none;
    }
}

/* Image grayscale effect */
.attention-section .group img {
    filter: grayscale(100%) contrast(1.05) brightness(0.95);
    transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.attention-section .group:hover img {
    filter: grayscale(0%) contrast(1) brightness(1);
}

/* Staggered animation delays for grid items */
.attention-section .fade-in-section.delay-200 {
    transition-delay: 0.1s;
}

.attention-section .fade-in-section.delay-300 {
    transition-delay: 0.2s;
}

.attention-section .fade-in-section.delay-400 {
    transition-delay: 0.3s;
}

.attention-section .fade-in-section.delay-500 {
    transition-delay: 0.4s;
}

.attention-section .fade-in-section.delay-600 {
    transition-delay: 0.5s;
}

.attention-section .fade-in-section.delay-700 {
    transition-delay: 0.6s;
}

/* Photo frame effect enhancement */
.attention-section .border {
    transition: border-color 0.5s ease-out;
}

.attention-section .group:hover .border {
    border-color: rgba(244, 69, 11, 0.15);
}

/* Corner accent animation */
.attention-section .group:hover .absolute.top-0.right-0,
.attention-section .group:hover .absolute.bottom-0.left-0 {
    border-color: rgba(244, 69, 11, 0.3);
    transition: border-color 0.5s ease-out;
}

/* ============================================ */
/* ACHIEVEMENTS SECTION - AWARD DESIGN */
/* ============================================ */

/* Achievements section specific styles */
.achievements-section p {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Achievement card hover effects */
.achievement-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.achievement-card:hover {
    transform: translateY(-8px);
}

@media (max-width: 768px) {
    .achievement-card:hover {
        transform: none;
    }
}

/* Award image styling */
.achievements-section .group img {
    filter: grayscale(100%) contrast(1.05) brightness(0.98);
    transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.achievements-section .group:hover img {
    filter: grayscale(0%) contrast(1) brightness(1);
}

/* Award frame enhancement */
.achievements-section .border {
    transition: border-color 0.5s ease-out;
}

.achievements-section .group:hover .border {
    border-color: rgba(244, 69, 11, 0.15);
}

/* Corner accent animation for awards */
.achievements-section .group:hover .absolute.top-0.right-0,
.achievements-section .group:hover .absolute.bottom-0.left-0 {
    border-color: rgba(244, 69, 11, 0.3);
    transition: border-color 0.5s ease-out;
}

/* Award title hover effect */
.achievements-section h3 {
    transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle shadow on hover */
.achievement-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0;
    box-shadow: 0 0 0 rgba(244, 69, 11, 0);
    transition: box-shadow 0.5s ease-out;
    pointer-events: none;
    z-index: -1;
}

.achievement-card:hover::after {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ============================================ */
/* PHILOSOPHY SECTION - TYPOGRAPHIC DESIGN */
/* ============================================ */

/* Philosophy section specific styles */
.philosophy-section p {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Emphasis underline animation */
.philosophy-section .philosophy-emphasis,
.philosophy-section .philosophy-emphasis-strong {
    position: relative;
    display: inline-block;
}

.philosophy-section .philosophy-emphasis .absolute,
.philosophy-section .philosophy-emphasis-strong .absolute {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left;
}

.philosophy-section .fade-in-section.is-visible .philosophy-emphasis .absolute,
.philosophy-section .fade-in-section.is-visible .philosophy-emphasis-strong .absolute {
    transform: scaleX(1);
}

/* "交差点" underline */
.philosophy-section .philosophy-emphasis .absolute {
    background: linear-gradient(to right, rgba(244, 69, 11, 0.3), rgba(244, 69, 11, 0.1));
    height: 2px;
}

/* "なにか" underline */
.philosophy-section .philosophy-emphasis-strong .absolute {
    background: linear-gradient(to right, rgba(244, 69, 11, 0.4), rgba(244, 69, 11, 0.2));
    height: 3px;
}

/* Logo inline alignment */
.philosophy-section .logo-inline {
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
}

.philosophy-section .logo-inline img {
    vertical-align: middle;
    display: inline-block;
    margin-bottom: 0.4em;
}

/* Logo inline large (for transition section) */
.logo-inline-large {
    vertical-align: baseline;
    line-height: 1;
    display: inline-flex;
    align-items: flex-end;
}

.logo-inline-large img {
    display: inline-block;
    vertical-align: baseline;
}

.logo-inline-large span {
    display: inline-block;
    vertical-align: baseline;
    line-height: 1.5;
}

/* Text reveal animation */
@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.philosophy-section .fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Emphasis text styling */
.philosophy-section .relative.inline-block {
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Quote marks styling */
.philosophy-section span:has-text('"') {
    font-style: italic;
}

/* ============================================ */
/* EVENTS CAROUSEL STYLES */
/* ============================================ */

.events-carousel-container {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.events-carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.events-carousel-track {
    display: flex;
    align-items: stretch;
    padding: 8px 0;
}

.events-carousel-item {
    flex-shrink: 0;
}

/* Navigation Buttons */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.carousel-nav-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav-btn .material-symbols-outlined {
    font-size: 28px;
    color: #333;
    font-weight: 300;
}

.carousel-nav-prev {
    left: -24px;
}

.carousel-nav-next {
    right: -24px;
}

@media (max-width: 768px) {
    .carousel-nav-prev,
    .carousel-nav-next {
        display: none !important;
    }
    
    .events-carousel-container {
        padding: 0 16px;
    }
}

/* Note Embed Styling */
.note-embed {
    border-radius: 8px;
    overflow: hidden;
}

/* Carousel Item Hover Effect */
.events-carousel-item:hover {
    transform: translateY(-4px);
    transition: transform 0.3s ease;
}

/* Pinned Event Cards */
.event-card-pinned {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-card-pinned > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Auto-scroll smooth animation */
.events-carousel-track {
    will-change: transform;
}

/* Image hover effect */
.event-card-pinned img,
.events-carousel-item img {
    will-change: transform;
}

/* Carousel Scroll Hint Styles */
.events-carousel-wrapper {
    position: relative;
    width: 100%;
}

.events-carousel-gradient-left,
.events-carousel-gradient-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.events-carousel-gradient-left {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.events-carousel-gradient-right {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

@media (max-width: 768px) {
    .events-carousel-gradient-left,
    .events-carousel-gradient-right {
        width: 40px;
    }
    
    .events-carousel-container {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scroll-padding: 0 16px;
    }
    
    .events-carousel-item {
        scroll-snap-align: start;
    }
}

/* Mobile Menu Styles */
.mobile-menu-item {
    position: relative;
    -webkit-tap-highlight-color: rgba(244, 69, 11, 0.1);
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #f4450b;
    transform: scaleY(0);
    transition: transform 0.2s ease;
    border-radius: 0 4px 4px 0;
}

.mobile-menu-item:hover::before,
.mobile-menu-item:active::before,
.mobile-menu-item:focus::before {
    transform: scaleY(1);
}

.mobile-menu-item:active {
    background: rgba(244, 69, 11, 0.08);
    transform: translateX(4px);
}

/* Mobile Menu Container */
#mobileMenu {
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

#mobileMenu::-webkit-scrollbar {
    width: 6px;
}

#mobileMenu::-webkit-scrollbar-track {
    background: #f5f5f5;
}

#mobileMenu::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

#mobileMenu::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Pinned Events Section Styles */
.pinned-events-gradient-left,
.pinned-events-gradient-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.pinned-events-gradient-left {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.pinned-events-gradient-right {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

@media (min-width: 768px) {
    .pinned-events-gradient-left,
    .pinned-events-gradient-right {
        display: none;
    }
}

/* Pinned Events Grid - Mobile Scroll */
@media (max-width: 767px) {
    .pinned-events-grid {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scroll-padding: 0 1.5rem;
        padding: 0 1.5rem;
        margin: 0 -1.5rem;
    }
    
    .pinned-events-grid .event-card-pinned {
        scroll-snap-align: start;
    }
}

