/* =========================================================
   Website Development page: hero + effects lab (10 live demos)
   Loaded only on /services/website-development/. Motion in assets/js/lab.js.
   ========================================================= */

/* ---------- Hero ---------- */
.wd-hero { position: relative; overflow: hidden; background: var(--c-dark); color: #fff; padding: clamp(48px, 6vw, 88px) 0 clamp(64px, 8vw, 104px); isolation: isolate; }
.wd-hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.wd-hero .breadcrumb { color: rgba(255,255,255,.6); }
.wd-hero .lead { color: rgba(255,255,255,.74); max-width: 560px; }
.wd-hero__title { perspective: 600px; }
.wd-hero__index { border: 1px solid var(--c-dark-line); border-radius: var(--r-card); background: rgba(255,255,255,.03); padding: clamp(20px, 2.4vw, 28px); display: grid; gap: 14px; backdrop-filter: blur(6px); }
.wd-hero__index ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.wd-hero__index a { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 8px 10px; border-radius: 12px; transition: background-color var(--t-ui); }
.wd-hero__index a:hover { background: rgba(255,255,255,.07); }
.wd-hero__index span { grid-row: span 2; font: 700 .8125rem/1.6 var(--f-head); color: var(--c-primary-hover); }
.wd-hero__index b { font: 600 .9375rem/1.3 var(--f-head); }
.wd-hero__index small { color: rgba(255,255,255,.55); font-size: .75rem; }

/* Letters that follow the cursor (hero + demo 08) */
.lf-word { display: inline-block; white-space: nowrap; }
.lf-ch { display: inline-block; transform-style: preserve-3d; will-change: transform; color: color-mix(in srgb, var(--brand-blue) calc(var(--n, 0) * 100%), currentColor); }

/* ---------- Lab layout ---------- */
.lab-list { display: grid; gap: clamp(56px, 7vw, 104px); }
.lab-row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; scroll-margin-top: calc(var(--header-h) + 24px); }
.lab-row:nth-child(even) .lab-frame { order: 2; }
.lab-frame { margin: 0; border-radius: 16px; overflow: hidden; background: #0d1117; box-shadow: 0 40px 80px -40px rgba(0, 40, 90, .45), 0 0 0 1px rgba(0,0,0,.06); }
.lab-frame__bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #161b22; color: rgba(255,255,255,.55); font-size: .75rem; }
.lab-frame__bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.lab-frame__bar i:nth-child(2) { background: #febc2e; }
.lab-frame__bar i:nth-child(3) { background: #28c840; }
.lab-frame__bar span { margin: 0 auto; padding: 3px 14px; border-radius: 6px; background: rgba(255,255,255,.07); }
.lab-info { display: grid; gap: 12px; align-content: center; }
.lab-info__num { font: 800 clamp(3rem, 5vw, 4.5rem)/0.9 var(--f-display); font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lab-info__concept { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-blue); }
.lab-info > p:not(.lab-info__concept) { color: var(--c-ink-2); }
.lab-info__meta { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 8px 0 0; font-size: var(--fs-small); align-items: center; }
.lab-info__meta dt { color: var(--c-ink-3); }
.lab-info__meta dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; color: var(--c-ink-2); }
.lab-cta { margin-top: clamp(64px, 8vw, 112px); text-align: center; display: grid; gap: 16px; justify-items: center; padding: clamp(32px, 5vw, 64px); border-radius: var(--r-card); background: var(--c-tint); }
.lab-cta .lead { max-width: 640px; }

/* ---------- Stage (each demo). Sizes inside use cqw so every demo scales with its frame ---------- */
.lab-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; container-type: inline-size; touch-action: pan-y; user-select: none; -webkit-user-select: none; background: #fff; color: var(--c-ink); font-family: var(--f-body); }
.lab-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lab-hint { position: absolute; right: 2.5cqw; bottom: 2.5cqw; z-index: 20; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em; pointer-events: none; backdrop-filter: blur(6px); transition: opacity .5s; }
.lab-hint::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--brand-blue); animation: blink 1.6s ease infinite; }
.lab-stage.is-used .lab-hint { opacity: 0; }
.lab-stage.is-still .lab-hint { opacity: 1; }
.lab-stage.is-still .lab-hint::before { animation: none; background: rgba(255,255,255,.6); }
.lab-eyebrow { font-size: max(10px, 1.5cqw); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.lab-h { font: 800 6cqw/1.02 var(--f-display); letter-spacing: -0.02em; }
.lab-mock-nav { position: absolute; left: 4cqw; right: 4cqw; top: 3cqw; display: flex; align-items: center; gap: 3cqw; font-size: max(10px, 1.6cqw); z-index: 3; }
.lab-mock-nav b { margin-right: auto; font: 800 2.2cqw/1 var(--f-display); letter-spacing: .08em; }
.lab-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 10cqw 4cqw 4cqw; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,.65), transparent); pointer-events: none; display: grid; gap: 1cqw; }

