/* ============================================================
   SCREAM JAR — screamjar.app
   Dark luxury + supernatural energy aesthetic
   ============================================================ */

/* --- Fonts --- */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');
@font-face {
  font-family: 'Moby';
  src: url('fonts/Moby-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Moby';
  src: url('fonts/Moby-Bold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Moby';
  src: url('fonts/Moby-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Variables --- */
:root {
  --bg-deep: #050208;
  --bg-surface: #0a0712;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #f0edf5;
  --text-secondary: rgba(240, 237, 245, 0.55);
  --text-tertiary: rgba(240, 237, 245, 0.30);

  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --accent-green: #22c55e;
  --accent-cyan: #06b6d4;

  --glow-purple: rgba(139, 92, 246, 0.4);
  --glow-pink: rgba(236, 72, 153, 0.3);
  --glow-blue: rgba(59, 130, 246, 0.3);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --font-display: 'Moby', sans-serif;
  --font-body: 'Satoshi', sans-serif;

  --max-width: 1200px;
  --section-pad: clamp(80px, 12vh, 140px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-purple);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(5, 2, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    #c084fc, #7c3aed 40%, #4c1d95 80%);
  box-shadow: 0 0 16px var(--glow-purple);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Radial gradient backdrop */
.hero-bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle,
    rgba(139, 92, 246, 0.15) 0%,
    rgba(59, 130, 246, 0.08) 35%,
    transparent 70%);
  filter: blur(40px);
}

/* Grain texture overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-jar {
  width: clamp(180px, 30vw, 280px);
  height: clamp(220px, 35vw, 340px);
  margin: 0 auto 48px;
  position: relative;
}

/* Jar silhouette — CSS-only mason jar shape */
.hero-jar-body {
  position: absolute;
  inset: 15% 10% 0 10%;
  border-radius: 8% 8% 12% 12% / 5% 5% 8% 8%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(2px);
  overflow: hidden;
}

.hero-jar-neck {
  position: absolute;
  top: 5%;
  left: 22%;
  right: 22%;
  height: 12%;
  border-radius: 4px 4px 0 0;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  background: rgba(255, 255, 255, 0.02);
}

.hero-jar-lid {
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 7%;
  border-radius: 6px;
  background: linear-gradient(135deg, #c08040, #a06828);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Floating orbs inside the jar */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  animation: float-orb 6s ease-in-out infinite;
}

.hero-orb:nth-child(1) {
  width: 32px; height: 32px;
  bottom: 25%; left: 25%;
  background: radial-gradient(circle at 35% 35%, #4ade80, #166534);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
  animation-delay: 0s;
}

.hero-orb:nth-child(2) {
  width: 26px; height: 26px;
  bottom: 35%; right: 25%;
  background: radial-gradient(circle at 35% 35%, #c084fc, #7c3aed);
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.5);
  animation-delay: -1.5s;
}

.hero-orb:nth-child(3) {
  width: 22px; height: 22px;
  bottom: 15%; left: 40%;
  background: radial-gradient(circle at 35% 35%, #fb923c, #c2410c);
  box-shadow: 0 0 16px rgba(251, 146, 60, 0.5);
  animation-delay: -3s;
}

.hero-orb:nth-child(4) {
  width: 28px; height: 28px;
  bottom: 45%; left: 35%;
  background: radial-gradient(circle at 35% 35%, #38bdf8, #0369a1);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
  animation-delay: -4.2s;
}

.hero-orb:nth-child(5) {
  width: 18px; height: 18px;
  bottom: 20%; right: 30%;
  background: radial-gradient(circle at 35% 35%, #f472b6, #be185d);
  box-shadow: 0 0 14px rgba(244, 114, 182, 0.5);
  animation-delay: -2.1s;
}

@keyframes float-orb {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-8px) translateX(4px); }
  50% { transform: translateY(-3px) translateX(-6px); }
  75% { transform: translateY(-10px) translateX(2px); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, rgba(192, 132, 252, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px var(--glow-purple);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow-purple);
}

.hero-cta svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: var(--section-pad) 0;
  position: relative;
}

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

.feature-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.feature-icon.purple { background: rgba(139, 92, 246, 0.15); }
.feature-icon.pink   { background: rgba(236, 72, 153, 0.15); }
.feature-icon.blue   { background: rgba(59, 130, 246, 0.15); }
.feature-icon.orange  { background: rgba(249, 115, 22, 0.15); }
.feature-icon.green  { background: rgba(34, 197, 94, 0.15); }
.feature-icon.cyan   { background: rgba(6, 182, 212, 0.15); }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   ORB STYLES SHOWCASE
   ============================================================ */
.orb-styles {
  padding: var(--section-pad) 0;
  position: relative;
}

.orb-styles-grid {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.orb-styles-grid::-webkit-scrollbar {
  display: none;
}

.orb-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s, transform 0.3s;
}

.orb-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.orb-preview {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  position: relative;
}

.orb-preview::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(12px);
}

/* Signature hues match JarOrbStyle.signatureHue in the app.
   Each orb has a distinct visual character beyond just color. */

/* Classic (hue ~0.5, teal) — clean solid sphere, the "default" */
.orb-preview.classic {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.7) 0%, transparent 25%),
    radial-gradient(circle at 50% 50%, #5eead4, #0d9488 50%, #134e4a 100%);
  box-shadow: 0 0 20px rgba(94, 234, 212, 0.4);
}

/* Nova (hue 0.45, green-cyan) — starburst cross visible through the sphere */
.orb-preview.nova {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.9) 0%, transparent 15%),
    conic-gradient(from 0deg at 50% 50%,
      transparent 0deg, #34d399 20deg, transparent 40deg,
      transparent 90deg, #34d399 110deg, transparent 130deg,
      transparent 180deg, #34d399 200deg, transparent 220deg,
      transparent 270deg, #34d399 290deg, transparent 310deg),
    radial-gradient(circle at 50% 50%, #059669 0%, #064e3b 100%);
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.5);
}

/* Nebula (hue 0.72, deep violet) — cloudy nebula interior */
.orb-preview.nebula {
  background:
    radial-gradient(ellipse at 30% 60%, rgba(139, 92, 246, 0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(59, 130, 246, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, #312e81 0%, #0f0a2e 100%);
  box-shadow: 0 0 24px rgba(99, 72, 186, 0.4);
}

/* Ember (hue 0.05, fire) — volcanic with hot core */
.orb-preview.ember {
  background:
    radial-gradient(circle at 50% 55%, #fef08a 0%, #f97316 20%, #dc2626 45%, #450a0a 85%),
    radial-gradient(circle at 50% 50%, #7c2d12 0%, #1c0a00 100%);
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.5);
}

/* Tempest (hue 0.62, indigo) — dark storm with lightning flash */
.orb-preview.tempest {
  background:
    linear-gradient(160deg, rgba(165, 180, 252, 0.4) 0%, transparent 30%),
    radial-gradient(circle at 40% 45%, rgba(129, 140, 248, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0a0820 100%);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Disco Ball (hue 0.55, chrome) — reflective metallic with facets */
.orb-preview.disco {
  background:
    repeating-conic-gradient(from 0deg at 50% 50%,
      rgba(255,255,255,0.12) 0deg 15deg, transparent 15deg 30deg),
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.8) 0%, transparent 20%),
    radial-gradient(circle at 50% 50%, #cbd5e1 0%, #64748b 40%, #334155 100%);
  box-shadow: 0 0 20px rgba(203, 213, 225, 0.35);
}

/* Plasma (hue 0.85, pink-magenta) — tendrils radiating from core */
.orb-preview.plasma {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.85) 0%, transparent 12%),
    conic-gradient(from 30deg at 50% 50%,
      transparent 0deg, #e879f9 15deg, transparent 35deg,
      transparent 50deg, #d946ef 65deg, transparent 85deg,
      transparent 110deg, #e879f9 125deg, transparent 145deg,
      transparent 170deg, #d946ef 185deg, transparent 205deg,
      transparent 230deg, #e879f9 245deg, transparent 265deg,
      transparent 300deg, #d946ef 315deg, transparent 335deg),
    radial-gradient(circle at 50% 50%, #86198f 0%, #3b0764 100%);
  box-shadow: 0 0 28px rgba(217, 70, 239, 0.45);
}

/* Vortex (hue 0.12, warm gold) — rainbow spiral inward */
.orb-preview.vortex {
  background:
    conic-gradient(from 0deg at 50% 50%,
      #f59e0b, #ef4444, #ec4899, #8b5cf6, #3b82f6, #06b6d4, #22c55e, #f59e0b),
    radial-gradient(circle at 50% 50%, #78350f 0%, #1c0a00 100%);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
  animation: vortex-spin 8s linear infinite;
}

@keyframes vortex-spin {
  to { filter: hue-rotate(360deg); }
}

.orb-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}

.orb-card p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: var(--section-pad) 0;
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(139, 92, 246, 0.08) 0%,
    transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}

.cta-section .section-title {
  max-width: 600px;
  margin: 0 auto 16px;
}

.cta-section .section-subtitle {
  margin: 0 auto 40px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
}

.footer-brand-orb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c084fc, #7c3aed);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ============================================================
   LEGAL PAGES (privacy, terms)
   ============================================================ */
.legal-page {
  padding: 120px 0 80px;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin-bottom: 8px;
}

.legal-page .last-updated {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 48px;
}

.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
}

.legal-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-page p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
  max-width: 720px;
}

.legal-page ul {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.8;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page strong {
  color: var(--text-primary);
}

.legal-page blockquote {
  border-left: 3px solid var(--accent-purple);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: block;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 2, 8, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Animations --- */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  animation: fade-in-up 0.6s ease forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }
