:root {
    --canvas: #faf8f5;
    --ink: #0d0d0d;
    --red: #e63946;
    --blue: #2a6f97;
    --yellow: #ffb703;
    --navy: #14213d;
    --coral: #fb8500;
    --cream: #fefae0;
    --shadow-soft: rgba(13, 13, 13, 0.08);
    --shadow-medium: rgba(13, 13, 13, 0.15);
    --shadow-hard: rgba(13, 13, 13, 0.25);
}

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

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

body {
    width: 100%;
    min-height: 100vh;
    background: var(--canvas);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
    cursor: none;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--ink);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease-out;
}

.cursor-ring.hovering {
    width: 60px;
    height: 60px;
    border-width: 1px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 13, 13, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 13, 13, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.construction-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 1.5s ease 1s forwards;
}

.construction-line {
    position: absolute;
    background: var(--ink);
    opacity: 0.04;
}

.construction-line.horizontal {
    width: 100%;
    height: 1px;
}

.construction-line.vertical {
    width: 1px;
    height: 100%;
}

/* ============================================
   SHAPE LAYERS
   ============================================ */
.shape-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape-layer--back {
    z-index: 1;
}

.shape-layer--mid {
    z-index: 2;
}

.shape-layer--front {
    z-index: 3;
}

/* ============================================
   GEOMETRIC SHAPES - ENHANCED
   ============================================ */
.shape {
    position: absolute;
    transform-origin: center center;
    opacity: 0;
    pointer-events: auto;
    transition: filter 0.3s ease;
}

.shape:hover {
    filter: brightness(1.1);
}

.shape.visible {
    opacity: 1;
}

/* Shape shadows with depth */
.shadow-soft {
    filter: drop-shadow(4px 4px 0 var(--shadow-soft));
}

.shadow-medium {
    filter: drop-shadow(8px 8px 0 var(--shadow-medium));
}

.shadow-hard {
    filter: drop-shadow(12px 12px 0 var(--shadow-hard));
}

/* Circles */
.circle {
    border-radius: 50%;
}

.circle--xl { width: 300px; height: 300px; }
.circle--lg { width: 200px; height: 200px; }
.circle--md { width: 120px; height: 120px; }
.circle--sm { width: 60px; height: 60px; }
.circle--xs { width: 30px; height: 30px; }

/* Squares */
.square {
    aspect-ratio: 1;
}

.square--xl { width: 250px; }
.square--lg { width: 150px; }
.square--md { width: 100px; }
.square--sm { width: 60px; }
.square--xs { width: 30px; }

/* Rectangles */
.rect--h-lg { width: 300px; height: 50px; }
.rect--h-md { width: 200px; height: 35px; }
.rect--h-sm { width: 120px; height: 20px; }
.rect--v-lg { width: 50px; height: 300px; }
.rect--v-md { width: 35px; height: 200px; }
.rect--v-sm { width: 20px; height: 120px; }

/* Triangles */
.triangle {
    width: 0;
    height: 0;
    background: transparent !important;
}

.triangle--lg {
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 139px solid currentColor;
}

.triangle--md {
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 87px solid currentColor;
}

.triangle--sm {
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 43px solid currentColor;
}

/* Half circles */
.half-circle {
    border-radius: 0 0 999px 999px;
}

.half-circle--top {
    border-radius: 999px 999px 0 0;
}

/* Rings */
.ring {
    border-radius: 50%;
    background: transparent !important;
    border: 4px solid currentColor;
}

.ring--thick {
    border-width: 8px;
}

/* Colors */
.fill-red { background: var(--red); color: var(--red); }
.fill-blue { background: var(--blue); color: var(--blue); }
.fill-yellow { background: var(--yellow); color: var(--yellow); }
.fill-navy { background: var(--navy); color: var(--navy); }
.fill-coral { background: var(--coral); color: var(--coral); }
.fill-ink { background: var(--ink); color: var(--ink); }
.fill-canvas { background: var(--canvas); color: var(--canvas); }

.stroke-red { border-color: var(--red); }
.stroke-blue { border-color: var(--blue); }
.stroke-ink { border-color: var(--ink); }

/* ============================================
   CHOREOGRAPHED ANIMATIONS
   ============================================ */

/* Entry animations with stagger */
@keyframes enterFromTop {
    from { transform: translateY(-100vh) rotate(-20deg); opacity: 0; }
    to { transform: translateY(0) rotate(0deg); opacity: 1; }
}

@keyframes enterFromBottom {
    from { transform: translateY(100vh) rotate(20deg); opacity: 0; }
    to { transform: translateY(0) rotate(0deg); opacity: 1; }
}

