/* Cure Crystals — curecrystal.com
 *
 * Design system and motion rules: docs/design.md.
 *
 * Constraints this file lives under (see node_server.js CSP):
 *   - style-src 'self'  → no inline styles anywhere; everything is here.
 *   - font-src 'self'   → system font stacks only, zero font downloads.
 * Motion rules:
 *   - Animate only transform, opacity and background-position (compositor-only).
 *   - Never fade the LCP element (hero logo/h1/tagline, crystal photo) from
 *     opacity 0; they may move, but they paint on the first frame.
 *   - Content is visible without JS. js/site.js only hides (then reveals)
 *     blocks that start below the fold, so crawlers and no-JS readers see
 *     everything.
 *   - prefers-reduced-motion turns every animation and transition off.
 */

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: dark;

  --bg: #07040f;
  --bg-2: #100a22;
  --ink: #f5f2ff;
  --ink-2: #cfc6ea;
  --ink-3: #a79dc9;

  --violet: #8b5cf6;
  --violet-2: #b69cff;
  --cyan: #5eead4;
  --pink: #f0abfc;
  --amber: #fcd34d;

  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.08);

  --grad: linear-gradient(100deg, var(--cyan) 0%, var(--violet-2) 45%, var(--pink) 100%);
  --grad-soft: linear-gradient(135deg, rgba(94, 234, 212, 0.18), rgba(139, 92, 246, 0.18) 50%, rgba(240, 171, 252, 0.14));

  --font: "SF Pro Display", "SF Pro Text", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bar-h: 64px;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Aurora: three soft light fields drifting behind everything. Gradients, not
 * filter: blur(), so it costs one composited layer and no per-frame raster. */
body::before {
  content: "";
  position: fixed;
  inset: -12vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(40vmax 32vmax at 22% 18%, rgba(139, 92, 246, 0.34), transparent 70%),
    radial-gradient(34vmax 28vmax at 82% 12%, rgba(94, 234, 212, 0.16), transparent 70%),
    radial-gradient(44vmax 36vmax at 70% 88%, rgba(240, 171, 252, 0.16), transparent 70%),
    radial-gradient(60vmax 40vmax at 10% 100%, rgba(76, 29, 149, 0.4), transparent 70%);
  animation: aurora 36s ease-in-out infinite alternate;
  will-change: transform;
}

/* Blueprint grid, faded out toward the edges. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(139, 92, 246, 0.55);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: var(--bg);
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px 32px;
}

/* Small uppercase mono label: "// 300+ crystals". */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.grad-text {
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--violet-2);
  animation: shimmer 8s linear infinite;
}

.section-head {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ------------------------------------------------------------------ site bar */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 4, 15, 0.72);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
  view-transition-name: site-bar;
}

/* Glass by default (no-JS safe); js/site.js adds .is-top while the page is
 * scrolled to the very top, where the bar melts into the aurora. */
.site-bar.is-top {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-bar-inner {
  max-width: 1120px;
  height: var(--bar-h);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Reading-progress hairline (CSS scroll-driven animation; browsers without
 * it simply don't draw the bar). */
.site-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
}

@supports (animation-timeline: scroll()) {
  .site-bar::after {
    opacity: 1;
    animation: progress linear both;
    animation-timeline: scroll(root block);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line-2), 0 6px 20px -6px rgba(139, 92, 246, 0.8);
  transition: transform 0.4s var(--ease-spring);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.06);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-bar-link {
  position: relative;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
}

.site-bar-link:hover {
  background: var(--glass-2);
}

.site-bar-cta {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0b0716;
  background: var(--grad);
  background-size: 200% 100%;
  box-shadow: 0 8px 24px -10px rgba(139, 92, 246, 0.9);
  transition: background-position 0.6s var(--ease), transform 0.2s var(--ease);
}

.site-bar-cta:hover {
  color: #0b0716;
  background-position: 100% 0;
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------ hero (home) */

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  padding: 40px 0 56px;
}

.hero > * {
  animation: rise 0.9s var(--ease) both;
}

.hero > :nth-child(2) { animation-delay: 0.06s; }
.hero > :nth-child(3) { animation-delay: 0.12s; }
.hero > :nth-child(4) { animation-delay: 0.18s; }
.hero > :nth-child(5) { animation-delay: 0.24s; }
.hero > :nth-child(6) { animation-delay: 0.3s; }

/* Small, non-LCP hero parts may also fade in. */
.hero .eyebrow,
.hero .store-buttons,
.hero .stats {
  animation-name: rise-fade;
}

.hero-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: 8px 0 6px;
  border-radius: 44px;
}

/* Rotating prism ring + breathing glow behind the logo. */
.hero-logo::before,
.hero-logo::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}

