/*
 Theme Name:   Blask Child
 Description:  Child Theme
 Author:       Young Joo Lee
 Template:     blask
 Version:      2.0.0
*/

/* =========================================
   1. GLOBAL RESET & BASE
   ========================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: color 0.3s, border-color 0.3s; 
}

img { 
    display: block; 
    max-width: 100%; 
    height: auto; 
}

/* WP Admin Bar Fixes */
body.admin-bar .horizontal-wrapper { height: calc(100vh - 32px); }
body.admin-bar .main-menu { top: 62px; }

@media screen and (max-width: 782px) { 
    body.admin-bar .horizontal-wrapper { height: calc(100vh - 46px); } 
}

/* =========================================
   2. SHARED COMPONENTS (Header, Logo, Menu)
   ========================================= */

/* Logo */
.site-logo {
    z-index: 60;
    width: 130px;
    display: block;
    margin-bottom: 0;
    margin-top: 10px;
}

.site-logo img {
    width: 100%; 
    height: auto;
}

/* Header General Layout */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-width: 100%;
    height: 80px;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 100px;
    box-sizing: border-box;
}

/* Remove theme default pseudo-elements */
.site-header::before,
.site-header::after {
    content: none;
    display: none;
}

/* Menu Items */
.main-menu {
    display: flex;
}

.main-menu .nav-section a { 
    text-decoration: none; 
    color: #000; 
    text-transform: uppercase; 
    font-size: 13px; 
    letter-spacing: 1px;
    font-weight: 500;
}

.nav-section {
    display: flex;
    flex-direction: row;
    gap: 20px;
    text-align: center;
}

/* Home Specific Header (Dark/Transparent) */
body.home .site-header {
    background-color: transparent;
}

/* Desktop Only Menu Colors for Home */
@media (min-width: 769px) {
    body.home .main-menu .nav-section a {
        color: white;
    }
    body.home .main-menu .nav-section a:hover {
        color: white;
    }
    
    .menu-toggle, 
    .media-mobile-only {
        display: none;
    }
}

/* =========================================
   3. HOME PAGE STYLES (Timeline)
   ========================================= */

body.home {
    background-color: #050505;
    overflow-x: hidden;
    overscroll-behavior: none;
    color: #e0e0e0;
}

.horizontal-wrapper {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.scroll-container {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center; 
    padding-left: 200px; 
    padding-right: 50vw;
    position: relative;
    padding-top: 100px;
    padding-bottom: 80px;
    box-sizing: border-box;
}

.scroll-container::before { 
    display: none; 
    content: none; 
}

/* GSAP Curve Line */
svg.curve-line {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; overflow: visible;
}
path#pathLine { fill: none; stroke: rgba(255, 255, 255, 0.15); stroke-width: 1.5; }

/* Dynamic Background Layers */
.bg-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
    transition: opacity 1.2s ease-in-out;
    opacity: 0;
    background-size: cover; background-position: center;
    filter: brightness(0.25) contrast(1.1);
}
.bg-layer.active { opacity: 1; }

/* Desktop Media Sidebar */
.media-sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    width: 60px;
    background-color: #000;
    z-index: 70;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    display: flex; align-items: center;
    box-shadow: 5px 0 20px rgba(0,0,0,0.5);
}

.media-sidebar:hover {
    width: 300px;
}

.media-label-col {
    width: 60px; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.15);
    background: #000;
    position: relative; z-index: 2;
    cursor: pointer;
    user-select: none;
}

.media-text {
    writing-mode: vertical-rl; transform: rotate(180deg);
    color: #fff; font-size: 11px; letter-spacing: 4px;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 15px;
    white-space: nowrap;
}

.media-arrow { font-size: 10px; animation: pulseArrow 2s infinite; }

@keyframes pulseArrow {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-5px); opacity: 1; }
}

.media-nav-content {
    flex-grow: 1;
    display: flex; flex-direction: column; justify-content: center;
    padding-left: 50px;
    opacity: 0; transform: translateX(-30px);
    transition: all 0.4s ease 0.1s;
    white-space: nowrap;
}

.media-sidebar:hover .media-nav-content { opacity: 1; transform: translateX(0); }

.media-nav-content a {
    color: #fff; font-size: 1.2rem; font-weight: 300;
    margin-bottom: 25px; letter-spacing: 2px;
    position: relative; display: inline-block; width: fit-content;
}

.media-nav-content a::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 1px; background: #fff; transition: width 0.3s ease;
}

