/* =========================
   Vibecode – Modern Master CSS
   Enhanced with animations, glassmorphism & tech effects
   ========================= */

:root{
  --blue:#007bff;
  --blue-bright: #3d8eff;
  --purple: #8F31FF;
  --purple-light: #a855f7;
  --cyan: #1e96e2;
  --bg:#0a0a0f;
  --bg-light: #13131a;
  --text:#e8e8f0;
  --text-dim: #a0a0b8;
  --dark:#050508;
  --dark2:#0f0f15;
  --card-bg: rgba(20, 20, 30, 0.7);
  --card-border: rgba(143, 49, 255, 0.2);
  
  /* Gradient colors */
  --gradient-1: linear-gradient(135deg, #8F31FF 0%, #3d70f0 100%);
  --gradient-2: linear-gradient(135deg, #1e96e2 0%, #8F31FF 100%);
  --gradient-glow: linear-gradient(135deg, rgba(143,49,255,0.3), rgba(30,150,226,0.3));

  /* LOGO: X-fönster för gradienten på [ */
  --logo-mask-from: 31%;
  --logo-mask-to:   60%;
  --logo-mask-top: -25%;
  --logo-mask-bottom: 125%;
  --logo-c-from: 54%;
  --logo-c-to:   58%;
  --logo-c-top: -25%;
  --logo-c-bottom: 125%;
}

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

html {
  scroll-behavior: smooth;
}

body{
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin:0;
  padding:0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(143, 49, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(30, 150, 226, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* ===== Font ===== */
@font-face{
  font-family: "Vibecode";
  src:
    url("/assets/fonts/vb.woff2") format("woff2"),
    url("/assets/fonts/vb.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

h3 {
  font-size: 1.5rem;
  color: var(--purple-light);
}

p {
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 1rem;
}

a {
  color: var(--cyan);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--purple-light);
  text-decoration: none;
}

/* ======================================
   HEADER / BANNER with Parallax
   ====================================== */
header{
  position: relative;
  color: #fff;
  text-align: center;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
}

.banner{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  display: block;
  z-index: 0;
  filter: brightness(0.4) contrast(1.1);
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* Parallax effect on scroll */
header:hover .banner {
  transform: scale(1.15);
}

/* Overlay gradient */
header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg, 
    rgba(10,10,15,0.3) 0%, 
    rgba(10,10,15,0.7) 100%
  );
  z-index: 0;
}

.banner-text{
  position: relative;
  z-index: 1;
  width: min(950px, 92vw);
  padding: 28px 5vw;
  background: rgba(20, 20, 30, 0.5);
  border-radius: 20px;
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(143, 49, 255, 0.2);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(143, 49, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: fadeInUp 0.8s ease;
}

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

/* ===== Logo with enhanced effects ===== */
.logoText{
  font-family: "Vibecode", sans-serif;
  font-size: 3.5rem;
  letter-spacing: 0.02em;
  font-kerning: normal;
  white-space: nowrap;
  margin: 0 0 8px 0;
  line-height: 1.15;
  padding-bottom: 0.22em;
  color: #fff;
  position: relative;
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(143, 49, 255, 0.4));
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(143, 49, 255, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(143, 49, 255, 0.6));
  }
}

/* Gradient för Y-ellipsen */
.logoText::after{
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font-family: "Vibecode", sans-serif;
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  background: linear-gradient(180deg,
    #8F31FF 0%,
    #7A3BFF 25%,
    #3D70F0 60%,
    #1E96E2 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(90deg,
      transparent 0%,
      transparent 44%,
      #000 44%,
      #000 51%,
      transparent 51%,
      transparent 100%
    ),
    linear-gradient(180deg,
      transparent 0%,
      transparent -10%,
      #000 -10%,
      #000 110%,
      transparent 110%,
      transparent 100%
    );
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.logoText::before{
  /* Ta bort gammalt ::before som var för [ */
  display: none;
}

.banner-text h2,
.banner-text p {
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.banner-text h2 {
  font-size: 1.4rem;
  background: none;
  -webkit-text-fill-color: #fff;
}

.banner-text p {
  font-size: 1.1rem;
  line-height: 1.5;
  opacity: 0.95;
}

/* ===== Navigation ===== */
nav{
  background: var(--dark2);
  padding: 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(143, 49, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.menu-items{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

nav a{
  color: var(--text);
  margin: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  position: relative;
  padding: 0.3rem 0;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover {
  color: var(--purple-light);
}

nav a:hover::after {
  width: 100%;
}

/* ===== Buttons ===== */
.cta-button,
.btn {
  display: inline-block;
  background: var(--gradient-1);
  color: #fff;
  padding: 0.9rem 1.8rem;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
  margin: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 10px 30px rgba(143, 49, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-button::before,
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.cta-button:hover::before,
.btn:hover::before {
  width: 300px;
  height: 300px;
}

.cta-button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 15px 40px rgba(143, 49, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cta-button:active,
.btn:active {
  transform: translateY(0);
}

/* Hamburger menu */
.menu-toggle{
  display: none;
  background: var(--purple);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  position: absolute;
  top: 0.6rem;
  right: 1rem;
  cursor: pointer;
  z-index: 10;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: var(--purple-light);
  transform: scale(1.05);
}

/* ===== Sections ===== */
section{
  padding: 3rem 2rem;
  max-width: 900px;
  margin: auto;
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

main {
  padding: 2rem 1rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

/* ===== Cards with Glassmorphism ===== */
.card{
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Subtle animated border glow */
.card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient-2);
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(143, 49, 255, 0.4);
  box-shadow: 
    0 20px 60px rgba(143, 49, 255, 0.2),
    0 0 40px rgba(143, 49, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card:hover::before {
  opacity: 0.1;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: 1rem;
}

.card ul {
  list-style: none;
  padding-left: 0;
}

.card ul li {
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  position: relative;
  color: var(--text-dim);
}

.card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--purple-light);
  font-weight: bold;
}

/* Highlight card - special styling */
.highlight-card {
  background: linear-gradient(
    135deg,
    rgba(143, 49, 255, 0.15) 0%,
    rgba(30, 150, 226, 0.15) 100%
  );
  border: 1px solid rgba(143, 49, 255, 0.4);
  box-shadow: 
    0 0 60px rgba(143, 49, 255, 0.3),
    0 15px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.highlight-card h2 {
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
}

/* Banner card */
.bannerCard{
  margin-top: 14px;
  text-align: left;
  background: rgba(20, 20, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 18px 20px;
  backdrop-filter: blur(10px);
}

.bannerCard h2 {
  margin: 0 0 8px 0;
  font-size: 1.3rem;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
}

.bannerCard p {
  margin: 0;
  font-size: 1.05rem;
  opacity: 0.9;
}

/* ===== Forms ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input[type="text"],
input[type="email"],
select,
textarea{
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid rgba(143, 49, 255, 0.2);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus{
  outline: none;
  border-color: var(--purple-light);
  box-shadow: 0 0 20px rgba(143, 49, 255, 0.3);
  background: rgba(20, 20, 30, 0.7);
}

textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

input[type="submit"],
button[type="submit"] {
  background: var(--gradient-1);
  color: #fff;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(143, 49, 255, 0.3);
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(143, 49, 255, 0.5);
}

/* ===== Language button ===== */
.langBtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(143, 49, 255, 0.2);
  transition: all 0.3s ease;
}

.langBtn img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  filter: saturate(0.9);
  transition: all 0.3s ease;
}

.langBtn:hover{
  box-shadow: 0 0 20px rgba(143, 49, 255, 0.5);
  transform: translateY(-2px) scale(1.05);
  border-color: var(--purple-light);
}

.langBtn:hover img{
  opacity: 1;
  filter: saturate(1.2);
}

/* === TEM – Rabbithole button === */
.btn.tem-link{
  position: relative;
  background: linear-gradient(135deg, #3b2cff, #6f3bff, #1e96e2);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2) inset,
    0 10px 35px rgba(90,60,255,0.5);
  transition: all 0.3s ease;
}

.btn.tem-link::after{
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255,255,255,0.3),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn.tem-link:hover{
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.3) inset,
    0 18px 50px rgba(120,90,255,0.7);
  filter: saturate(1.2);
}

.btn.tem-link:hover::after{
  opacity: 0.7;
}

.btn.tem-link::before{
  content: "enter";
  position: absolute;
  bottom: -1.4em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.btn.tem-link:hover::before {
  opacity: 0.7;
}

/* ===== Footer ===== */
footer{
  background: var(--dark);
  color: var(--text-dim);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(143, 49, 255, 0.1);
}

/* ===== Blockquote ===== */
blockquote {
  border-left: 4px solid var(--purple);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text);
  background: rgba(143, 49, 255, 0.05);
  padding: 1rem 1.5rem;
  border-radius: 0 12px 12px 0;
}

/* ===== Audio player ===== */
audio {
  width: 100%;
  max-width: 500px;
  margin: 1rem auto;
  display: block;
  filter: hue-rotate(260deg) saturate(1.2);
}

/* ===== Images ===== */
img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

section img {
  box-shadow: 0 10px 40px rgba(143, 49, 255, 0.2);
  transition: all 0.3s ease;
}

section img:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 50px rgba(143, 49, 255, 0.3);
}

/* ===== Scroll animations ===== */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Mobile responsiveness ===== */
@media (max-width: 600px){
  header { 
    min-height: 300px; 
  }

  .logoText{
    font-size: 2.5rem;
    padding-bottom: 0.28em;
  }

  .banner-text{
    padding: 20px 4vw;
    width: min(950px, 94vw);
    border-radius: 16px;
  }

  .banner-text h2 {
    font-size: 1.2rem;
  }

  .banner-text p { 
    font-size: 1rem; 
  }

  h2 {
    font-size: 1.6rem;
  }

  nav{
    background: var(--dark2);
    padding: 0.75rem 0;
  }

  .menu-toggle{ 
    display: block; 
  }

  .menu-items{
    display: none;
    flex-direction: column;
    align-items: center;
    background: rgba(15, 15, 21, 0.98);
    padding: 1.5rem;
    border-radius: 0 0 16px 16px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(143, 49, 255, 0.2);
    border-top: none;
  }

  .menu-items.active{ 
    display: flex; 
  }

  nav a{ 
    margin: 0.5rem auto;
    font-size: 1.1rem;
  }

  section {
    padding: 2rem 1rem;
  }

  .card {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .cta-button,
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

/* ===== Utility classes ===== */
.muted {
  color: var(--text-dim);
  font-size: 0.95rem;
}

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

code {
  background: rgba(143, 49, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: var(--purple-light);
  font-size: 0.9em;
}