.hero-logo::before {
  inset: -3px;
  background: conic-gradient(from var(--angle, 0deg), var(--cyan), var(--violet), var(--pink), var(--amber), var(--cyan));
  -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);
  padding: 3px;
  animation: spin-angle 8s linear infinite;
}

.hero-logo::after {
  inset: -40px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.55), rgba(94, 234, 212, 0.12) 60%, transparent);
  animation: breathe 5s ease-in-out infinite;
}

.hero-logo img {
  width: 160px;
  height: 160px;
  border-radius: 40px;
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease-spring);
}

.hero-logo:hover img {
  transform: scale(1.05) rotate(-3deg);
}

.hero h1 {
  font-size: clamp(2.8rem, 9vw, 5.4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.045em;
  background: linear-gradient(100deg, #fff 20%, var(--violet-2) 40%, var(--cyan) 50%, var(--pink) 60%, #fff 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ink);
  animation: rise 0.9s var(--ease) both, shimmer 10s linear infinite;
}

.tagline {
  max-width: 34em;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-2);
}

.tagline strong {
  color: var(--ink);
  font-weight: 700;
}

/* HUD stats strip */
.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(760px, 100%);
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.stats li {
  display: grid;
  gap: 2px;
  padding: 16px 12px;
  background: rgba(10, 6, 22, 0.82);
}

.stat-value {
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* While js/site.js counts up, the real text stays in the DOM (transparent)
 * and the ticking value is painted from data-live on top of it. */
.is-counting {
  position: relative;
  color: transparent;
}

.is-counting::after {
  content: attr(data-live);
  position: absolute;
  inset: 0;
  color: var(--ink);
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ store buttons */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

.store-buttons a {
  position: relative;
  display: block;
  border-radius: 12px;
  transition: transform 0.35s var(--ease-spring), filter 0.35s var(--ease);
}

.store-buttons a::after {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: 16px;
  background: var(--grad);
  opacity: 0;
  filter: blur(14px);
  transition: opacity 0.35s var(--ease);
}

.store-buttons a:hover {
  transform: translateY(-3px) scale(1.03);
}

.store-buttons a:hover::after {
  opacity: 0.55;
}

.store-buttons img {
  height: 56px;
  width: auto;
}

/* ------------------------------------------------------------------ glass surfaces */

/* Anything with [data-glow] gets a pointer-tracked spotlight; js/site.js
 * writes --mx/--my. Without JS the spotlight just never shows. */
[data-glow] {
  --mx: 50%;
  --my: 50%;
  position: relative;
}

[data-glow]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(182, 156, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

[data-glow]:hover::before {
  opacity: 1;
}

/* 3D tilt: js/site.js writes --rx/--ry from the pointer position on
 * [data-tilt] cards (fine pointers only); :hover rules set --lift. Tilt owns
 * `transform` on the card, so entrance animations use the separate
 * translate/scale/opacity properties and never fight it. */
[data-tilt] {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transform-origin: 50% 50%;
}

/* While the pointer drives it, track quickly; on leave, the element's own
 * slower transition eases it back flat. */
[data-tilt].is-tilting {
  transition-property: transform, border-color, box-shadow;
  transition-duration: 0.12s, 0.45s, 0.45s;
  transition-timing-function: linear, var(--ease), var(--ease);
}

/* ------------------------------------------------------------------ features (home) */

.features-wrap {
  padding: 48px 0 40px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature {
  overflow: hidden;
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.5s var(--ease), border-color 0.4s var(--ease);
}

.feature:hover {
  --lift: -4px;
  border-color: var(--line-2);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform 0.5s var(--ease-spring);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature:hover .feature-icon {
  transform: rotate(-8deg) scale(1.08);
}

.feature h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.feature p {
  font-size: 0.93rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ screenshots (home) */

.screens-wrap {
  padding: 40px 0 24px;
}

.screenshots {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 16px 4px 32px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--violet) transparent;
}

.screenshots img {
  flex: 0 0 auto;
  width: 220px;
  height: auto;
  scroll-snap-align: center;
  border-radius: 28px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow), 0 0 0 6px rgba(255, 255, 255, 0.03);
  animation: float 7s ease-in-out infinite;
}

.screenshots img:nth-child(2) { animation-delay: -1.75s; }
.screenshots img:nth-child(3) { animation-delay: -3.5s; }
.screenshots img:nth-child(4) { animation-delay: -5.25s; }

@media (min-width: 1020px) {
  .screenshots {
    justify-content: center;
  }
}

/* ------------------------------------------------------------------ CTA */

.cta {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
  margin: 40px 0 48px;
  padding: 48px 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(139, 92, 246, 0.28), transparent 70%),
    linear-gradient(180deg, var(--glass-2), var(--glass));
}

/* Slow light sweep across the CTA panel. */
.cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: sweep 6s var(--ease) infinite;
}

.cta p {
  max-width: 30em;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
}

.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 40px;
  display: grid;
  gap: 14px;
  text-align: center;
}

.legal {
  display: flex;
  gap: 12px;
  justify-content: center;
  color: var(--ink-3);
}

.legal a {
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 4px;
}

.legal a:hover {
  text-decoration-color: currentColor;
}

.disclaimer {
  max-width: 46em;
  margin: 0 auto;
  font-size: 0.84rem;
  color: var(--ink-3);
}

.credit {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ legal pages */

#privacypolicy .container,
#termsconditions .container,
#renewaldetails .container {
  width: calc(100% - 32px);
  max-width: 820px;
  margin: 40px auto;
  padding: 40px clamp(20px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(16, 10, 34, 0.86), rgba(10, 6, 22, 0.9));
  box-shadow: var(--shadow);
  animation: rise 0.7s var(--ease) both;
}

#privacypolicy .logo,
#termsconditions .logo,
#renewaldetails .logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0 auto 24px;
  box-shadow: 0 0 0 1px var(--line-2), 0 12px 40px -12px rgba(139, 92, 246, 0.9);
}

#privacypolicy h2,
#termsconditions h2,
#renewaldetails h2 {
  margin: 28px 0 12px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

#privacypolicy h3,
#termsconditions h3,
#renewaldetails h3 {
  margin: 20px 0 8px;
}

