/*
 * Motyw Sketch Noir — czarno-fioletowy, ręcznie rysowany
 * Plik nie jest nadpisywany przy aktualizacjach motywu Sellauth.
 */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Kalam:wght@300;400;700&display=swap');

:root {
  --sketch-purple: #c084fc;
  --sketch-purple-deep: #9333ea;
  --sketch-purple-glow: rgba(192, 132, 252, 0.45);
  --sketch-ink: #e9d5ff;
  --sketch-paper: #050508;
  --sketch-card: #0c0c14;
  --sketch-border: rgba(192, 132, 252, 0.55);
  --sketch-shadow: 4px 5px 0 rgba(147, 51, 234, 0.35);
  --sketch-radius: 255px 18px 225px 12px / 12px 225px 18px 255px;
  --sketch-radius-sm: 18px 255px 12px 225px / 225px 12px 255px 18px;
}

/* ── Tło & atmosfera ── */
body {
  font-family: 'Kalam', cursive !important;
  background-color: var(--sketch-paper) !important;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(147, 51, 234, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(124, 58, 237, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    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)' opacity='0.04'/%3E%3C/svg%3E") !important;
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M10 50 Q30 45 50 50 T90 50' fill='none' stroke='%23c084fc' stroke-width='0.3' opacity='0.06'/%3E%3Cpath d='M5 80 Q40 75 95 82' fill='none' stroke='%239333ea' stroke-width='0.25' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.7;
}

#particles-js canvas {
  opacity: 0.55 !important;
  mix-blend-mode: screen;
}

/* ── Typografia rysunkowa ── */
h1, h2, h3, h4,
.font-bold.text-xl,
.font-bold.text-2xl,
.font-bold.text-3xl,
.font-bold.text-4xl,
.font-bold.text-5xl {
  font-family: 'Caveat', cursive !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 rgba(147, 51, 234, 0.25);
}

.text-accent-500,
[class*="text-accent"] {
  color: var(--sketch-purple) !important;
}

/* ── Ramki „od ręki” ── */
.sketch-border,
nav.component > div,
footer,
.announcement > div,
[class*="bg-card"] {
  border-radius: var(--sketch-radius-sm) !important;
  border: 2.5px solid var(--sketch-border) !important;
  box-shadow: var(--sketch-shadow) !important;
  background-color: color-mix(in srgb, rgb(var(--cl-card)) 88%, #1a0a2e 12%) !important;
  position: relative;
}

/* Podwójna kreska jak w szkicu */
nav.component > div::after,
footer::after,
[class*="bg-card"]::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(192, 132, 252, 0.15);
  border-radius: inherit;
  pointer-events: none;
}

/* ── Navbar ── */
nav.component {
  margin-bottom: 0.5rem;
  transform: rotate(-0.2deg);
}

nav.component h1 {
  font-size: 1.75rem !important;
  background: linear-gradient(135deg, #e9d5ff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav.component a[class*="px-4"] {
  border-radius: 12px 255px 12px 255px / 255px 12px 255px 12px !important;
  transition: transform 0.2s ease, background 0.2s ease !important;
}

nav.component a[class*="px-4"]:hover {
  transform: rotate(-1deg) scale(1.03);
  background: rgba(192, 132, 252, 0.12) !important;
}

nav.component a[class*="border-accent"] {
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px !important;
  border-width: 2.5px !important;
  box-shadow: 3px 4px 0 rgba(147, 51, 234, 0.4) !important;
}

nav.component button,
nav.component a[class*="size-10"] {
  border-radius: 50% 45% 55% 50% / 50% 55% 45% 50% !important;
  border: 2px solid var(--sketch-border) !important;
}

/* ── Announcement ── */
.announcement > div {
  background: linear-gradient(90deg, #581c87, #7c3aed, #581c87) !important;
  border-color: #e9d5ff !important;
  transform: rotate(0.15deg);
  animation: sketch-pulse-bar 4s ease-in-out infinite;
}

@keyframes sketch-pulse-bar {
  0%, 100% { box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.4), 0 0 20px rgba(192, 132, 252, 0.2); }
  50% { box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.5), 0 0 30px rgba(192, 132, 252, 0.35); }
}

