/* ============================================================
   tsundere.party — Styles
   Colors: #FF3C5A #2D2B42 #1C1C28 #0A0A0F #8B8FA8 #C8CADB #E8E4DC #F2F0EB
   Fonts: Nunito (display 800), DM Sans (body 300/500), Noto Sans JP
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
    --crimson:       #FF3C5A;
    --deep-navy:     #2D2B42;
    --near-black:    #1C1C28;
    --void-black:    #0A0A0F;
    --blue-gray:     #8B8FA8;
    --light-gray:    #C8CADB;
    --warm-white:    #E8E4DC;
    --off-white:     #F2F0EB;

    --font-display: 'Nunito', sans-serif;
    --font-body:    'DM Sans', sans-serif;
    --font-jp:      'Noto Sans JP', sans-serif;

    --card-w: 200px;
    --card-h: 280px; /* 2.5:3.5 ratio */
    --card-ratio: calc(3.5 / 2.5);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void-black);
    color: var(--off-white);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* ---- Custom Cursor ---- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: var(--crimson);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s;
    mix-blend-mode: screen;
}

/* ============================================================
   GRAIN UTILITY
   ============================================================ */
.grain-layer,
.gallery-grain,
.manifesto-grain,
.footer-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Grain via SVG noise filter pseudo-element trick */
.grain-layer::before,
.gallery-grain::before,
.manifesto-grain::before,
.footer-grain::before {
    content: '';
    position: absolute;
    inset: -200%;
    width: 400%;
    height: 400%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 300px 300px;
    animation: grain-drift 8s steps(10) infinite;
}

.grain-layer::before    { opacity: 0.14; }
.gallery-grain::before  { opacity: 0.10; }
.manifesto-grain::before{ opacity: 0.16; }
.footer-grain::before   { opacity: 0.09; }

@keyframes grain-drift {
    0%   { transform: translate(0, 0); }
    10%  { transform: translate(-5%, -10%); }
    20%  { transform: translate(-15%, 5%); }
    30%  { transform: translate(7%, -25%); }
    40%  { transform: translate(-5%, 25%); }
    50%  { transform: translate(-15%, 10%); }
    60%  { transform: translate(15%, 0%); }
    70%  { transform: translate(0%, 15%); }
    80%  { transform: translate(3%, 35%); }
    90%  { transform: translate(-10%, 10%); }
    100% { transform: translate(0, 0); }
}

/* ============================================================
   ACT I — HERO
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: var(--void-black);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ---- Bokeh Background ---- */
.hero-bokeh {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bokeh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: bokeh-float linear infinite;
    will-change: transform, opacity;
}

/* Individual orb sizes, colors, positions, durations */
.orb-1  { width: 120px; height: 120px; background: rgba(255, 120, 30, 0.55); top: 15%; left: 8%;   animation-duration: 18s; animation-delay: 0s; }
.orb-2  { width: 80px;  height: 80px;  background: rgba(140, 60, 200, 0.45); top: 60%; left: 20%;  animation-duration: 22s; animation-delay: -5s; }
.orb-3  { width: 160px; height: 160px; background: rgba(255, 60, 90, 0.30);  top: 30%; left: 60%;  animation-duration: 26s; animation-delay: -10s; }
.orb-4  { width: 60px;  height: 60px;  background: rgba(255, 200, 60, 0.40); top: 75%; left: 75%;  animation-duration: 14s; animation-delay: -3s; }
.orb-5  { width: 100px; height: 100px; background: rgba(100, 120, 255, 0.35);top: 10%; left: 45%;  animation-duration: 20s; animation-delay: -8s; }
.orb-6  { width: 140px; height: 140px; background: rgba(255, 100, 50, 0.40); top: 55%; left: 85%;  animation-duration: 30s; animation-delay: -15s; }
.orb-7  { width: 50px;  height: 50px;  background: rgba(200, 100, 255, 0.50);top: 85%; left: 35%;  animation-duration: 16s; animation-delay: -2s; }
.orb-8  { width: 90px;  height: 90px;  background: rgba(255, 80, 120, 0.35); top: 40%; left: 3%;   animation-duration: 24s; animation-delay: -12s; }
.orb-9  { width: 70px;  height: 70px;  background: rgba(255, 180, 50, 0.45); top: 20%; left: 80%;  animation-duration: 19s; animation-delay: -7s; }
.orb-10 { width: 110px; height: 110px; background: rgba(80, 200, 255, 0.25); top: 70%; left: 50%;  animation-duration: 28s; animation-delay: -4s; }
.orb-11 { width: 45px;  height: 45px;  background: rgba(255, 60, 60, 0.50);  top: 5%;  left: 30%;  animation-duration: 12s; animation-delay: -9s; }
.orb-12 { width: 130px; height: 130px; background: rgba(150, 80, 255, 0.30); top: 88%; left: 10%;  animation-duration: 32s; animation-delay: -20s; }

