/* === TOSHI LANDING PAGE === */

/* === BODY LEVEL === */
body { background: var(--bg, #111111); transition: background-color 1.5s ease; }
body.tl-daylight { background: var(--bg); }
@media (min-width: 901px) {
    body { overflow: hidden; height: 100vh; }
}

/* === MOBILE NAV === */
#tl-home .tl-mobile-nav { display: none; }
@media (max-width: 900px) {
    #tl-home.tl-mobile .tl-mobile-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        position: sticky;
        top: 0;
        z-index: 100;
        transition: background 1.5s ease;
    }
    #tl-home.tl-daylight .tl-mobile-nav {
        background: var(--bg);
    }
    .tl-mobile-nav .tl-mob-brand {
        font-family: 'toshifont', serif;
        font-size: 13px;
        color: var(--text);
        letter-spacing: 3px;
        text-transform: uppercase;
        text-decoration: none;
    }
    .tl-mobile-nav .tl-mob-links {
        display: flex;
        gap: 20px;
    }
    .tl-mobile-nav .tl-mob-links a {
        font-family: 'Inter', sans-serif;
        font-size: 11px;
        color: var(--dim);
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }
}

/* === TOSHI LANDING — all scoped under #tl-home === */

#tl-home {
    --white: #ffffff;
    --font: 'Inter', -apple-system, sans-serif;
    --fluo: #39ff14;
    --brand: 'toshifont', 'YOURFONTMEDIUM', 'Georgia', serif;
    --canvas-text: rgba(200, 200, 200, 0.6);
    --canvas-text-dim: rgba(160, 160, 160, 0.35);
    --canvas-label: #cccccc;

    background: #111111;
    font-family: var(--font);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    transition: background-color 1.5s ease, color 1.5s ease;
}

/* === DAYLIGHT THEME — adaptive via solar engine, only non-adaptive overrides here === */
#tl-home.tl-daylight {
    --white: #1a1816;
    --fluo: #e07830;
    --canvas-text: rgba(50, 48, 42, 0.6);
    --canvas-text-dim: rgba(80, 75, 68, 0.4);
    --canvas-label: #4a4540;
    background: var(--bg);
}
#tl-home.tl-daylight .tl-logo-grid img { filter: grayscale(1); opacity: 0.6; }
#tl-home.tl-daylight .tl-logo-grid img:hover { opacity: 0.9; }
#tl-home.tl-daylight .tl-about-right img { filter: grayscale(0.6) blur(12px); }
#tl-home.tl-daylight .tl-about-right img.tl-revealed { filter: grayscale(0.6); }
#tl-home.tl-daylight .tl-project-visual { background: var(--bg-dark); }
#tl-home.tl-daylight .tl-img-box img { filter: grayscale(0.5) contrast(0.9) brightness(0.85); }
#tl-home.tl-daylight .tl-img-box:hover img { filter: grayscale(0.2) contrast(0.95) brightness(0.9); }
@media (min-width: 901px) {
    #tl-home {
        position: fixed;
        top: 63px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
    }
}

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

/* ═══════════════════════════════════════
   MAIN SPLIT LAYOUT
   Left: scrolling project stream
   Right: sticky brand panel (then unsticks for about/contact)
═══════════════════════════════════════ */
#tl-home .tl-main {
    display: flex;
    width: 100%;
    height: calc(100vh - 63px);
}

/* ── LEFT: Independently scrolling projects ── */
#tl-home .tl-left {
    width: 50%;
    height: calc(100vh - 63px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: none; /* Firefox */
}
#tl-home .tl-left::-webkit-scrollbar { display: none; }

/* ── RIGHT: Independently scrolling ── */
#tl-home .tl-right {
    width: 50%;
    height: calc(100vh - 63px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--line);
    scrollbar-width: none;
}
#tl-home .tl-right::-webkit-scrollbar { display: none; }

#tl-home .tl-right-sticky {
    min-height: calc(100vh - 63px);
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    padding: clamp(20px, 3vh, 32px) clamp(20px, 2.5vw, 40px);
    position: relative;
}

/* Hover resize */
#tl-home .tl-main.hover-l .tl-left { width: 60%; }
#tl-home .tl-main.hover-l .tl-right { width: 40%; }
#tl-home .tl-main.hover-r .tl-left { width: 40%; }
#tl-home .tl-main.hover-r .tl-right { width: 60%; }

/* ── Brand panel content ── */
#tl-home .tl-brand-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
#tl-home .tl-brand-logo {
    font-family: var(--font);
    font-size: 10px;
    color: var(--fluo);
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
}
#tl-home .tl-brand-mark {
    width: 48px; height: 48px;
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--brand); font-size: 18px; color: var(--ash);
}
#tl-home .tl-brand-desc {
    font-size: 10px; color: var(--dim);
    line-height: 1.6; max-width: 220px;
    text-align: right; margin-top: 8px;
}

