/* ═════════ r6.1 — ROOM 05-Ⅰ 물의 과학 / THE SCIENCE OF Q WATER ═════════
   One white room that becomes misted glass (distillation), dims to a dark niche around real footage (EPU),
   and clears into glacier light (oxygen). Light / oxygen drawings are explanatory, never presented as measurements. */

/* static (no JS / reduced motion): four calm blocks in flow */
.science{background:var(--glacier);color:var(--marine)}
.science .stage{display:block;padding:clamp(72px,11vh,130px) var(--pad-x)}
.sci-surface,.sci-behind,.sci-glass,.sci-index{display:none}
.sci-scene+.sci-scene{margin-top:clamp(72px,10vh,120px)}
.science .ln{display:block}

/* identity */
.sci-title{font-weight:300}
.sci-title__en{font:300 clamp(46px,6.4vw,116px)/1.02 var(--serif);letter-spacing:.02em;color:var(--marine)}
.sci-title__en sub{font-size:.42em;vertical-align:baseline;position:relative;top:.18em;margin-left:.04em;line-height:0}
.sci-title__ko{margin-top:clamp(12px,2vh,22px);font:300 clamp(26px,2.5vw,44px)/1.3 var(--serif);letter-spacing:.06em;color:var(--marine)}
.sci-title__q{margin-top:clamp(12px,1.8vh,18px);font:500 13px/1 var(--sans);letter-spacing:.32em;color:var(--mineral-ink)}
.sci-key{margin-top:clamp(24px,4vh,40px);font:400 clamp(17px,1.35vw,22px)/1.7 var(--sans);color:var(--marine-2);word-break:keep-all}
.sci-tech{position:relative;display:flex;gap:clamp(24px,3.4vw,64px);margin-top:clamp(36px,6vh,60px);padding-top:26px}
.sci-tech::before{content:"";position:absolute;left:0;top:0;height:1px;width:calc(var(--il,1) * 100%);
  background:linear-gradient(90deg,rgba(82,127,152,.9),rgba(170,215,235,.9) 70%,rgba(255,255,255,0));box-shadow:0 0 12px rgba(150,205,230,.8)}
.sci-tech li{position:relative;display:flex;flex-direction:column;gap:9px;opacity:calc(.2 + .8 * var(--il,1))}
.sci-tech li::before{content:"";position:absolute;left:0;top:-30px;width:7px;height:7px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px rgba(82,127,152,.7),0 0 12px 2px rgba(150,205,230,.9)}
.sci-tech .en{font:500 12px/1.3 var(--sans);letter-spacing:.2em;color:var(--marine)}
.sci-tech .ko{font:400 16px/1.3 var(--serif);color:var(--marine-2)}
.sci-note{margin-top:clamp(28px,4vh,40px);max-width:34em;font:400 12.5px/1.6 var(--sans);color:var(--mineral-ink);word-break:keep-all}

