/* Seijaku to Douran - Modern White Theme */
@charset "UTF-8";

/* Variables */
:root {
    --c-white: #ffffff;
    --c-offwhite: #f5f5f7;
    --c-black: #111111;
    --c-gray: #888888;
    --c-accent: #cc2200;
    /* Vermilion */

    --font-base: 'Noto Sans JP', sans-serif;
    --font-mincho: 'Shippori Mincho', serif;

    --easing: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reset covers */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--c-white);
    color: var(--c-black);
    font-family: var(--font-base);
    line-height: 1.8;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

li {
    list-style: none;
}

/* Utility Classes */
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.15em;
}

/* Loader */
.loading {
    overflow: hidden;
}

.loader {
    position: fixed;
    inset: 0;
    background: var(--c-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    animation: pulse 2s infinite;
}

.loader-logo {
    height: 100px;
    width: auto;
    display: block;
    transform: translateY(-5px);
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

/* Header & Nav */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    background: transparent;
    /* Changed from gradient to transparent to avoid 'box' look */
    transition: background 0.3s ease;
}

.global-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-mincho);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--c-black);
    letter-spacing: 0.1em;
}

.loader-text-logo {
    font-family: var(--font-mincho);
    font-weight: 700;
    font-size: 2rem;
    color: var(--c-black);
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.logo-img {
    height: 68px;
    width: auto;
    display: block;
    transform: translateY(-4px);
}

/* Nav Menu */
.menu-trigger {
    width: 50px;
    height: 50px;
    background: var(--c-black);
    border: none;
    cursor: pointer;
    position: relative;
    border-radius: 50%;
    /* Modern circle button */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--c-white);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.menu-trigger:hover {
    transform: scale(1.1);
}

/* If hero banner is dark, we might need white UI elements */
.hero+.global-header .menu-trigger {
    color: var(--c-black);
}

.bar {
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: currentColor;
    transition: transform 0.4s var(--easing);
}

.bar-1 {
    transform: translateY(-3px);
}

.bar-2 {
    transform: translateY(3px);
}

.menu-open .bar-1 {
    transform: translateY(0) rotate(45deg);
}

.menu-open .bar-2 {
    transform: translateY(0) rotate(-45deg);
}

/* Fullscreen Nav */
.global-nav {
    position: fixed;
    inset: 0;
    background: var(--c-black);
    color: var(--c-white);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s var(--easing);
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-nav.active {
    opacity: 1;
    pointer-events: auto;
}

/* Fix: "Upside Down" - likely meant the vertical text flow order.
   Switching to standard vertical stack for Mobile for better usability. */
.nav-list {
    height: auto;
    display: flex;
    flex-direction: column;
    /* Standard vertical stack */
    align-items: center;
    gap: 2rem;
    padding: 0;
    border: none;
}

.nav-link {
    font-family: var(--font-mincho);
    font-size: 1.5rem;
    display: block;
    position: relative;
    text-align: center;
}

.nav-link span {
    display: block;
    font-family: var(--font-base);
    font-size: 0.8rem;
    color: var(--c-accent);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

/* Nav Instagram Item specific style */
.nav-social-item {
    margin-top: 2rem;
}

.nav-social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 0.3s ease;
}

.nav-social-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-footer {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
}

.social-link {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    border-bottom: 1px solid currentColor;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    height: 100%;
    background: var(--c-offwhite);
    z-index: -1;
}

.hero-img-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-img,
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    opacity: 0.8;
}

/* Sequencer specifics */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 8%;
    transform: translateY(-50%);
}

.hero-title {
    font-family: var(--font-mincho);
    font-size: clamp(2.5rem, 6vw, 5rem);
    /* Reduced max size for elegance */
    line-height: 1.4;
    height: 60vh;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    /* Increased gap between lines */
    letter-spacing: 0.2em;
    /* Added tracking */
}

/* Text Line Animation */
.txt-line {
    opacity: 0;
    animation: blurFadeIn 1.5s var(--easing) forwards;
}

