/* ============================================================
   shinonome.date — Chrome Metallic Crystal Design System
   ============================================================ */

/* ---- FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400&family=DM+Sans:wght@300;400&display=swap');

/* ---- CSS CUSTOM PROPERTIES ---- */
:root {
    --void-black:    #0D0F12;
    --chrome-dark:   #1C2028;
    --chrome-mid:    #3A4150;
    --silver-mid:    #9AA3B0;
    --platinum:      #C8CDD6;
    --chrome-white:  #E8ECF2;
    --refraction:    #A8C4E0;
    --crystal-spark: #D4EEF8;
    --d4d8df:        #D4D8DF;

    --font-primary:  'Jost', sans-serif;
    --font-body:     'DM Sans', sans-serif;

    --crystal-stroke: rgba(200, 205, 214, 0.15);
    --crystal-stroke-bright: rgba(200, 205, 214, 0.3);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--void-black);
    color: var(--chrome-white);
    font-family: var(--font-body);
    font-weight: 300;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ---- SCROLL CONTAINER ---- */
#scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
#scroll-container::-webkit-scrollbar {
    display: none;
}
#scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ---- FACET BASE ---- */
.facet {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.facet-snap {
    scroll-snap-align: start;
}

.facet-noscroll {
    scroll-snap-align: none;
}

/* ---- CRYSTAL EDGE LINES (cleavage planes) ---- */
.crystal-edge-line,
.cleavage-edge,
.still-edge-line {
    position: absolute;
    width: 200%;
    height: 1px;
    background: var(--crystal-stroke-bright);
    bottom: 0;
    left: -50%;
    transform: rotate(-15deg);
    transform-origin: center;
    pointer-events: none;
    z-index: 10;
}

.cleavage-edge {
    bottom: -1px;
    transform: rotate(15deg);
}

.still-edge-line {
    top: 0;
    bottom: auto;
    transform: rotate(-15deg);
}

/* ---- FACET LABELS ---- */
.facet-label {
    position: absolute;
    bottom: 32px;
    left: 40px;
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--platinum);
    z-index: 20;
}

.facet-label-inline {
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--platinum);
    margin-bottom: 24px;
    display: block;
}

/* ---- LOTTIE LAYERS ---- */
.lottie-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* ============================================================
   FACET I: HORIZON
   ============================================================ */

#facet-horizon {
    background-color: var(--void-black);
    background-image:
        linear-gradient(135deg, var(--void-black) 0%, var(--chrome-dark) 60%, var(--void-black) 100%);
}

.facet-horizon-grid {
    display: grid;
    grid-template-columns: 35fr 65fr;
    gap: 0;
    height: 100%;
    width: 100%;
}

/* Left panel: kanji architecture */
.horizon-left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 80px 48px;
    z-index: 5;
    border-right: 1px solid var(--crystal-stroke);
}

.kanji-architecture {
    font-family: var(--font-primary);
    font-size: clamp(180px, 25vw, 320px);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--chrome-white);
    line-height: 0.85;
    user-select: none;
    /* Kanji acts as structural architecture — aligned to crystal facet boundary */
    position: relative;
    left: -0.04em;
    /* Subtle chrome shimmer effect */
    background: linear-gradient(135deg, var(--chrome-white) 0%, var(--platinum) 40%, var(--chrome-white) 70%, var(--d4d8df) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: kanji-shimmer 8s ease-in-out infinite;
}

@keyframes kanji-shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.horizon-label {
    font-family: var(--font-primary);
    font-size: clamp(14px, 1.8vw, 22px);
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--silver-mid);
    text-transform: lowercase;
    margin-top: 16px;
}

.horizon-sublabel {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--chrome-mid);
    margin-top: 8px;
}

/* Right panel: crystal SVG + Lottie */
.horizon-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    overflow: hidden;
}

.crystal-svg {
    width: 80%;
    max-width: 540px;
    height: auto;
    z-index: 3;
    position: relative;
    animation: crystal-slow-rotate 200s linear infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 20px rgba(168, 196, 224, 0.08));
}

@keyframes crystal-slow-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.crystal-coord {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 300;
    fill: var(--chrome-mid);
}