.announcement p {
  font-family: 'Caveat', cursive !important;
  font-size: 1.15rem !important;
}

/* ── Hero ── */
section.component .text-3xl,
section.component .text-4xl,
section.component .text-5xl {
  font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
  line-height: 1.1 !important;
  animation: sketch-float 6s ease-in-out infinite;
}

@keyframes sketch-float {
  0%, 100% { transform: translateY(0) rotate(-0.3deg); }
  50% { transform: translateY(-6px) rotate(0.3deg); }
}

section.component:has(.text-3xl) {
  position: relative;
}

section.component:has(.text-3xl)::before {
  content: '✦';
  position: absolute;
  top: 10%;
  left: 5%;
  font-size: 2rem;
  color: var(--sketch-purple);
  opacity: 0.4;
  animation: sketch-sparkle 3s ease-in-out infinite;
}

section.component:has(.text-3xl)::after {
  content: '◇';
  position: absolute;
  bottom: 15%;
  right: 8%;
  font-size: 1.5rem;
  color: var(--sketch-purple-deep);
  opacity: 0.35;
  animation: sketch-sparkle 4s ease-in-out infinite reverse;
}

@keyframes sketch-sparkle {
  0%, 100% { opacity: 0.2; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.6; transform: scale(1.2) rotate(15deg); }
}

/* ── Przyciski ── */
a[class*="border-accent"],
button[class*="border-accent"],
a[class*="bg-accent-500"],
div[class*="border-accent-500"][class*="hover:bg-accent"] {
  border-radius: 255px 20px 225px 20px / 20px 225px 20px 255px !important;
  border-width: 2.5px !important;
  font-family: 'Caveat', cursive !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  box-shadow: 4px 5px 0 rgba(147, 51, 234, 0.45) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

a[class*="border-accent"]:hover,
button[class*="border-accent"]:hover,
a[class*="bg-accent-500"]:hover,
div[class*="hover:bg-accent-500"]:hover {
  transform: translate(-2px, -2px) rotate(-0.5deg) !important;
  box-shadow: 6px 7px 0 rgba(147, 51, 234, 0.5) !important;
}

a[class*="bg-accent-500"]:not([class*="hover:bg-accent-600"]) {
  background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
}

/* ── Karty produktów ── */
a.block.h-full[class*="bg-card"] {
  transform: rotate(var(--card-tilt, 0deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  overflow: visible !important;
}

a.block.h-full[class*="bg-card"]:nth-child(4n+1) { --card-tilt: -0.4deg; }
a.block.h-full[class*="bg-card"]:nth-child(4n+2) { --card-tilt: 0.3deg; }
a.block.h-full[class*="bg-card"]:nth-child(4n+3) { --card-tilt: -0.2deg; }
a.block.h-full[class*="bg-card"]:nth-child(4n)   { --card-tilt: 0.5deg; }

a.block.h-full[class*="bg-card"]:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.02) !important;
  box-shadow: 6px 8px 0 rgba(147, 51, 234, 0.5), 0 0 40px rgba(192, 132, 252, 0.15) !important;
  z-index: 2;
}

a.block.h-full[class*="bg-card"] h3 {
  font-family: 'Caveat', cursive !important;
  font-size: 1.5rem !important;
}

a.block.h-full[class*="bg-card"] img {
  border-radius: 8px 200px 8px 200px / 200px 8px 200px 8px;
  border: 2px dashed rgba(192, 132, 252, 0.3);
}

/* ── Features & text blocks ── */
section.component [class*="bg-card/75"].p-4,
section.component [class*="bg-card/75"].p-6,
section.component [class*="bg-card/75"].py-4 {
  transform: rotate(0.15deg);
}

section.component [class*="bg-card/75"]:nth-child(even) {
  transform: rotate(-0.2deg);
}

section.component i[class*="text-accent"] {
  filter: drop-shadow(0 0 8px var(--sketch-purple-glow));
  transform: rotate(-5deg);
  display: inline-block;
}

/* ── Nagłówki sekcji (hr pod tytułem) ── */
section.component hr[class*="border-accent"] {
  border: none !important;
  height: 4px !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='8' viewBox='0 0 200 8'%3E%3Cpath d='M0 4 Q25 0 50 4 T100 4 T150 4 T200 4' fill='none' stroke='%23c084fc' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat !important;
  opacity: 0.9;
}

/* ── Stats ── */
section.component [class*="border-b-2"] {
  border-bottom: 3px solid transparent !important;
  border-image: linear-gradient(90deg, transparent, var(--sketch-purple), transparent) 1 !important;
}

section.component [class*="text-3xl"][class*="text-accent"],
section.component [class*="text-4xl"][class*="text-accent"],
section.component [class*="text-5xl"][class*="text-accent"] {
  font-family: 'Caveat', cursive !important;
  font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
  text-shadow: 0 0 30px var(--sketch-purple-glow);
}

/* ── Searchbar & inputy ── */
[class*="bg-card/75"][class*="focus-within"],
[class*="bg-white/[0.025]"],
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select,
.choices__inner {
  border-radius: 20px 255px 20px 255px / 255px 20px 255px 20px !important;
  border: 2px solid rgba(192, 132, 252, 0.35) !important;
  font-family: 'Kalam', cursive !important;
}

[class*="focus-within:border-accent"],
input:focus,
textarea:focus {
  border-color: var(--sketch-purple) !important;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.2), 3px 4px 0 rgba(147, 51, 234, 0.3) !important;
  outline: none !important;
}

