/* ============================================================
   AIGENBERG · Components
   Hero, cards, modals, gallery
   ============================================================ */

/* ============================================================
   HERO (landing)
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg canvas,
.hero-bg svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-logo {
    width: clamp(280px, 38vw, 460px);
    margin: 0 auto 28px;
}

.hero-tagline {
    font-size: clamp(16px, 1.4vw, 20px);
    font-weight: var(--fw-light);
    letter-spacing: 0.02em;
    color: var(--fg-soft);
    opacity: 0;
    animation: fadeUp 1.2s var(--ease-out) 0.6s forwards;
}

.scroll-cue {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    z-index: 3;
    transition: color 0.3s var(--ease-out);
}

.scroll-cue:hover {
    color: var(--fg);
}

.scroll-cue-line {
    width: 1px;
    height: 56px;
    background: var(--rule-strong);
    position: relative;
    overflow: hidden;
}

.scroll-cue-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: var(--fg);
    animation: scrollDrop 2.2s infinite var(--ease-in-out);
}

@keyframes scrollDrop {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(360%); }
}

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

/* ============================================================
   PROSE BLOCKS
   ============================================================ */
.prose {
    font-size: var(--fs-body-lg);
    font-weight: var(--fw-light);
    line-height: var(--lh-body);
    color: var(--fg-soft);
    max-width: 880px;
}

.prose p + p {
    margin-top: 24px;
}

.prose strong {
    font-weight: var(--fw-medium);
    color: var(--fg);
}

.prose ul {
    margin-top: 16px;
    padding-left: 0;
}

.prose ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 10px;
    height: 1px;
    background: var(--muted);
}

.prose a {
    border-bottom: 1px solid var(--rule-strong);
}

.prose a:hover {
    border-bottom-color: var(--fg);
}

/* ============================================================
   STUDIO LOGOTYPE HEADING
   Replaces the .display title in the Studio section.
   Height = 110% of the standard display heading vertical size,
   so it visually aligns with other section titles but slightly heavier.
   ============================================================ */
.display-as-logotype {
    line-height: 1;
    display: block;
    font-size: 0;
}

.studio-logotype {
    display: block;
    width: auto;
    height: calc(var(--fs-display) * 1.1);
}

/* ============================================================
   TEAM GRID
   ============================================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.team-card {
    background: var(--bg);
    padding: 36px 32px;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 200px;
    justify-content: flex-end;
    position: relative;
}

.team-card:hover {
    background: var(--bg-elev);
}

.team-card-name {
    font-size: 28px;
    font-weight: var(--fw-bold);
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.team-card-role {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: var(--fw-medium);
}

.team-card-arrow {
    position: absolute;
    top: 28px;
    right: 28px;
    font-size: 18px;
    opacity: 0.4;
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.team-card:hover .team-card-arrow {
    opacity: 1;
    transform: translate(4px, -4px);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid var(--rule);
    align-items: baseline;
}

.contact-row:last-child {
    border-bottom: 1px solid var(--rule);
}

.contact-row .label {
    font-size: 11px;
    font-weight: var(--fw-bold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact-row .value {
    font-size: 18px;
    font-weight: var(--fw-light);
    color: var(--fg-soft);
}

.contact-row a.value:hover {
    color: var(--fg);
}

@media (max-width: 600px) {
    .contact-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ============================================================
   ORIGINALS GRID
   ============================================================ */
.originals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.original-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
    position: relative;
}

.original-card-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--bg-elev);
    position: relative;
}

.original-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.original-card:hover .original-card-poster img {
    transform: scale(1.04);
}

.original-card-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.original-card:hover .original-card-poster::after {
    opacity: 1;
}

.original-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.original-card-eyebrow {
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: var(--fw-bold);
}

.original-card-title {
    font-size: clamp(28px, 3vw, 44px);
    font-weight: var(--fw-display);
    letter-spacing: -0.02em;
    line-height: 1;
    text-transform: uppercase;
}

.original-card-meta {
    font-size: 13px;
    color: var(--muted);
    font-weight: var(--fw-light);
}

@media (max-width: 768px) {
    .originals-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }
}

/* ============================================================
   WORKS HORIZONTAL GALLERY
   ============================================================ */
.h-gallery {
    position: relative;
}

.h-gallery-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding: 4px 0 24px;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: var(--rule-strong) transparent;
    -webkit-overflow-scrolling: touch;
}

.h-gallery-scroll.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.h-gallery-scroll::-webkit-scrollbar {
    height: 6px;
}

.h-gallery-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.h-gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--rule-strong);
    border-radius: 3px;
}

