/* ============================================================
   imagic: homepage LUT section (board #989)

   Loaded after home-v2.css, only while the served desktop build is >= 1.5.0
   (see website/api/release_gates.py). It reuses the page's hairline spec
   grid (.hv2-spec), its tokens and its reveal / wipe covers; typography is
   the site's own (Inter, JetBrains Mono for numbers). Nothing here animates
   anything but opacity and transform.
   ============================================================ */

.hv2-lut-cell--compare { grid-column: 1 / 7; display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.6fr); gap: 44px; align-items: center; }
.hv2-lut-cell--log     { grid-column: 1 / 4; }
.hv2-lut-cell--app     { grid-column: 4 / 7; }
.hv2-lut-cell--facts   { grid-column: 1 / 7; padding: 0; }

.hv2-lut-copy { min-width: 0; }
.hv2-lut-stage { min-width: 0; }

/* the box carries the image's place; the wipe cover inside it shrinks off */
.hv2-lut-box { position: relative; display: block; margin-top: 22px; }
.hv2-lut-cell--compare .hv2-lut-box { margin-top: 0; }
.hv2-lut-cell--log .hv2-lut-box, .hv2-lut-cell--app .hv2-spec-img-box { margin-top: auto; }
.hv2-lut-cell--log .hv2-lut-box { padding-top: 0; }
.hv2-lut-cell--log p, .hv2-lut-cell--app p { margin-bottom: 22px; }

/* ------------------------------------------------------------
   Strength compare: two exports stacked, the LUT frame's opacity is the
   strength (a straight blend, which is what the app's Strength does)
   ------------------------------------------------------------ */
.hv2-lutcmp-frame {
    position: relative;
    display: block;
    aspect-ratio: 1600 / 1076;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    background: #000;
}
.hv2-lutcmp-frame img, .hv2-lutsplit img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hv2-lutcmp-top { opacity: var(--s, 0.8); will-change: opacity; }
.hv2-lutcmp-chip {
    position: absolute;
    top: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(10, 10, 12, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    pointer-events: none;
}
.hv2-lutcmp-chip--l { left: 12px; }
.hv2-lutcmp-chip--r { right: 12px; }

.hv2-lutcmp-ctl {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}
.hv2-lutcmp-lbl { font-size: 0.82rem; color: var(--dim); }
.hv2-lutcmp-val {
    min-width: 3.6ch;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--brand);
}
.hv2-lutcmp-cap { margin: 14px 0 0; font-size: 0.78rem; line-height: 1.55; color: var(--dim); max-width: none; }
.hv2-spec-cell .hv2-lutcmp-cap { font-size: 0.78rem; color: var(--dim); max-width: none; }

.hv2-lutcmp-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 28px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    --fill: calc(var(--s, 0.8) * 100%);
}
.hv2-lutcmp-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand) var(--fill), rgba(255, 255, 255, 0.16) var(--fill));
}
.hv2-lutcmp-range::-moz-range-track {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.16);
}
.hv2-lutcmp-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--brand); }
.hv2-lutcmp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -9px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--brand);
    box-shadow: 0 2px 10px rgba(246, 112, 20, 0.5);
}
.hv2-lutcmp-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--brand);
    box-shadow: 0 2px 10px rgba(246, 112, 20, 0.5);
}
.hv2-lutcmp-range:focus-visible { outline: 2px solid #ffb347; outline-offset: 4px; border-radius: 6px; }

/* ------------------------------------------------------------
   Log pair: one frame, flat on the left, graded on the right
   ------------------------------------------------------------ */
.hv2-lutsplit {
    position: relative;
    display: block;
    aspect-ratio: 900 / 606;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    background: #000;
}
.hv2-lutsplit-top { clip-path: inset(0 0 0 50%); }
.hv2-lutsplit-rule { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.85); }
.hv2-lut-fine { display: block; margin-top: 12px; font-size: 0.78rem; line-height: 1.55; color: var(--dim); }

/* ------------------------------------------------------------
   Fact row: five hairline cells
   ------------------------------------------------------------ */
.hv2-lut-facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, 0.10);
}
.hv2-lut-facts li { background: var(--page); padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 6px; }
.hv2-lut-facts b {
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #fff;
}
.hv2-lut-facts b .hv2-feat-tier { margin-left: 6px; vertical-align: 1px; font-family: var(--font-sans); }
.hv2-lut-facts span { font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.hv2-lut-facts li > span { max-width: 26ch; }

.hv2-lut .hv2-actions { margin-top: 8px; }
.hv2-lut .hv2-note { max-width: 760px; margin-left: auto; margin-right: auto; }

/* the fact row sits inside a cell that has no padding of its own */
.hv2-lut-cell--facts.hv2-reveal { opacity: 1; transform: none; }

@media (max-width: 1024px) {
    .hv2-lut-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .hv2-lut-cell--compare, .hv2-lut-cell--log, .hv2-lut-cell--app, .hv2-lut-cell--facts { grid-column: 1 / 7; grid-row: auto; }
    .hv2-lut-cell--compare { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .hv2-lutcmp-ctl { grid-template-columns: 1fr auto; gap: 8px 14px; }
    .hv2-lutcmp-lbl { grid-column: 1 / 3; }
    .hv2-lut-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hv2-lut-facts li { padding: 20px 18px; }
    .hv2-lutcmp-chip { top: 8px; padding: 4px 9px; font-size: 0.66rem; }
    .hv2-lutcmp-chip--l { left: 8px; }
    .hv2-lutcmp-chip--r { right: 8px; }
}
@media (max-width: 420px) {
    .hv2-lut-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .hv2-lutcmp-top { will-change: auto; }
}