.txt-line:nth-child(1) {
    animation-delay: 0.3s;
}

.txt-line:nth-child(2) {
    animation-delay: 0.8s;
}

@keyframes blurFadeIn {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: scale(1.05);
        /* Slight zoom out effect */
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

.hero-subtitle {
    position: absolute;
    bottom: -40px;
    left: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    transform: rotate(-90deg);
    transform-origin: left top;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.scroll-indicator span {
    writing-mode: vertical-rl;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: var(--c-black);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Mobile Portrait Adjustments */
/* Mobile Portrait Adjustments */
@media (max-width: 768px) {
    .hero-content {
        top: 130px;
        left: 10%;
        /* Increase left margin to accommodate subtitle */
        transform: none;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
        gap: 1.5rem;
    }

    .hero-img {
        object-position: 15% center;
        /* Show left side of image (whitespace) */
    }

    .hero-subtitle {
        bottom: 0;
        /* Align to bottom like PC */
        top: auto;
        left: -2rem;
        width: 1rem;
        font-size: 0.7rem;
        transform: none;
        writing-mode: vertical-rl;
        letter-spacing: 0.2em;
    }
}

/* Landscape / Short Screen Adjustments */
@media (max-height: 600px) {
    .hero-content {
        top: 110px;
        /* Push down to clear logo */
        transform: none;
        /* Remove centering */
        left: 5%;
    }

    .hero-title {
        font-size: clamp(1.5rem, 8vh, 2.5rem);
        height: auto;
        gap: 0.8rem;
    }

    .hero-subtitle {
        bottom: auto;
        top: 0;
        left: -1.5rem;
        /* Closer to text */
        width: 1rem;
        /* Force vertical width */
        font-size: 0.7rem;
        transform: none;
        /* Remove -90deg rotation */
        writing-mode: vertical-rl;
        /* Use natural vertical orientation */
        letter-spacing: 0.2em;
    }

    .scroll-indicator {
        display: none;
    }
}

/* Sections Common */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 2rem;
    display: grid;
    grid-template-columns: 100px 1fr;
    /* Header | Content */
    gap: 4rem;
}

@media (max-width: 768px) {
    .section-container {
        grid-template-columns: 1fr;
        padding: 80px 1.5rem;
        gap: 3rem;
    }
}

.section-header {
    height: 300px;
    border-right: 1px solid var(--c-black);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-right: 1.5rem;
}

@media (max-width: 768px) {
    .section-header {
        height: auto;
        writing-mode: horizontal-tb;
        border-right: none;
        border-bottom: 2px solid var(--c-black);
        padding-right: 0;
        padding-bottom: 1rem;
        flex-direction: row;
        align-items: baseline;
    }

    .section-header h2 {
        writing-mode: horizontal-tb;
        font-size: 2rem;
    }

    .section-header .en-label {
        writing-mode: horizontal-tb;
    }
}

.section-header h2 {
    font-family: var(--font-mincho);
    font-size: 2.5rem;
    letter-spacing: 0.2em;
}

.header-prefix {
    display: block;
    /* Forces new line in vertical text (appears as new column to the right) in some modes, or top in others. In vertical-rl, block flows right to left. */
    font-size: 0.6em;
    /* Smaller relative to h2 */
    margin-left: 0.5em;
    /* Spacing from main text in vertical mode? Or margin-bottom? vertical-rl flows right-to-left. 1st line is rightmost. */
    /* Let's try simple font-size reduction first, visual check will confirm position. */
    margin-bottom: 0.5em;
    /* Space "above" (which is right in vertical?) */
}

.section-header .en-label {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--c-accent);
}

.content-body {
    padding-top: 2rem;
}

/* About Section */
.lead-text {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .lead-text {
        font-size: 1.5rem;
    }
}

.description-text {
    color: var(--c-gray);
    margin-bottom: 4rem;
    max-width: 600px;
}

/* Button */
.btn-arrow {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
}

.btn-arrow .circle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--c-black);
    border-radius: 50%;
    position: relative;
    transition: background 0.3s ease;
}