.h-gallery-card {
    flex: 0 0 auto;
    width: clamp(320px, 42vw, 640px);
    scroll-snap-align: start;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.h-gallery-scroll.is-dragging .h-gallery-card {
    cursor: grabbing;
}

.h-gallery-card-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background: var(--bg-elev);
}

.h-gallery-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out), opacity 0.3s var(--ease-out);
    opacity: 0.85;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.h-gallery-card:hover .h-gallery-card-thumb img {
    transform: scale(1.04);
    opacity: 1;
}

.h-gallery-card-info {
    padding: 18px 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.h-gallery-card-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.h-gallery-card-title {
    font-size: 20px;
    font-weight: var(--fw-bold);
    letter-spacing: -0.005em;
    line-height: 1.25;
}

.h-gallery-card-subtitle {
    font-size: 14px;
    font-weight: var(--fw-light);
    color: var(--muted);
    line-height: 1.35;
}

.h-gallery-card-meta {
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: var(--fw-medium);
    text-align: right;
    flex-shrink: 0;
    line-height: 1.4;
    padding-top: 8px;
}

.h-gallery-controls {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.h-gallery-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease-out);
    color: var(--fg-soft);
}

.h-gallery-btn:hover:not(:disabled) {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

.h-gallery-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.h-gallery-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================
   NOTICE LIST
   ============================================================ */
.notice-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--rule);
}

.notice-row {
    display: grid;
    grid-template-columns: 140px 1fr 24px;
    gap: 32px;
    align-items: center;
    padding: 28px 8px;
    border-bottom: 1px solid var(--rule);
    cursor: pointer;
    transition: padding 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.notice-row:hover {
    padding-left: 24px;
    background: var(--bg-elev);
}

.notice-row .date {
    font-size: 12px;
    font-weight: var(--fw-medium);
    color: var(--muted);
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

.notice-row .title {
    font-size: clamp(18px, 1.4vw, 22px);
    font-weight: var(--fw-medium);
    color: var(--fg);
    letter-spacing: -0.005em;
}

.notice-row .arrow {
    font-size: 18px;
    color: var(--muted-2);
    transition: color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.notice-row:hover .arrow {
    color: var(--fg);
    transform: translateX(4px);
}

.notice-empty {
    padding: 80px 0;
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    font-weight: var(--fw-light);
}

@media (max-width: 600px) {
    .notice-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 22px 4px;
    }

    .notice-row .arrow {
        display: none;
    }

    .notice-row:hover {
        padding-left: 12px;
    }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 12px;
    font-weight: var(--fw-medium);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 999px;
    transition: all 0.25s var(--ease-out);
    line-height: 1;
}

.btn-solid {
    background: var(--fg);
    color: var(--bg);
}

.btn-solid:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--rule-strong);
}

.btn-ghost:hover {
    border-color: var(--fg);
    background: rgba(255, 255, 255, 0.04);
}

.btn .iconify {
    font-size: 14px;
}

/* ============================================================
   MODAL (universal)
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: var(--overlay);
    display: none;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    overscroll-behavior: contain;
}

.modal.active {
    display: block;
    opacity: 1;
}

.modal-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--rule-strong);
    color: var(--fg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s var(--ease-out);
}

.modal-close:hover {
    background: var(--fg);
    color: var(--bg);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

/* --- Project detail modal --- */
.project-modal-inner {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: grid;
    grid-template-columns: 35% 65%;
    background: var(--bg);
}

.project-modal-aside {
    padding: 80px 56px;
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow-y: auto;
}

.project-modal-poster {
    aspect-ratio: 2 / 3;
    width: 100%;
    overflow: hidden;
    background: var(--bg-elev);
}

.project-modal-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-modal-aside .eyebrow {
    margin-top: 8px;
}

.project-modal-title {
    font-size: clamp(36px, 3.4vw, 56px);
    font-weight: var(--fw-display);
    line-height: 0.95;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

.project-modal-meta {
    font-size: 13px;
    color: var(--muted);
    font-weight: var(--fw-light);
    line-height: 1.7;
}

.project-modal-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.project-modal-main {
    overflow-y: auto;
    padding: 80px 80px 120px;
    scroll-behavior: smooth;
}

.project-section {
    padding: 36px 0;
    border-top: 1px solid var(--rule);
}

.project-section:first-child {
    border-top: none;
    padding-top: 0;
}

.project-section .label {
    font-size: 11px;
    font-weight: var(--fw-bold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 18px;
    display: block;
}

.project-section .body {
    font-size: 17px;
    font-weight: var(--fw-light);
    line-height: 1.75;
    color: var(--fg-soft);
}

.project-section .body strong {
    color: var(--fg);
    font-weight: var(--fw-medium);
}

.project-section.is-logline .body {
    font-size: clamp(20px, 1.8vw, 28px);
    font-weight: var(--fw-medium);
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--fg);
}

.project-stills {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.project-stills .still {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-elev);
}

.project-stills .still img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out), opacity 0.3s var(--ease-out);
    opacity: 0.85;
}