/* technology scenes */
.sci-eyebrow{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;font:400 15px/1.2 var(--serif);color:var(--mineral-ink)}
.sci-eyebrow span{font:500 12px/1 var(--sans);letter-spacing:.22em;color:var(--marine)}
.sci-h{margin-top:16px;font:300 clamp(34px,3.6vw,64px)/1.25 var(--serif);word-break:keep-all;color:var(--marine)}
.sci-body{margin-top:22px;max-width:25em;font:400 clamp(16px,1.15vw,19px)/1.85 var(--sans);color:var(--marine-2);word-break:keep-all}
.sci-steps{display:flex;gap:clamp(18px,2.2vw,34px);margin-top:34px}
.sci-steps li{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;font:400 14px/1 var(--serif);color:var(--marine)}
.sci-steps li+li::before{content:"";position:absolute;top:20px;right:calc(100% + 4px);width:calc(clamp(18px,2.2vw,34px) - 8px);height:1px;background:rgba(82,127,152,.5)}
.sci-steps svg{width:40px;height:40px;fill:none;stroke:var(--mineral);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.sci-steps circle{fill:var(--mineral);stroke:none}
.sci-disclaim{margin-top:22px;max-width:30em;font:400 13px/1.6 var(--sans);color:rgba(243,242,236,.72);word-break:keep-all}

.sci-epu{background:var(--ocean);color:var(--ivory);margin:0 calc(var(--pad-x) * -1);padding:clamp(48px,8vh,96px) var(--pad-x)}
.sci-epu .sci-eyebrow{color:rgba(220,238,247,.8)}.sci-epu .sci-eyebrow span{color:var(--ivory)}
.sci-epu .sci-h{color:var(--ivory)}.sci-epu .sci-body{color:rgba(243,242,236,.82)}
.sci-epu__film{position:relative;margin:0 0 32px;aspect-ratio:16/9;overflow:hidden;background-size:cover}
.sci-epu__film video{width:100%;height:100%;object-fit:cover}
.sci-epu__film figcaption,.sci-o2 figcaption{margin-top:10px;font:400 13px/1.5 var(--sans);color:var(--marine-2)}
.sci-epu__film figcaption{position:absolute;right:16px;bottom:14px;margin:0;color:rgba(243,242,236,.78)}
.sci-flow{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.sci-flow path{fill:none;stroke-linecap:round;stroke-dasharray:1 1;stroke-dashoffset:calc(1 - var(--el,1))}
.sci-flow__halo{stroke:rgba(150,205,230,.55);stroke-width:12;filter:url(#flowglow)}
.sci-flow__line{stroke:#F2FAFE;stroke-width:1.6}
.sci-ripples ellipse{fill:none;stroke:rgba(225,243,251,.75);stroke-width:1.2;transform-box:fill-box;transform-origin:50% 50%}
.sci-ripples ellipse:nth-child(1){opacity:calc(var(--rp,0) * .9);transform:scale(calc(.6 + .4 * var(--rp,0)))}
.sci-ripples ellipse:nth-child(2){opacity:calc(var(--rp,0) * .55);transform:scale(calc(.5 + .5 * var(--rp,0)))}
.sci-ripples ellipse:nth-child(3){opacity:calc(var(--rp,0) * .3);transform:scale(calc(.4 + .6 * var(--rp,0)))}
.sci-flow__glint{fill:#fff;opacity:calc(var(--el,0) * (1 - var(--el,0)) * 4);filter:drop-shadow(0 0 8px #BFE6F5) drop-shadow(0 0 22px #9FD3EA)}

.sci-o2{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr) minmax(0,1fr);gap:clamp(20px,3vw,48px);align-items:start}
.sci-o2 figure{margin:0}
.sci-o2__device img{width:100%;height:auto}
.sci-o2__concept{position:relative}
.sci-o2__canvas{width:100%;aspect-ratio:3/4;height:auto;background:linear-gradient(180deg,#F7FBFD,#E6F1F7)}
.sci-o2__labels{display:grid;grid-template-columns:38fr 62fr;margin-top:10px;font:400 13px/1.4 var(--sans);color:var(--marine)}
.sci-o2__labels .past{color:var(--mineral-ink)}
.sci-o2__labels .now{padding-left:12px}
.sci-review{margin-top:32px;font:400 12px/1.6 var(--sans);color:var(--mineral-ink)}

/* panels: quotes and internal pending notes */
.panel__quote{margin:6px 0 0;padding:4px 0 4px 18px;border-left:1px solid var(--mineral)}
.panel__quote p{font:400 16px/1.8 var(--serif)!important;color:var(--marine)!important}
.panel__quote cite{display:block;margin-top:10px;font:400 13px/1.4 var(--sans);font-style:normal;color:var(--mineral-ink)}
.panel__pending{margin-top:28px!important;padding:14px 16px;background:var(--glacier);border:1px dashed rgba(61,105,129,.45);font-size:13px!important;line-height:1.7!important;color:var(--mineral-ink)!important}

/* ═════════ cinematic ═════════ */
.cine .science{--len:720vh}
.cine .science .stage{background:var(--glacier)}
.cine .sci-scene{position:absolute;inset:0;margin:0}
.cine .sci-scene[inert]{visibility:hidden}
.cine .sci-surface{display:block;position:absolute;inset:0;z-index:20;pointer-events:none}
.cine .sci-surface__dark{position:absolute;left:0;right:0;top:0;height:calc((1 - var(--w,0)) * 100%);background:linear-gradient(to bottom,var(--ocean) 0%,var(--ocean) 72%,#1B3A50 100%)}
.cine .sci-surface__line{position:absolute;left:0;right:0;top:calc((1 - var(--w,0)) * 100%);height:1px;opacity:calc(1 - var(--w,0) * var(--w,0));background:linear-gradient(90deg,rgba(255,255,255,0),#fff 50%,rgba(255,255,255,0));box-shadow:0 0 18px rgba(170,215,235,.95),0 0 60px 8px rgba(220,238,247,.7)}

/* the products seen through misted glass, then only the glass */
.cine .sci-behind{display:block;position:absolute;inset:-6%;background-size:auto 112%;background-position:86% 54%;background-repeat:no-repeat;
  filter:blur(22px) saturate(.85);opacity:calc(var(--gb,1) * .62);
  -webkit-mask-image:linear-gradient(90deg,transparent 30%,#000 66%);mask-image:linear-gradient(90deg,transparent 30%,#000 66%)}
.cine .sci-glass{display:block;position:absolute;inset:0;width:100%;height:100%;opacity:var(--ga,1)}

.cine .sci-id{display:flex;flex-direction:column;justify-content:center;padding:0 var(--pad-x);opacity:var(--it,0)}
.cine .sci-id .ln{transform:translateY(calc((1 - var(--it,0)) * 18px))}
.cine .sci-key,.cine .sci-note{opacity:var(--it2,1)}

.cine .sci-text{position:absolute;z-index:3;left:var(--pad-x);top:50%;width:min(40vw,560px);transform:translateY(-50%)}
.cine .sci-dist{opacity:var(--ds,0)}
.cine .sci-dist .sci-text{opacity:var(--dst,0)}
.cine .sci-o2 .sci-text{opacity:var(--ot,0)}
.cine .sci-dist .sci-h .ln{clip-path:inset(0 0 calc((1 - var(--ds,0)) * 100%) 0)}
.cine .sci-steps li:nth-child(1){opacity:calc(.22 + .78 * var(--d0,0))}
.cine .sci-steps li:nth-child(2){opacity:calc(.22 + .78 * var(--d1,0))}
.cine .sci-steps li:nth-child(3){opacity:calc(.22 + .78 * var(--d2,0))}
.cine .sci-steps li:nth-child(4){opacity:calc(.22 + .78 * var(--d3,0))}

.cine .sci-epu{margin:0;padding:0;opacity:var(--ed,0)}
.cine .sci-epu__film{position:absolute;top:0;bottom:0;right:0;width:66%;height:100%;margin:0;aspect-ratio:auto;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 34%);mask-image:linear-gradient(90deg,transparent 0%,#000 34%)}
.cine .sci-epu__film video{transform:scale(calc(1.08 - var(--ed,0) * .06))}
.cine .sci-epu .sci-text{opacity:var(--es,0);transform:translateY(calc(-50% + (1 - var(--es,0)) * 14px))}
.cine .sci-epu .sci-h{font-size:clamp(32px,3vw,54px)}
.cine .sci-epu .sci-h .ln{white-space:nowrap}
.cine .sci-epu__film figcaption{bottom:auto;top:clamp(84px,11vh,110px);right:clamp(20px,3vw,44px)}

.cine .sci-o2{display:block;opacity:var(--os,0)}
.cine .sci-o2{--tw:min(28vw,420px);--dw:min(calc(60vh * .818),26vw);--cw:min(36vh,21vw);--dh:calc(var(--dw) / .818 + 30px)}
.cine .sci-o2 .sci-text{width:var(--tw)}
.cine .sci-o2 .sci-h{font-size:clamp(30px,2.8vw,50px)}
.cine .sci-o2 .sci-h .ln{white-space:nowrap}
.cine .sci-o2__device{position:absolute;z-index:2;left:calc(var(--pad-x) + var(--tw) + 3vw);top:calc(50% - var(--dh) / 2);height:var(--dh);width:var(--dw);
  transform:translateY(calc((1 - var(--os,0)) * 4vh))}
.cine .sci-o2__device picture{display:block;width:100%;height:calc(100% - 30px)}
.cine .sci-o2__device img{width:100%;height:100%;object-fit:cover}
.cine .sci-o2__concept{position:absolute;z-index:2;left:calc(var(--pad-x) + var(--tw) + 3vw + var(--dw) + 2.4vw);top:calc(50% - var(--dh) / 2);height:var(--dh);width:var(--cw)}
.cine .sci-o2__canvas{height:calc(100% - 64px);width:100%;aspect-ratio:auto}

.cine .sci-index{display:flex;position:absolute;z-index:15;top:clamp(18px,3.4vh,34px);left:50%;transform:translateX(-50%);gap:6px;padding:8px 10px;margin:0;
  border-radius:999px;background:rgba(255,255,255,.74);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:0 6px 24px rgba(23,45,60,.08);opacity:var(--ix,0)}
.cine .sci-index li{white-space:nowrap;display:flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;font:500 11px/1 var(--sans);letter-spacing:.18em;color:rgba(23,45,60,.42);transition:color .4s,background .4s}
.cine .sci-index b{font:400 12px/1 var(--serif);letter-spacing:0}
.cine .sci-index li[data-on]{color:var(--marine);background:rgba(220,238,247,.85)}
.cine .sci-review{position:absolute;z-index:8;left:var(--pad-x);bottom:3vh;margin:0;max-width:60vw;opacity:.85}

@media (max-width:760px){
  .science .stage{padding:72px 24px}
  .sci-o2{grid-template-columns:1fr 1fr}
  .sci-o2 .sci-text{grid-column:1 / -1}
  .sci-tech{gap:18px}
  .sci-tech .en{font-size:10.5px;letter-spacing:.14em}
  .sci-tech .ko{font-size:14px}
  .sci-steps{gap:18px}
  .sci-steps li+li::before{width:10px}

  .cine .science{--len:680vh}
  .cine .sci-behind{background-size:auto 70%;background-position:50% 4%;-webkit-mask-image:linear-gradient(180deg,#000 30%,transparent 62%);mask-image:linear-gradient(180deg,#000 30%,transparent 62%)}
  .cine .sci-id{justify-content:flex-end;padding:0 24px 13vh}
  .cine .sci-title__en{font-size:clamp(32px,9.4vw,44px);white-space:nowrap}
  .cine .sci-title__ko{font-size:24px}
  .cine .sci-key{font-size:16px;margin-top:20px}
  .cine .sci-tech{margin-top:30px}
  .cine .sci-note{font-size:11.5px;margin-top:22px}
  .cine .sci-text{left:24px;right:24px;width:auto!important;top:auto;bottom:10vh;transform:none}
  .cine .sci-h{font-size:clamp(28px,8vw,34px)}
  .cine .sci-body{font-size:15px;margin-top:14px;line-height:1.75}
  .cine .sci-steps{margin-top:22px}
  .cine .sci-epu__film{left:0;right:0;width:100%;top:0;bottom:auto;height:50vh;-webkit-mask-image:linear-gradient(180deg,#000 70%,transparent 100%);mask-image:linear-gradient(180deg,#000 70%,transparent 100%)}
  .cine .sci-epu__film figcaption{right:24px;bottom:auto;top:calc(50vh - 34px);font-size:11px}
  .cine .sci-epu .sci-text{transform:translateY(calc((1 - var(--es,0)) * 14px))}
  .cine .sci-epu .sci-h,.cine .sci-o2 .sci-h{font-size:clamp(26px,7.4vw,32px)}
  .cine .sci-epu .sci-h .ln,.cine .sci-o2 .sci-h .ln{white-space:normal}
  .cine .sci-o2__device{left:24px;top:9vh;height:40vh;width:31vw;transform:none}
  .cine .sci-o2__device picture{height:calc(100% - 50px)}
  .cine .sci-o2__device img{object-position:40% 28%}
  .cine .sci-o2__concept{left:auto;right:24px;top:9vh;height:40vh;width:calc(100vw - 64px - 31vw)}
  .cine .sci-o2__canvas{height:calc(100% - 58px)}
  .cine .sci-o2__labels{font-size:11px}
  .cine .sci-o2 figcaption{font-size:11px;line-height:1.4}
  .cine .sci-o2 .sci-text{bottom:8vh}
  .cine .sci-index{left:16px;transform:none;top:16px;padding:4px}
  .cine .sci-index li{padding:6px 8px}
  .cine .sci-index li span{display:none}
  .cine .sci-review{left:24px;right:24px;bottom:1.2vh;max-width:none;font-size:10px}
}

/* portrait tablets (e.g. 768×1024): stack the visual above the words, like the phone */
@media (min-width:761px) and (max-aspect-ratio:4/5){
  .cine .sci-text{top:auto;bottom:11vh;transform:none;width:min(78vw,620px)!important}
  .cine .sci-epu__film{left:0;right:0;width:100%;top:0;bottom:auto;height:52vh;-webkit-mask-image:linear-gradient(180deg,#000 72%,transparent 100%);mask-image:linear-gradient(180deg,#000 72%,transparent 100%)}
  .cine .sci-epu .sci-text{transform:translateY(calc((1 - var(--es,0)) * 14px))}
  .cine .sci-o2{--dw:30vw;--cw:40vw;--dh:44vh}
  .cine .sci-o2__device{left:var(--pad-x);top:10vh;transform:none}
  .cine .sci-o2__concept{left:calc(var(--pad-x) + var(--dw) + 4vw);top:10vh}
  .cine .sci-o2__device img{object-position:40% 28%}
  .cine .sci-o2 .sci-h .ln{white-space:normal}
}
.cine .sci-dist .more{opacity:var(--dst,0)}
.cine .sci-epu .more{opacity:var(--es,0)}
.cine .sci-o2 .more{opacity:var(--ot,0)}

/* ═════════ r6.3 — the still: real equipment → inside (concept) → condensation ═════════ */
.sci-still__photo{position:relative;margin:0 0 28px;overflow:hidden}
.sci-still__photo img{width:100%;height:auto}
.sci-inside{background:var(--ocean);color:var(--ivory);margin:0 calc(var(--pad-x) * -1);padding:clamp(48px,8vh,96px) var(--pad-x)}
.sci-inside .sci-eyebrow{color:rgba(220,238,247,.8)}.sci-inside .sci-eyebrow span{color:var(--ivory)}
.sci-inside .sci-h{color:var(--ivory)}.sci-inside .sci-body{color:rgba(243,242,236,.84)}
.sci-section{display:block;width:100%;aspect-ratio:4/3;margin-bottom:28px}
.panel__flow{margin:-12px 0 22px;padding:12px 14px;background:var(--glacier);font:500 14px/1.6 var(--sans)!important;color:var(--marine)!important;word-break:keep-all}

.cine .sci-still{opacity:var(--pa,0)}
.cine .sci-still__photo{position:absolute;top:0;bottom:0;right:0;width:calc(64% + 36% * var(--pz,0));height:100%;margin:0;
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,var(--pz,0)) 0%,#000 26%);mask-image:linear-gradient(90deg,rgba(0,0,0,var(--pz,0)) 0%,#000 26%)}
.cine .sci-still__photo picture{display:block;width:100%;height:100%}
.cine .sci-still__photo img{width:100%;height:100%;object-fit:cover;object-position:50% 46%;transform-origin:54% 52%;transform:scale(calc(1.02 + var(--pz,0) * var(--pz,0) * 2.2))}
.cine .sci-still__photo figcaption{position:absolute;top:clamp(84px,11vh,110px);right:clamp(20px,3vw,44px);margin:0;color:var(--marine);opacity:calc(1 - var(--pz,0) * 2)}
.cine .sci-still .sci-text{opacity:var(--ta,0);transform:translateY(calc(-50% + (1 - var(--ta,0)) * 14px))}
.cine .sci-inside{margin:0;padding:0;opacity:var(--ins,0);background:radial-gradient(110% 90% at 66% 52%,#12304A 0%,var(--ocean) 62%);
  clip-path:circle(calc(var(--iris,0) * 130%) at 62% 52%)}
.cine .sci-section{position:absolute;inset:0;width:100%;height:100%;margin:0;aspect-ratio:auto}
.cine .sci-inside::after{content:"";position:absolute;inset:0;background:#F6FAFC;pointer-events:none;z-index:4;opacity:calc(var(--wh,0) * 1.5);
  -webkit-mask-image:linear-gradient(to top,#000 calc(var(--wh,0) * 140% - 30%),transparent calc(var(--wh,0) * 140%));mask-image:linear-gradient(to top,#000 calc(var(--wh,0) * 140% - 30%),transparent calc(var(--wh,0) * 140%))}
.cine .sci-inside .sci-text{opacity:var(--tc,0);transform:translateY(calc(-50% + (1 - var(--tc,0)) * 14px))}
.cine .sci-inside .more{opacity:var(--tc,0)}
@media (max-width:760px){
  .cine .sci-still__photo{left:0;width:100%;height:54vh;bottom:auto;-webkit-mask-image:linear-gradient(180deg,#000 74%,rgba(0,0,0,var(--pz,0)) 100%);mask-image:linear-gradient(180deg,#000 74%,rgba(0,0,0,var(--pz,0)) 100%)}
  .cine .sci-still__photo figcaption{top:auto;bottom:16px;right:24px;font-size:11px}
  .cine .sci-still .sci-text,.cine .sci-inside .sci-text{transform:translateY(calc((1 - var(--ta,0)) * 14px))}
  .cine .sci-inside .sci-text{transform:translateY(calc((1 - var(--tc,0)) * 14px))}
  .cine .sci-inside{clip-path:circle(calc(var(--iris,0) * 140%) at 50% 28%);background:radial-gradient(120% 70% at 50% 28%,#12304A 0%,var(--ocean) 62%)}
  .cine .sci-inside .sci-h,.cine .sci-still .sci-h{font-size:clamp(26px,7.4vw,32px)}
}
@media (min-width:761px) and (max-aspect-ratio:4/5){
  .cine .sci-still__photo{left:0;width:100%;height:52vh;bottom:auto;-webkit-mask-image:linear-gradient(180deg,#000 74%,rgba(0,0,0,var(--pz,0)) 100%);mask-image:linear-gradient(180deg,#000 74%,rgba(0,0,0,var(--pz,0)) 100%)}
  .cine .sci-still .sci-text{transform:translateY(calc((1 - var(--ta,0)) * 14px))}
  .cine .sci-inside .sci-text{transform:translateY(calc((1 - var(--tc,0)) * 14px))}
  .cine .sci-inside{clip-path:circle(calc(var(--iris,0) * 140%) at 50% 28%)}
}
.cine .sci-still__photo figcaption{top:auto;bottom:clamp(64px,9vh,96px);right:auto;left:30%;color:#fff;text-shadow:0 1px 10px rgba(8,21,32,.7)}
.cine .sci-still__photo figcaption::before{background:#fff}
@media (max-width:760px){.cine .sci-still__photo figcaption{left:24px;bottom:16px}}

/* r6.4: on narrow / portrait screens the inside drawing lives in the upper half; the words keep the lower half */
@media (max-width:760px),(min-width:761px) and (max-aspect-ratio:4/5){.cine .sci-section{bottom:auto;height:52vh}}
@media (max-width:760px) and (max-height:700px){.cine .sci-section{height:42vh}.cine .sci-inside .sci-h{font-size:24px}.cine .sci-inside .sci-body{font-size:13.5px;line-height:1.65}.cine .sci-inside .sci-disclaim{font-size:11px}}
