/* ============================================================
   Evrion Prism — Landing Page Styles
   Dark theme with glassmorphism, matching Keycloak login design
   ============================================================ */

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

:root {
  --prism-bg: #050814;
  --prism-surface: rgba(15, 22, 44, 0.85);
  --prism-border: rgba(168, 85, 247, 0.15);
  --prism-border-hover: rgba(168, 85, 247, 0.35);
  --prism-text: #F9FAFB;
  --prism-text-muted: #9CA3AF;
  --prism-primary: #A855F7;
  --prism-primary-light: #D946EF;
  --prism-primary-dark: #9333EA;
  --prism-gradient: linear-gradient(135deg, #D946EF 0%, #A855F7 100%);
  --prism-green: #22c55e;
  --prism-amber: #f59e0b;
  --prism-red: #ef4444;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1100px;
  --section-py: 6rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--prism-bg);
  color: var(--prism-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--prism-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Animated background orbs ---------- */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  animation: float 15s ease-in-out infinite;
}

.bg-orbs .orb:nth-child(1) {
  width: 600px;
  height: 600px;
  background: var(--prism-primary);
  top: -10%;
  left: -10%;
}

.bg-orbs .orb:nth-child(2) {
  width: 500px;
  height: 500px;
  background: var(--prism-primary-light);
  bottom: -10%;
  right: -10%;
  animation-delay: -7s;
}

.bg-orbs .orb:nth-child(3) {
  width: 350px;
  height: 350px;
  background: var(--prism-primary-dark);
  top: 40%;
  left: 50%;
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-40px) scale(1.05); }
}

/* ---------- Layout ---------- */
.container {
  position: relative;
  z-index: 1;
}

section {
  padding: var(--section-py) 1.5rem;
}

.inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

.gradient-text {
  background: var(--prism-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--prism-text-muted);
  font-size: 1.125rem;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: var(--prism-gradient);
  color: #fff;
  box-shadow: 0 4px 24px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--prism-primary);
  border: 1.5px solid var(--prism-border-hover);
}

.btn-outline:hover {
  background: rgba(168, 85, 247, 0.08);
}

/* ---------- Cards ---------- */
.card {
  background: var(--prism-surface);
  border: 1px solid var(--prism-border);
  border-radius: 16px;
  padding: 1.75rem;
  backdrop-filter: blur(20px);
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--prism-border-hover);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(16px);
  background: rgba(5, 8, 20, 0.8);
  border-bottom: 1px solid var(--prism-border);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--prism-text);
}

.nav-brand:hover { text-decoration: none; }

.nav-logo-icon {
  flex-shrink: 0;
  display: block;
}

.nav-brand-name {
  font-weight: 600;
  color: #F9FAFB;
  letter-spacing: -0.01em;
}

.nav-brand-product {
  color: var(--prism-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

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

.nav-links a:hover {
  color: var(--prism-text);
  text-decoration: none;
}

/* ---------- HERO ---------- */
.hero {
  padding-top: 10rem;
  padding-bottom: var(--section-py);
  text-align: center;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero p {
  color: var(--prism-text-muted);
  font-size: 1.25rem;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- PROBLEM (Fällorna) ---------- */
.traps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.trap-card .trap-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.trap-card h3 {
  margin-bottom: 0.5rem;
}

.trap-card p {
  color: var(--prism-text-muted);
  font-size: 0.95rem;
}

/* ---------- SOLUTION (Tre steg) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.step {
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--prism-gradient);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step h3 {
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--prism-text-muted);
  font-size: 0.95rem;
}

.step .time {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--prism-green);
  background: rgba(34, 197, 94, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.step-connector {
  display: none;
}

/* ---------- MAGNETMODELLEN ---------- */
.magnet-levels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.magnet-level {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.magnet-level .level-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--prism-border);
}

.magnet-level h3 {
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.magnet-level p {
  color: var(--prism-text-muted);
  font-size: 0.9rem;
}

/* ---------- SOCIAL PROOF ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.stat {
  text-align: center;
}

.stat .number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--prism-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat .label {
  color: var(--prism-text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ---------- HOW IT WORKS ---------- */
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.how-step {
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid var(--prism-border);
}

.how-step.active {
  border-left-color: var(--prism-primary);
}

.how-step .step-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--prism-primary);
  margin-bottom: 0.5rem;
}

.how-step h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.how-step p {
  color: var(--prism-text-muted);
  font-size: 0.9rem;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 3rem;
  justify-content: center;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--prism-text-muted);
}

.badge-icon {
  font-size: 1.25rem;
}

/* ---------- SCREENSHOTS ---------- */
.screenshots-section {
  background: linear-gradient(180deg, transparent 0%, rgba(168, 85, 247, 0.04) 50%, transparent 100%);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (max-width: 768px) {
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
}

.screenshot-card {
  margin: 0;
  text-align: left;
}

.screenshot-frame {
  border: 1px solid var(--prism-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--prism-surface);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s, transform 0.2s;
  /* 16:10 aspect ratio placeholder while images load */
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-frame:hover {
  border-color: var(--prism-border-hover);
  transform: translateY(-3px);
}

.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-card figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--prism-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 0.25rem;
}

/* ---------- PRICING ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.price-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.price-card.featured {
  border-color: var(--prism-primary);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.15);
}

.price-card.featured::before {
  content: 'Populärast';
  position: absolute;
  top: 12px;
  right: -28px;
  background: var(--prism-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 2rem;
  transform: rotate(45deg);
}

.price-card .plan-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.price-card .price {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.price-card .price-sub {
  color: var(--prism-text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.price-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 1.5rem;
}

.price-card li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--prism-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-card li .check {
  color: var(--prism-green);
  font-weight: 700;
}

.price-card li .dash {
  color: var(--prism-text-muted);
  opacity: 0.4;
}

.price-card .btn {
  width: 100%;
  justify-content: center;
}

/* ---------- FINAL CTA ---------- */
.final-cta {
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(168, 85, 247, 0.06) 100%);
}

.final-cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.final-cta p {
  color: var(--prism-text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 1rem auto 2rem;
}

.final-cta .subtext {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--prism-text-muted);
}

/* ---------- FOOTER ---------- */
footer {
  padding: 3rem 1.5rem 2rem;
  border-top: 1px solid var(--prism-border);
}

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.footer-usps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-usp {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--prism-text-muted);
}

.footer-bottom {
  text-align: center;
  color: var(--prism-text-muted);
  font-size: 0.8rem;
}

.footer-bottom a {
  color: var(--prism-text-muted);
  margin: 0 0.5rem;
}

.footer-bottom a:hover {
  color: var(--prism-text);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  :root {
    --section-py: 4rem;
  }

  .nav-links { display: none; }

  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

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

  .hero {
    padding-top: 7rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .trust-badges {
    flex-direction: column;
    align-items: center;
  }

  .footer-usps {
    flex-direction: column;
    align-items: center;
  }
}
