/* Home page redesign (v2). Loaded only on the home page, after styles.css. */

.no-js .js-only { display: none !important; }

/* ---------- hero: copy + live viewfinder ---------- */
.hero2 { position: relative; overflow: hidden; padding: 56px 0 32px; }
.hero2::before {
  content: ""; position: absolute; inset: -25% -15% auto auto; width: 760px; height: 760px;
  background: radial-gradient(closest-side, rgba(255, 199, 44, .14), transparent 70%); pointer-events: none;
}
.hero2-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; position: relative; }
.hero2-grid > *, .lab-grid > * { min-width: 0; }
@media (max-width: 920px) { .hero2-grid { grid-template-columns: 1fr; gap: 36px; } .hero2 { padding-top: 32px; } }
.hero2 .lede { margin-bottom: 28px; }
.try-hint { margin: 22px 0 0; font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .04em; }
.try-hint::before { content: "↘ "; }
@media (max-width: 920px) { .try-hint::before { content: "↓ "; } }

.vf { margin: 0; justify-self: center; width: min(420px, 100%); }
.vf-screen {
  position: relative; aspect-ratio: 586 / 725; border-radius: 26px; overflow: hidden; background: #000;
  box-shadow: 0 40px 90px -25px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.08), 0 0 0 10px #050505, 0 0 0 11px rgba(255,255,255,.07);
}
.vf-img, .vf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf-canvas { opacity: 0; transition: opacity .25s; }
.vf.ready .vf-canvas { opacity: 1; }
.vf-hist { position: absolute; top: 12px; right: 12px; width: 92px; height: 49px; border-radius: 8px; background: rgba(0,0,0,.55); opacity: 0; }
.vf.ready .vf-hist { opacity: 1; }
.vf-chip {
  position: absolute; left: 12px; bottom: 12px; font: 600 11.5px var(--mono); letter-spacing: .12em; color: var(--accent);
  background: rgba(0,0,0,.6); padding: 6px 10px; border-radius: 999px;
}
.vf-chip::after { content: " ▾"; }
.no-js .vf-chip { display: none; }

.vf-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 10px; margin-top: 14px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.vf-tile {
  flex: 0 0 auto; width: 76px; display: grid; gap: 5px; justify-items: center; position: relative;
  background: none; border: 0; padding: 0; color: var(--muted); font: 500 12px var(--font); cursor: pointer; scroll-snap-align: start;
}
.vf-tile canvas { width: 72px; height: 90px; border-radius: 10px; outline: 2px solid transparent; outline-offset: 2px; background: var(--card); transition: outline-color .15s; }
.vf-tile:hover canvas { outline-color: var(--line); }
.vf-tile[aria-checked="true"] { color: var(--text); }
.vf-tile[aria-checked="true"] canvas { outline-color: var(--accent); }
.vf-tile i { position: absolute; top: 4px; right: 6px; font: 600 8.5px var(--mono); font-style: normal; background: var(--accent); color: var(--accent-ink); padding: 1px 4px; border-radius: 3px; }
.vf-strip { display: block; width: 100%; height: auto; margin-top: 14px; border-radius: 12px; }
.vf figcaption { margin-top: 10px; font-size: 13.5px; color: var(--dim); text-align: center; }
.vf figcaption a { color: var(--accent); }

/* ---------- film edge divider ---------- */
.filmedge {
  display: flex; justify-content: space-around; gap: 24px; overflow: hidden; white-space: nowrap;
  padding: 22px 0; font: 600 11px var(--mono); letter-spacing: .3em; color: #b8741f;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, var(--bg) 14px 26px) 0 5px / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 14px, var(--bg) 14px 26px) 0 calc(100% - 5px) / 100% 9px no-repeat,
    #141210;
  border-block: 1px solid #241f19;
}
@media (max-width: 600px) { .filmedge span:nth-child(n+4) { display: none; } }

