/* ============================================================
   chikayami.com — Cold Pastel Luxury
   ============================================================ */

:root {
    --bg-primary: #F5F0F7;
    --bg-secondary: #EAE4F2;
    --bg-void: #FDFBFF;
    --bg-dark: #1C1C22;
    --accent-cold-pink: #F0E8F0;
    --accent-violet: #7B6FA0;
    --ghost-neutral: #C8C2D5;
    --text-dark: #1C1C22;
    --text-body: #5A556A;
    --text-label: #9B94A8;
    --text-light: #EDE8F5;
    --crystal-mid: #EDE8F5;
}

/* ============================================================
   Reset & Base
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    background-color: var(--bg-void);
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
}

/* ============================================================
   Coordinate Grid Overlay
   ============================================================ */

#coord-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.12;
}

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

#site-nav {
    position: fixed;
    top: 32px;
    right: 48px;
    z-index: 100;
    pointer-events: auto;
}

#site-nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

#site-nav ul li a {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-decoration: none;
    color: var(--text-dark);
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

#site-nav ul li a:hover {
    opacity: 1;
    color: var(--accent-violet);
}

/* ============================================================
   Parallax Layers
   ============================================================ */

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform;
}

/* ============================================================
   Section Base
   ============================================================ */

.section {
    position: relative;
    width: 100%;
    overflow: visible;
    z-index: 1;
}

.section-counter {
    position: absolute;
    top: 24px;
    right: 48px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--text-label);
    letter-spacing: 0.1em;
    z-index: 10;
}

.section-counter--light {
    color: var(--text-light);
    opacity: 0.5;
}

/* ============================================================
   Section 1: The Void Arrival
   ============================================================ */

.section--hero {
    height: 100vh;
    background-color: var(--bg-void);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Vertical domain name — left edge, rotated -90deg bottom to top */
.hero-domain-name {
    position: absolute;
    left: -8vw;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

.hero-domain-name span {
    font-family: 'DM Sans', sans-serif;
    font-weight: 200;
    font-size: 11vw;
    letter-spacing: 0.08em;
    color: var(--text-dark);
    display: block;
}

/* Hero crystal object — center-right, columns 4-9 intersection area */
.object-wrapper--hero {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

/* Ghost circle backgrounds */
.ghost-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--accent-violet);
    opacity: 0.08;
    pointer-events: none;
}

.ghost-circle--1 {
    width: 800px;
    height: 800px;
    top: -200px;
    left: 20%;
}

.ghost-circle--2 {
    width: 800px;
    height: 800px;
    top: -100px;
    right: -200px;
}

.ghost-circle--3 {
    width: 800px;
    height: 800px;
    top: 50%;
    left: -200px;
    transform: translateY(-50%);
}

/* ============================================================
   3D Object: Crystalline Forms
   ============================================================ */

.crystal-object {
    width: 280px;
    height: 340px;
    background: linear-gradient(135deg, var(--crystal-mid) 0%, var(--bg-primary) 50%, rgba(123, 111, 160, 0.2) 100%);
    transform: rotateX(25deg) rotateY(-15deg);
    transform-style: preserve-3d;
    box-shadow:
        4px 4px 0 rgba(123, 111, 160, 0.15),
        12px 12px 24px rgba(28, 28, 34, 0.08),
        -4px -4px 0 rgba(200, 194, 213, 0.3),
        24px 32px 60px rgba(28, 28, 34, 0.12),
        -12px -8px 0 rgba(237, 232, 245, 0.8),
        40px 60px 100px rgba(91, 85, 106, 0.08);
    clip-path: polygon(15% 0%, 85% 5%, 100% 15%, 95% 85%, 80% 100%, 10% 95%, 0% 80%, 5% 15%);
    will-change: transform;
    transform-origin: center center;
    animation: crystal-entrance 1.4s cubic-bezier(0.25, 0, 0, 1) both;
}

.crystal-object--small {
    width: 180px;
    height: 220px;
    animation: none;
}

.crystal-object--tiny {
    width: 140px;
    height: 170px;
    animation: none;
}

.crystal-object--angled {
    width: 160px;
    height: 200px;
    transform: rotateX(20deg) rotateY(10deg);
    animation: none;
}

@keyframes crystal-entrance {
    from {
        transform: rotateX(25deg) rotateY(-15deg) scale(0.92);
        opacity: 0.6;
    }
    to {
        transform: rotateX(25deg) rotateY(-15deg) scale(1.0);
        opacity: 1;
    }
}

/* ============================================================
   3D Object: Architectural Fragments
   ============================================================ */

.arch-fragment {
    background: var(--bg-secondary);
    box-shadow:
        inset 4px 4px 12px rgba(28, 28, 34, 0.06),
        inset -2px -2px 8px rgba(200, 194, 213, 0.4),
        8px 16px 40px rgba(28, 28, 34, 0.1);
}

.arch-fragment--l {
    width: 200px;
    height: 240px;
    clip-path: polygon(0% 0%, 60% 0%, 60% 40%, 100% 40%, 100% 100%, 0% 100%);
}

.arch-fragment--t {
    width: 240px;
    height: 200px;
    clip-path: polygon(20% 0%, 80% 0%, 80% 40%, 100% 40%, 100% 60%, 80% 60%, 80% 100%, 20% 100%, 20% 60%, 0% 60%, 0% 40%, 20% 40%);
}

.arch-fragment--rotated {
    transform: rotate(2deg);
}

.arch-fragment--mirrored {
    transform: scaleX(-1) rotate(-3deg);
}

/* ============================================================
   3D Object: Floating Spheres
   ============================================================ */

.sphere-object {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 30%, #F5F0F7, #C8C2D5 40%, #7B6FA0 80%, #1C1C22);
    box-shadow: 0 60px 120px rgba(28, 28, 34, 0.25);
}

.sphere-object--small {
    width: 160px;
    height: 160px;
}

.sphere-object--hero {
    width: 400px;
    height: 400px;
    box-shadow: 0 80px 160px rgba(28, 28, 34, 0.4);
}

/* ============================================================
   Section 2: Object Field
   ============================================================ */

.section--object-field {
    min-height: 100vh;
    background-color: var(--bg-primary);
    padding: 180px 0;
    position: relative;
}

.object-field-grid {
    display: grid;
    grid-template-columns: 4fr 8fr;
    max-width: 100%;
    width: 100%;
}

.field-void {
    /* intentional void — left 4 columns */
}

.field-objects {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 60px 48px;
    gap: 40px;
}

.field-object {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.25, 0, 0, 1), opacity 0.6s ease;
}

