/* -For Debugging */
/* * {
  outline: 1px solid red;
} */

/* ---------- Fonts ----------
   Loaded from assets/Fonts/ (matches the folder as uploaded). */

@font-face {
    font-family: 'Awesome Serif';
    src: url('assets/Fonts/AwesomeSerif-Regular.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('assets/Fonts/Geist-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('assets/Fonts/Geist-Bold.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --gold: #F9CE17;
    --muted: #b8b8b8;
    --border: #000000;
    --font-display: 'Awesome Serif', Georgia, 'Times New Roman', serif;
    --font-body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-body);
}

/* ---------- Smooth scroll wrapper ----------
   .viewport pins a full-screen window; #scroll-container holds the real
   page content and gets translateY'd by JS to a lerped (eased) position.
   body.style.height is set by JS to match the content's real height so the
   native scrollbar, wheel, touch, and keyboard scrolling all still work —
   they just drive a smoothed value instead of moving content directly. */

.viewport {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    background: var(--black);
    padding: 56px 40px 40px;
    overflow: hidden;
}

.hero__meta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
}

.hero__scribble {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    /* opacity: 0.15; */
    pointer-events: none;
    z-index: 0;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 2160px;
}

.hero__name {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(4rem, 11vw, 8.5rem);
    letter-spacing: -0.05em;
    color: var(--gold);
    margin: 0 0 20px;
    line-height: 1;
}

.hero__blurb {
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--white);
    width: 1300px;
    max-width: calc(100vw - 80px);
    margin: 0 0 0 0;
    margin-right: -320px;
}

/* Its own full-width row (not capped by hero__content's max-width),
   so Instagram genuinely sticks to the hero's right edge */
.hero__links {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.hero__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    text-decoration: underline;
    font-size: 1rem;
    font-weight: 400;
    font-family: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.15s ease;
}

.hero__link:hover {
    color: var(--white);
}

/* Email: "mouse effect" is a copy-style cursor on hover, plus a small
   fading tooltip on click — the button's own text never changes */
.hero__email-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hero__email {
    cursor: copy;
}

.copy-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    background: var(--white);
    color: var(--black);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--white);
}

.copy-tooltip.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Flaticon icon (raster PNG) recolored to match the gold accent via mask,
   so it works regardless of the source icon's own color.
   Icon: "Up Right Arrow" by HAJICON on Flaticon — attribution in README/footer.
   Currently unused: paired Instagram link is commented out in header.php. */
.hero__link-icon {
    display: inline-block;
    width: 11px;
    height: 11px;
    background-color: var(--gold);
    -webkit-mask-image: url('https://cdn-icons-png.flaticon.com/512/3718/3718458.png');
    mask-image: url('https://cdn-icons-png.flaticon.com/512/3718/3718458.png');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color 0.15s ease;
}

.hero__instagram:hover .hero__link-icon {
    background-color: var(--white);
}

/* ---------- Tab bar ---------- */
/* "Magic line" hover indicator: a shared bar that slides to whichever tab
   is hovered, and falls back to the active tab's position when nothing is
   hovered. Colors: grey (default text) / white (hover text) / gold (active
   text + the line itself). Based on the classic CSS-only magic-line navbar
   pattern (grid + custom properties), adapted to 3 fixed tabs. */

.tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--black);
    border-bottom: 4px solid var(--black);
}

.tabs__item {
    padding: 16px 12px;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.tabs__item:hover {
    color: var(--gold);
}

.tabs__item.is-active {
    color: var(--gold);
}

.tabs__line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 33.333%;
    height: 3px;
    background: var(--gold);
    pointer-events: none;
    transition: left 0.3s ease, width 0.3s ease;
}

/* ---------- Video grid ---------- */

