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

:root {
    --bg:        #f5f5f7;
    --bg-alt:    #ffffff;
    --bg-card:   #ffffff;
    --text:      #1d1d1f;
    --text-2:    #6e6e73;
    --text-3:    #aeaeb2;
    --border:    #d2d2d7;
    --accent:    #1d1d1f;
    --tg-color:  #1d1d1f;
    --radius:    16px;
    --radius-sm: 10px;
    --font:      'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-h:     60px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font-family: inherit; color: inherit; }

/* Remove tap highlight and focus outline on click */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--border); outline-offset: 2px; }
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    transition: background var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
    background: rgba(245,245,247,0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.nav-logo {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}
.nav-links a {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-2);
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    width: 36px;
}
.nav-menu-btn span {
    display: block;
    height: 1.5px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-menu-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ===== SECTIONS ===== */
.section {
    display: flex;
    align-items: center;
    padding: 72px 0 80px;
}
.section--about, .section--authors, .section--posters { background: var(--bg-alt); }
.section--authors, .section--posters {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0;
}
.section--authors + .section--posters {
    padding-top: 0;
}
.section--authors .section-title,
.section--posters .section-title {
    margin-bottom: 24px;
}
.section--authors .authors-grid,
.section--posters .posters-grid {
    padding-top: 0;
    padding-bottom: 48px;
}
.section--videos, .section--contact, .section--hero { background: var(--bg); }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: clamp(14px, 3.5vw, 18px);
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-bottom: 48px;
    line-height: 1.5;
    color: #7A7570;
    text-align: center;
}

/* ===== HERO ===== */
.section--hero {
    min-height: 100svh;
    background: linear-gradient(160deg, #f5f5f7 0%, #ffffff 60%, #f0f0f3 100%);
    justify-content: center;
    padding: calc(var(--nav-h) + 48px) 0 64px;
    text-align: center;
    position: relative;
}
.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 32px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.hero-greeting {
    font-size: clamp(24px, 6.5vw, 38px);
    font-weight: 400;
    color: #38342F;
    line-height: 1.4;
    animation: fadeUp 0.8s ease both;
}
.hero-title {
    font-size: clamp(24px, 6.5vw, 38px);
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.4;
    color: #242220;
    animation: fadeUp 0.8s 0.1s ease both;
}
.hero-subtitle {
    font-size: clamp(24px, 6.5vw, 38px);
    font-weight: 400;
    color: #38342F;
    max-width: 600px;
    line-height: 1.4;
    animation: fadeUp 0.8s 0.2s ease both;
}
.hero-scroll-hint {
    margin-top: 32px;
    color: var(--text-3);
    animation: bounce 2s 1.5s ease-in-out infinite, fadeUp 0.8s 0.4s ease both;
    display: inline-flex;
}
.hero-scroll-hint:hover { color: var(--text); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}

/* ===== ABOUT ===== */
.about-text {
    font-size: clamp(24px, 6.5vw, 38px);
    font-weight: 400;
    color: #38342F;
    max-width: 780px;
    line-height: 1.4;
    text-align: center;
}

/* ===== VIDEO GALLERY ===== */
.video-gallery { width: 100%; }
.video-carousel { position: relative; }

.video-slide { display: none; }
.video-slide.active { display: block; }

.video-wrapper {
    position: relative;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    width: 100%;
}
.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

/* Thumbnail overlay — shown until video plays */
.video-thumb-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
    transition: opacity 0.25s ease;
}
.video-thumb-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.thumb-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    transition: transform 0.2s ease;
    pointer-events: none;
}
.video-thumb-overlay:hover .thumb-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}
.video-wrapper.playing .video-thumb-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Custom video controls */
.video-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.25s;
}
.video-wrapper:hover .video-controls,
.video-wrapper.show-controls .video-controls { opacity: 1; }

.vc-play {
    color: #fff;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.vc-play:hover { transform: scale(1.15); }
.vc-play svg { width: 20px; height: 20px; }
.vc-play .icon-pause { display: none; }
.video-wrapper.playing .vc-play .icon-play { display: none; }
.video-wrapper.playing .vc-play .icon-pause { display: block; }

.vc-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.vc-bar {
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
.vc-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}
.vc-time {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    font-family: var(--font);
    font-weight: 400;
    white-space: nowrap;
}
.vc-mute, .vc-fullscreen {
    color: #fff;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.vc-mute:hover, .vc-fullscreen:hover { transform: scale(1.15); }
.vc-mute svg, .vc-fullscreen svg { width: 18px; height: 18px; }
.vc-mute .icon-mute { display: none; }
.video-wrapper.muted .vc-mute .icon-sound { display: none; }
.video-wrapper.muted .vc-mute .icon-mute { display: block; }

.video-meta {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.video-title {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.video-authors {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: hidden;
}
.video-authors .author-chip {
    padding: 3px 10px;
    font-size: 11px;
    gap: 1px;
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
}
.video-authors .chip-role {
    font-size: 10px;
}
/* Author chips — used in poster modal */
.author-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition), border-color var(--transition);
    cursor: pointer;
    text-align: left;
}
.author-chip:hover {
    background: var(--text);
    color: var(--bg-alt);
    border-color: var(--text);
}
.chip-role {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-2);
    display: block;
}
.author-chip:hover .chip-role { color: rgba(255,255,255,0.6); }

/* Video authors — plain text, one line */
.video-author-name {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-2);
    white-space: nowrap;
    transition: color var(--transition);
    padding: 0;
}
.video-author-name:hover { color: var(--text); }
.va-role {
    font-weight: 300;
    color: var(--text-3);
}
.video-authors-sep {
    color: var(--text-3);
    font-size: 13px;
    flex-shrink: 0;
}

