/* ============================================================
   kanojo.name — Marble-Classical Dopamine Design System
   Palette: Electric Violet + Electric Crimson on Marble Ivory
   ============================================================ */

/* CSS Custom Properties */
:root {
    --marble-white: #F2EDE8;
    --marble-mid: #D9CFC4;
    --marble-vein: #9B8E82;
    --electric-violet: #6A0DAD;
    --violet-bright: #8B2BE2;
    --electric-crimson: #C1121F;
    --crimson-hot: #E63946;
    --ink-black: #1A1A1A;
    --sidebar-shadow: #0D0D0D;

    --sidebar-width: 280px;
    --transition-fast: 200ms ease;
    --transition-medium: 400ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--marble-white);
    color: var(--ink-black);
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 17px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ============================================================
   INTRO OVERLAY
   ============================================================ */
.intro-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--marble-white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 600ms ease, visibility 600ms ease;
}

.intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.intro-chisel-animation {
    width: 600px;
    max-width: 90vw;
}

#chisel-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.marble-block {
    filter: url(#marble-texture);
}

.carved-title {
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 48px;
    fill: var(--electric-violet);
    opacity: 0;
    letter-spacing: -0.02em;
    animation: carveIn 1.4s ease forwards 0.4s;
}

@keyframes carveIn {
    0% { opacity: 0; letter-spacing: 0.2em; fill: var(--marble-mid); }
    50% { opacity: 0.6; fill: var(--marble-vein); }
    100% { opacity: 1; fill: var(--electric-violet); letter-spacing: -0.02em; }
}

.spark {
    animation: sparkFly 0.8s ease-out forwards;
    opacity: 0;
}

.spark:nth-child(1)  { animation-delay: 0.1s; }
.spark:nth-child(2)  { animation-delay: 0.15s; }
.spark:nth-child(3)  { animation-delay: 0.2s; }
.spark:nth-child(4)  { animation-delay: 0.25s; }
.spark:nth-child(5)  { animation-delay: 0.3s; }
.spark:nth-child(6)  { animation-delay: 0.12s; }
.spark:nth-child(7)  { animation-delay: 0.18s; }
.spark:nth-child(8)  { animation-delay: 0.22s; }
.spark:nth-child(9)  { animation-delay: 0.08s; }
.spark:nth-child(10) { animation-delay: 0.14s; }
.spark:nth-child(11) { animation-delay: 0.28s; }

@keyframes sparkFly {
    0%   { opacity: 1; transform: translate(0, 0) scale(1); }
    60%  { opacity: 0.8; }
    100% { opacity: 0; transform: translate(var(--spark-dx, 15px), var(--spark-dy, -20px)) scale(0); }
}

.dust {
    animation: dustFloat 1.2s ease-out forwards;
    opacity: 0;
}

.dust:nth-child(1) { animation-delay: 0.05s; --drift-x: 8px; --drift-y: -12px; }
.dust:nth-child(2) { animation-delay: 0.1s;  --drift-x: -5px; --drift-y: -18px; }
.dust:nth-child(3) { animation-delay: 0.15s; --drift-x: 12px; --drift-y: -10px; }
.dust:nth-child(4) { animation-delay: 0.08s; --drift-x: -8px; --drift-y: -15px; }
.dust:nth-child(5) { animation-delay: 0.2s;  --drift-x: 5px; --drift-y: -20px; }

@keyframes dustFloat {
    0%   { opacity: 0.7; transform: translate(0, 0); }
    100% { opacity: 0; transform: translate(var(--drift-x), var(--drift-y)); }
}

#chisel-tool {
    animation: chiselStrike 0.3s ease-in-out infinite alternate;
    transform-origin: 115px 95px;
}

@keyframes chiselStrike {
    0%   { transform: rotate(-8deg); }
    100% { transform: rotate(8deg); }
}

.intro-subtitle {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 0.14em;
    color: var(--marble-vein);
    text-transform: uppercase;
    animation: fadeInUp 0.6s ease forwards 0.8s;
    opacity: 0;
}

@keyframes fadeInUp {
    0%   { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-layout {
    display: flex;
    min-height: 100vh;
    transition: clip-path 600ms ease-out;
}

.main-layout.revealed {
    clip-path: inset(0 0% 0 0) !important;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--marble-white);
    border-right: 3px solid var(--sidebar-shadow);
    box-shadow: 8px 0 32px rgba(13, 13, 13, 0.35);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Marble texture overlay via filter */
.sidebar-marble-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--marble-white);
    filter: url(#marble-texture);
    z-index: 0;
    pointer-events: none;
}

/* Column fluting pattern */
.sidebar-fluting {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 8px,
        rgba(155, 142, 130, 0.06) 8px,
        rgba(155, 142, 130, 0.06) 10px
    );
    z-index: 1;
    pointer-events: none;
}

/* Sidebar content layers above overlays */
.sidebar-logo,
.sidebar-nav,
.sidebar-footer {
    position: relative;
    z-index: 2;
}