.media-nav-content a:hover { color: #ccc; }
.media-nav-content a:hover::after { width: 100%; }

/* Art Items */
.art-item {
    z-index: 5;
    display: flex;
    flex-direction: column;
    will-change: transform;
    transform-origin: center center;
    position: relative;
    margin-right: 15vw;
    flex-shrink: 0;
    cursor: pointer;
    filter: grayscale(80%) brightness(0.8);
    transition: filter 0.4s ease;
}

.art-media {
    width: 100%; height: auto; display: block; background: #1a1a1a;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.05); 
    max-width: 350px;
    max-height: 380px;      
    object-fit: contain;
}

.art-info {
    position: absolute; left: 0; width: 100%; text-align: center;
    font-family: monospace; font-size: 11px; letter-spacing: 1px;
    opacity: 0; color: #ccc; transition: opacity 0.3s;
    text-transform: uppercase; bottom: -30px; 
}

.art-item.is-hovered {
    filter: grayscale(0%) brightness(1.1);
    z-index: 100;
}

.art-item.is-hovered .art-info {
    opacity: 1;
    color: #fff;
    bottom: -40px;
}

/* Timeline Year Separators */
.year-separator {
    position: relative;
    margin: 0 50px;
    z-index: 5;
    display: flex; 
    align-items: center; 
    justify-content: center;
    pointer-events: none;
}

.year-number {
    font-size: 48px;
    font-weight: 800; 
    color: rgba(255, 255, 255, 0.4);
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    letter-spacing: 2px;
    transform: translateY(-70px);
}

/* =========================================
   4. MODAL (Home Only)
   ========================================= */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px);
    z-index: 100; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}

.modal.open { opacity: 1; pointer-events: all; }

.modal-card {
    background: #fff; color: #111; width: 90vw; max-width: 1000px; height: 90vh; margin-top: 50px; 
    overflow-y: auto; position: relative; box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transform: translateY(30px); transition: transform 0.4s ease;
}

.modal.open .modal-card { transform: translateY(0); }