.btn-full-video {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    transition: color var(--transition);
    width: fit-content;
}
.btn-full-video:hover { color: var(--text); }

.video-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}
.video-nav-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text);
    transition: background var(--transition), transform var(--transition);
}
.video-nav-btn:hover { background: var(--text); color: var(--bg-alt); border-color: var(--text); }
.video-nav-btn svg { width: 18px; height: 18px; }
.video-dots { display: flex; gap: 8px; }
.video-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--border);
    transition: background var(--transition), transform var(--transition);
}
.video-dot.active { background: var(--text); transform: scale(1.3); }

/* ===== AUTHORS & POSTERS CAROUSELS ===== */
.authors-grid,
.posters-grid {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 24px 16px;
}
.authors-grid::-webkit-scrollbar,
.posters-grid::-webkit-scrollbar { display: none; }

.author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 28px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    flex-shrink: 0;
    scroll-snap-align: start;
    min-width: 200px;
    transition: background var(--transition), transform var(--transition);
}
.author-card:hover {
    background: var(--bg);
    transform: translateY(-3px);
}
.author-avatar {
    width: 180px; height: 180px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-initials {
    font-size: 64px;
    font-weight: 600;
    color: var(--text-2);
}
.author-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text);
    max-width: 140px;
}

/* ===== POSTERS CAROUSEL ===== */
.poster-card {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 300px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.poster-card:hover { transform: scale(1.03); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.poster-img-wrap {
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg);
}
.poster-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.poster-card:hover .poster-img-wrap img { transform: scale(1.05); }

/* ===== CONTACT ===== */
.section--contact {
    padding: 72px 0 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.section--contact .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}
.contact-phone {
    font-size: clamp(28px, 8vw, 52px);
    font-weight: 300;
    letter-spacing: 0.01em;
    color: var(--text);
    transition: color var(--transition);
}
.contact-phone:hover { color: var(--text-2); }

/* ===== TG BUTTON ===== */
.btn-tg {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text);
    color: #fff;
    border-radius: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 13px 28px;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}
.btn-tg:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-tg--float {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: none;
    border-radius: 0;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-tg--float:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}
.btn-tg--float.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(12px);
}

.btn-tg--contact { align-self: center; }

/* ===== MODALS ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}
#authorModal {
    z-index: 310;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    cursor: pointer;
    pointer-events: none;
    transition:
        background 0.28s ease,
        backdrop-filter 0.28s ease,
        -webkit-backdrop-filter 0.28s ease;
}
.modal.open .modal-overlay {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: all;
}
.modal-box {
    position: relative;
    background: var(--bg-alt);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 90svh;
    overflow-y: auto;
    padding: 36px 24px calc(40px + env(safe-area-inset-bottom, 0px));
    /* extend below viewport so browser-bar reveal never shows the bottom edge */
    margin-bottom: -120px;
    padding-bottom: calc(40px + 120px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.modal-box::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: -16px auto 20px;
}
.modal.open .modal-box {
    transform: translateY(0);
    pointer-events: all;
}

.modal-box--poster { max-width: 720px; }

.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2);
    transition: background var(--transition), color var(--transition);
    z-index: 2;
}
.modal-close:hover { background: var(--text); color: #fff; }

/* Author modal content */
.am-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.am-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.am-avatar img { width: 100%; height: 100%; object-fit: cover; }
.am-avatar-init { font-size: 24px; font-weight: 600; color: var(--text-2); }
.am-name { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.am-bio {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.65;
    white-space: pre-wrap;
    margin-bottom: 20px;
}
.am-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.am-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.am-social-btn:hover { background: var(--text); color: #fff; border-color: var(--text); }
.am-social-btn svg { width: 16px; height: 16px; }

/* Poster modal content */
.pm-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 24px;
    text-align: center;
}
.pm-image img {
    width: auto;
    max-width: 100%;
    max-height: 70svh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.pm-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}
.pm-logline {
    font-size: 15px;
    font-weight: 500;
    font-style: italic;
    color: var(--text-2);
    margin-bottom: 16px;
    line-height: 1.55;
}
.pm-synopsis {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 20px;
}
.pm-authors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.pm-trailer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--text);
    color: #fff;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition), transform var(--transition);
}
.pm-trailer-btn:hover { background: #333; transform: translateY(-1px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: rgba(245,245,247,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px 24px 28px;
        gap: 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        border-top: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 18px; padding: 4px 0; }
    .nav-menu-btn { display: flex; }

    .section { padding: 56px 0 64px; }
    .section--hero { padding: calc(var(--nav-h) + 32px) 0 48px; }
    .section-title { margin-bottom: 32px; }

    .hero-title { line-height: 0.9; }

    .authors-grid { gap: 12px; }
    .authors-grid, .posters-grid { padding: 8px 16px 16px; }
    .author-avatar { width: 140px; height: 140px; }
    .author-initials { font-size: 48px; }
    .author-name { font-size: 14px; }
    .author-card { min-width: 160px; padding: 20px 14px; }
    .poster-card { width: 260px; }

    .modal-box { padding: 28px 20px 36px; }
    .am-header { gap: 14px; }
    .am-name { font-size: 18px; }
    .pm-image img { max-height: 55svh; }
}

@media (max-width: 480px) {
    :root { --nav-h: 54px; }
    .authors-grid { gap: 8px; }
    .authors-grid, .posters-grid { padding: 8px 12px 16px; }
    .author-avatar { width: 120px; height: 120px; }
    .author-initials { font-size: 40px; }
    .author-card { min-width: 140px; padding: 16px 12px; }
    .poster-card { width: 220px; }
    .btn-tg--float { bottom: 20px; padding: 12px 20px; font-size: 13px; }
    .video-controls { padding: 10px 12px; gap: 8px; }
}