/* 01 Glass shatter: everything is drawn on canvas */
.lab--shatter { background: #05070c; cursor: pointer; }

/* 02 Silk page */
.lab--silk { background: radial-gradient(120% 90% at 50% 10%, #f4f7fb, #d9e2ec); cursor: grab; }
.lab--silk:active { cursor: grabbing; }
.lab-silk__rod { position: absolute; left: 3%; right: 3%; top: 4.2%; height: max(6px, 1.1cqw); border-radius: 99px; background: linear-gradient(180deg, #2a2f38, #0b0e13); box-shadow: 0 6px 14px rgba(0,0,0,.25); z-index: 2; }

/* 03 Flashlight */
.lab--flashlight { background: #07070a; color: #f3e9d2; cursor: none; }
.lab-flash__page { position: absolute; inset: 0; background: radial-gradient(80% 70% at 30% 30%, #1c1a1f, #0c0b0e); }
.lab-flash__page .lab-mock-nav { color: #e9dcc0; }
.lab-flash__page .lab-mock-nav b { color: #e7c77c; }
.lab-flash__hero { position: absolute; left: 6cqw; top: 13cqw; display: grid; gap: 1.6cqw; }
.lab-flash__hero .lab-h { font-style: italic; color: #f6ecd6; }
.lab-flash__gems { position: absolute; right: 4cqw; left: 46cqw; bottom: 5cqw; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.lab-flash__gems figure { margin: 0; display: grid; gap: 1cqw; justify-items: center; padding: 2cqw 1cqw; border: 1px solid rgba(231,199,124,.25); border-radius: 1.4cqw; background: rgba(255,255,255,.02); }
.lab-flash__gems svg { width: 70%; height: auto; }
.lab-flash__gems figcaption { font-size: max(10px, 1.5cqw); color: #d9c9a3; }
.lab-flash__mask { position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background:
    radial-gradient(circle at var(--fx, 50%) var(--fy, 45%), rgba(255, 236, 190, .14), transparent var(--r1, 26cqw)),
    radial-gradient(circle at var(--fx, 50%) var(--fy, 45%), transparent 0, transparent var(--r0, 9cqw), rgba(0,0,0,.94) var(--r1, 26cqw), #000 calc(var(--r1, 26cqw) + 8cqw)); }

/* 04 Pour scroll */
.lab--pour { background: linear-gradient(180deg, #ffffff, #eef6fd); }
.lab-pour__copy { position: absolute; inset: 0; z-index: 2; padding: 14cqw 6cqw 0; display: grid; align-content: start; gap: 1.6cqw; transition: color .5s; pointer-events: none; }
.lab-pour__copy .lab-mock-nav b { color: var(--brand-blue); }
.lab-pour__pct { font: 700 2.2cqw/1 var(--f-head); margin-top: 1cqw; }
.lab-pour__pct b { font-size: 4.4cqw; }
.lab--pour.is-full .lab-pour__copy { color: #fff; }
.lab--pour.is-full .lab-pour__copy .lab-mock-nav b { color: #fff; }

/* 05 Pond ripple */
.lab--ripple { background: #0b1a2b; cursor: crosshair; }

/* 06 Photo trail */
.lab--trail { background: #f5f3ef; cursor: crosshair; }
.lab-trail__copy { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 1.6cqw; z-index: 1; pointer-events: none; }
.lab-trail__copy .lab-h { font-size: 7cqw; }
.lab-trail__layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.lab-trail__layer img { position: absolute; left: 0; top: 0; width: 19cqw; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 1cqw; box-shadow: 0 18px 30px -12px rgba(0,0,0,.45); opacity: 0; will-change: transform, opacity; }

/* 07 Sunset scroll */
.lab--sunset { background: #8fd3ff; }
.lab-sunset__copy { position: absolute; inset: 0; z-index: 2; padding: 14cqw 6cqw 0; display: grid; align-content: start; gap: 1.6cqw; color: color-mix(in srgb, #fff calc(var(--night, 0) * 100%), #0b1424); pointer-events: none; }

/* 08 Follow text */
.lab--follow { background: radial-gradient(90% 80% at 70% 20%, #eaf4fd, #fff 60%); }
.lab-follow__copy { position: absolute; inset: 0; padding: 0 6cqw; display: grid; align-content: center; gap: 2cqw; perspective: 500px; }
.lab-follow__text { font: 800 10.5cqw/0.98 var(--f-display); letter-spacing: -0.03em; color: var(--c-ink); }

/* 09 Book flip */
.lab--book { background: radial-gradient(90% 90% at 50% 40%, #3a2a1f, #140d09); cursor: pointer; }
.lab-book__nav { position: absolute; top: 50%; z-index: 30; width: max(34px, 5.4cqw); height: max(34px, 5.4cqw); margin-top: calc(max(34px, 5.4cqw) / -2); border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); transition: background-color var(--t-ui), opacity var(--t-ui); }
.lab-book__nav:hover:not(:disabled) { background: var(--brand-blue); border-color: var(--brand-blue); }
.lab-book__nav:disabled { opacity: .3; cursor: default; }
.lab-book__nav svg { width: 45%; height: 45%; }
.lab-book__nav--prev { left: 1.6cqw; }
.lab-book__nav--prev svg { transform: scaleX(-1); }
.lab-book__nav--next { right: 1.6cqw; }
.lab-book { --pw: 40cqw; --ph: 52cqw; position: absolute; left: 50%; top: 50%; width: calc(var(--pw) * 2); height: var(--ph); transform: translate(-50%, -50%); perspective: 1600px; }
.lab-book__page, .lab-book__face { position: absolute; top: 0; width: var(--pw); height: 100%; padding: 4cqw 3.4cqw; background: #fbf6ec; color: #2b1d12; display: grid; align-content: start; gap: 1.6cqw; overflow: hidden; }
.lab-book__page--left { left: 0; border-radius: 1cqw 0 0 1cqw; box-shadow: inset -2cqw 0 3cqw -2cqw rgba(0,0,0,.35); }
.lab-book__page--right { left: var(--pw); border-radius: 0 1cqw 1cqw 0; box-shadow: inset 2cqw 0 3cqw -2cqw rgba(0,0,0,.3); }
.lab-book__leaf { position: absolute; left: var(--pw); top: 0; width: var(--pw); height: 100%; transform-origin: 0 50%; transform-style: preserve-3d; z-index: calc(10 - var(--i)); }
.lab-book__face { left: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.lab-book__front { border-radius: 0 1cqw 1cqw 0; box-shadow: inset 2cqw 0 3cqw -2cqw rgba(0,0,0,.3); }
.lab-book__back { transform: rotateY(180deg); border-radius: 1cqw 0 0 1cqw; box-shadow: inset -2cqw 0 3cqw -2cqw rgba(0,0,0,.35); }
.lab-book__face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.28), transparent 60%); opacity: var(--shade, 0); }
.lab-book__title { font: 800 3.4cqw/1.05 var(--f-display); font-style: italic; color: #8a3b12; }
.lab-book__brand { font: 800 4.4cqw/1 var(--f-display); font-style: italic; color: #8a3b12; }
.lab-book__note { font-size: max(10px, 1.55cqw); line-height: 1.45; color: #5b4636; }
.lab-book__big { font: 800 5cqw/1 var(--f-display); color: #2b1d12; }
.lab-book__btn { justify-self: start; padding: 1cqw 2cqw; border-radius: 99px; background: var(--brand-blue); color: #fff; font-size: max(10px, 1.5cqw); font-weight: 600; }
.lab-book__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6cqw; }
.lab-book__menu li { display: flex; justify-content: space-between; gap: 1cqw; border-bottom: 1px dashed rgba(43,29,18,.2); padding-bottom: 1.2cqw; }
.lab-book__menu b { display: block; font: 700 1.9cqw/1.2 var(--f-head); }
.lab-book__menu small { font-size: max(9px, 1.35cqw); color: #7a6553; }
.lab-book__menu i { font-style: normal; font: 700 1.8cqw/1.2 var(--f-head); color: #8a3b12; }
.lab-book__photo { height: 22cqw; border-radius: 1cqw; background: #6b4a33 center / cover no-repeat; }
.lab-book__cover { background: #1f140d; color: #fbf6ec; }
.lab-book__cover .lab-book__note { color: #e8d9c4; }
.lab-book__cover .lab-book__brand { color: #f2c38b; }

/* 10 Liquid glass */
.lab--glass { background: #eef3f9; }
.lab-glass__scroll { position: absolute; inset: 0; overflow: hidden; }
.lab-glass__content { padding: 0 5cqw; animation: lab-glass-scroll 26s linear infinite; }
.lab-glass__content > div { display: grid; gap: 3cqw; padding-top: 3cqw; }
@keyframes lab-glass-scroll { to { transform: translateY(-50%); } }
.lab-glass__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; padding-top: 9cqw; }
.lab-glass__kpis div { background: #fff; border-radius: 1.6cqw; padding: 2cqw; display: grid; gap: .4cqw; box-shadow: 0 10px 24px -16px rgba(0,40,90,.35); }
.lab-glass__kpis small { font-size: max(9px, 1.4cqw); color: var(--c-ink-3); }
.lab-glass__kpis b { font: 800 3.6cqw/1 var(--f-display); }
.lab-glass__kpis i { font-style: normal; font-size: max(9px, 1.4cqw); color: #11a36a; font-weight: 600; }
.lab-glass__chart { height: 22cqw; display: flex; align-items: flex-end; gap: 2cqw; padding: 2.4cqw; background: #fff; border-radius: 1.6cqw; }
.lab-glass__chart span { flex: 1; height: var(--h); border-radius: .8cqw .8cqw 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--brand-blue) 55%, white), var(--brand-blue)); }
.lab-glass__row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2cqw; }
.lab-glass__blob { height: 16cqw; border-radius: 1.6cqw; }
.lab-glass__blob--a { background: linear-gradient(120deg, #007fd9, #7c4dff 60%, #ff5fa2); }
.lab-glass__blob--b { background: linear-gradient(160deg, #ffb347, #ff5f6d); }
.lab-glass__blob--c { background: linear-gradient(200deg, #00c9a7, #007fd9); }
.lab-glass__list { background: #fff; border-radius: 1.6cqw; padding: 1cqw 2.4cqw; }
.lab-glass__list p { display: flex; align-items: center; gap: 1.4cqw; padding: 1.4cqw 0; border-bottom: 1px solid var(--c-line); font-size: max(10px, 1.6cqw); }
.lab-glass__list p:last-child { border-bottom: 0; }
.lab-glass__list span { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: hsl(calc(205 + var(--c) * 40) 90% 50%); }
.lab-glass__list b { margin-left: auto; }
.lab-glass__nav, .lab-glass__lens { position: absolute; z-index: 4; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.12); box-shadow: inset 0 1px 1px rgba(255,255,255,.8), inset 0 -1px 2px rgba(0,0,0,.08), 0 10px 30px -10px rgba(0,40,90,.35);
  -webkit-backdrop-filter: blur(10px) saturate(1.8); backdrop-filter: blur(10px) saturate(1.8); }
.lab-glass__nav { left: 4cqw; right: 4cqw; top: 2.4cqw; height: 6.4cqw; border-radius: 99px; display: flex; align-items: center; gap: 3cqw; padding: 0 2.4cqw; font-size: max(10px, 1.6cqw); font-weight: 600; color: #0b1424; }
.lab-glass__nav b { margin-right: auto; font: 800 2.2cqw/1 var(--f-display); color: var(--brand-blue); }
.lab-glass__nav i { width: 3.6cqw; height: 3.6cqw; border-radius: 50%; background: linear-gradient(135deg, #007fd9, #7c4dff); }
.lab-glass__lens { left: 0; top: 0; width: 18cqw; height: 18cqw; border-radius: 50%; transform: translate3d(var(--lx, 60cqw), var(--ly, 24cqw), 0) translate(-50%, -50%); pointer-events: none; }

/* ---------- Still mode (slow phones, reduced motion, data saver) ---------- */
.lab-low .lab-glass__content { animation: none; }
.lab-low .lf-ch { will-change: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .wd-hero__grid { grid-template-columns: 1fr; }
  .lab-row { grid-template-columns: 1fr; }
  .lab-row:nth-child(even) .lab-frame { order: 0; }
}
@media (max-width: 640px) {
  .lab-stage { aspect-ratio: 4 / 3; }
  .wd-hero__index ol { grid-template-columns: 1fr; }
  .lab-frame__bar span { display: none; }
  .lab-flash__gems { left: 4cqw; }
  .lab-book { --pw: 44cqw; --ph: 66cqw; }
}
