/* =========================================================
   AI STUDIO (#ai-studio) — Glamolur Illusions AI themed portraits
   before/after HUD compare · 3-step process · results reel · AI product cards
   ========================================================= */
.ai-studio { overflow: clip; isolation: isolate; }
.ais-aura {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(46% 34% at 78% 22%, rgba(41, 231, 255, .09), transparent 70%),
    radial-gradient(40% 30% at 12% 40%, rgba(138, 92, 255, .12), transparent 70%),
    radial-gradient(36% 22% at 60% 92%, rgba(255, 63, 208, .07), transparent 70%);
}

/* ---------- compare layout ---------- */
.ais-grid {
  display: grid; grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 4.5vw, 72px); align-items: center;
}
.ais-copy h2 {
  font-size: clamp(34px, 4.6vw, 68px); line-height: 1; letter-spacing: -.045em; font-weight: 800;
  margin: 16px 0 18px; max-width: 11ch;
}
.ais-copy .lede { font-size: clamp(15.5px, 1.25vw, 17.5px); }
.ais-presets { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.ais-chip {
  display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 16px 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(140, 200, 255, .26); background: rgba(255, 255, 255, .03); color: #c9d5f5; font-size: 13.5px;
  transition: border-color .25s, color .25s, background .25s, box-shadow .25s;
}
.ais-chip small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--muted); transition: color .25s; }
.ais-chip:hover { border-color: rgba(41, 231, 255, .6); color: #fff; }
.ais-chip[aria-pressed="true"] {
  color: #fff; border-color: rgba(41, 231, 255, .75);
  background: linear-gradient(100deg, rgba(41, 231, 255, .2), rgba(138, 92, 255, .26));
  box-shadow: 0 0 26px rgba(41, 231, 255, .24);
}
.ais-chip[aria-pressed="true"] small { color: var(--cyan); }
.ais-note { min-height: 3em; margin-top: 16px; color: var(--muted); font-size: 14.5px; max-width: 46ch; }

/* ---------- HUD + compare slider ---------- */
.ais-hud {
  position: relative; padding: 14px 14px 12px; border-radius: 22px; min-width: 0;
  background: linear-gradient(160deg, rgba(34, 44, 100, .38), rgba(8, 10, 28, .62));
  border: 1px solid rgba(120, 200, 255, .24);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 0 80px rgba(41, 231, 255, .06), 0 0 70px rgba(138, 92, 255, .12);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.ais-corner { position: absolute; width: 28px; height: 28px; border: 2px solid var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); pointer-events: none; }
.ais-c1 { top: -7px; left: -7px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.ais-c2 { top: -7px; right: -7px; border-left: 0; border-bottom: 0; border-top-right-radius: 10px; }
.ais-c3 { bottom: -7px; left: -7px; border-right: 0; border-top: 0; border-bottom-left-radius: 10px; border-color: var(--magenta); filter: drop-shadow(0 0 6px var(--magenta)); }
.ais-c4 { bottom: -7px; right: -7px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; border-color: var(--magenta); filter: drop-shadow(0 0 6px var(--magenta)); }
.ais-hud-top, .ais-hud-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #8fd9ff;
}
.ais-hud-top { padding: 2px 4px 12px; }
.ais-hud-bottom { padding: 12px 4px 2px; }
.ais-hud-live { display: inline-flex; align-items: center; gap: 8px; }
.ais-hud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.ais-hud-mix { color: #fff; font-variant-numeric: tabular-nums; }
.ais-hud-idx { color: rgba(160, 190, 255, .85); font-variant-numeric: tabular-nums; }
.ais-hud-title { color: #e6f0ff; letter-spacing: .1em; }
.ais-hud-hint { color: rgba(160, 190, 255, .85); letter-spacing: .12em; }

.ais-cmp {
  position: relative; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: #000;
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.ais-cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ais-cmp-b { clip-path: inset(0 0 0 var(--pos)); }
.ais-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, var(--cyan), var(--violet) 50%, var(--magenta));
  box-shadow: 0 0 14px var(--cyan), 0 0 40px rgba(138, 92, 255, .7);
}
.ais-knob { /* sibling of the line so it can stop short of the frame edge instead of being clipped */
  --kr: 29px;
  position: absolute; z-index: 3; top: 82%; left: clamp(calc(var(--kr) + 12px), var(--pos), calc(100% - var(--kr) - 12px));
  width: calc(var(--kr) * 2); height: calc(var(--kr) * 2); transform: translate(-50%, -50%); pointer-events: none;
  border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(5, 8, 22, .55); border: 2px solid var(--cyan);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 0 30px rgba(41, 231, 255, .6), inset 0 0 18px rgba(138, 92, 255, .5);
  transition: transform .25s var(--ease);
}
.ais-knob::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed rgba(41, 231, 255, .55); animation: ais-spin 12s linear infinite; }
.ais-knob svg { width: 24px; height: 24px; }
.ais-cmp.is-off .ais-knob::before { animation-play-state: paused; }
.ais-cmp.is-drag .ais-knob { transform: translate(-50%, -50%) scale(1.1); }
.ais-cmp.is-focus .ais-knob { outline: 3px solid #fff; outline-offset: 6px; }
.ais-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.ais-label {
  position: absolute; z-index: 2; top: 14px; padding: 6px 10px; border-radius: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #e6f6ff;
  background: rgba(4, 6, 18, .66); border: 1px solid rgba(140, 200, 255, .3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none;
  transition: opacity .3s;
}
.ais-label i { font-style: normal; color: rgba(200, 225, 255, .7); }
.ais-label-a { left: 14px; }
.ais-label-b { right: 14px; border-color: rgba(255, 63, 208, .5); }
.ais-cmp[data-side="a"] .ais-label-b, .ais-cmp[data-side="b"] .ais-label-a { opacity: .35; }
.ais-scan {
  position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 30%; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(41, 231, 255, .28) 70%, rgba(255, 255, 255, .85) 96%, transparent 100%);
}
.ais-cmp.is-scanning .ais-scan { animation: ais-scan .75s cubic-bezier(.5, 0, .5, 1); }
.ais-cmp.is-scanning img { animation: ais-glitch .75s steps(6); }
.ais-cmp.is-loading::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, transparent 30%, rgba(41, 231, 255, .08) 50%, transparent 70%) 0 0 / 200% 100%, #05070f;
  animation: ais-shimmer 1.4s linear infinite;
}
@keyframes ais-spin { to { transform: rotate(360deg); } }
@keyframes ais-scan { 0% { transform: translateY(-100%); opacity: 1; } 100% { transform: translateY(345%); opacity: 1; } }
@keyframes ais-glitch { 0% { filter: none; } 20% { filter: hue-rotate(60deg) saturate(1.6) brightness(1.2); } 40% { filter: none; } 60% { filter: hue-rotate(-40deg) brightness(1.15); } 100% { filter: none; } }
@keyframes ais-shimmer { to { background-position: -200% 0, 0 0; } }
.ais-cmp.is-off.is-loading::after { animation-play-state: paused; } /* off-screen */