@keyframes bokeh-float {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(20px, -30px) scale(1.05); }
    50%  { transform: translate(-15px, 20px) scale(0.95); }
    75%  { transform: translate(10px, 15px) scale(1.03); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ---- Kanji Watermarks ---- */
.kanji-watermark {
    position: absolute;
    font-family: var(--font-jp);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
    z-index: 0;
    user-select: none;
    animation: kanji-drift linear infinite;
}

.kanji-1 { font-size: 220px; top: -5%;  left: 5%;  animation-duration: 40s; animation-delay: 0s; }
.kanji-2 { font-size: 180px; top: 50%;  left: 65%; animation-duration: 35s; animation-delay: -10s; }
.kanji-3 { font-size: 250px; top: 60%;  left: -2%; animation-duration: 45s; animation-delay: -20s; }
.kanji-4 { font-size: 160px; top: 5%;   left: 80%; animation-duration: 38s; animation-delay: -5s; }

@keyframes kanji-drift {
    0%   { transform: translateY(0) rotate(-3deg); }
    50%  { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0) rotate(-3deg); }
}

/* ---- Cursor Glow ---- */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 60, 90, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    transition: transform 0.08s ease-out;
    mix-blend-mode: screen;
}

/* ---- Hero Panel (Frosted Glass) ---- */
.hero-panel {
    position: relative;
    z-index: 5;
    background: rgba(45, 43, 66, 0.55);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(200, 202, 219, 0.18);
    border-radius: 16px;
    padding: 56px 64px;
    max-width: 620px;
    width: 90%;
    /* Trading card proportions: 2.5:3.5 wide-format panel */
    min-height: 280px;

    /* Slide-in animation */
    animation: panel-slide-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
    box-shadow:
        0 0 0 1px rgba(255, 60, 90, 0.08),
        0 32px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@keyframes panel-slide-in {
    from {
        transform: translateX(120px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.hero-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(48px, 8vw, 80px);
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: var(--off-white);
}

.title-tsundere { color: var(--off-white); }
.title-dot      { color: var(--blue-gray); }
.title-party    { color: var(--crimson); }

.hero-tagline-jp {
    font-family: var(--font-jp);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: var(--blue-gray);
    margin-top: 4px;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 15px;
    letter-spacing: 0.04em;
    color: var(--light-gray);
    font-style: italic;
}

.hero-divider {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, var(--crimson), transparent);
    margin: 4px 0;
}

.hero-subtext {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    line-height: 1.7;
    color: var(--blue-gray);
    max-width: 400px;
}

.hero-scroll-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.scroll-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blue-gray);
}

.scroll-line {
    width: 40px;
    height: 1px;
    background: var(--blue-gray);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--crimson);
    animation: scroll-sweep 2s ease-in-out infinite;
}

@keyframes scroll-sweep {
    0%   { left: -100%; }
    50%  { left: 0%; }
    100% { left: 100%; }
}

/* ============================================================
   ACT II — CARD GALLERY
   ============================================================ */
.gallery-section {
    position: relative;
    background-color: var(--near-black);
    padding: 100px 40px 120px;
    overflow: hidden;
}

.gallery-header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 64px;
}

.gallery-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: -0.03em;
    color: var(--off-white);
    margin-bottom: 8px;
}

.gallery-title-en {
    font-size: 0.55em;
    font-weight: 600;
    color: var(--blue-gray);
    margin-left: 12px;
    vertical-align: middle;
    letter-spacing: 0.04em;
}

.gallery-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--blue-gray);
}

/* ---- Card Grid ---- */
.card-grid {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ---- Card Wrapper (perspective host) ---- */
.card-wrapper {
    perspective: 1000px;
    cursor: pointer;
    /* Trading card 2.5:3.5 ratio */
    width: var(--card-w);
    height: var(--card-h);
    flex-shrink: 0;
}

/* ---- Card (flip container) ---- */
.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 12px;
}

.card.flipped {
    transform: rotateY(180deg);
}

/* ---- Card Faces ---- */
.card-face {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    border: 1px solid rgba(200, 202, 219, 0.12);
}

/* ---- Card Front ---- */
.card-front {
    background: linear-gradient(
        145deg,
        var(--deep-navy) 0%,
        var(--near-black) 60%,
        #1a1a2e 100%
    );
    display: flex;
    align-items: stretch;
    flex-direction: column;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---- Holographic Shimmer Layer ---- */
.card-holo-layer {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    opacity: 0;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 60, 90, 0.15) 15%,
        rgba(100, 120, 255, 0.2) 30%,
        rgba(50, 200, 255, 0.15) 45%,
        transparent 55%,
        rgba(200, 100, 255, 0.15) 70%,
        rgba(255, 180, 50, 0.15) 85%,
        transparent 100%
    );
    background-size: 300% 300%;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 3;
    animation: holo-shift 4s ease infinite paused;
}