.panel {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel.is-active {
    display: block;
}

.panel.is-active.is-visible {
    opacity: 1;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: var(--black);
    padding: 5px;
    justify-content: center;
    margin: 0 auto;
}

.video-frame {
    position: relative;
    flex: 0 0 auto;
    background-color: var(--black);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.video-frame:hover {
    transform: scale(1.04);
    z-index: 5;
}

/* When any tile in the grid is hovered, dim/blur every other tile */
.grid:has(.video-frame:hover) .video-frame:not(:hover) {
    filter: blur(2px) brightness(0.6);
    opacity: 0.85;
}

/* Skip entirely on touch devices — no hover state to trigger it */
@media (hover: none) {
    .video-frame:hover {
        transform: none;
    }

    .grid:has(.video-frame:hover) .video-frame:not(:hover) {
        filter: none;
        opacity: 1;
    }
}

/* Ads tab: fixed 614x345 tiles, capped at 4 per row, reflowing to
   3/2/1 as the screen narrows (each tile keeps its real size) */
.grid--ads {
    max-width: calc(614px * 4 + 5px * 3);
}

.grid--ads .video-frame {
    width: 614px;
    max-width: 100%;
    aspect-ratio: 614 / 345;
}

/* Motion Graphics + Long Forms tabs: fixed 702x394.88 tiles, same rule */
.grid--wide {
    max-width: calc(702px * 4 + 5px * 3);
}

.grid--wide .video-frame {
    width: 702px;
    max-width: 100%;
    aspect-ratio: 702 / 394.88;
}

/* Portrait videos get a rotated version of the tab's own size,
   instead of being cropped into the landscape box */
.grid--ads .video-frame--portrait {
    width: 345px;
    max-width: 100%;
    aspect-ratio: 345 / 614;
}

.grid--wide .video-frame--portrait {
    width: 394.88px;
    max-width: 100%;
    aspect-ratio: 394.88 / 702;
}

/* Vimeo's SDK injects an <iframe> here on hover — fill the tile with it */
.video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    object-fit: cover;
    pointer-events: none;
}

/* Custom control bar: play/pause, seek, mute, volume — overlaid on each tile */
.video-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.video-frame:hover .video-controls,
.video-frame:focus-within .video-controls {
    opacity: 1;
    pointer-events: auto;
}

/* No hover on touch devices — keep controls visible so they're reachable */
@media (hover: none) {
    .video-controls {
        opacity: 1;
        pointer-events: auto;
    }
}

.vc-btn {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    padding: 0;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vc-btn svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.vc-btn:hover {
    color: var(--gold);
}

.vc-play .icon-pause,
.vc-mute .icon-muted {
    display: none;
}

.vc-play.is-playing .icon-play {
    display: none;
}

.vc-play.is-playing .icon-pause {
    display: block;
}

.vc-mute.is-muted .icon-vol {
    display: none;
}

.vc-mute.is-muted .icon-muted {
    display: block;
}

.vc-seek,
.vc-volume {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.vc-seek {
    flex: 1 1 auto;
    min-width: 0;
}

.vc-volume {
    flex: 0 0 auto;
    width: 40px;
}

.vc-seek::-webkit-slider-thumb,
.vc-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
}

.vc-seek::-moz-range-thumb,
.vc-volume::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
    border: none;
}

.empty-msg {
    width: 100%;
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
}

/* Currently unused: paired footer is commented out in index.php. */
.site-credit {
    text-align: center;
    padding: 14px;
    font-size: 0.68rem;
    color: #555;
}

.site-credit a {
    color: #777;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .hero {
        padding: 40px 20px 28px;
    }

    .hero__links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tabs__item {
        font-size: 0.7rem;
        padding: 14px 6px;
    }

    .grid {
        gap: 3px;
        padding: 3px;
    }
}

@media (max-width: 380px) {
    .hero__name {
        font-size: 2.2rem;
    }

    .tabs__item {
        font-size: 0.62rem;
        letter-spacing: 0.03em;
        padding: 12px 4px;
    }
}

.streamable-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.streamable-player {
    width: 100%;
    height: 100%;
    border: none;
}

.video-frame .streamable-player {
    pointer-events: auto;
}