/* =============================================================
   KENTAROS — REELS add-on  (vertical 9:16)
   -------------------------------------------------------------
   Drop-in stylesheet. Loads AFTER style.css / responsive.css and
   deliberately uses slightly higher specificity (.reel .reel__…)
   so it overrides the original 16:9 reel rules without you having
   to edit or remove anything from your existing CSS.
   ============================================================= */

/* ---------- 14. REELS  (vertical 9:16) ---------------------- */
.reel { padding-inline: var(--gutter); }

/* text | vertical frame | facts */
.reel .reel__stage {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: clamp(24px, 4vw, 72px);
}

.reel__col {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.4vw, 20px);
    padding-bottom: clamp(6px, 1vw, 18px);
}

.reel__col--right {
    align-items: flex-end;
    text-align: right;
}

/* small leading rule so the text column reads as part of the grid */
.reel__col--left .label {
    display: flex;
    align-items: center;
    gap: 14px;
}

.reel__col--left .label::before {
    content: "";
    display: block;
    width: clamp(28px, 3vw, 52px);
    height: 1px;
    background: var(--line);
}

.reel .reel__title {
    font-size: clamp(30px, 4.4vw, 76px);
    line-height: 0.92;
    letter-spacing: -0.035em;
    text-transform: uppercase;
    font-weight: 500;
    margin-left: -0.03em;
    max-width: 12ch;
}

.reel__desc {
    color: var(--grey-500);
    font-size: clamp(13px, 1.1vw, 16px);
    max-width: 42ch;
}

.reel__facts {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 1.6vw, 26px);
}

.reel__facts div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reel__facts dt {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--grey-500);
}

.reel__facts dd {
    margin: 0;
    font-size: clamp(13px, 1.15vw, 17px);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* --- the vertical viewport --- */
.reel .reel__viewport {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(100%, calc(min(78svh, 780px) * 9 / 16));
    margin-inline: auto;
}

/* soft light bloom behind the frame */
.reel__glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 190%;
    height: 116%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center,
                rgba(255, 255, 255, 0.14) 0%,
                rgba(255, 255, 255, 0.05) 38%,
                rgba(255, 255, 255, 0) 70%);
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
}

.reel .reel__frame {
    position: relative;
    z-index: 1;
    aspect-ratio: 9 / 16;
    width: 100%;
    overflow: hidden;
    background: var(--grey-900);
    border: 1px solid var(--line-soft);
}

.reel__frame video,
.reel__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* built for true 9:16 sources */
    display: block;
}

/* centred play cue — a ring with a triangle, hidden while playing */
.reel__cue {
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(56px, 6vw, 84px);
    height: clamp(56px, 6vw, 84px);
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(2px);
    transition: opacity 0.45s var(--ease-soft), transform 0.6s var(--ease);
    pointer-events: none;
}

.reel__cue i {
    display: block;
    width: 0;
    height: 0;
    margin-left: 3px;
    border-left: 12px solid var(--white);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.reel.is-playing .reel__cue {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
}

.reel__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--white);
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: opacity 0.4s var(--ease-soft);
}

.reel.is-playing .reel__badge { opacity: 0; }

/* --- scrubber --- */
.reel__scrub {
    position: relative;
    height: 2px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    z-index: 1;
}

.reel__scrub::after {          /* larger hit area */
    content: "";
    position: absolute;
    inset: -10px 0;
}

.reel__scrub i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--white);
    transition: width 0.1s linear;
}

.reel__time {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--grey-500);
    z-index: 1;
}

/* --- controls --- */
.reel .reel__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(14px, 1.6vw, 26px);
    margin-top: 4px;
}

.reel .reel__btn {
    position: relative;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white);
    opacity: 0.7;
    padding-block: 6px;
    transition: opacity 0.3s var(--ease-soft), transform 0.3s var(--ease);
}

.reel__btn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s var(--ease);
}

.reel__btn:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.reel__btn:hover::after { width: 100%; }

/* --- rail of other reels (also 9:16) --- */
.reel__rail-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-top: var(--space-md);
    padding-bottom: clamp(14px, 1.6vw, 22px);
    border-bottom: 1px solid var(--line-soft);
}

.reel__rail {
    display: flex;
    gap: clamp(14px, 1.6vw, 28px);
    margin-top: clamp(20px, 2.6vw, 40px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.reel__rail::-webkit-scrollbar { display: none; }

.reel-card {
    flex: none;
    width: clamp(150px, 15vw, 230px);
    scroll-snap-align: start;
}

/* With only a couple of reels, let the cards breathe instead of
   leaving a wide empty gutter to their right. */
.reel__rail--few .reel-card { width: clamp(180px, 21vw, 320px); }

.reel-card__frame {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: var(--grey-900);
    border: 1px solid var(--line-soft);
}

.reel-card__frame video,
.reel-card__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 1.2s var(--ease);
}

.reel-card:hover .reel-card__frame video,
.reel-card:hover .reel-card__frame img { transform: scale(1); }

.reel-card__index {
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--white);
    mix-blend-mode: difference;
}

.reel-card__title {
    margin-top: 12px;
    font-size: clamp(14px, 1.25vw, 18px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-weight: 500;
}

.reel-card__year {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--grey-500);
}

/* ---------- responsive ---------------------------------- */
@media (max-width: 1024px) {
    .reel .reel__stage {
        grid-template-columns: 1fr;
        gap: clamp(22px, 4vw, 40px);
        justify-items: start;
    }
}

@media (max-width: 768px) {
    /* REELS on phones: the vertical frame is the hero of the section. */
    .reel .reel__viewport {
        width: 100%;
        max-width: calc(72svh * 9 / 16);
    }
    .reel .reel__title { font-size: clamp(26px, 9vw, 44px); max-width: none; }
    .reel .reel__controls { gap: 16px 22px; }
    .reel__facts { gap: 14px 28px; }
    .reel__rail {
        margin-inline: calc(var(--gutter) * -1);
        padding-inline: var(--gutter);
    }
    .reel-card { width: clamp(132px, 42vw, 190px); }
}