.close-btn {
    background: transparent; border: none; border-radius: 0; 
    color: #000; font-size: 40px; font-weight: 100; 
    top: 20px; right: 30px; width: auto; height: auto;
    opacity: 0.6; transition: opacity 0.3s ease; position: fixed; z-index: 10;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus,
.close-btn:active {
    background: transparent;
    box-shadow: none;
    outline: none;
    opacity: 1;
}

.modal-inner { padding: 60px 80px; text-align: left; }
.modal-category { font-family: 'Inter', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: #888; margin-bottom: 20px; display: block; font-weight: 500; }
.modal-title { font-family: 'Inter', sans-serif; font-size: 3rem; font-weight: 300; margin-bottom: 40px; line-height: 1.1; }
.modal-main-media { width: 100%; height: auto; margin-bottom: 40px; display: block; }
.modal-description { font-size: 1.1rem; line-height: 1.6; color: #333; max-width: 700px; margin-bottom: 50px; }
.modal-description p {
        font-size: 16px;
        font-family: 'Inter', sans-serif;
    }

/* Custom Scrollbars for Modal */
.modal-card::-webkit-scrollbar { width: 8px; }
.modal-card::-webkit-scrollbar-track { background: #f1f1f1; }
.modal-card::-webkit-scrollbar-thumb { background: #888; }
.modal-card::-webkit-scrollbar-thumb:hover { background: #555; }

/* =========================================
   5. STANDARD PAGE STYLES (Light Theme)
   ========================================= */

body:not(.home) {
    background-color: #ffffff;
    color: #333333;
}

.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 180px 40px 100px;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
    color: #000;
    font-family: 'Inter', sans-serif;
}

.page-id-1160 .page-title {
    margin-bottom: 1rem;
}

.page-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.page-content p { margin-bottom: 1.5em; }
.page-content img { max-width: 100%; height: auto; margin: 2rem 0; }

.page-content a { 
    color: #000; 
    border-bottom: 1px solid #ccc; 
}
.page-content a:hover { 
    border-color: #666; 
}

.page-content h2, .page-content h3 { 
    color: #000; 
    margin-top: 3rem; 
    font-weight: 300; 
}

/* =========================================
   6. WP TYPOGRAPHY FORCING
   ========================================= */

h1, h2, h3, h4, h5, h6,
.entry-title, .widget-title {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.entry-content p, 
.entry-content li, 
.entry-content span,
.page-content p,
.page-content li {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

input, textarea, select, button, 
.button, 
.wp-block-button__link,
input[type="submit"] {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

blockquote, blockquote p {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-weight: 300;
}

b, strong {
    font-weight: 600;
}

/* =========================================
   7. MOBILE RESPONSIVE STYLES
   ========================================= */

@media (max-width: 768px) {
    /* Mobile Timeline Adjustments */
    .scroll-container {
        display: block;
        width: 100%;
        padding: 100px 40px;
        height: auto;
        background-color: #000000; /* Home background for mobile items */
    }

    .horizontal-wrapper {
        height: auto;
        overflow-y: visible;
    }

    .curve-line {
        display: none;
    }

    .art-item {
        margin: 0 auto 80px auto;
        transform: none;
        width: 100%;
        max-width: 320px;
        filter: grayscale(0) brightness(1);
    }

    .art-info {
        opacity: 1;
        position: relative;
        bottom: 0;
        margin-top: 15px;
    }

    .year-separator {
        display: block;
        margin: 30px 0;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        transform: none;
    }

    .year-number {
        font-size: 24px;
        color: #fff;
        transform: none;
        -webkit-text-stroke: 0;
    }

    /* Mobile Header & Sidebar */
    .media-sidebar {
        display: none;
    }

    .menu-toggle::before, 
    .menu-toggle::after,
    .media-sidebar .media-label-col::before { 
        content: none; 
        display: none; 
    }

    .site-header {
        padding: 0 30px;
    }
    
    body.home .site-header {
        background-color: #000000;
    }

    /* Mobile Page Padding */
    .page-wrapper { 
        padding-top: 250px; 
    }

    /* Hamburger Menu Button */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 18px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        z-index: 10002;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #000;
        transition: all 0.3s ease-in-out;
    }

    body.home header.site-header .menu-toggle span {
        background-color: #fff;
    }

    /* Hamburger Active State (X) */
    body.home header.site-header .menu-toggle.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: #000;
    }
    body.home header.site-header .menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }
    body.home header.site-header .menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: #000;
    }

    /* Mobile Dropdown Menu */
    .main-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
        z-index: 10000;
    }

    .main-menu.is-active {
        display: flex;
        transform: translateX(0);
    }

    .nav-section {
        flex-direction: column;
        margin-bottom: 20px;
    }

    .main-menu .nav-section a {
        color: #000;
        font-size: 20px;
        opacity: 1;
    }

    /* Media Links inside Mobile Menu */
    .media-mobile-only {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .menu-label {
        font-size: 10px;
        letter-spacing: 3px;
        text-transform: uppercase;
        color: #999;
        margin-bottom: 10px;
    }

    /* Mobile Modal Padding */
    .modal {
        top: 80px !important;
    }
    
    .modal-inner {
        padding: 80px 30px;
    }

    .close-btn {
        font-size: 25px;
        top: 30px;
        right: 30px;
        padding: 0;
    }

    .modal-card {
        height: 100vh;
    }
}



/* =========================================
   JETPACK CONTACT FORM CUSTOMIZATION
   ========================================= */

/* 1. Form Container */
.wp-block-jetpack-contact-form {
    max-width: 600px; /* Centered and readable width */
    margin: 0 auto;
}

/* 2. Labels (Name, Email, Message) */
.wp-block-jetpack-contact-form label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
    color: #000;
}

/* 3. Input Fields & Textarea */
.wp-block-jetpack-contact-form input[type="text"],
.wp-block-jetpack-contact-form input[type="email"],
.wp-block-jetpack-contact-form textarea {
    width: 100%;
    padding: 12px 0; /* Minimal padding */
    border: none;
    border-bottom: 1px solid #ccc; /* Only bottom border */
    border-radius: 0;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    background-color: transparent;
    transition: border-color 0.3s ease;
    margin-bottom: 30px;
}

/* 4. Focus State (When clicking the field) */
.wp-block-jetpack-contact-form input:focus,
.wp-block-jetpack-contact-form textarea:focus {
    outline: none;
    border-bottom: 1px solid #000; /* Darker border on focus */
}

/* 5. Submit Button */
.wp-block-jetpack-contact-form .wp-block-button__link {
    background-color: #000 !important; /* Solid black */
    color: #fff !important;
    border: none;
    border-radius: 0; /* Square button */
    padding: 15px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.wp-block-jetpack-contact-form .wp-block-button__link:hover {
    opacity: 0.8;
}

/* 6. Success/Error Messages */
.contact-form-submission-error,
.contact-form-submission-success {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 20px;
    margin-top: 20px;
}


/* Ensure the wrapper doesn't break on touch devices like iPad */
@media (min-width: 769px) {
    .horizontal-wrapper {
        overflow: hidden;
        /* Prevents weird elastic scrolling on iOS */
        touch-action: none; 
    }
}