/* Crystal look for the storefront: clearer glass and motion. Everything is scoped to
   html.crystal (set in index.html), so removing that class restores the original look. */

html.crystal {
  /* clearer glass: less milk, more light, sharper refraction */
  --glass-fill: linear-gradient(150deg, rgba(255, 255, 255, 0.24), rgba(255, 250, 244, 0.06) 60%, rgba(255, 255, 255, 0.16));
  --glass-fill-strong: linear-gradient(150deg, rgba(255, 255, 255, 0.62), rgba(255, 250, 244, 0.42));
  --glass-blur: blur(9px) saturate(190%) brightness(1.03) contrast(1.04);
  --glass-blur-thin: blur(7px) saturate(200%) brightness(1.04);
  --glass-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 1),
    inset 1.5px 0 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 0 42px rgba(255, 255, 255, 0.34),
    0 0 0 1px rgba(142, 106, 44, 0.16),
    inset 0 -20px 34px -24px rgba(94, 14, 38, 0.22),
    0 34px 70px -32px rgba(62, 10, 26, 0.5),
    0 2px 6px rgba(62, 10, 26, 0.06);
  --cx-sheen: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.6) 49%, rgba(255, 255, 255, 0.15) 53%, transparent 60%);
  --cx-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- the crystal itself ---------- */
/* crisp rim: a bright edge that fades round the shape, like light caught in cut glass */
html.crystal .glass::before {
  padding: 1.3px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.25) 30%, rgba(255, 255, 255, 0.05) 55%, rgba(255, 244, 228, 0.55) 82%, rgba(255, 255, 255, 0.95));
}
/* soft pointer glow: a faint warm light under the cursor, never a white spot */
html.crystal .glass::after {
  background: radial-gradient(220px 160px at var(--mx, 18%) var(--my, -10%), rgba(255, 246, 232, 0.22), transparent 72%);
  opacity: 1;
}
html.crystal .glass.dark::after { background: radial-gradient(220px 160px at var(--mx, 18%) var(--my, -10%), rgba(255, 214, 170, 0.10), transparent 72%); }
html.crystal .glass.dark::before { background: linear-gradient(155deg, rgba(255, 230, 200, 0.75), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0) 60%, rgba(201, 163, 95, 0.6)); }
/* dark glass stays deep maroon: smoked crystal, not pink haze */
html.crystal .glass.dark {
  background: linear-gradient(150deg, rgba(104, 14, 42, 0.98), rgba(58, 6, 22, 0.98) 55%, rgba(78, 10, 31, 0.98));
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: inset 0 1.5px 0 rgba(255, 230, 205, 0.4), inset 0 -1px 0 rgba(255, 230, 205, 0.1), 0 0 0 1px rgba(201, 163, 95, 0.35), 0 30px 60px -28px rgba(30, 4, 12, 0.65);
}

/* text plates over busy photos keep enough frost to read */
html.crystal .pcard-info,
html.crystal .cat-tile .cap { background: var(--cx-sheen) 100% 0 / 300% 100% no-repeat, linear-gradient(150deg, rgba(255, 255, 255, 0.66), rgba(255, 250, 244, 0.42)); transition: background-position 1s var(--cx-ease); }
html.crystal .pcard:hover .pcard-info,
html.crystal .cat-tile:hover .cap { background-position: 0 0, 0 0; }
html.crystal .nav { background: linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(255, 250, 244, 0.28)); transition: background 0.4s, box-shadow 0.4s; }
html.crystal.cx-scrolled .nav { background: linear-gradient(150deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 244, 0.52)); box-shadow: var(--glass-shadow), 0 18px 40px -20px rgba(62, 10, 26, 0.45); }