/* ---------- looks + scene picker ---------- */
.looks2 { padding-top: 72px; }
.scene-picker { margin: -16px 0 28px; }
.scene-q { font-weight: 700; font-size: 18px; margin: 0 0 12px; }
.scene-list { display: flex; flex-wrap: wrap; gap: 8px; }
.scene {
  min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text); font: 500 15px var(--font); cursor: pointer; transition: background .15s, border-color .15s;
}
.scene:hover { border-color: var(--muted); }
.scene[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.scene-result { min-height: 1.6em; margin: 14px 0 0; color: var(--muted); }
.scene-result b { color: var(--text); }

.looks2-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .looks2-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) {
  .looks2-grid { gap: 8px; }
  .looks2 .look { grid-template-columns: 1fr; padding: 12px 12px; }
  .looks2 .frame-no { grid-row: auto; font-size: 11px; }
  .looks2 .look-name { font-size: 15.5px; display: flex; justify-content: space-between; gap: 6px; }
  .looks2 .look-use { grid-column: 1; font-size: 13px; }
}
.looks2 .look {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: baseline;
  min-height: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  transition: opacity .2s, border-color .2s;
}
.looks2 .frame-no { grid-row: span 2; font: 600 13px var(--mono); color: #b8741f; }
.looks2 .look-name { font-size: 17px; }
.looks2 .look-use { margin: 0; grid-column: 2; }
.looks2-grid.filtering .look { opacity: .32; }
.looks2-grid.filtering .look.match { opacity: 1; border-color: var(--accent); }

/* ---------- pro tools lab ---------- */
.lab { background: var(--bg-2); border-block: 1px solid var(--line); }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 920px) { .lab-grid { grid-template-columns: 1fr; gap: 32px; } }
.lab-copy h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; }
.lab-copy > p { color: var(--muted); font-size: 18px; margin: 16px 0 24px; }
.tools { margin: 0; display: grid; gap: 14px; }
.tools div { border-left: 2px solid var(--accent); padding: 2px 0 2px 16px; }
.tools dt { font-weight: 700; }
.tools dd { margin: 2px 0 0; color: var(--muted); font-size: 15.5px; }
.muted-note { color: var(--dim); font-size: 15px; margin: 22px 0 0; }
.muted-note a { color: var(--muted); }

.lab-demo { justify-self: center; width: min(440px, 100%); }
.lab-screen { position: relative; aspect-ratio: 586 / 725; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.lab-img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.js .lab-img { display: none; }
.lab-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-hist { position: absolute; top: 12px; right: 12px; width: 120px; height: 60px; border-radius: 8px; background: rgba(0,0,0,.6); }
.lab-hist.off { display: none; }
.lab-controls { margin-top: 18px; display: grid; gap: 16px; }

.ev-dial { display: grid; gap: 8px; }
.ev-dial-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.ev-dial-head output { font: 600 14px var(--mono); color: var(--accent); }
.ev-dial input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.ev-dial input[type="range"]::-webkit-slider-runnable-track {
  height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--dim) 0 1px, transparent 1px 10%) center / calc(100% - 20px) 12px no-repeat,
              repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 2.5%) center / calc(100% - 20px) 6px no-repeat, var(--bg);
}
.ev-dial input[type="range"]::-moz-range-track {
  height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--dim) 0 1px, transparent 1px 10%) center / calc(100% - 20px) 12px no-repeat, var(--bg);
}
.ev-dial input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 6px; height: 40px; margin-top: -6px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 3px rgba(255,199,44,.25); }
.ev-dial input[type="range"]::-moz-range-thumb { width: 6px; height: 40px; border: 0; border-radius: 3px; background: var(--accent); }
.ev-dial input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }

.switches { display: flex; flex-wrap: wrap; gap: 10px; }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; font-size: 15px; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.switch:has(input:checked) { border-color: var(--accent); }

/* ---------- screenshot rail as a film strip ---------- */
.shots2 { padding-bottom: 72px; }
.shots2 .sec-head { margin-bottom: 28px; }
.shots2 .rail {
  padding: 30px 24px; gap: 14px;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, var(--bg) 14px 26px) 0 8px / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 14px, var(--bg) 14px 26px) 0 calc(100% - 8px) / 100% 10px no-repeat,
    #141210;
  border-radius: 6px;
}
.shots2 .rail img { border-color: #2a241c; border-radius: 10px; }

/* ---------- mobile install bar ---------- */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 16px;
  background: rgba(23,23,26,.96); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.6);
}
.install-bar img { border-radius: 10px; }
.install-bar span { display: grid; flex: 1; line-height: 1.25; }
.install-bar small { color: var(--muted); font-size: 13px; }
.install-bar .btn { color: var(--accent-ink); min-height: 44px; }
@media (max-width: 760px) {
  .install-bar.show { display: flex; }
  .js body { padding-bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .vf-canvas, .vf-tile canvas, .looks2 .look, .scene { transition: none; }
}