/* Logo / Brand */
.sidebar-logo {
    padding: 32px 24px 24px;
    border-bottom: 1px solid rgba(155, 142, 130, 0.3);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.logo-column-anim {
    width: 50px;
    height: 90px;
}

.column-svg {
    width: 100%;
    height: 100%;
}

.column-crack {
    animation: crackForm 1.8s ease-in-out forwards 0.5s;
    stroke-dashoffset: 80;
}

@keyframes crackForm {
    0%   { stroke-dashoffset: 80; opacity: 0; }
    30%  { opacity: 0.8; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}

.sidebar-brand {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 22px;
    color: var(--ink-black);
    letter-spacing: -0.01em;
    line-height: 1;
}

.brand-dot {
    color: var(--electric-violet);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 32px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 18px 28px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--electric-violet);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.nav-item:hover::before {
    opacity: 0.04;
}

.nav-item.active {
    border-left-color: var(--electric-violet);
}

.nav-item.active .nav-numeral {
    color: var(--electric-violet);
}

.nav-numeral {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    color: var(--marble-vein);
    letter-spacing: 0.12em;
    transition: color var(--transition-fast);
    position: relative;
    z-index: 1;
}

.nav-item:hover .nav-numeral {
    color: var(--electric-violet);
}

.nav-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--ink-black);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    transition: color var(--transition-fast);
}

.nav-item:hover .nav-label {
    color: var(--electric-violet);
}

/* Laurel burst container */
.nav-laurel-burst {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 3;
    overflow: visible;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(155, 142, 130, 0.3);
}

.sidebar-footer-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--marble-vein);
    text-transform: uppercase;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    position: relative;
}

/* ============================================================
   SECTION BASE
   ============================================================ */
.section {
    position: relative;
    padding: 80px 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    background-color: var(--marble-white);
    padding-top: 100px;
}

/* Background statue fragments */
.hero-bg-fragment {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.fragment-1 {
    right: -20px;
    top: 40px;
    width: 280px;
    height: 420px;
    transform: rotate(15deg);
    opacity: 0.8;
}

.fragment-2 {
    right: 200px;
    bottom: 60px;
    width: 220px;
    height: 220px;
    transform: rotate(-10deg);
    opacity: 0.8;
}

.fragment-3 {
    right: 60px;
    top: 80px;
    width: 250px;
    height: 250px;
    transform: rotate(15deg);
    opacity: 0.8;
}

.fragment-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Acanthus scroll border */
.acanthus-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    z-index: 1;
}

.acanthus-path {
    transition: stroke-dashoffset 1.6s ease-in-out;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(72px, 10vw, 140px);
    color: var(--electric-violet);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

.title-dot {
    color: var(--electric-crimson);
    display: block;
}

.hero-tagline {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: 0.14em;
    color: var(--marble-vein);
    text-transform: uppercase;
    margin-bottom: 40px;
}

.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 28px;
}

.cta-primary {
    display: inline-block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--marble-white);
    background-color: var(--electric-violet);
    padding: 14px 36px;
    border: none;
    border-radius: 2px;
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.cta-primary:hover {
    background-color: var(--violet-bright);
    box-shadow: 0 0 24px rgba(139, 43, 226, 0.4);
}

.cta-ornament {
    font-family: 'Cormorant SC', serif;
    font-size: 13px;
    letter-spacing: 0.22em;
    color: var(--marble-vein);
}

/* Classical figure interactive SVGs */
.classical-figure {
    position: absolute;
    z-index: 2;
}

.figure-nike {
    right: 80px;
    top: 80px;
    width: 180px;
    height: 360px;
}

.figure-discobolus {
    position: relative;
    width: 160px;
    height: 240px;
    margin-top: 20px;
    float: right;
}

.figure-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    cursor: pointer;
    transition: filter var(--transition-fast);
}

.figure-svg:hover {
    filter: drop-shadow(0 0 12px var(--violet-bright));
}

/* On figure hover, stroke changes via JS */
.figure-svg.hovered path,
.figure-svg.hovered ellipse,
.figure-svg.hovered line {
    stroke: var(--electric-crimson);
    transition: stroke var(--transition-fast);
}

/* ============================================================
   SECTION DIVIDERS (marble vein)
   ============================================================ */
.section-divider {
    position: relative;
    height: 48px;
    display: flex;
    align-items: center;
    background-color: var(--marble-white);
    padding: 0 64px;
}

.divider-svg {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 20px;
}

.vein-path {
    transition: stroke-dashoffset 1.2s ease-in-out;
}

.divider-ornament {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--marble-white);
    padding: 2px;
}

.ornament-badge {
    width: 100%;
    height: 100%;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    margin-bottom: 48px;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(36px, 5vw, 56px);
    color: var(--ink-black);
    line-height: 1.1;
    position: relative;
    display: inline-block;
}

.title-underline-wrapper {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 300px;
    height: 8px;
    overflow: visible;
}

.title-underline-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 300px;
    height: 8px;
    overflow: visible;
}

.title-underline-path {
    transition: stroke-dashoffset 800ms ease-in-out;
}

/* ============================================================
   MANIFESTO SECTION
   ============================================================ */
.manifesto-section {
    background-color: var(--marble-white);
    min-height: 80vh;
}