#tl-home .tl-brand-tagline {
    margin-top: auto;
    font-family: 'YOURFONTMEDIUM', 'toshifont', 'Georgia', serif;
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 100;
    line-height: 1.08;
    letter-spacing: 0em;
    color: var(--text);
}
#tl-home .tl-brand-tagline .tl-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
}
#tl-home .tl-brand-tagline .tl-line-inner {
    display: block;
    transform: translateY(130%);
}

#tl-home .tl-label-inner {
    display: inline-block;
}

/* ── Project cards (left column) ── */
#tl-home .tl-project {
    position: relative;
    border-bottom: 1px solid var(--line);
}

#tl-home .tl-project-visual {
    position: relative;
    width: 100%;
    min-height: 65vh;
    background: var(--bg-dark);
    overflow: hidden;
}
#tl-home .tl-project-visual canvas {
    display: block; width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
}

#tl-home .tl-project-visual .tl-mapbox {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
#tl-home .tl-project-visual .tl-mapbox .mapboxgl-ctrl-logo,
#tl-home .tl-project-visual .tl-mapbox .mapboxgl-ctrl-attrib { display: none; }

/* Image carousel nav */
#tl-home .tl-project-nav {
    position: absolute;
    bottom: 14px; left: 14px;
    display: flex; gap: 4px; z-index: 5;
}
#tl-home .tl-project-nav button {
    width: 24px; height: 24px;
    background: none; border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5); font-size: 11px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: border-color 0.3s, color 0.3s;
}
#tl-home .tl-project-nav button:hover { border-color: rgba(255,255,255,0.5); color: white; }

/* Project metadata bar */
#tl-home .tl-project-meta {
    padding: 12px clamp(14px, 2vw, 24px);
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    align-items: center;
    gap: 16px;
}
#tl-home .tl-pm-title { font-size: 12px; font-weight: 500; color: var(--text); }
#tl-home .tl-pm-sub { font-size: 10px; color: var(--dim); margin-top: 2px; }
#tl-home .tl-pm-type { font-size: 10px; color: var(--ash); letter-spacing: 0.06em; }
#tl-home .tl-pm-count { font-size: 10px; color: var(--ash); font-variant-numeric: tabular-nums; }
#tl-home .tl-pm-year { font-size: 10px; color: var(--ash); font-variant-numeric: tabular-nums; }
#tl-home .tl-pm-expand {
    padding: 4px 8px; margin-left: -4px;
}
#tl-home .tl-pm-expand a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    color: var(--fluo); background: none; border: none;
    text-decoration: none; font-size: 16px;
    transition: opacity 0.3s;
    opacity: 0.7;
}
#tl-home .tl-pm-expand a:hover { opacity: 1; }

/* ── Right column continued content (below brand panel) ── */
#tl-home .tl-right-section {
    padding: clamp(48px, 7vh, 96px) clamp(20px, 2.5vw, 40px);
    border-top: 1px solid var(--line);
}
#tl-home .tl-section-label {
    font-size: 10px; font-weight: 500; color: var(--ash);
    letter-spacing: 0.14em; text-transform: uppercase;
    margin-bottom: 24px;
    overflow: hidden;
}

/* About */
#tl-home .tl-about-section {
    display: grid; grid-template-columns: 1fr auto; gap: 0; min-height: 280px;
    position: relative; overflow: visible;
    margin-bottom: calc(-1 * clamp(48px, 7vh, 96px));
}
#tl-home .tl-about-left { padding-right: 40px; display: flex; flex-direction: column; justify-content: center; }
#tl-home .tl-about-text {
    font-size: clamp(16px, 2vw, 26px); font-weight: 300;
    line-height: 1.5; color: var(--dim); max-width: 500px;
}
#tl-home .tl-about-text strong { font-weight: 400; color: var(--text); }
#tl-home .tl-about-logo { font-family: var(--brand); font-size: 0.85em; color: var(--text); }
#tl-home .tl-about-btn {
    display: inline-block; margin-top: 20px;
    font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text); text-decoration: none; width: fit-content;
    padding: 10px 22px; border: 1px solid var(--line); border-radius: 50px;
    background: var(--bg); transition: border-color 0.4s ease, color 0.4s ease, background 0.4s ease;
}
#tl-home .tl-about-btn:hover { border-color: var(--fluo); color: var(--fluo); }
#tl-home .tl-about-caption {
    font-size: 11px; color: var(--dim); letter-spacing: 0.04em; margin-top: 14px; margin-bottom: 28px;
}
#tl-home .tl-about-right {
    align-self: end;
    width: 320px; overflow: hidden;
}
#tl-home .tl-about-right img {
    width: 100%; height: auto; display: block;
    object-fit: cover; object-position: top center;
    filter: grayscale(1) blur(12px); opacity: 0.85;
    transition: filter 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#tl-home .tl-about-right img.tl-revealed {
    filter: grayscale(1);
}