.btn-arrow .circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 45%;
    width: 8px;
    height: 8px;
    border-top: 1px solid var(--c-black);
    border-right: 1px solid var(--c-black);
    transform: translate(-50%, -50%) rotate(45deg);
    transition: border-color 0.3s ease;
}

.btn-arrow:hover .circle {
    background: var(--c-black);
}

.btn-arrow:hover .circle::after {
    border-color: var(--c-white);
}

/* History Section - Mobile First Feed */
.history-feed-container {
    padding-top: 2rem;
    position: relative;
    max-width: 800px;
    /* Limit width on desktop */
    margin: 0 auto;
}

/* Sticky Year Header */
.sticky-year-header {
    position: sticky;
    top: 80px;
    /* Adjust based on header height */
    z-index: 10;
    padding: 1rem 0;
    margin-bottom: 1rem;
    pointer-events: none;
    /* Let clicks pass through to content behind */
}

/* Background gradient mask for year header to fade content slightly */
.sticky-year-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    right: -20px;
    bottom: 0;
    background: linear-gradient(180deg, var(--c-bg) 60%, transparent);
    z-index: -1;
    backdrop-filter: blur(2px);
}

.year-number {
    display: inline-block;
    font-family: var(--font-mincho);
    font-size: 4rem;
    line-height: 1;
    font-weight: 700;
    color: rgba(204, 34, 0, 0.15);
    /* Watermark-like appearance */
    transition: all 0.3s ease;
}

/* Active/Hover state for year (optional) */
.history-year-group:hover .year-number {
    color: rgba(204, 34, 0, 0.25);
    transform: scale(1.05);
}

/* Cards List */
.history-cards-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 4rem;
}

/* History Card - Mobile Optimized */
.history-card {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Animation initial state */
    opacity: 0;
    transform: translateY(20px);
}

.history-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.history-card:active {
    transform: scale(0.98);
}

/* Date Column */
.card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-right: 1.25rem;
    border-right: 2px solid rgba(0, 0, 0, 0.05);
    margin-right: 1.25rem;
    min-width: 60px;
}

.card-date .month {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--c-accent);
    line-height: 1;
}

.card-date .separator {
    font-size: 0.8rem;
    color: var(--c-gray-light);
    margin: 2px 0;
    color: rgba(0, 0, 0, 0.2);
    transform: rotate(20deg);
}

.card-date .day {
    font-size: 0.9rem;
    color: var(--c-gray);
    font-family: var(--font-en);
}


/* Card Content */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    color: var(--c-black);
}

.card-content p {
    font-size: 0.9rem;
    color: var(--c-gray);
    line-height: 1.6;
}

/* Category Pill */
.category-pill {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 100px;
    margin-bottom: 0.75rem;
    white-space: nowrap;
}

/* Category Colors (Reusing scheme) */
.category-pill.media {
    background: #e5f0ff;
    color: #0044cc;
}

.category-pill.community {
    background: #e6fcf5;
    color: #087f5b;
}

.category-pill.ceremony {
    background: #fff4e6;
    color: #d9480f;
}

.category-pill.festival {
    background: #fff9db;
    color: #e67700;
}

.category-pill.dedication {
    background: #f3f0ff;
    color: #5f3dc4;
}

.category-pill.collaboration {
    background: #fff0f6;
    color: #c2255c;
}

.category-pill.performance {
    background: #e3fafc;
    color: #0b7285;
}