.coord-label {
    position: absolute;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--chrome-mid);
    z-index: 5;
}

.coord-top  { top: 32px; left: 50%; transform: translateX(-50%); }
.coord-right { right: 32px; bottom: 50%; }

/* ============================================================
   FACET II: REFRACTION
   ============================================================ */

#facet-refraction {
    background-color: var(--void-black);
    display: flex;
    align-items: stretch;
}

/* Left panel: dark matte with text */
.refraction-left {
    position: relative;
    width: 55%;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
    background-color: var(--void-black);
    z-index: 4;
    display: flex;
    align-items: center;
}

.refraction-content {
    padding: 60px 80px 60px 56px;
    max-width: 520px;
}

.refraction-title {
    font-family: var(--font-primary);
    font-size: clamp(48px, 6vw, 96px);
    font-weight: 300;
    letter-spacing: 0.06em;
    color: var(--chrome-white);
    line-height: 1.05;
    margin-bottom: 32px;
}

.refraction-body {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.75;
    color: var(--silver-mid);
    margin-bottom: 20px;
}

.refraction-spec-block {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    border-top: 1px solid var(--crystal-stroke);
    padding-top: 24px;
}

.spec-label {
    font-family: var(--font-primary);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--chrome-mid);
    align-self: end;
}

.spec-value {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    color: var(--platinum);
    letter-spacing: 0.05em;
}

/* Right panel: chrome surface */
.refraction-right {
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
    overflow: hidden;
    z-index: 3;
}

.refraction-chrome-surface {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        var(--chrome-dark) 0%,
        var(--chrome-mid) 25%,
        var(--platinum) 50%,
        var(--chrome-mid) 75%,
        var(--void-black) 100%
    );
    background-size: 300% 300%;
    animation: chrome-flow 12s ease-in-out infinite;
}

@keyframes chrome-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.refraction-specular {
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 210deg at 60% 40%,
        transparent 40%,
        rgba(168, 196, 224, 0.06) 50%,
        transparent 60%
    );
    mix-blend-mode: screen;
    animation: conic-spin 20s linear infinite;
}

@keyframes conic-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.refraction-conic-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(212, 238, 248, 0.04) 0%,
        transparent 50%,
        rgba(168, 196, 224, 0.03) 100%
    );
}

/* Spark particles */
.spark {
    position: absolute;
    border-radius: 50%;
    background: var(--crystal-spark);
    pointer-events: none;
}

.spark-1 { width: 3px; height: 3px; top: 30%; left: 25%; opacity: 0.9; animation: spark-pulse 4s ease-in-out infinite; }
.spark-2 { width: 2px; height: 2px; top: 55%; left: 60%; opacity: 0.7; animation: spark-pulse 5.5s ease-in-out infinite 1s; }
.spark-3 { width: 4px; height: 4px; top: 20%; left: 70%; opacity: 0.8; animation: spark-pulse 3.8s ease-in-out infinite 0.5s; }
.spark-4 { width: 2px; height: 2px; top: 70%; left: 35%; opacity: 0.6; animation: spark-pulse 6s ease-in-out infinite 2s; }
.spark-5 { width: 3px; height: 3px; top: 42%; left: 80%; opacity: 0.85; animation: spark-pulse 4.5s ease-in-out infinite 0.8s; }

@keyframes spark-pulse {
    0%, 100% { transform: scale(1); opacity: 0; }
    50%       { transform: scale(1.5); opacity: 1; }
}

/* ============================================================
   FACET III: LATTICE
   ============================================================ */

#facet-lattice {
    background-color: var(--void-black);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.lattice-header {
    padding: 40px 56px 0;
    display: flex;
    align-items: baseline;
    gap: 32px;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.lattice-hint {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 300;
    color: var(--chrome-mid);
    letter-spacing: 0.05em;
}

.lattice-scroll-track {
    position: relative;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--chrome-mid) var(--void-black);
    padding: 0 56px 40px;
    /* Wide enough for 8 cards */
    width: 100%;
}