/* Services */
#tl-home .tl-svc-cols {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
}
#tl-home .tl-svc-title {
    font-size: 13px; font-weight: 300; color: var(--text);
    margin-bottom: 10px; padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
#tl-home .tl-svc-list { list-style: none; }
#tl-home .tl-svc-list li {
    font-size: 11px; color: var(--dim); padding: 4px 0;
    transition: color 0.3s, padding-left 0.3s;
}
#tl-home .tl-svc-list li:hover { color: #E8927C; padding-left: 5px; }

/* Contact */
#tl-home .tl-contact-btn {
    display: inline-block;
    font-size: 13px; font-weight: 400;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--bg); background: var(--fluo);
    text-decoration: none; margin-bottom: 32px;
    padding: 14px 36px;
    border: 1px solid var(--fluo);
    border-radius: 50px;
    transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
#tl-home .tl-contact-btn:hover {
    background: transparent; color: var(--fluo); border-color: var(--fluo);
}

#tl-home .tl-contact-grid { display: flex; gap: clamp(24px, 4vw, 56px); flex-wrap: wrap; }
#tl-home .tl-cc-title { font-size: 10px; font-weight: 500; color: var(--ash); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
#tl-home .tl-cc a, #tl-home .tl-cc p { font-size: 11px; color: var(--dim); text-decoration: none; line-height: 2; display: block; transition: color 0.3s; }
#tl-home .tl-cc a:hover { color: var(--text); }

/* Logo Grid — BIG and prominent */
#tl-home .tl-logo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 40px;
    align-items: center;
    justify-items: center;
    padding: 20px 0;
}
#tl-home .tl-logo-grid img {
    max-width: 267px;
    width: 100%;
    height: auto;
    max-height: 147px;
    object-fit: contain;
    opacity: 0.45;
    filter: invert(1) grayscale(1);
    transition: opacity 0.4s ease;
}
#tl-home .tl-logo-grid img:hover {
    opacity: 0.8;
}

/* Footer */
#tl-home .tl-footer {
    border-top: 1px solid var(--line);
    padding: 16px clamp(20px, 2.5vw, 40px);
    display: flex; justify-content: space-between; align-items: center;
}
#tl-home .tl-footer-brand { font-family: var(--brand); font-size: 10px; color: var(--ash); }
#tl-home .tl-footer-links { display: flex; gap: 16px; list-style: none; }
#tl-home .tl-footer-links a { font-size: 9px; color: var(--ash); text-decoration: none; text-transform: uppercase; letter-spacing: 0.08em; }
#tl-home .tl-footer-copy { font-size: 9px; color: var(--muted); }

/* ── Description panel (alternates with visuals on left) ── */
#tl-home .tl-desc-panel {
    padding: clamp(48px, 8vh, 100px) clamp(28px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#tl-home .tl-desc-number {
    font-size: 10px; font-weight: 500; color: var(--ash);
    letter-spacing: 0.14em; text-transform: uppercase;
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
}
#tl-home .tl-desc-number::after {
    content: ''; width: 40px; height: 1px; background: var(--line);
}
#tl-home .tl-desc-title {
    font-size: clamp(28px, 4vw, 52px); font-weight: 300;
    line-height: 1.08; letter-spacing: -0.025em;
    color: var(--text); margin-bottom: 20px;
}
#tl-home .tl-desc-body {
    font-size: 14px; font-weight: 400; line-height: 1.8;
    color: var(--dim); max-width: 420px; margin-bottom: 24px;
}
#tl-home .tl-desc-credits {
    font-size: 10px; color: var(--ash);
    letter-spacing: 0.06em; margin-top: 8px;
}
#tl-home .tl-desc-credits span { color: var(--dim); }

/* ── Image box (real photos — grayscale + subtle texture) ── */
@keyframes tl-slow-pan {
    0% { background-position: 48% 48%; }
    20% { background-position: 55% 42%; }
    40% { background-position: 52% 56%; }
    60% { background-position: 44% 52%; }
    80% { background-position: 50% 44%; }
    100% { background-position: 48% 48%; }
}
@keyframes tl-slow-pan-2 {
    0% { background-position: 52% 52%; }
    20% { background-position: 45% 55%; }
    40% { background-position: 48% 42%; }
    60% { background-position: 56% 48%; }
    80% { background-position: 50% 56%; }
    100% { background-position: 52% 52%; }
}
#tl-home .tl-project-img {
    position: relative;
    width: 100%;
    min-height: 55vh;
    background-size: 125%;
    background-position: center;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--line);
    filter: grayscale(1) contrast(0.85) brightness(0.65);
    transition: filter 0.6s ease;
    animation: tl-slow-pan 25s ease-in-out infinite;
}
#tl-home .tl-project-img + .tl-project-meta + .tl-desc-panel + .tl-project-img {
    animation: tl-slow-pan-2 22s ease-in-out infinite;
}
#tl-home .tl-project-img:hover {
    filter: grayscale(0.3) contrast(0.9) brightness(0.75);
}

