/* Float Valley case file. functions.php loads this file on that page only, after theme.css and glass-fx.css.
   Its dark rules match those files' specificity, so this load order is what makes them win. */

/* Before and after.
   Default state is the no-JavaScript fallback, a labelled pair. .is-live (showcase.js) stacks the pair in one
   frame and shows the glass pane. The range input sits invisibly over the frame so drag, touch and keys are native. */
.fv-ba{--fv-hit:72px}
.fv-ba .sec-head{margin-bottom:clamp(24px,3.4vw,44px)}
.fv-ba-cmp{margin:0; --pos:50%}

/* fallback: a pair */
.fv-ba-stage{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
.fv-ba-img{width:100%; height:auto; border-radius:18px; box-shadow:0 34px 70px -40px rgba(25,50,90,.5)}
.fv-ba-tag,.fv-ba-pane{display:none}
.fv-ba-key{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 16px; margin-top:14px}
.fv-ba-key .lbl{text-transform:none; letter-spacing:.03em}
.fv-ba-key .lbl:last-child{text-align:right}

/* live: one frame */
.fv-ba-cmp.is-live .fv-ba-key{display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 24px}
.fv-ba-cmp.is-live .fv-ba-key .lbl:last-child{text-align:left}
.fv-ba-cmp.is-live .fv-ba-stage{display:block; position:relative; isolation:isolate; overflow:hidden; aspect-ratio:1440/748;
  border-radius:clamp(18px,2.4vw,28px); background:var(--mist); box-shadow:0 50px 90px -50px rgba(25,50,90,.6)}
.fv-ba-cmp-phone.is-live .fv-ba-stage{aspect-ratio:390/820}
.is-live .fv-ba-img{position:absolute; inset:0; height:100%; object-fit:cover; object-position:top; border-radius:0; box-shadow:none}
.is-live .fv-ba-before{z-index:1; clip-path:inset(0 calc(100% - var(--pos)) 0 0)}

.is-live .fv-ba-tag{display:block; position:absolute; z-index:4; bottom:clamp(8px,1.2vw,16px); padding:5px 10px; border-radius:999px;
  font:500 11px/1.2 var(--mono); letter-spacing:.07em; text-transform:uppercase; color:#fff; background:rgba(15,23,32,.68);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px)}
.fv-ba-tag-before{left:clamp(8px,1.2vw,16px)}
.fv-ba-tag-after{right:clamp(8px,1.2vw,16px)}
/* showcase.js adds these once the pane reaches a tag, so a tag never sits on the other site. */
.is-live.fv-ba-no-before .fv-ba-tag-before,.is-live.fv-ba-no-after .fv-ba-tag-after{visibility:hidden}

/* desktop pair, flipped: the new site rests on the left so its headline shows. The markup keeps Before then After for the no-JavaScript pair. */
.fv-ba-newleft.is-live .fv-ba-before{clip-path:none; z-index:0}
.fv-ba-newleft.is-live .fv-ba-after{z-index:1; clip-path:inset(0 calc(100% - var(--pos)) 0 0)}
.fv-ba-newleft.is-live .fv-ba-tag{bottom:12%}
.fv-ba-newleft.is-live .fv-ba-tag-before{left:auto; right:clamp(8px,1.2vw,16px)}
.fv-ba-newleft.is-live .fv-ba-tag-after{right:auto; left:clamp(8px,1.2vw,16px)}
.fv-ba-newleft.is-live .fv-ba-key .lbl:first-child{order:2}
/* Tags clear both sites: 12% sits above the old site's logo badge. Below 960 the new site's text reaches the left edge, so its tag moves up under the nav. */
@media (max-width:960px){ .fv-ba-newleft.is-live .fv-ba-tag-after{bottom:auto; top:17%} }

/* the glass pane: a sliver of frosted glass that bends what is behind it */
.is-live .fv-ba-pane{display:block; position:absolute; z-index:3; top:0; bottom:0; left:var(--pos); width:clamp(18px,3.4vw,48px); transform:translateX(-50%); pointer-events:none;
  background:linear-gradient(90deg,rgba(255,255,255,.36),rgba(255,255,255,.1) 42%,rgba(255,255,255,.3));
  -webkit-backdrop-filter:blur(12px) saturate(165%); backdrop-filter:blur(12px) saturate(165%);
  box-shadow:inset 1px 0 0 rgba(255,255,255,.85), inset -1px 0 0 rgba(255,255,255,.6), 0 0 42px rgba(15,23,32,.42)}
.fv-ba-pane i{position:absolute; top:50%; left:50%; width:40px; height:68px; margin:-34px 0 0 -20px; border-radius:999px;
  background:rgba(255,255,255,.82); box-shadow:inset 0 1px 0 #fff, 0 12px 26px -10px rgba(15,23,32,.6)}
.fv-ba-pane i::before,.fv-ba-pane i::after{content:""; position:absolute; top:24px; bottom:24px; width:2px; border-radius:2px; background:#0F1720; opacity:.7}
.fv-ba-pane i::before{left:15px}
.fv-ba-pane i::after{right:15px}

.fv-ba-range{position:absolute; z-index:5; top:0; bottom:0; left:calc(var(--fv-hit) / -2); width:calc(100% + var(--fv-hit)); height:100%; margin:0; padding:0;
  opacity:0; cursor:ew-resize; touch-action:pan-y pinch-zoom; -webkit-appearance:none; appearance:none; background:none}
.fv-ba-range::-webkit-slider-runnable-track{height:100%; background:none}
.fv-ba-range::-moz-range-track{height:100%; background:none}
.fv-ba-range::-webkit-slider-thumb{-webkit-appearance:none; appearance:none; width:var(--fv-hit); height:100vh}
.fv-ba-range::-moz-range-thumb{width:var(--fv-hit); height:100%; border:0; border-radius:0; background:none}
.fv-ba-range:focus-visible ~ .fv-ba-pane i{outline:3px solid var(--ink); outline-offset:2px; box-shadow:0 0 0 7px var(--clear)}

/* phone pair */
.fv-ba-cmp-phone.is-live .fv-ba-pane{width:18px}
.fv-ba-cmp-phone.is-live .fv-ba-tag{bottom:auto; top:15.5%}
.fv-ba-phone{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,350px); gap:clamp(28px,6vw,96px); align-items:center; margin-top:clamp(44px,6vw,88px)}
.fv-ba-note{display:grid; gap:14px}
.fv-ba-note h3{font-size:clamp(1.6rem,2.8vw,2.5rem); line-height:1.08; color:var(--ink)}
.fv-ba-note p{font-size:17px}
.fv-ba-note .fv-ba-src{display:block; margin-top:6px; max-width:62ch; font-size:11.5px; line-height:1.55; color:var(--slate); text-transform:none; letter-spacing:.03em}

@media (max-width:760px){
  .fv-ba-phone{grid-template-columns:minmax(0,1fr)}
  .fv-ba-cmp-phone{width:100%; max-width:380px; margin-inline:auto}
}
@media (max-width:620px){
  .is-live .fv-ba-tag{padding:3px 8px; font-size:10px}
  .fv-ba-cmp-phone.is-live .fv-ba-tag{padding:5px 10px; font-size:11px}
  .fv-ba-pane i{width:32px; height:52px; margin:-26px 0 0 -16px}
  .fv-ba-pane i::before,.fv-ba-pane i::after{top:18px; bottom:18px}
  .fv-ba-pane i::before{left:11px}
  .fv-ba-pane i::after{right:11px}
}
/* On touch the phone frame's range is only a band across the grip, so a swipe anywhere else scrolls the page. */
@media (pointer:coarse){
  .fv-ba-cmp-phone .fv-ba-range{top:calc(50% - 60px); bottom:auto; height:120px}
  .fv-ba-cmp-phone .fv-ba-range::-webkit-slider-thumb{height:120px}
}
@media (hover:none){ .fv-ba-hint-keys{display:none} }

/* Case image: keep the browser bar and nav, as .site2 does on Work. Keep this here too: elevate.css would change the six other cases. */
.gallery figure.g-wide img{object-position:top}
.gallery figure.g-tall img{object-position:30% 50%} /* gives the Services page headline room at the pane's left edge */

/* The system. Scoped to .fv-sys. Theme tokens only, so it holds in light and dark. */

.fv-sys-parts{display:grid; gap:clamp(56px,7vw,104px)}
.fv-sys-part{display:grid; gap:clamp(16px,2vw,24px); min-width:0; align-content:start}
.fv-sys figure{margin:0; min-width:0}

/* each part: a short note, the artefact, one small caption */
.fv-sys-note{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 64px; align-items:baseline}
.fv-sys-note h3{font-size:clamp(1.6rem,2.6vw,2.25rem); line-height:1.08}
.fv-sys-note p{font-size:16px; max-width:58ch}
.fv-sys-cap{max-width:none; text-transform:none; letter-spacing:.01em; font-size:12px; line-height:1.5; color:var(--slate)}

/* glass pane that holds real work */
.fv-sys-pane{border-radius:26px; padding:clamp(8px,1.1vw,14px)}
.fv-sys-pane img{width:100%; height:auto; border-radius:16px; background:#fff}
.fv-sys-tile figcaption{padding:8px 4px 2px; text-transform:none; letter-spacing:.02em; font-size:11.5px; line-height:1.4; color:var(--slate)}

/* the wall of pages */
.fv-sys-wall{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(10px,1.2vw,16px)}
.fv-sys-wall img{aspect-ratio:520/278; object-fit:cover; object-position:top}

/* brand system beside the icon set */
.fv-sys-pair{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(16px,2vw,24px) 64px; align-items:start}
.fv-sys-pair > .fv-sys-part{grid-row:span 3; grid-template-rows:subgrid}
.fv-sys-pair .fv-sys-note{grid-template-columns:minmax(0,1fr)}
.fv-sys-pair img{aspect-ratio:1}

/* the photo library selection */
.fv-sys-photos{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(10px,1.2vw,16px)}
.fv-sys-photos img{aspect-ratio:3/2; object-fit:cover}

/* brand standards: spacing and alignment, no rules between rows */
.fv-sys-std{margin:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(20px,2.4vw,30px) clamp(24px,3vw,40px)}
.fv-sys-std dt{display:block; margin-bottom:6px; color:var(--slate)}
.fv-sys-std dd{margin:0; font-size:15px; line-height:1.5; color:var(--slate)}

@media (max-width:960px){
  .fv-sys-note{grid-template-columns:minmax(0,1fr)}
  .fv-sys-pair{grid-template-columns:minmax(0,1fr); row-gap:clamp(56px,7vw,72px)}
  .fv-sys-pair > .fv-sys-part{grid-row:auto; grid-template-rows:none}
  .fv-sys-wall{grid-template-columns:repeat(3,minmax(0,1fr))}
  .fv-sys-std{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){
  .fv-sys-wall{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fv-sys-photos{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fv-sys-std{grid-template-columns:minmax(0,1fr)}
  .fv-sys-pane{border-radius:20px}
  .fv-sys-pane img{border-radius:12px}
}

/* Frequency Forest.
   A second window into the same case file. Only the captures and the palette specimen carry Frequency Forest's
   look: everything else here is Glass & Light tokens. No divider rules, spacing and the glass panes do the work. */
.ffx{--ffx-gap:clamp(14px,1.6vw,20px)}
.ffx-lede{display:grid; gap:12px}
.ffx-lede p{text-wrap:pretty}

/* Screens: shown large, with the caption on the glass below the image, never over it. */
.ffx-shot{margin:0; border-radius:26px; overflow:hidden; display:flex; flex-direction:column}
.ffx-shot img{display:block; width:100%; height:auto}
.ffx-cap{font-family:var(--mono); font-size:12px; line-height:1.55; letter-spacing:.01em; color:var(--slate); padding:12px 16px 14px}
.ffx-cap b{font-weight:500; color:var(--ink)}

/* Desktop and phone share one image height: the columns follow the two captures' proportions (1.6 and .462). */
.ffx-pair{display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,.462fr); gap:var(--ffx-gap)}
.ffx-two{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ffx-gap); margin-top:var(--ffx-gap)}

/* The identity sheet */
.ffx-kit{margin-top:var(--ffx-gap); display:grid; gap:clamp(20px,2.4vw,30px)}
/* In dark, the section's light can sit under any caption here: a scrim keeps the text at AA and leaves the glow at the edges. */
:root[data-theme="dark"] .ffx-kit, :root[data-theme="dark"] .ffx-shot{background:linear-gradient(155deg, rgba(15,23,32,.74), rgba(15,23,32,.64))}
.ffx-kit-head{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px clamp(20px,3vw,40px); align-items:baseline}
.ffx-kit-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(20px,2.6vw,32px) clamp(20px,3vw,40px); align-items:start}
.ffx-spec{margin:0; display:grid; gap:2px; align-content:start}
.ffx-spec img{display:block; width:100%; height:auto; border-radius:16px}
.ffx-spec .ffx-cap{padding:10px 2px 0}

.ffx-pal{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px}
.ffx-pal li{display:grid; gap:2px; align-content:start; min-width:0}
.ffx-pal i{display:block; aspect-ratio:1/1.3; border-radius:12px; margin-bottom:6px; box-shadow:inset 0 0 0 1px rgba(15,23,32,.1)}
.ffx-pal b{font-family:var(--mono); font-weight:500; font-size:11px; line-height:1.3; color:var(--ink)}
.ffx-pal span{font-family:var(--mono); font-size:10.5px; line-height:1.3; color:var(--slate)}
:root[data-theme="dark"] .ffx-pal i{box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}

.ffx-tok{margin:0; font-family:var(--mono); font-size:12.5px; line-height:1.8; color:var(--slate); white-space:pre-wrap; overflow-wrap:anywhere}
.ffx-tok b{font-weight:500; color:var(--ink)}

@media (max-width:960px){
  .ffx-pair{grid-template-columns:minmax(0,1fr)}
  .ffx-phone{width:100%; max-width:300px; justify-self:center}
}
@media (max-width:860px){
  .ffx-two,.ffx-kit-grid,.ffx-kit-head{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:560px){
  .ffx-pal{grid-template-columns:repeat(4,minmax(0,1fr))}
  .ffx-shot{border-radius:20px}
}

/* App preview. */
.fv-app{--fv-app-cols:5; --fv-app-gap:clamp(14px,1.9vw,26px)}

/* The verbatim label keeps its capital and lower case; .lbl would otherwise uppercase it. */
.fv-app .fv-app-flag{text-transform:none; letter-spacing:.02em}

/* Five screens across, then three and two centred, then two columns with Ripples beside its caption. */
.fv-app-row{display:flex; flex-wrap:wrap; justify-content:center; gap:clamp(32px,4vw,48px) var(--fv-app-gap)}
.fv-app-fig{flex:0 0 calc((100% - (var(--fv-app-cols) - 1) * var(--fv-app-gap)) / var(--fv-app-cols)); min-width:0; margin:0; display:grid; gap:16px; align-content:start}

/* A rounded, phone-shaped crop of a real screen. No bezel, notch or other device hardware. */
.fv-app-screen{width:100%; height:auto; aspect-ratio:1206/2462; object-fit:cover; border-radius:11% / 5.4%; background:var(--mist);
  box-shadow:0 34px 56px -32px rgba(25,50,90,.5), 0 6px 16px -10px rgba(25,50,90,.28)}
:root[data-theme="dark"] .fv-app-screen{box-shadow:0 0 0 1px rgba(255,255,255,.1), 0 34px 56px -30px rgba(0,0,0,.85)}

.fv-app-fig figcaption{display:grid; gap:5px; align-content:start; min-width:0}
.fv-app-name{font-size:17px; font-weight:500; letter-spacing:-.01em; color:var(--ink)}
.fv-app-what{font-size:14.5px; line-height:1.45; color:var(--slate)}
/* Slate, not mute: the light fields pass behind these lines, and mute falls to 3.5:1 over the dark theme's amber. */
.fv-app .fv-app-src{margin-top:3px; font-size:11px; letter-spacing:.02em; text-transform:none; color:var(--slate)}
.fv-app-note{margin-top:clamp(32px,4vw,48px); font-size:14px; color:var(--slate)}

@media (max-width:1100px){ .fv-app{--fv-app-cols:3} }
@media (max-width:640px){
  .fv-app{--fv-app-cols:2}
  .fv-app-fig{gap:12px}
  .fv-app-fig:last-child{flex-basis:100%; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:var(--fv-app-gap); align-items:end}
}

/* v3.9.2 · Prism glass showcase. No hard frame and no white backing: the sites sit on frosted glass,
   lit by a soft prism edge and a caustic glow behind. Same treatment in light and dark. */
.fv-sys .fv-sys-pane.glass{position:relative; isolation:isolate; border:0 !important; background-image:none; border-radius:30px; padding:clamp(12px,1.6vw,22px);
  background:linear-gradient(150deg, rgba(255,255,255,.22), rgba(255,255,255,.06) 55%, rgba(127,180,255,.08));
  -webkit-backdrop-filter:blur(24px) saturate(160%); backdrop-filter:blur(24px) saturate(160%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55), 0 50px 90px -60px rgba(25,50,90,.45)}
.fv-sys .fv-sys-pane.glass::before{content:""; position:absolute; inset:0; border-radius:inherit; padding:1px; pointer-events:none;
  background:linear-gradient(120deg, rgba(127,180,255,.75), rgba(246,200,224,.6) 30%, rgba(245,194,122,.5) 55%, rgba(199,240,230,.6) 80%, rgba(127,180,255,.7));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0)}
.fv-sys .fv-sys-pane.glass::after{content:""; position:absolute; z-index:-1; inset:8% 4% -6%; border-radius:50%; pointer-events:none; filter:blur(60px); opacity:.45;
  background:radial-gradient(closest-side at 25% 40%, var(--sky), transparent), radial-gradient(closest-side at 70% 60%, var(--blush), transparent), radial-gradient(closest-side at 50% 90%, var(--amber), transparent)}
.fv-sys .fv-sys-pane.glass img{background:transparent; display:block; border-radius:12px;
  box-shadow:0 0 0 1px rgba(255,255,255,.35), 0 18px 34px -22px rgba(25,50,90,.55)}
:root[data-theme="dark"] .fv-sys .fv-sys-pane.glass{background:linear-gradient(150deg, rgba(255,255,255,.09), rgba(255,255,255,.02) 55%, rgba(127,180,255,.06));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 50px 90px -60px rgba(0,0,0,.8)}
:root[data-theme="dark"] .fv-sys .fv-sys-pane.glass::after{opacity:.22}
:root[data-theme="dark"] .fv-sys .fv-sys-pane.glass img{box-shadow:0 0 0 1px rgba(255,255,255,.12), 0 18px 34px -20px rgba(0,0,0,.8)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .fv-sys .fv-sys-pane.glass img{background:transparent}}