.category-pill.milestone {
    background: linear-gradient(135deg, var(--c-accent), #ff5533);
    color: white;
    box-shadow: 0 2px 6px rgba(204, 34, 0, 0.25);
}

/* Milestone Card Special Style */
.history-card.milestone-card {
    border: 2px solid rgba(204, 34, 0, 0.1);
    background: linear-gradient(to bottom, #fff, #fff9f9);
}

/* Staggered Animations */
.history-card:nth-child(1) {
    transition-delay: 0.05s;
}

.history-card:nth-child(2) {
    transition-delay: 0.1s;
}

.history-card:nth-child(3) {
    transition-delay: 0.15s;
}

.history-card:nth-child(4) {
    transition-delay: 0.2s;
}

.history-card:nth-child(n+5) {
    transition-delay: 0s;
}

/* Desktop Enhancements */
@media (min-width: 769px) {
    .history-feed-container {
        /* Remove single grid container to allow year groups to be self-contained */
        display: block;
        max-width: 1000px;
        margin: 0 auto;
    }

    .history-year-group {
        /* Each group becomes its own grid, providing a context for sticky */
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 2rem;
        align-items: start;
        position: relative;
        /* Context for sticky */
    }

    /* In grid layout, we need to adjust the sticky positioning */
    .sticky-year-header {
        grid-column: 1;
        position: sticky;
        top: 120px;
        text-align: right;
        padding-right: 2rem;
        border-right: 2px solid rgba(204, 34, 0, 0.1);
        padding-top: 0;
        margin-bottom: 4rem;
        /* Height adjustment to ensure sticky works for the duration of the content */
        align-self: start;
    }

    .sticky-year-header::after {
        display: none;
    }

    .year-number {
        font-size: 3.5rem;
        /* color: var(--c-accent); */
        color: var(--c-black);
        opacity: 0.8;
    }

    .history-cards-list {
        grid-column: 2;
        padding-bottom: 6rem;
    }

    .history-card {
        padding: 2rem;
        margin-bottom: 2rem;
    }

    .history-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }
}


/* Gallery Section - Instagram Grid Style */
.gallery-section {
    padding: 120px 0;
    background: var(--c-offwhite);
    overflow: hidden;
}

.section-header-horizontal {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header-horizontal h2 {
    font-family: var(--font-mincho);
    font-size: 3rem;
}

.insta-id {
    color: var(--c-gray);
    letter-spacing: 0.1em;
    font-weight: 700;
    display: inline-block;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.insta-id:hover {
    border-bottom-color: var(--c-black);
}

.insta-grid-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.insta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    /* Tiny gap like Instagram */
}

@media (max-width: 768px) {
    .insta-grid {
        gap: 2px;
    }
}

.insta-item {
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
    display: block;
    background: #eee;
}

.insta-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.insta-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.9);
}

.video-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.view-more-container {
    text-align: center;
    margin-top: 3rem;
}

.btn-insta {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--c-black);
    background: var(--c-white);
    color: var(--c-black);
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-insta:hover {
    background: var(--c-black);
    color: var(--c-white);
}

/* Contact Options */
.contact-options {
    margin-bottom: 3rem;
    text-align: center;
}

.btn-insta-dm {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(200, 50, 100, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-insta-dm:hover {
    opacity: 1;
    /* Override default hover opacity */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 50, 100, 0.4);
}

.divider-text {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--c-gray);
    position: relative;
    display: inline-block;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: #eee;
}

.divider-text::before {
    right: 100%;
    margin-right: 10px;
}

.divider-text::after {
    left: 100%;
    margin-left: 10px;
}


/* Contact Form */
.minimal-form {
    margin-top: 1rem;
    max-width: 600px;
}

.form-row {
    margin-bottom: 2rem;
    border-bottom: 1px solid #ccc;
    position: relative;
}

.form-row label {
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--c-accent);
    display: block;
    margin-bottom: 0.5rem;
}

.form-row input,
.form-row textarea {
    width: 100%;
    border: none;
    background: transparent;
    padding: 1rem 0;
    font-size: 1rem;
    font-family: inherit;
    color: var(--c-black);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-bottom: 1px solid var(--c-black);
}

.btn-submit {
    background: var(--c-black);
    color: var(--c-white);
    border: none;
    padding: 1rem 3rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: var(--c-accent);
}

.form-message {
    margin-top: 1rem;
    font-weight: 700;
}

/* Footer */
.global-footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid #eee;
}

.copyright {
    font-size: 0.8rem;
    color: var(--c-gray);
}