.project-stills .still:hover img {
    transform: scale(1.04);
    opacity: 1;
}

@media (max-width: 1024px) {
    .project-modal-inner {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .project-modal-aside {
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding: calc(var(--nav-h) + 24px) 24px 32px;
        overflow: visible;
    }

    .project-modal-poster {
        max-width: 280px;
    }

    .project-modal-main {
        padding: 32px 24px 80px;
        overflow: visible;
    }
}

/* --- Team profile modal --- */
.team-modal-inner {
    height: 100vh;
    overflow-y: auto;
    padding: 120px 0 100px;
}

.team-modal-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
}

.team-modal-header .eyebrow {
    margin-bottom: 16px;
    display: block;
}

.team-modal-name {
    font-size: clamp(48px, 5vw, 84px);
    font-weight: var(--fw-display);
    line-height: 0.95;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.team-modal-role {
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: var(--fw-medium);
}

.team-modal-bio {
    font-size: 17px;
    font-weight: var(--fw-light);
    line-height: 1.75;
    color: var(--fg-soft);
    margin-bottom: 48px;
}

.team-modal-section {
    border-top: 1px solid var(--rule);
    padding: 28px 0;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 32px;
}

.team-modal-section .label {
    font-size: 11px;
    font-weight: var(--fw-bold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.team-modal-section ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.team-modal-section ul li {
    font-size: 15px;
    font-weight: var(--fw-light);
    color: var(--fg-soft);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .team-modal-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .team-modal-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* --- Notice post modal --- */
.post-modal-inner {
    height: 100vh;
    overflow-y: auto;
    padding: 120px 0 120px;
}

.post-modal-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.post-modal-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: var(--fw-medium);
}

.post-modal-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted-2);
}

.post-modal-title {
    font-size: clamp(36px, 4vw, 64px);
    font-weight: var(--fw-display);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 56px;
}

.post-modal-body {
    font-size: 17px;
    font-weight: var(--fw-light);
    line-height: 1.8;
    color: var(--fg-soft);
}

.post-modal-body h1,
.post-modal-body h2,
.post-modal-body h3 {
    color: var(--fg);
    margin: 48px 0 16px;
    line-height: 1.25;
}

.post-modal-body h1 { font-size: 32px; font-weight: var(--fw-bold); letter-spacing: -0.01em; }
.post-modal-body h2 { font-size: 26px; font-weight: var(--fw-bold); letter-spacing: -0.005em; }
.post-modal-body h3 { font-size: 20px; font-weight: 600; }

.post-modal-body p {
    margin-bottom: 22px;
}

.post-modal-body img {
    width: 100%;
    height: auto;
    margin: 32px 0;
    border-radius: 2px;
}

.post-modal-body ul,
.post-modal-body ol {
    margin: 16px 0 22px 22px;
}

.post-modal-body ul li,
.post-modal-body ol li {
    margin-bottom: 8px;
}

.post-modal-body ul {
    list-style: none;
    margin-left: 0;
}

.post-modal-body ul li {
    position: relative;
    padding-left: 22px;
}

.post-modal-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 10px;
    height: 1px;
    background: var(--muted);
}

.post-modal-body a {
    color: var(--fg);
    border-bottom: 1px solid var(--rule-strong);
}

.post-modal-body a:hover {
    border-bottom-color: var(--fg);
}

.post-modal-body blockquote {
    border-left: 2px solid var(--fg);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--fg);
    font-weight: var(--fw-light);
}

.post-modal-body code {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 14px;
    background: var(--bg-elev);
    padding: 2px 6px;
    border-radius: 3px;
}

/* --- Video modal --- */
.video-modal-inner {
    width: 95%;
    max-width: 1600px;
    aspect-ratio: 16 / 9;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.video-modal-inner iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 4px;
}

/* --- Lightbox (image gallery) --- */
.lightbox-inner {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrap {
    max-width: 85%;
    max-height: 85vh;
}

.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    user-select: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg);
    opacity: 0.4;
    transition: opacity 0.25s var(--ease-out);
    background: none;
    font-size: 32px;
    font-weight: 100;
}

.lightbox-nav:hover {
    opacity: 1;
}

.lightbox-nav.prev { left: 32px; }
.lightbox-nav.next { right: 32px; }

.lightbox-counter {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.15em;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .lightbox-nav.prev { left: 8px; }
    .lightbox-nav.next { right: 8px; }
}