/* ---------- 3 steps ---------- */
.ais-steps {
  list-style: none; margin: clamp(64px, 8vw, 110px) 0 0; padding: 0; position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: none;
}
.ais-steps::before { /* connecting beam */
  content: ""; position: absolute; left: 8%; right: 8%; top: 58px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan) 12%, var(--violet) 50%, var(--magenta) 88%, transparent);
  box-shadow: 0 0 14px rgba(41, 231, 255, .55); opacity: .7;
}
.ais-step {
  position: relative; z-index: 1; padding: 24px 24px 26px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #0f1737, #080c1f);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -36px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.ais-step-n {
  position: absolute; right: 22px; top: 18px; font-family: var(--mono); font-size: 13px; letter-spacing: .2em; color: var(--cyan);
}
.ais-step:nth-child(2) .ais-step-n { color: #b79cff; }
.ais-step:nth-child(3) .ais-step-n { color: #ff8be3; }
.ais-step-ico {
  width: 72px; height: 72px; border-radius: 18px; mix-blend-mode: screen;
  background: #000; box-shadow: 0 0 0 1px rgba(130, 200, 255, .18), 0 0 30px -10px rgba(41, 231, 255, .6);
}
.ais-step h3 { font-size: 20px; letter-spacing: -.02em; font-weight: 760; margin: 18px 0 8px; }
.ais-step p { color: var(--ink-2); font-size: 14.5px; }

/* ---------- results reel (marquee) ---------- */
.ais-reel { margin-top: clamp(64px, 8vw, 110px); }
.ais-reel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.ais-sub-title { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.08; letter-spacing: -.03em; font-weight: 780; margin: 10px 0 0; }
.ais-sub-copy { color: var(--muted); font-size: 15px; }
.ais-reel-toggle .ico { width: 16px; height: 16px; }
.ais-reel-view {
  position: relative; overflow: hidden; padding: 14px 0 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ais-reel-track {
  --h: clamp(220px, 24vw, 330px);
  list-style: none; margin: 0; padding: 0; display: flex; width: max-content;
  animation: ais-marquee var(--dur, 80s) linear infinite;
}
.ais-reel-track > li { flex: none; margin-right: 16px; height: var(--h); }
@keyframes ais-marquee { to { transform: translateX(-50%); } }
.ais-reel.is-paused .ais-reel-track,
.ais-reel.is-off .ais-reel-track,
.ais-reel-view:hover .ais-reel-track,
.ais-reel-track:focus-within { animation-play-state: paused; }
.ais-shot {
  position: relative; display: block; height: 100%; padding: 0; margin: 0; overflow: hidden; cursor: zoom-in;
  border-radius: 16px; border: 1px solid var(--line-2); background: #070a16;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .9);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.ais-shot img { width: 100%; height: 100%; object-fit: cover; }
.ais-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(3, 5, 13, .85)); opacity: 0; transition: opacity .35s; }
.ais-shot-cap {
  position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px; text-align: left;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #fff;
  opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s;
}
.ais-shot:hover, .ais-shot:focus-visible { transform: translateY(-6px); border-color: rgba(41, 231, 255, .7); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .9), 0 0 34px -8px rgba(41, 231, 255, .6); }
.ais-shot:hover::after, .ais-shot:focus-visible::after { opacity: 1; }
.ais-shot:hover .ais-shot-cap, .ais-shot:focus-visible .ais-shot-cap { opacity: 1; transform: none; }
.ais-shot:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
/* static (reduced motion / no JS sizing): a plain swipeable row */
.ais-reel.is-static .ais-reel-view { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2)); scroll-padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2)); scrollbar-width: thin; scrollbar-color: rgba(130, 200, 255, .3) transparent; }
.ais-reel.is-static .ais-reel-track { animation: none; }
.ais-reel.is-static .ais-reel-track > li { scroll-snap-align: start; }
.ais-reel.is-static .ais-reel-toggle { display: none; }