.card-wrapper:hover .card-holo-layer {
    opacity: 1;
    animation-play-state: running;
}

@keyframes holo-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Card Front Content ---- */
.card-front-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    height: 100%;
}

.card-number {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--blue-gray);
    text-transform: uppercase;
    align-self: flex-start;
}

.card-kanji {
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: 80px;
    line-height: 1;
    color: rgba(200, 202, 219, 0.15);
    user-select: none;
    transition: color 0.3s ease;
}

.card-wrapper:hover .card-kanji {
    color: rgba(255, 60, 90, 0.35);
}

.card-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: -0.01em;
    color: var(--off-white);
    text-align: center;
}

.card-rarity {
    font-size: 10px;
    color: var(--crimson);
    letter-spacing: 0.1em;
}

/* ---- Card Back ---- */
.card-back {
    background: linear-gradient(
        155deg,
        var(--near-black) 0%,
        #181828 100%
    );
    transform: rotateY(180deg);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card-back-content {
    padding: 20px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
}

.card-back-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crimson);
    margin-top: 8px;
}

.card-back-value {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 11px;
    line-height: 1.5;
    color: var(--light-gray);
}

.card-back-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 9px;
    color: var(--blue-gray);
    letter-spacing: 0.05em;
}

.stat-val {
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--blue-gray);
}

.stat-val.crimson {
    color: var(--crimson);
}

/* Card hover lift */
.card-wrapper:hover .card:not(.flipped) {
    transform: translateY(-8px) rotateX(4deg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   ACT III — MANIFESTO
   ============================================================ */
.manifesto-section {
    position: relative;
    background-color: var(--deep-navy);
    padding: 120px 40px;
    overflow: hidden;
}

.manifesto-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
}

.manifesto-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--crimson);
    margin-bottom: 32px;
}

.manifesto-heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--off-white);
    margin-bottom: 48px;
}

.manifesto-accent {
    color: var(--crimson);
    font-style: italic;
}

.manifesto-subline {
    display: block;
    color: var(--blue-gray);
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.manifesto-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.manifesto-p {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.8;
    color: var(--light-gray);
}

.manifesto-p em {
    color: var(--off-white);
    font-style: italic;
}

.manifesto-jp {
    font-family: var(--font-jp);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(200, 202, 219, 0.6);
    border-left: 2px solid var(--crimson);
    padding-left: 20px;
    margin-top: 8px;
}

.manifesto-jp-sub {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--blue-gray);
    margin-top: 6px;
}

.manifesto-rule {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--crimson) 0%, transparent 40%);
    margin: 40px 0;
    opacity: 0.4;
}

.manifesto-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--blue-gray);
    border: 1px solid rgba(139, 143, 168, 0.25);
    border-radius: 20px;
    padding: 5px 14px;
    transition: border-color 0.25s, color 0.25s;
}

.tag:hover {
    border-color: var(--crimson);
    color: var(--crimson);
}

/* ============================================================
   ACT IV — FOOTER
   ============================================================ */
.site-footer {
    position: relative;
    background-color: var(--near-black);
    padding: 64px 40px 48px;
    overflow: hidden;
    border-top: 1px solid rgba(139, 143, 168, 0.08);
}

.footer-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.footer-logo-tsundere { color: var(--off-white); }
.footer-logo-dot      { color: var(--blue-gray); }
.footer-logo-party    { color: var(--crimson); }

.footer-tagline-jp {
    font-family: var(--font-jp);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--blue-gray);
}

.footer-tagline-en {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: rgba(139, 143, 168, 0.5);
    font-style: italic;
}

.footer-divider {
    width: 40px;
    height: 1px;
    background: var(--crimson);
    opacity: 0.4;
    margin: 8px 0;
}

.footer-copy {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(139, 143, 168, 0.4);
}

.footer-jp {
    font-family: var(--font-jp);
    font-size: 11px;
}

/* ============================================================
   SCROLL-TRIGGERED ANIMATIONS
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --card-w: 160px;
        --card-h: 224px;
    }

    .hero-panel {
        padding: 36px 32px;
    }

    .hero-title {
        font-size: clamp(36px, 10vw, 56px);
    }

    .gallery-section {
        padding: 80px 20px 100px;
    }

    .manifesto-section {
        padding: 80px 24px;
    }

    .card-grid {
        gap: 20px;
    }

    .manifesto-heading {
        font-size: clamp(26px, 8vw, 42px);
    }

    .kanji-watermark {
        font-size: 120px;
    }

    .site-footer {
        padding: 48px 24px 36px;
    }
}

@media (max-width: 480px) {
    :root {
        --card-w: 140px;
        --card-h: 196px;
    }

    .hero-panel {
        padding: 28px 24px;
    }

    .card-back-content {
        padding: 14px 12px;
        gap: 4px;
    }

    .card-back-label {
        font-size: 7px;
        margin-top: 6px;
    }

    .card-back-value {
        font-size: 9px;
    }
}