/* Scroll reveal for field objects */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Angular cut-line divider */
.angular-divider {
    width: 100%;
    height: 1px;
    background-color: var(--ghost-neutral);
    transform: rotate(1.5deg) scaleX(1.3);
    margin: 0 auto;
    opacity: 0.4;
}

/* ============================================================
   Section 3: Right-Side Manifesto
   ============================================================ */

.section--manifesto {
    min-height: 100vh;
    background-color: var(--bg-secondary);
    padding: 180px 0;
    position: relative;
}

.manifesto-container {
    display: grid;
    grid-template-columns: 7fr 5fr;
    height: 100%;
    padding: 0 48px;
}

.manifesto-void {
    /* intentional void — left 7 columns */
}

.manifesto-text {
    padding: 60px 0;
    max-width: 400px;
}

.manifesto-line {
    font-family: 'DM Sans', sans-serif;
    font-weight: 200;
    font-size: 2.8vw;
    letter-spacing: 0.08em;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.2em;
}

.manifesto-body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--text-body);
    line-height: 1.8;
    max-width: 320px;
    margin-top: 40px;
}

/* ============================================================
   Section 4: Archive Grid
   ============================================================ */

.section--archive {
    min-height: 100vh;
    background-color: var(--bg-primary);
    padding: 180px 48px;
    position: relative;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.archive-cell {
    background-color: var(--bg-void);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 300px;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0, 0, 1), box-shadow 0.4s ease;
    border: 1px solid transparent;
}

.archive-cell:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(28, 28, 34, 0.1);
    border-color: var(--ghost-neutral);
    background-color: var(--accent-cold-pink);
}

.archive-cell--wide {
    grid-column: span 2;
}

/* Cell 4 bleeds 40px outside grid to the right */
.archive-cell--bleed {
    margin-right: -40px;
}

.cell-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--text-label);
    letter-spacing: 0.1em;
    position: absolute;
    bottom: 16px;
    right: 16px;
}

/* ============================================================
   Section 5: Dark Inversion
   ============================================================ */

.section--dark {
    min-height: 100vh;
    background-color: var(--bg-dark);
    padding: 180px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dark-sphere-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 80px;
}

.dark-nav {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.dark-nav span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--text-light);
    opacity: 0.3;
    text-transform: uppercase;
}

.cta-ghost {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.15em;
    color: var(--accent-violet);
    text-decoration: none;
    text-transform: lowercase;
    border: 1px solid var(--accent-violet);
    padding: 14px 36px;
    opacity: 0.7;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.cta-ghost:hover {
    opacity: 1;
    background-color: rgba(123, 111, 160, 0.08);
}

/* ============================================================
   Reduced Motion Fallback
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .crystal-object {
        animation: none;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    .parallax-layer {
        transform: none !important;
    }
}