@keyframes enterFromLeft {
    from { transform: translateX(-100vw) scale(0.5); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes enterFromRight {
    from { transform: translateX(100vw) scale(0.5); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes enterScale {
    from { transform: scale(0) rotate(180deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Continuous dance animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(var(--orbit-radius, 100px)) rotate(0deg); }
    to { transform: rotate(360deg) translateX(var(--orbit-radius, 100px)) rotate(-360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -20px) rotate(90deg); }
    50% { transform: translate(0, -40px) rotate(180deg); }
    75% { transform: translate(-30px, -20px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes sway {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

/* ============================================
   MAIN TITLE
   ============================================ */
.title-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    text-align: center;
    pointer-events: none;
}

.title {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 0.85;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-row {
    display: flex;
    overflow: hidden;
}

.title-letter {
    display: inline-block;
    transform: translateY(120%);
    animation: letterReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letterReveal {
    to { transform: translateY(0); }
}

.title-letter:nth-child(1) { animation-delay: 0.1s; }
.title-letter:nth-child(2) { animation-delay: 0.15s; }
.title-letter:nth-child(3) { animation-delay: 0.2s; }
.title-letter:nth-child(4) { animation-delay: 0.25s; }
.title-letter:nth-child(5) { animation-delay: 0.3s; }
.title-letter:nth-child(6) { animation-delay: 0.35s; }

.subtitle {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: 0;
    transform: translateY(20px);
    animation: subtitleReveal 0.6s ease 0.8s forwards;
    margin-top: 2rem;
}

@keyframes subtitleReveal {
    to { opacity: 0.5; transform: translateY(0); }
}

/* ============================================
   CORNER ELEMENTS
   ============================================ */
.corner {
    position: absolute;
    width: 80px;
    height: 80px;
    z-index: 50;
}

.corner--tl { top: 40px; left: 40px; }
.corner--tr { top: 40px; right: 40px; }
.corner--bl { bottom: 40px; left: 40px; }
.corner--br { bottom: 40px; right: 40px; }

.corner-line {
    position: absolute;
    background: var(--ink);
    opacity: 0;
    animation: cornerReveal 0.5s ease forwards;
}

.corner--tl .corner-line:first-child,
.corner--bl .corner-line:first-child {
    width: 40px;
    height: 2px;
    left: 0;
}

.corner--tr .corner-line:first-child,
.corner--br .corner-line:first-child {
    width: 40px;
    height: 2px;
    right: 0;
}

.corner--tl .corner-line:last-child,
.corner--tr .corner-line:last-child {
    width: 2px;
    height: 40px;
    top: 0;
}

.corner--bl .corner-line:last-child,
.corner--br .corner-line:last-child {
    width: 2px;
    height: 40px;
    bottom: 0;
}

.corner--tl .corner-line:first-child { top: 0; }
.corner--tl .corner-line:last-child { left: 0; }
.corner--tr .corner-line:first-child { top: 0; }
.corner--tr .corner-line:last-child { right: 0; }
.corner--bl .corner-line:first-child { bottom: 0; }
.corner--bl .corner-line:last-child { left: 0; }
.corner--br .corner-line:first-child { bottom: 0; }
.corner--br .corner-line:last-child { right: 0; }

@keyframes cornerReveal {
    to { opacity: 0.2; }
}

.corner--tl .corner-line { animation-delay: 1.2s; }
.corner--tr .corner-line { animation-delay: 1.3s; }
.corner--bl .corner-line { animation-delay: 1.4s; }
.corner--br .corner-line { animation-delay: 1.5s; }

/* ============================================
   DOT PATTERNS
   ============================================ */
.dot-pattern {
    position: absolute;
    display: grid;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.dot-pattern .dot {
    width: 6px;
    height: 6px;
    background: var(--ink);
    border-radius: 50%;
    opacity: 0.15;
    transition: opacity 0.3s, transform 0.3s;
}

.dot-pattern:hover .dot {
    opacity: 0.4;
}

.dot-pattern .dot:hover {
    transform: scale(2);
    opacity: 1;
}

/* ============================================
   PHILOSOPHY SECTION
   ============================================ */
.philosophy {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10vh 10vw;
    background: var(--ink);
    color: var(--canvas);
    overflow: hidden;
}

.philosophy-content {
    max-width: 800px;
    z-index: 2;
}

.philosophy-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.philosophy-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.philosophy-text {
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.8;
    opacity: 0.7;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.philosophy-text.visible {
    opacity: 0.7;
    transform: translateY(0);
}

.philosophy-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.1;
}

/* ============================================
   VISUAL SECTION
   ============================================ */
.visual-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10vh 5vw;
    overflow: hidden;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
}

.visual-cell {
    aspect-ratio: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-cell.visible {
    opacity: 1;
    transform: scale(1);
}

.visual-cell:hover .cell-shape {
    animation-play-state: paused;
}

.cell-shape {
    transition: transform 0.3s ease;
}

.visual-cell:hover .cell-shape {
    transform: scale(1.1);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    padding: 8vh 10vw;
    background: var(--canvas);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(13, 13, 13, 0.1);
}

.footer-tagline {
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.4;
}

.footer-credit {
    font-size: 0.8rem;
    opacity: 0.3;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 0.5s ease 2s forwards;
    z-index: 50;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.4;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--ink), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 0.3; }
    50% { transform: scaleY(0.5); opacity: 0.6; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .visual-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .corner {
        width: 40px;
        height: 40px;
    }

    .corner--tl, .corner--tr, .corner--bl, .corner--br {
        top: 20px;
        left: 20px;
    }

    .corner--tr, .corner--br { left: auto; right: 20px; }
    .corner--bl, .corner--br { top: auto; bottom: 20px; }
}