#privacypolicy p,
#termsconditions p,
#renewaldetails p,
#privacypolicy li,
#termsconditions li,
#renewaldetails li {
  color: var(--ink-2);
  margin-bottom: 12px;
}

#privacypolicy strong,
#termsconditions strong,
#renewaldetails strong {
  color: var(--ink);
}

#privacypolicy ul,
#termsconditions ul,
#renewaldetails ul {
  padding-left: 24px;
}

#privacypolicy li::marker,
#termsconditions li::marker,
#renewaldetails li::marker {
  color: var(--violet-2);
}

#privacypolicy a,
#termsconditions a,
#renewaldetails a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ crystal pages */

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 24px;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--violet-2);
}

.breadcrumbs [aria-current] {
  color: var(--ink);
}

.crystal-head {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding-bottom: 28px;
}

/* Photo in a slowly rotating prism frame. The photo itself is the LCP
 * element, so only the frame and glow animate. */
.crystal-photo-frame {
  position: relative;
  border-radius: 28px;
  padding: 3px;
  isolation: isolate;
}

.crystal-photo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from var(--angle, 0deg), var(--cyan), var(--violet), var(--pink), var(--amber), var(--cyan));
  animation: spin-angle 10s linear infinite;
}

.crystal-photo-frame::after {
  content: "";
  position: absolute;
  inset: -7%;   /* ×1.04 breathe must stay inside a 375px viewport's gutters */
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.5), transparent);
  animation: breathe 6s ease-in-out infinite;
}

.crystal-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 25px;
  background: var(--bg-2);
  animation: rise 0.9s var(--ease) both;
}

.crystal-intro {
  animation: rise 0.9s 0.08s var(--ease) both;
}

.crystal-intro h1,
.hub-head h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.04em;
  background: linear-gradient(100deg, #fff 30%, var(--violet-2) 50%, var(--cyan) 60%, #fff 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ink);
  animation: shimmer 10s linear infinite;
}