.lattice-scroll-track::-webkit-scrollbar {
    height: 2px;
}
.lattice-scroll-track::-webkit-scrollbar-track {
    background: var(--void-black);
}
.lattice-scroll-track::-webkit-scrollbar-thumb {
    background: var(--chrome-mid);
}

/* Crystal cards — rhombus shape */
.crystal-card {
    display: inline-block;
    position: relative;
    white-space: normal;
    width: 240px;
    height: 220px;
    margin-right: 40px;
    vertical-align: top;
    transform: skewX(-20deg);
    background: linear-gradient(135deg,
        var(--chrome-dark) 0%,
        var(--chrome-mid) 50%,
        var(--chrome-dark) 100%
    );
    border: 1px solid var(--crystal-stroke);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.crystal-card:hover {
    border-color: rgba(200, 205, 214, 0.35);
    box-shadow: 0 0 24px rgba(168, 196, 224, 0.08);
}

.card-inner {
    transform: skewX(20deg);
    padding: 32px 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-label {
    font-family: var(--font-primary);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--chrome-mid);
    margin-bottom: 10px;
}

.card-title {
    font-family: var(--font-primary);
    font-size: clamp(24px, 2.5vw, 36px);
    font-weight: 300;
    letter-spacing: 0.06em;
    color: var(--chrome-white);
    margin-bottom: 12px;
}

.card-body {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--silver-mid);
}

/* Card y-position variations */
.crystal-card-1 { margin-top: calc(20% - 110px); }
.crystal-card-2 { margin-top: calc(45% - 110px); }
.crystal-card-3 { margin-top: calc(15% - 110px); }
.crystal-card-4 { margin-top: calc(60% - 110px); }
.crystal-card-5 { margin-top: calc(30% - 110px); }
.crystal-card-6 { margin-top: calc(50% - 110px); }
.crystal-card-7 { margin-top: calc(25% - 110px); }
.crystal-card-8 { margin-top: calc(55% - 110px); margin-right: 56px; }

/* ============================================================
   FACET IV: DEPTH
   ============================================================ */

#facet-depth {
    background-color: var(--void-black);
}

.depth-grid {
    display: grid;
    grid-template-columns: 30fr 70fr;
    gap: 0;
    height: 100%;
    width: 100%;
}

/* Left narrow column: rotated text */
.depth-left {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--crystal-stroke);
    overflow: hidden;
    background: linear-gradient(
        to right,
        var(--void-black),
        rgba(28, 32, 40, 0.6)
    );
}

.depth-vertical-text {
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--silver-mid);
    transform: rotate(-90deg);
    white-space: nowrap;
    text-transform: lowercase;
}

.depth-axis-labels {
    position: absolute;
    bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.axis-label {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 300;
    color: var(--chrome-mid);
    letter-spacing: 0.2em;
}

/* Right large column: concentric diamonds */
.depth-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.depth-label {
    position: absolute;
    bottom: 32px;
    right: 40px;
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--platinum);
}

/* Diamond container */
.diamond-container {
    position: relative;
    width: 200px;
    height: 200px;
}

/* Generate 12 concentric diamonds */
.diamond-layer {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    animation: diamond-breathe 6s ease-in-out infinite;
}