/* ---------- product cards ---------- */
.ais-cards-head { margin-top: clamp(64px, 8vw, 110px); margin-bottom: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 48px; align-items: end; }
.ais-cards-head .ais-sub-title { margin: 0; }
.ais-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ais-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(160deg, rgba(16, 24, 58, .78), rgba(8, 12, 30, .72));
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -36px rgba(0, 0, 0, .9);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s, opacity .7s var(--ease);
}
.ais-card:hover { transform: translateY(-4px); border-color: rgba(255, 63, 208, .5); box-shadow: 0 30px 70px -36px rgba(0, 0, 0, .9), 0 0 40px -14px rgba(255, 63, 208, .5); }
html.js .ais-card.is-pre { opacity: 0; transform: translateY(24px); }
.ais-card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #050812; }
.ais-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform .7s var(--ease); }
.ais-card:hover .ais-card-media img { transform: scale(1.05); }
.ais-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(6, 10, 26, .9)); pointer-events: none; }
.ais-card-media.is-icon img { width: 42%; height: auto; aspect-ratio: 1; object-fit: contain; margin: auto; position: absolute; inset: 0; mix-blend-mode: screen; }
.ais-card-meta { position: absolute; z-index: 1; left: 14px; top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.ais-card-cat {
  display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #dff6ff;
  background: rgba(4, 7, 18, .7); border: 1px solid rgba(140, 200, 255, .24);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ais-card-meta .status-chip { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); background-color: rgba(4, 7, 18, .7); }
.ais-card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 22px; }
.ais-card h4 { font-size: 20px; line-height: 1.2; letter-spacing: -.02em; font-weight: 760; margin: 0; }
.ais-card h4 a { text-decoration: none; }
.ais-card h4 a:hover { color: var(--cyan); }
.ais-card-tag { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; }
.ais-card .bullets { margin-top: 14px; gap: 7px; }
.ais-card .bullets li { font-size: 13.5px; line-height: 1.45; }
.ais-card-foot { margin-top: auto; padding-top: 18px; }
.ais-card-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ais-card-note { color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 4px; }
.ais-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ais-noscript { color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .ais-grid { grid-template-columns: 1fr; }
  .ais-copy { max-width: 720px; }
  .ais-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* tablet 2-up grid: an odd last card spans the row as a wide card instead of sitting alone */
@media (min-width: 641px) and (max-width: 1080px) {
  .ais-cards > li:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; }
  .ais-cards > li:last-child:nth-child(odd) .ais-card-media { flex: 0 0 calc(50% - 10px); aspect-ratio: auto; min-height: 240px; }
}
@media (max-width: 860px) {
  .ais-steps { grid-template-columns: 1fr; gap: 14px; }
  .ais-steps::before { left: 59px; right: auto; top: 24px; bottom: 24px; width: 2px; height: auto; background: linear-gradient(180deg, var(--cyan), var(--violet), var(--magenta)); }
  .ais-step { display: grid; grid-template-columns: 72px 1fr; column-gap: 18px; align-items: start; }
  .ais-step-ico { grid-row: span 2; position: relative; }
  .ais-step h3 { margin: 4px 0 6px; padding-right: 30px; }
  .ais-cards-head { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ais-presets { gap: 8px; }
  .ais-chip { font-size: 13px; min-height: 40px; padding: 0 13px 0 10px; }
  .ais-hud { padding: 10px 10px 8px; border-radius: 18px; }
  .ais-hud-top, .ais-hud-bottom { font-size: 9.5px; letter-spacing: .12em; }
  .ais-hud-hint { display: none; }
  .ais-label { font-size: 9.5px; letter-spacing: .1em; padding: 5px 7px; top: 10px; }
  .ais-label i { display: none; }
  .ais-label-a { left: 10px; }
  .ais-label-b { right: 10px; }
  .ais-knob { --kr: 24px; }
  .ais-knob svg { width: 20px; height: 20px; }
  .ais-reel-track > li { margin-right: 12px; }
  .ais-reel-head .ais-sub-title { font-size: 24px; }
}
@media (max-width: 640px) {
  /* product cards become a swipe row */
  .ais-cards {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px;
    margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 14px; scroll-padding-inline: var(--gutter);
    scrollbar-width: thin; scrollbar-color: rgba(130, 200, 255, .3) transparent;
  }
  .ais-card { flex: 0 0 86%; scroll-snap-align: start; }
  .ais-card:hover { transform: none; }
  html.js .ais-card.is-pre { transform: translateX(24px); }
  .ais-step { padding: 18px 18px 20px; }
  .ais-step-ico { width: 60px; height: 60px; border-radius: 15px; }
  .ais-step { grid-template-columns: 60px 1fr; column-gap: 16px; }
  .ais-steps::before { left: 48px; }
  .ais-step h3 { font-size: 18px; }
  .ais-step p { font-size: 14px; }
  .ais-reel-head { align-items: center; }
}

/* ---------- reduced motion ---------- */
html.reduced .ais-knob::before, html.reduced .ais-cmp.is-scanning .ais-scan, html.reduced .ais-cmp.is-scanning img, html.reduced .ais-cmp.is-loading::after { animation: none; }
html.reduced .ais-card, html.reduced .ais-shot, html.reduced .ais-card-media img { transition: opacity .4s; }
html.reduced .ais-card:hover, html.reduced .ais-shot:hover, html.reduced .ais-shot:focus-visible { transform: none; }
html.reduced .ais-card:hover .ais-card-media img { transform: none; }