/* ═══ RESPONSIVE ═══ */
/* ═══════════════════════════════════════
   MOBILE LAYOUT — triggered by .tl-mobile class (JS) AND media query
═══════════════════════════════════════ */
/* ═══════════════════════════════════════
   MOBILE — fixed fullscreen, single column, internal scroll
═══════════════════════════════════════ */
#tl-home.tl-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
#tl-home.tl-mobile .tl-main {
    flex-direction: column;
    height: auto;
    min-height: 0;
}
#tl-home.tl-mobile .tl-left,
#tl-home.tl-mobile .tl-right {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    overflow-y: visible;
    position: relative;
}
#tl-home.tl-mobile .tl-mobile-top,
#tl-home.tl-mobile .tl-mobile-bottom {
    width: 100%;
}
#tl-home.tl-mobile .tl-mobile-top {
    border-bottom: 1px solid var(--line);
}
#tl-home.tl-mobile .tl-right-sticky {
    position: relative;
    min-height: auto;
    height: auto;
    padding: 24px 20px;
}
#tl-home.tl-mobile .tl-brand-tagline {
    margin-top: 32px;
}
#tl-home.tl-mobile .tl-brand-tagline .tl-line-inner {
    transform: none;
}
#tl-home.tl-mobile .tl-project-visual { min-height: 50vh; }
#tl-home.tl-mobile .tl-project-img {
    min-height: 45vh;
    width: 100%;
    background-size: cover;
    background-position: center;
}
#tl-home.tl-mobile .tl-brand-tagline { font-size: clamp(36px, 10vw, 72px); }
#tl-home.tl-mobile .tl-logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
}
#tl-home.tl-mobile .tl-logo-grid img {
    max-width: 140px;
    max-height: 80px;
}
#tl-home.tl-mobile .tl-about-section { grid-template-columns: 1fr; margin-bottom: 0; }
#tl-home.tl-mobile .tl-about-right { display: none; }
#tl-home.tl-mobile .tl-about-left { padding-right: 0; }
#tl-home.tl-mobile .tl-svc-cols { grid-template-columns: 1fr; }
#tl-home.tl-mobile .tl-contact-grid { flex-direction: column; gap: 20px; }
#tl-home.tl-mobile .tl-footer { flex-direction: column; gap: 10px; text-align: center; }
#tl-home.tl-mobile .tl-desc-title { font-size: clamp(20px, 6vw, 32px); }
#tl-home.tl-mobile .tl-project-meta {
    flex-wrap: wrap;
    gap: 8px;
}

/* Media query fallback — mirrors .tl-mobile for when JS hasn't fired */
@media screen and (max-width: 900px) {
    #tl-home {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99999;
        width: 100%;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    #tl-home .tl-main {
        flex-direction: column;
        height: auto;
        min-height: 0;
    }
    #tl-home .tl-left, #tl-home .tl-right {
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: visible;
        overflow-y: visible;
        position: relative;
    }
    #tl-home .tl-right {
        border-left: none;
    }
    #tl-home .tl-right-sticky {
        position: relative;
        min-height: auto;
        height: auto;
        padding: 24px 20px;
    }
    #tl-home .tl-project-visual { min-height: 50vh; }
    #tl-home .tl-project-img {
        min-height: 45vh;
        width: 100%;
        background-size: cover;
        background-position: center;
    }
    #tl-home .tl-brand-tagline { font-size: clamp(36px, 10vw, 72px); }
    #tl-home .tl-svc-cols { grid-template-columns: 1fr; }
    #tl-home .tl-contact-grid { flex-direction: column; gap: 20px; }
    #tl-home .tl-footer { flex-direction: column; gap: 10px; text-align: center; }
    #tl-home .tl-logo-grid { grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
    #tl-home .tl-logo-grid img { max-width: 140px; max-height: 80px; }
    #tl-home .tl-desc-title { font-size: clamp(20px, 6vw, 32px); }
    #tl-home .tl-project-meta { flex-wrap: wrap; gap: 8px; }
    #tl-home .tl-about-right { display: none; }
}
@media screen and (max-width: 600px) {
    #tl-home .tl-logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 20px;
    }
    #tl-home .tl-logo-grid img {
        max-width: 120px;
        max-height: 70px;
    }
}