.crystal-lede {
  margin: 10px 0 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.crystal-subtitle {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink-2);
  margin-bottom: 18px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.facts div {
  overflow: hidden;
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.facts div:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.facts dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.facts dd {
  color: var(--ink);
  font-weight: 500;
}

.app-cta {
  overflow: hidden;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  margin-bottom: 40px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--grad-soft);
}

.app-cta p {
  color: var(--ink);
  font-weight: 500;
}

.app-cta .store-buttons img {
  height: 48px;
}

.crystal-section {
  max-width: 46em;
  padding-bottom: 40px;
}

.crystal-section h2 {
  position: relative;
  margin-bottom: 14px;
  padding-left: 18px;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Gradient tick before section headings. */
.crystal-section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 4px;
  background: var(--grad);
}

.crystal-section p {
  color: var(--ink-2);
  margin-bottom: 16px;
  font-size: 1.04rem;
}

.crystal-section .section-note {
  color: var(--ink-3);
  font-style: italic;
}

.cleanse-list {
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: cleanse;
}

.cleanse-list li {
  position: relative;
  padding: 14px 18px 14px 58px;
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  counter-increment: cleanse;
}

.cleanse-list li::before {
  content: counter(cleanse, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
}

.cleanse-list p {
  margin: 4px 0 0;
  font-size: 0.93rem;
}

.cleanse-time {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--glass-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

/* ---- chakra line (crystal pages) */

/* Meaning + cleanse copy on the left, the chakra line pinned on the right
 * (desktop). The static markup is the finished state: all chakras on the
 * line, the stone's own lit up and tagged. The scroll animation below only
 * draws it in, so browsers without scroll-driven animations, crawlers and
 * reduced-motion readers get the complete picture. */
.crystal-body {
  view-timeline: --crystal-body block;
}

.crystal-body.has-rail {
  display: grid;
  grid-template-columns: minmax(0, 46em) 220px;
  justify-content: space-between;
  gap: 48px;
}

.chakra-rail {
  align-self: start;
  position: sticky;
  top: calc(var(--bar-h) + 32px);
  display: grid;
  gap: 16px;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
}

.chakra-line {
  list-style: none;
  position: relative;
  display: flex;
  flex-direction: column-reverse;   /* root at the bottom, crown on top */
  gap: 18px;
  view-timeline: --chakra-line block;
}

/* Track, and the energy fill that rises along it. */
.chakra-line::before,
.chakra-line::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 2px;
}

.chakra-line::before {
  background: var(--line-2);
}

.chakra-line::after {
  background: linear-gradient(0deg, #f87171, #fb923c, #facc15, #4ade80, #38bdf8, #818cf8, #c084fc);
  transform-origin: 50% 100%;
}

.chakra {
  --c: var(--ink-3);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 14px auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

.chakra-root { --c: #f87171; --i: 0; }
.chakra-sacral { --c: #fb923c; --i: 1; }
.chakra-solar-plexus { --c: #facc15; --i: 2; }
.chakra-heart { --c: #4ade80; --i: 3; }
.chakra-throat { --c: #38bdf8; --i: 4; }
.chakra-third-eye { --c: #818cf8; --i: 5; }
.chakra-crown { --c: #c084fc; --i: 6; }

.chakra-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--bg);
}

.chakra.is-linked {
  color: var(--ink);
  font-weight: 600;
}

.chakra.is-linked .chakra-dot {
  border-color: var(--c);
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), 0 0 18px var(--c);
}

.chakra-tag {
  justify-self: end;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c);
}

.chakra-note {
  font-size: 0.82rem;
  color: var(--ink-3);
}

@supports (animation-timeline: view()) {
  /* Desktop: the rail is pinned, so it is driven by the copy column's
   * progress. The fill climbs over the first 45% of the stretch in which the
   * copy fills the viewport; each chakra lights as the fill reaches it. */
  .chakra-line::after {
    animation: rail-fill-y linear both;
    animation-timeline: --crystal-body;
    animation-range: contain 0% contain 45%;
  }

  .chakra.is-linked .chakra-dot,
  .chakra-tag {
    animation: chakra-on linear both;
    animation-timeline: --crystal-body;
    animation-range: contain calc(var(--i) * 7.5% - 2.5%) contain calc(var(--i) * 7.5% + 2.5%);
  }
}

@media (max-width: 959px) {
  .crystal-body.has-rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  /* Phone/tablet: a horizontal line above the copy, drawn in as it
   * scrolls through the viewport (its own view timeline). */
  .chakra-rail {
    order: -1;
    position: static;
    margin-bottom: 32px;
  }

  .chakra-line {
    flex-direction: row;
    justify-content: space-between;
    gap: 4px;
  }

  .chakra-line::before,
  .chakra-line::after {
    left: 7%;
    right: 7%;
    top: 6px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .chakra-line::after {
    background: linear-gradient(90deg, #f87171, #fb923c, #facc15, #4ade80, #38bdf8, #818cf8, #c084fc);
    transform-origin: 0 50%;
  }

  .chakra {
    flex: 1 1 0;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
    text-align: center;
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .chakra-tag {
    justify-self: center;
    font-size: 0.56rem;
  }

  @supports (animation-timeline: view()) {
    .chakra-line::after {
      animation-name: rail-fill-x;
      animation-timeline: --chakra-line;
      animation-range: cover 15% cover 45%;
    }

    .chakra.is-linked .chakra-dot,
    .chakra-tag {
      animation-timeline: --chakra-line;
      animation-range: cover calc(15% + var(--i) * 5% - 2%) cover calc(15% + var(--i) * 5% + 3%);
    }
  }
}

.crystal-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.crystal-section .crystal-grid {
  max-width: none;
}

.crystal-card {
  display: grid;
  gap: 6px;
  height: 100%;
  overflow: hidden;
  padding: 10px 10px 14px;
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.5s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.crystal-card:hover {
  --lift: -6px;
  border-color: rgba(182, 156, 255, 0.5);
  box-shadow: 0 24px 50px -24px rgba(139, 92, 246, 0.9);
}

.crystal-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-2);
  transition: transform 0.6s var(--ease);
}

.crystal-card:hover img {
  transform: scale(1.06);
}

.crystal-card-name {
  margin-top: 4px;
  font-weight: 700;
  color: var(--ink);
}

.crystal-card-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.hub-head {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 8px 0 12px;
}

.hub-head .tagline {
  margin-bottom: 12px;
}

.crystal-grid-hub {
  padding-bottom: 16px;
}

/* ------------------------------------------------------------------ home: crystal links */

.crystal-links {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  padding: 24px 0 32px;
}

.crystal-links h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.crystal-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 900px;
}

.crystal-links li a {
  display: inline-block;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.crystal-links li a:hover {
  transform: translateY(-2px);
  border-color: rgba(182, 156, 255, 0.6);
  background: rgba(139, 92, 246, 0.16);
  color: var(--ink);
}

.crystal-links .all-link {
  font-weight: 700;
  color: var(--cyan);
}

.crystal-links .all-link::after {
  content: " →";
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.crystal-links .all-link:hover::after {
  transform: translateX(4px);
}

/* ------------------------------------------------------------------ scroll reveal */

/* Fallback path (browsers without scroll-driven animations): js/site.js
 * adds .reveal only to [data-reveal] blocks that start below the viewport,
 * then .is-in when they scroll into view. Blocks entering in the same frame
 * get --d = 0, 1, 2… so rows of cards cascade (capped at 10). Uses
 * translate/scale, not transform, so it composes with [data-tilt]. */
.reveal {
  opacity: 0;
  translate: 0 28px;
  scale: 0.985;
  transition-property: opacity, translate, scale, transform;
  transition-duration: 0.65s;
  transition-timing-function: var(--ease);
  transition-delay: calc(min(var(--d, 0), 10) * 45ms);
}

.reveal.is-in {
  opacity: 1;
  translate: none;
  scale: none;
}

/* Card grids are dealt in: each card starts tipped back and flattens. The
 * <li> owns this transform; the card inside it owns the tilt. */
.crystal-grid > li.reveal {
  transform: perspective(900px) rotateX(38deg);
  transform-origin: 50% 100%;
}

.crystal-grid > li.reveal.is-in {
  transform: none;
}

/* Preferred path: CSS scroll-driven animations, scrubbed by the scroll
 * position, no JS, off the main thread. Each block fades in over the first
 * 180px after its top crosses the bottom of the viewport. Anything already
 * inside the viewport is at (or near) full opacity on the first frame, and
 * crawlers render a viewport as tall as the page, so nothing is hidden from
 * them. Browsers without support ignore the whole block. */
@supports (animation-timeline: view()) {
  [data-reveal] {
    animation: reveal-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 180px;
  }

  .crystal-grid > li[data-reveal] {
    animation-name: deal;
    transform-origin: 50% 100%;
  }

  /* Neighbouring cards finish a beat apart, so a row ripples in. */
  .crystal-grid > li[data-reveal]:nth-child(3n + 2) {
    animation-range: entry 20px entry 220px;
  }

  .crystal-grid > li[data-reveal]:nth-child(3n) {
    animation-range: entry 40px entry 260px;
  }
}

/* ------------------------------------------------------------------ scroll parallax */

/* Three depths: content at 1×, the blueprint grid at 0.35×, the aurora at
 * 0.1×. Scroll-driven (compositor only), measured in pixels of scroll so
 * every page moves at the same speed. Uses `translate` so the aurora's own
 * time-based drift (`transform`) keeps running underneath. */
@supports (animation-timeline: scroll()) {
  body::before {
    animation: aurora 36s ease-in-out infinite alternate, parallax-slow linear both;
    animation-timeline: auto, scroll(root block);
    animation-range: normal, 0px 6000px;
  }

  body::after {
    animation: parallax-fast linear both;
    animation-timeline: scroll(root block);
    animation-range: 0px 3000px;
  }
}

/* ------------------------------------------------------------------ view transitions */

/* Same-origin page navigations cross-fade (Chromium 126+, Safari 18.2+);
 * other browsers ignore this and navigate normally. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 0.25s var(--ease) both vt-out;
}

::view-transition-new(root) {
  animation: 0.35s var(--ease) both vt-in;
}

/* ------------------------------------------------------------------ keyframes */

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(4vmax, -3vmax, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(-3vmax, 3vmax, 0) rotate(-6deg) scale(1.04); }
}

@keyframes shimmer {
  from { background-position: 0% 50%; }
  to { background-position: 250% 50%; }
}

@keyframes rise {
  from { transform: translateY(16px); }
  to { transform: none; }
}

@keyframes rise-fade {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes spin-angle {
  to { --angle: 360deg; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes sweep {
  0% { transform: translateX(0); }
  60%, 100% { transform: translateX(360%); }
}

@keyframes progress {
  to { transform: scaleX(1); }
}

@keyframes vt-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes vt-in {
  from { opacity: 0; transform: translateY(8px); }
}

@keyframes reveal-in {
  from { opacity: 0; translate: 0 28px; scale: 0.985; }
}

@keyframes deal {
  from { opacity: 0; transform: perspective(900px) rotateX(38deg) translateY(40px) scale(0.94); }
}

@keyframes parallax-slow {
  to { translate: 0 -600px; }
}

@keyframes parallax-fast {
  to { translate: 0 -1050px; }
}

@keyframes rail-fill-y {
  from { transform: scaleY(0); }
}

@keyframes rail-fill-x {
  from { transform: scaleX(0); }
}

@keyframes chakra-on {
  from { opacity: 0.15; scale: 0.4; }
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 720px) {
  .site-bar-link.hide-sm {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crystal-head {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .crystal-photo-frame {
    width: min(300px, 100%);
    margin: 0 auto;
  }

  .facts {
    text-align: left;
  }

  .screenshots img {
    width: 190px;
  }
}

@media (max-width: 480px) {
  /* Logo only; the name stays readable to screen readers and crawlers. */
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .site-bar-link {
    padding: 8px 8px;
  }
}

@media (max-width: 420px) {
  .site-bar-cta {
    padding: 7px 12px;
    font-size: 0.84rem;
  }

  .store-buttons img {
    height: 48px;
  }
}

/* ------------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .reveal {
    opacity: 1;
    translate: none;
    scale: none;
  }

  .crystal-grid > li.reveal {
    transform: none;
  }

  /* Scroll-driven animations ignore duration, so switch them off outright:
   * reveals, deal-in, parallax and the chakra draw-in all show their
   * finished state. */
  [data-reveal],
  body::before,
  body::after,
  .chakra-line::after,
  .chakra.is-linked .chakra-dot,
  .chakra-tag {
    animation: none !important;
  }

  /* The scroll-driven progress bar is informative, not decorative: keep it. */
  .site-bar::after {
    animation-duration: auto !important;
  }

  @view-transition {
    navigation: none;
  }
}

/* ------------------------------------------------------------------ print */

/* Paper has no scroll: print every block in its finished state. */
@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1 !important;
    translate: none !important;
    scale: none !important;
    transform: none !important;
  }

  .site-bar,
  .skip-link,
  body::before,
  body::after {
    display: none !important;
  }

  .chakra-rail {
    position: static;
  }
}