/* N values from 1–12: rotate N*7.5deg, scale N*0.15 */
.diamond-1  { transform: translate(-50%,-50%) rotate(calc(1  * 7.5deg)) scale(calc(1  * 0.15)); background: var(--chrome-dark);  box-shadow: 0 0 1px rgba(200,205,214,0.1);  opacity: 1.00; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-2  { transform: translate(-50%,-50%) rotate(calc(2  * 7.5deg)) scale(calc(2  * 0.15)); background: var(--chrome-dark);  box-shadow: 0 0 2px rgba(200,205,214,0.1);  opacity: 0.93; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-3  { transform: translate(-50%,-50%) rotate(calc(3  * 7.5deg)) scale(calc(3  * 0.15)); background: var(--chrome-mid);   box-shadow: 0 0 3px rgba(200,205,214,0.1);  opacity: 0.86; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-4  { transform: translate(-50%,-50%) rotate(calc(4  * 7.5deg)) scale(calc(4  * 0.15)); background: var(--chrome-mid);   box-shadow: 0 0 4px rgba(200,205,214,0.09); opacity: 0.79; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-5  { transform: translate(-50%,-50%) rotate(calc(5  * 7.5deg)) scale(calc(5  * 0.15)); background: var(--chrome-mid);   box-shadow: 0 0 5px rgba(200,205,214,0.08); opacity: 0.72; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-6  { transform: translate(-50%,-50%) rotate(calc(6  * 7.5deg)) scale(calc(6  * 0.15)); background: var(--chrome-mid);   box-shadow: 0 0 6px rgba(200,205,214,0.07); opacity: 0.65; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-7  { transform: translate(-50%,-50%) rotate(calc(7  * 7.5deg)) scale(calc(7  * 0.15)); background: var(--chrome-mid);   box-shadow: 0 0 7px rgba(200,205,214,0.06); opacity: 0.58; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-8  { transform: translate(-50%,-50%) rotate(calc(8  * 7.5deg)) scale(calc(8  * 0.15)); background: var(--silver-mid);   box-shadow: 0 0 8px rgba(200,205,214,0.05); opacity: 0.51; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-9  { transform: translate(-50%,-50%) rotate(calc(9  * 7.5deg)) scale(calc(9  * 0.15)); background: var(--silver-mid);   box-shadow: 0 0 9px rgba(200,205,214,0.05); opacity: 0.44; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-10 { transform: translate(-50%,-50%) rotate(calc(10 * 7.5deg)) scale(calc(10 * 0.15)); background: var(--platinum);     box-shadow: 0 0 10px rgba(200,205,214,0.04); opacity: 0.37; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-11 { transform: translate(-50%,-50%) rotate(calc(11 * 7.5deg)) scale(calc(11 * 0.15)); background: var(--platinum);     box-shadow: 0 0 11px rgba(200,205,214,0.03); opacity: 0.20; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.diamond-12 { transform: translate(-50%,-50%) rotate(calc(12 * 7.5deg)) scale(calc(12 * 0.15)); background: transparent;         box-shadow: 0 0 12px rgba(200,205,214,0.02); opacity: 0.05; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); border: 1px solid rgba(200,205,214,0.08); }

@keyframes diamond-breathe {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.08);
        /* scale(1.02) incorporated via JS to preserve individual scales */
    }
}

/* ============================================================
   FACET V: STILL
   ============================================================ */

#facet-still {
    background: linear-gradient(180deg,
        var(--void-black) 0%,
        var(--chrome-dark) 40%,
        #2E3340 60%,
        var(--chrome-white) 120%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.still-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
    z-index: 5;
    position: relative;
}

.still-crystal-svg {
    width: clamp(200px, 30vw, 380px);
    height: auto;
    animation: still-breathe 8s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(168, 196, 224, 0.12));
}

@keyframes still-breathe {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50%       { transform: scale(1.018); opacity: 1; }
}

.still-text-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.still-label {
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--platinum);
}

.still-title {
    font-family: var(--font-primary);
    font-size: clamp(64px, 10vw, 120px);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--chrome-white);
    opacity: 0.85;
    line-height: 1;
    animation: still-fade 8s ease-in-out infinite;
}

@keyframes still-fade {
    0%, 100% { opacity: 0.7; }
    50%       { opacity: 1; }
}

.still-body {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.75;
    color: var(--silver-mid);
    max-width: 380px;
    text-align: center;
}

.still-coord-pair {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 300;
    color: var(--chrome-mid);
    letter-spacing: 0.1em;
}

.coord-sep {
    color: var(--crystal-stroke-bright);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 900px) {
    .facet-horizon-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .horizon-left {
        border-right: none;
        border-bottom: 1px solid var(--crystal-stroke);
        padding: 0 0 32px 32px;
        justify-content: flex-end;
    }

    .kanji-architecture {
        font-size: clamp(120px, 25vw, 220px);
    }

    .refraction-left {
        width: 60%;
    }

    .refraction-right {
        width: 45%;
    }

    .depth-grid {
        grid-template-columns: 1fr;
    }

    .depth-left {
        display: none;
    }
}