/* ── Footer ── */
footer {
  transform: rotate(0.1deg);
  margin-top: 2rem !important;
}

footer a:hover svg {
  filter: drop-shadow(0 0 6px currentColor);
  transform: rotate(8deg) scale(1.1);
  transition: transform 0.2s ease;
}

/* ── Modale ── */
[class*="bg-background"].p-4,
[class*="bg-background"].p-6 {
  border-radius: var(--sketch-radius) !important;
  border: 3px solid var(--sketch-border) !important;
  box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.5), 0 0 60px rgba(147, 51, 234, 0.2) !important;
}

/* ── Badge produktów ── */
.badges [class*="bg-accent"] {
  border-radius: 255px 8px 255px 8px / 8px 255px 8px 255px !important;
  transform: rotate(-2deg);
  border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
}

/* ── Splide / karuzele ── */
.splide .splide__arrow {
  border-radius: 50% !important;
  border: 2px solid var(--sketch-border) !important;
}

/* ── Vouches ── */
#vouchesContainer .vouches-card {
  border-radius: var(--sketch-radius-sm) !important;
  border: 2.5px solid var(--sketch-border) !important;
  box-shadow: var(--sketch-shadow) !important;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--sketch-paper);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c3aed, #c084fc);
  border-radius: 255px 5px;
  border: 2px solid var(--sketch-paper);
}

/* ── Linki w edytorze ── */
.editor .e-link,
.editor .e-quote {
  border-left-color: var(--sketch-purple) !important;
}

/* ── Delikatna animacja wejścia kart ── */
@keyframes sketch-in {
  from {
    opacity: 0;
    transform: translateY(12px) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--card-tilt, 0deg));
  }
}

.flex.flex-wrap.gap-4 > div {
  animation: sketch-in 0.5s ease backwards;
}

.flex.flex-wrap.gap-4 > div:nth-child(1) { animation-delay: 0.05s; }
.flex.flex-wrap.gap-4 > div:nth-child(2) { animation-delay: 0.1s; }
.flex.flex-wrap.gap-4 > div:nth-child(3) { animation-delay: 0.15s; }
.flex.flex-wrap.gap-4 > div:nth-child(4) { animation-delay: 0.2s; }
.flex.flex-wrap.gap-4 > div:nth-child(5) { animation-delay: 0.25s; }
.flex.flex-wrap.gap-4 > div:nth-child(6) { animation-delay: 0.3s; }

/* ── SVG filter dla lekkiego „drżenia” linii (opcjonalnie na hover) ── */
.sketch-wobble:hover {
  animation: sketch-wobble 0.4s ease;
}

@keyframes sketch-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-0.8deg); }
  75% { transform: rotate(0.8deg); }
}