.manifesto-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.body-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink-black);
    max-width: 680px;
    margin-bottom: 24px;
}

.body-text em {
    font-style: italic;
    color: var(--electric-violet);
}

.pull-quote {
    font-family: 'Cormorant SC', 'Cormorant Garamond', serif;
    font-size: 20px;
    font-style: italic;
    color: var(--ink-black);
    border-left: 3px solid var(--electric-crimson);
    padding: 16px 24px;
    margin: 0 0 32px;
    background-color: rgba(217, 207, 196, 0.2);
    line-height: 1.6;
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section {
    background-color: var(--marble-mid);
    min-height: 80vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.gallery-card {
    background-color: var(--marble-white);
    border: 1px solid rgba(155, 142, 130, 0.4);
    border-radius: 2px;
    overflow: hidden;
    transition: box-shadow var(--transition-medium), transform var(--transition-medium);
    cursor: pointer;
}

.gallery-card:hover {
    box-shadow: 0 8px 32px rgba(13, 13, 13, 0.15), 0 0 0 1px var(--electric-violet);
    transform: translateY(-4px);
}

.card-marble-surface {
    background-color: var(--marble-mid);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    filter: url(#marble-texture);
}

.card-figure-svg {
    width: 100%;
    height: 100%;
    transition: filter var(--transition-fast);
}

.gallery-card:hover .card-figure-svg path,
.gallery-card:hover .card-figure-svg ellipse,
.gallery-card:hover .card-figure-svg line {
    stroke: var(--electric-crimson);
}

.gallery-card:hover .card-figure-svg {
    filter: drop-shadow(0 0 8px var(--violet-bright));
}

.card-content {
    padding: 20px 24px 24px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--ink-black);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.card-caption {
    font-family: 'Source Serif 4', serif;
    font-size: 14px;
    color: var(--marble-vein);
    line-height: 1.6;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
    background-color: var(--marble-white);
    min-height: 70vh;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 64px;
    align-items: start;
}

.contact-links {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-link {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 16px 0;
    text-decoration: none;
    color: var(--ink-black);
    border-bottom: 1px solid rgba(155, 142, 130, 0.25);
    transition: color var(--transition-fast), border-color var(--transition-fast);
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--electric-violet);
    transition: width 300ms ease;
}

.contact-link:hover::after {
    width: 100%;
}

.contact-link:hover {
    color: var(--electric-violet);
}

.contact-link-numeral {
    font-family: 'Cormorant SC', 'Cormorant Garamond', serif;
    font-size: 16px;
    color: var(--electric-crimson);
    min-width: 20px;
}

.contact-link-label {
    font-family: 'Source Serif 4', serif;
    font-size: 17px;
    transition: color var(--transition-fast);
}

.contact-columns-visual {
    width: 200px;
    flex-shrink: 0;
}

.contact-svg {
    width: 200px;
    height: 280px;
    filter: url(#marble-texture);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background-color: var(--ink-black);
    border-top: 3px solid var(--electric-violet);
    padding: 28px 64px;
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-brand {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 18px;
    color: var(--marble-white);
    letter-spacing: -0.01em;
}

.footer-divider {
    color: var(--electric-violet);
    font-size: 20px;
}

.footer-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 12px;
    letter-spacing: 0.16em;
    color: var(--marble-vein);
    text-transform: uppercase;
}

.footer-ornament {
    margin-left: auto;
}

/* ============================================================
   ACTIVE SECTION INDICATOR (scroll)
   ============================================================ */
.nav-item.active .nav-numeral {
    color: var(--electric-violet);
}

/* ============================================================
   SCROLLBAR STYLING (main content)
   ============================================================ */
.main-content::-webkit-scrollbar {
    width: 4px;
}

.main-content::-webkit-scrollbar-track {
    background: var(--marble-mid);
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--electric-violet);
}

/* ============================================================
   LAUREL BURST ANIMATION (CSS-based, Lottie substitute)
   ============================================================ */
.laurel-leaf {
    position: absolute;
    width: 8px;
    height: 14px;
    background-color: var(--electric-violet);
    border-radius: 50% 0 50% 0;
    transform-origin: 4px 14px;
    opacity: 0;
    animation: laurelBurst 600ms ease-out forwards;
}

@keyframes laurelBurst {
    0%   { opacity: 0; transform: rotate(var(--angle)) translateY(0) scale(0.3); }
    40%  { opacity: 1; transform: rotate(var(--angle)) translateY(-12px) scale(1); }
    100% { opacity: 0; transform: rotate(var(--angle)) translateY(-20px) scale(0.5); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .manifesto-columns {
        gap: 40px;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 240px;
    }
    .section {
        padding: 60px 40px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .manifesto-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .contact-columns-visual {
        display: none;
    }
    .figure-nike {
        display: none;
    }
}

@media (max-width: 640px) {
    :root {
        --sidebar-width: 0px;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 300ms ease;
    }
    .main-content {
        margin-left: 0;
    }
    .section {
        padding: 48px 24px;
    }
    .site-footer {
        padding: 24px;
    }
}
