/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    /* Editorial Palette */
    --bg-color: #ffffff;
    --text-main: #000000;
    --text-muted: #666666;
    --accent: #1a1a1a;
    --panel-border: rgba(0, 0, 0, 0.08);
    --glass: rgba(255, 255, 255, 0.8);

    /* Animation Timing */
    --ease-fluid: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    /* Kinetic interface fits viewport */
    height: 100vh;
    width: 100vw;
}

/* --- Layout: The Kinetic Container --- */
.kinetic-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* --- Individual Panel --- */
.panel {
    position: relative;
    flex: 1;
    /* All equal interactions */
    border-right: 1px solid var(--panel-border);
    transition: flex 0.8s var(--ease-fluid), background-color 0.5s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
}

.panel:last-child {
    border-right: none;
}

/* Hover State / Active State */
.panel:hover,
.panel.active {
    flex: 3;
    /* Expands to take space */
    background: #ffffff;
}

.panel:hover .panel-bg-text,
.panel.active .panel-bg-text {
    opacity: 0.05;
    transform: scale(1.2);
}

.panel:hover .panel-content,
.panel.active .panel-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    transition-delay: 0.2s;
}

.panel:hover .panel-label,
.panel.active .panel-label {
    opacity: 0;
    transform: rotate(-90deg) translateY(-50px);
}

/* --- Typography Elements --- */

/* 1. Large Vertical Label (Visible initially) */
.panel-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: 0.5s var(--ease-snap);
    pointer-events: none;
}

/* 2. Massive Background Letters (Decorative) */
.panel-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    font-family: 'Inter', sans-serif;
    font-size: 20rem;
    font-weight: 800;
    color: #000;
    opacity: 0.03;
    transition: 0.8s var(--ease-fluid);
    pointer-events: none;
    line-height: 0;
}

/* --- Content Reveal (Hidden initially) --- */
.panel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(50px);
    transition: 0.6s var(--ease-snap);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    pointer-events: none;
    /* Prevent clicks when hidden */
}

/* Specific Panel Styling */
.content-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.content-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-style: italic;
    margin-bottom: 10px;
}

.content-data {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.action-btn {
    padding: 15px 40px;
    border: 1px solid #000;
    background: transparent;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.action-btn:hover {
    background: #000;
    color: #fff;
}

/* --- Internal Form (Panel 2) --- */
.mini-form {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mini-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    background: transparent;
    padding: 10px 0;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    resize: none;
}

.mini-input:focus {
    border-bottom: 1px solid #000;
}

.mini-btn {
    margin-top: 10px;
    background: #000;
    color: #fff;
    border: none;
    padding: 15px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mini-btn:hover {
    opacity: 0.8;
}

/* --- Navigation (Floating) --- */
.back-nav {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 100;
}

.nav-link {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #000;
    transition: 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Mobile Logic --- */
@media (max-width: 768px) {
    .kinetic-container {
        flex-direction: column;
    }

    .panel {
        border-right: none;
        border-bottom: 1px solid var(--panel-border);
    }

    .panel-label {
        writing-mode: horizontal-tb;
        transform: rotate(0);
        font-size: 1.5rem;
    }

    .panel:hover,
    .panel.active {
        flex: 5;
        /* More expansion on mobile */
    }

    .panel:hover .panel-label,
    .panel.active .panel-label {
        transform: translateY(-20px);
        opacity: 0;
    }

    .content-title {
        font-size: 2rem;
    }
}

/* --- Fixed Footer --- */
.fixed-footer {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 100;
    display: flex;
    gap: 20px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    pointer-events: none;
}

.fixed-footer span {
    opacity: 0.5;
}

.footer-links {
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-main);
    transition: 0.3s;
}

.footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .fixed-footer {
        width: 100%;
        justify-content: center;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);
        padding: 10px 0;
        backdrop-filter: blur(5px);
    }
}