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

/* Typography implementation references: IntersectionObserver threshold subtle amethyst-tinted pill used only snippets Mono" (Google */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #1a1126;
  color: #c5b8d0;
  font-family: 'Nunito Sans', Inter, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
}

.sparkle-header {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, #1a1126 0%, #2d1f3d 40%, #1a1126 70%, #140e1e 100%);
  isolation: isolate;
}

.sparkle-header::before,
.sparkle-header::after {
  position: absolute;
  content: '';
  border-radius: 999px;
  pointer-events: none;
}

.sparkle-header::before {
  width: 72vw;
  height: 72vw;
  background: radial-gradient(circle, rgba(212, 160, 200, 0.14), transparent 64%);
  transform: translate(-32vw, -24vh);
}

.sparkle-header::after {
  right: -18vw;
  bottom: -24vh;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, rgba(232, 200, 240, 0.1), transparent 68%);
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(232, 200, 240, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.05), 0 0 60px rgba(212, 160, 200, 0.08);
}

.hero-orbit-one {
  width: min(74vw, 980px);
  height: min(74vw, 980px);
  animation: orbitSpin 24s linear infinite;
}

.hero-orbit-two {
  width: min(50vw, 680px);
  height: min(50vw, 680px);
  border-style: dashed;
  opacity: 0.7;
  animation: orbitSpin 32s linear reverse infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-wordmark {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-family: 'Outfit', Inter, system-ui, sans-serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  background: linear-gradient(135deg, #e8c8f0, #ffffff, #c8a0d8, #ffffff, #e8c8f0);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 28px rgba(212, 160, 200, 0.28));
  opacity: 0;
  animation: wordmarkIn 0.6s ease-out 0.8s forwards;
}

.hero-wordmark::after {
  position: absolute;
  inset: -10% auto -10% -45%;
  width: 34%;
  content: '';
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
  filter: blur(4px);
  transform: skewX(-20deg) translateX(-160%);
  animation: chromeSweep 6s ease-in-out 1.6s infinite;
  mix-blend-mode: screen;
}

.hero-tagline {
  margin-top: 1.35rem;
  color: #c5b8d0;
  font-family: 'Nunito Sans', Inter, system-ui, sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-shadow: 0 0 22px rgba(232, 200, 240, 0.28);
  opacity: 0;
  animation: taglineIn 0.4s ease-out 1.8s forwards, taglinePulse 3.8s ease-in-out 2.4s infinite;
}

.masonry-gallery {
  position: relative;
  z-index: 2;
  column-count: 4;
  column-gap: 20px;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, rgba(26, 17, 38, 0.92), #1a1126 9rem, #1a1126);
}

.masonry-gallery::before {
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 1px;
  content: '';
  background: linear-gradient(90deg, transparent, #d4d4d4, #ffffff, #d4a0c8, #ffffff, transparent);
  opacity: 0.65;
}

.card {
  --chrome-angle: 0deg;
  position: relative;
  display: inline-block;
  width: 100%;
  min-height: 180px;
  max-height: 480px;
  margin: 0 0 20px;
  padding: 2rem;
  overflow: hidden;
  break-inside: avoid;
  border: 2px solid transparent;
  border-radius: 14px;
  background:
    linear-gradient(#251a33, #251a33) padding-box,
    linear-gradient(var(--chrome-angle), #6b5a7a, #6b5a7a) border-box;
  box-shadow: 0 4px 24px rgba(180, 140, 220, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: scale(0.85) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease, box-shadow 0.5s ease, --chrome-angle 2s linear;
  will-change: transform, opacity;
}

.card.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.card-tall {
  min-height: 360px;
}

.card-medium {
  min-height: 270px;
}

.card-gem {
  min-height: 205px;
}

.card::before,
.card::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: '';
  pointer-events: none;
}

.card::before {
  background: radial-gradient(circle at var(--mx, 22%) var(--my, 12%), rgba(255, 255, 255, 0.18), transparent 24%), linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%);
  transition: opacity 0.35s ease;
}

.card::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.13), transparent);
  transform: translateX(-120%);
  opacity: 0;
}

.card.premium::after {
  opacity: 1;
  animation: cardShimmer 4s ease-in-out infinite;
}

.card:hover {
  --chrome-angle: 360deg;
  background:
    linear-gradient(#251a33, #251a33) padding-box,
    linear-gradient(var(--chrome-angle), #d4d4d4, #ffffff, #d4a0c8, #ffffff, #d4d4d4) border-box;
  box-shadow: 0 8px 40px rgba(180, 140, 220, 0.3), 0 0 20px rgba(212, 160, 200, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-glyph {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.35rem;
  place-items: center;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(232, 200, 240, 0.13), rgba(212, 160, 200, 0.03) 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 22px rgba(212, 160, 200, 0.1);
}

.card-glyph svg {
  width: 58px;
  height: 58px;
  overflow: visible;
  animation: glyphPulse 2s ease-in-out infinite;
}

.card-glyph svg path,
.card-glyph svg line,
.card-glyph svg rect,
.card-glyph svg ellipse {
  fill: none;
  stroke: #e8c8f0;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-glyph svg circle,
.card-glyph .fill,
.card-glyph .rose-fill {
  fill: #e8c8f0;
  stroke: none;
}

.card-glyph .thin {
  stroke: #6b5a7a;
  stroke-width: 1.6;
  opacity: 0.75;
}

.card-glyph .rose {
  stroke: #d4a0c8;
}

.card-glyph .rose-fill {
  fill: #d4a0c8;
}

.card-headline {
  margin-bottom: 1rem;
  color: #e8c8f0;
  font-family: 'Outfit', Inter, system-ui, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 0.98;
  text-shadow: 0 0 18px rgba(232, 200, 240, 0.12);
}

.card-body {
  color: #c5b8d0;
  font-family: 'Nunito Sans', Inter, system-ui, sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 400;
  line-height: 1.65;
}

.card-code {
  display: inline-block;
  margin-top: 1.15rem;
  padding: 2px 8px;
  border: 1px solid rgba(155, 138, 170, 0.22);
  border-radius: 4px;
  background: rgba(180, 140, 220, 0.08);
  color: #9b8aaa;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 400;
}

.gloss-footer {
  position: relative;
  z-index: 2;
  padding: 2rem;
  background: #1a1126;
  text-align: center;
}

.gloss-footer::before {
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  content: '';
  background: linear-gradient(90deg, transparent, #d4d4d4, #ffffff, #a8a8a8, #d4a0c8, #ffffff, transparent);
  box-shadow: 0 0 18px rgba(212, 160, 200, 0.35);
}

.gloss-footer p {
  color: #9b8aaa;
  font-family: 'Nunito Sans', Inter, system-ui, sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
}

@keyframes wordmarkIn {
  to { opacity: 1; }
}

@keyframes taglineIn {
  to { opacity: 1; }
}

@keyframes taglinePulse {
  0%, 100% { text-shadow: 0 0 16px rgba(232, 200, 240, 0.18); }
  50% { text-shadow: 0 0 34px rgba(212, 160, 200, 0.46); }
}

@keyframes chromeSweep {
  0% { transform: skewX(-20deg) translateX(-160%); }
  42%, 100% { transform: skewX(-20deg) translateX(560%); }
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes glyphPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes cardShimmer {
  0%, 100% { transform: translateX(-120%); }
  50% { transform: translateX(120%); }
}

@media (max-width: 1199px) {
  .masonry-gallery { column-count: 3; }
}

@media (max-width: 767px) {
  .masonry-gallery {
    column-count: 2;
    padding: 3rem 1rem;
  }
  .masonry-gallery::before {
    left: 1rem;
    right: 1rem;
  }
  .card { padding: 1.45rem; }
}

@media (max-width: 480px) {
  .masonry-gallery { column-count: 1; }
  .hero-orbit-one { width: 92vw; height: 92vw; }
  .hero-orbit-two { width: 68vw; height: 68vw; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orbit,
  .hero-wordmark::after,
  .hero-tagline,
  .card.premium::after,
  .card-glyph svg {
    animation: none;
  }
  .hero-wordmark,
  .hero-tagline,
  .card {
    opacity: 1;
    transform: none;
  }
}