/* ---------- hero ---------- */
/* a light band glides across the glass every few seconds */
html.crystal .hero-panel {
  background: var(--cx-sheen) 100% 0 / 300% 100% no-repeat, var(--glass-fill);
  animation: condense 1.1s var(--cx-ease) both 0.15s, cx-sheen 7s ease-in-out 1.8s infinite;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.7s var(--cx-ease);
}
@keyframes cx-sheen { 0% { background-position: 100% 0, 0 0; } 32%, 100% { background-position: 0% 0, 0 0; } }
/* the photograph breathes and drifts slower than the page */
html.crystal .hero-img { transform-origin: 30% 40%; translate: 0 var(--cx-par, 0px); animation: cx-breathe 22s ease-in-out infinite alternate; }
@keyframes cx-breathe { from { scale: 1.03; } to { scale: 1.11; } }
/* headline letters settle in one by one */
html.crystal .cx-word { display: inline-block; opacity: 0; translate: 0 0.45em; filter: blur(8px); animation: cx-settle 0.9s var(--cx-ease) forwards; animation-delay: calc(0.35s + var(--cx-w) * 0.12s); }
@keyframes cx-settle { to { opacity: 1; translate: 0 0; filter: blur(0); } }

/* ---------- light moving behind every page ---------- */
html.crystal .backdrop::after { inset: -14%; animation: cx-caustic 24s ease-in-out infinite alternate; }
@keyframes cx-caustic {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(4%, -3%, 0) rotate(5deg) scale(1.05); }
  100% { transform: translate3d(-3%, 4%, 0) rotate(-4deg) scale(1); }
}
html.crystal .cx-orb { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.55; mix-blend-mode: soft-light; animation: cx-orbit var(--d, 30s) ease-in-out infinite alternate; }
@keyframes cx-orbit { to { transform: translate3d(var(--tx, 20vw), var(--ty, 10vh), 0) scale(1.25); } }

/* the kasavu band shimmers like real zari */
html.crystal .kasavu { animation: cx-zari 5s linear infinite; }
@keyframes cx-zari { to { background-position: 220px 0, 0 0; } }

/* ---------- cards: reveal on scroll, tilt toward the pointer ---------- */
html.crystal .cx-reveal {
  opacity: 0; translate: 0 38px; filter: blur(6px);
  transition:
    opacity 0.9s var(--cx-ease) calc(var(--cx-i, 0) * 85ms),
    translate 0.9s var(--cx-ease) calc(var(--cx-i, 0) * 85ms),
    filter 0.9s var(--cx-ease) calc(var(--cx-i, 0) * 85ms),
    transform 0.6s var(--cx-ease);
}
html.crystal .cx-reveal.cx-in { opacity: 1; translate: 0 0; filter: none; }
html.crystal .pcard,
html.crystal .cat-tile { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)); }
html.crystal .pcard:hover,
html.crystal .cat-tile:hover { --lift: -6px; }
html.crystal .pcard:hover .pcard-img { box-shadow: 0 30px 50px -26px rgba(62, 10, 26, 0.6); }
html.crystal .pcard-img img { transition: transform 1.1s var(--cx-ease); }
html.crystal .pcard:hover .pcard-img img { transform: scale(1.06); }

/* ---------- buttons ---------- */
html.crystal .btn { background: var(--cx-sheen) 100% 0 / 300% 100% no-repeat, linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 250, 243, 0.3)); transition: background-position 0.8s var(--cx-ease), translate 0.35s var(--cx-ease), transform 0.18s cubic-bezier(.2, .8, .2, 1.2), box-shadow 0.2s, filter 0.2s; translate: var(--bx, 0px) var(--by, 0px); }
html.crystal .btn.primary { background: var(--cx-sheen) 100% 0 / 300% 100% no-repeat, radial-gradient(120px 40px at var(--mx, 30%) 0%, rgba(255, 220, 190, 0.35), transparent 70%), linear-gradient(180deg, #86203c, #5a0c23 60%, #4b0a1d); }
html.crystal .btn.ghost { background: var(--cx-sheen) 100% 0 / 300% 100% no-repeat; }
html.crystal .btn:hover { background-position: 0 0, 0 0, 0 0; }

/* the headline sits on clear glass: a soft halo keeps it crisp over any photo */
html.crystal .hero-panel h1, html.crystal .hero-panel p { text-shadow: 0 1px 18px rgba(255, 250, 243, 0.9), 0 0 2px rgba(255, 250, 243, 0.6); }

@media (max-width: 820px) {
  html.crystal .hero-img { translate: none; }
  html.crystal .hero-panel { background: var(--cx-sheen) 100% 0 / 300% 100% no-repeat, linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(255, 250, 244, 0.3)); }
}
