/* Cartamed — one shot + full-screen motion graphics */

:root {
  --cm-bg: #1A1B26;
  --cm-violet: #6D5CFF;
  --cm-lavender: #A78BFA;
  --cm-peach: #FFB08A;
  --cm-gold: #FFD6A6;
  --cm-ivory: #F5F5F5;
  --cm-text: var(--cm-ivory);
  --cm-font: 'Manrope', Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  background: var(--cm-bg);
  color: var(--cm-text);
  font-family: var(--cm-font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.cm-noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cm-vignette {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 75% 65% at 50% 42%, transparent 35%, rgba(13, 15, 20, 0.55) 100%);
}

.cm-motion-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 2;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.cm-shot {
  position: fixed; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.cm-lockup {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  max-width: min(92vw, 600px);
  margin-top: clamp(120px, 22vh, 200px);
  animation: cmFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cm-wordmark {
  font-size: clamp(1.85rem, 7.5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 clamp(12px, 2vh, 18px);
  line-height: 1;
  text-shadow:
    0 0 40px rgba(109, 92, 255, 0.35),
    0 0 80px rgba(109, 92, 255, 0.12);
  animation: cmWordPulse 4s ease-in-out infinite;
}

.cm-beyond {
  font-size: clamp(0.92rem, 2.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cm-gold);
  margin: 0 0 14px;
  text-shadow: 0 0 24px rgba(255, 214, 166, 0.55), 0 0 48px rgba(255, 176, 138, 0.2);
  animation: cmBeyondGlow 2.6s ease-in-out infinite;
}

.cm-tagline {
  font-size: clamp(0.88rem, 2.2vw, 1.08rem);
  font-weight: 500;
  line-height: 1.55;
  margin: 0;
  max-width: 26em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
.cm-tagline-primary { color: var(--cm-lavender); margin-bottom: 8px; }
.cm-tagline-secondary { color: var(--cm-peach); }

@keyframes cmFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cmWordPulse {
  0%, 100% { text-shadow: 0 0 48px rgba(109, 92, 255, 0.42), 0 0 92px rgba(109, 92, 255, 0.16); }
  50% { text-shadow: 0 0 68px rgba(109, 92, 255, 0.62), 0 0 120px rgba(255, 176, 138, 0.24); }
}

@keyframes cmBeyondGlow {
  0%, 100% { opacity: 0.86; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}

@media (min-width: 768px) {
  .cm-lockup { text-align: center; margin-top: clamp(80px, 16vh, 160px); }
  /* Lighter vignette on large screens so canvas motion stays visible behind brand */
  .cm-vignette {
    background: radial-gradient(ellipse 82% 72% at 50% 40%, transparent 42%, rgba(13, 15, 20, 0.42) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Keep canvas visible — JS runs a slower/softer loop instead of hiding motion */
  .cm-wordmark, .cm-lockup, .cm-beyond { animation-duration: 0.01ms; animation-iteration-count: 1; }
}
