/* ============================================================
   PremiumKit — Unified Landing Page Stylesheet
   Pure vanilla CSS · No Tailwind · No @apply · No @layer
   ============================================================ */

/* ----------------------------------------------------------
   1. Design Tokens
   ---------------------------------------------------------- */
:root {
  --pk-bg: oklch(0.11 0.008 260);
  --pk-fg: oklch(0.95 0.005 80);
  --pk-card: oklch(0.155 0.008 260);
  --pk-card-fg: oklch(0.95 0.005 80);
  --pk-primary: oklch(0.78 0.16 182);
  --pk-primary-fg: oklch(0.11 0.008 260);
  --pk-secondary: oklch(0.185 0.01 260);
  --pk-muted: oklch(0.20 0.01 260);
  --pk-muted-fg: oklch(0.85 0.015 260);
  --pk-border: oklch(0.24 0.012 260);
  --pk-gain: oklch(0.76 0.16 162);
  --pk-loss: oklch(0.62 0.22 18);
  --pk-azure: oklch(0.68 0.14 245);
  --pk-amber: oklch(0.76 0.14 75);
  --pk-surface: oklch(0.175 0.01 260);
  --pk-surface-hover: oklch(0.21 0.012 260);
  --pk-radius: 0.75rem;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Outfit', system-ui, sans-serif;
}

/* ----------------------------------------------------------
   2. Body Base
   ---------------------------------------------------------- */
body {
  background: var(--pk-bg) !important;
  color: var(--pk-fg) !important;
  font-family: var(--font-sans) !important;
}

/* ----------------------------------------------------------
   3. Grain Overlay
   ---------------------------------------------------------- */
.pk-grain::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* ----------------------------------------------------------
   4. Surface Cards
   ---------------------------------------------------------- */
.pk-surface-card {
  background: linear-gradient(145deg, oklch(0.165 0.01 260), oklch(0.145 0.008 260));
  border: 1px solid oklch(0.26 0.012 260 / 0.6);
  border-radius: 16px;
}

.pk-surface-elevated {
  background: linear-gradient(145deg, oklch(0.19 0.012 260), oklch(0.16 0.008 260));
  border: 1px solid oklch(0.28 0.015 260 / 0.5);
  border-radius: 16px;
}

/* ----------------------------------------------------------
   5. Glow Effects
   ---------------------------------------------------------- */
.glow-teal {
  box-shadow: 0 0 40px oklch(0.78 0.16 182 / 0.15),
              0 0 80px oklch(0.78 0.16 182 / 0.05);
}

.glow-azure {
  box-shadow: 0 0 40px oklch(0.68 0.14 245 / 0.15),
              0 0 80px oklch(0.68 0.14 245 / 0.05);
}

.glow-amber {
  box-shadow: 0 0 40px oklch(0.76 0.14 75 / 0.15),
              0 0 80px oklch(0.76 0.14 75 / 0.05);
}

/* ----------------------------------------------------------
   6. Keyframe Animations
   ---------------------------------------------------------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes fade-up {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes scale-in {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slide-in-right {
  0% { opacity: 0; transform: translateX(40px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-left {
  0% { opacity: 0; transform: translateX(-40px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes bounce-in {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animation utility classes */
.animate-shimmer {
  animation: shimmer 2.5s ease-in-out infinite;
  background-size: 200% 100%;
}

.animate-pulse-soft {
  animation: pulse-soft 2s ease-in-out infinite;
}

.animate-fade-up {
  animation: fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-gradient-shift {
  animation: gradient-shift 8s ease infinite;
  background-size: 200% 200%;
}

.animate-scale-in {
  animation: scale-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-slide-in-right {
  animation: slide-in-right 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-slide-in-left {
  animation: slide-in-left 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-bounce-in {
  animation: bounce-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-spin-slow {
  animation: spin-slow 12s linear infinite;
}

/* Animation delay classes */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-500 { animation-delay: 500ms; }

/* ----------------------------------------------------------
   7. Character Animation
   ---------------------------------------------------------- */
.animate-char-in {
  animation: char-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  filter: blur(40px);
  transform: translateY(100%);
}

@keyframes char-in {
  0% {
    opacity: 0;
    filter: blur(40px);
    transform: translateY(100%);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* ----------------------------------------------------------
   8. Font Utility Classes
   ---------------------------------------------------------- */
.font-sans    { font-family: var(--font-sans); }
.font-mono    { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }

.heading-xl {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.heading-lg {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.heading-md {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.heading-sm {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.body-lg {
  font-size: 1.15rem;
  line-height: 1.7;
}

.body-md {
  font-size: 1rem;
  line-height: 1.6;
}

.body-sm {
  font-size: 0.9rem;
  line-height: 1.5;
}

.body-xs {
  font-size: 0.8rem;
  line-height: 1.4;
}

.label-lg {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.label-sm {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.number-xl {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.number-lg {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.number-md {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.number-sm {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------
   9. Transition Utilities
   ---------------------------------------------------------- */
.transition-smooth {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.transition-spring {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ----------------------------------------------------------
   10. Marquee Animation
   ---------------------------------------------------------- */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.pk-marquee {
  animation: marquee 30s linear infinite;
}

/* ----------------------------------------------------------
   11. Hover Lift
   ---------------------------------------------------------- */
.pk-hover-lift {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pk-hover-lift:hover {
  transform: translateY(-4px);
}

/* ----------------------------------------------------------
   12. Scrollbar Utilities
   ---------------------------------------------------------- */
.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: oklch(0.28 0.015 260) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: oklch(0.28 0.015 260);
  border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: oklch(0.35 0.015 260);
}

/* ----------------------------------------------------------
   13. Hero Section
   ---------------------------------------------------------- */
.pk-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.pk-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff 0%, oklch(0.75 0.005 80) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: 1000px;
  margin: 0 auto 24px;
}

.pk-hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--pk-muted-fg);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ----------------------------------------------------------
   14. Animated Headline Container
   ---------------------------------------------------------- */
.pk-animated-word {
  display: inline-flex;
  overflow: hidden;
  vertical-align: bottom;
}

.pk-animated-word span {
  display: inline-block;
}

/* ----------------------------------------------------------
   15. Section Containers
   ---------------------------------------------------------- */
.pk-section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.pk-section-head {
  text-align: center;
  margin-bottom: 64px;
}

.pk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--pk-muted-fg);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pk-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--pk-muted-fg);
}

.pk-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.pk-section-head p {
  color: var(--pk-muted-fg);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ----------------------------------------------------------
   16. Bento Grid
   ---------------------------------------------------------- */
.pk-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.pk-bento-item {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .pk-bento-item--4 { grid-column: span 4; }
  .pk-bento-item--6 { grid-column: span 6; }
  .pk-bento-item--8 { grid-column: span 8; }
}

/* ----------------------------------------------------------
   17. Card Styling
   ---------------------------------------------------------- */
.pk-card {
  background: var(--pk-card);
  border: 1px solid var(--pk-border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.pk-card:hover {
  border-color: oklch(0.35 0.015 260);
  transform: translateY(-2px);
}

.pk-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.pk-card p {
  color: var(--pk-muted-fg);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----------------------------------------------------------
   18. CRM Chat Mockup
   ---------------------------------------------------------- */
.pk-chat {
  background: oklch(0.13 0.008 260);
  border: 1px solid var(--pk-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.pk-chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.pk-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.7rem;
  flex-shrink: 0;
  color: #fff;
}

.pk-chat-bubble {
  padding: 10px 14px;
  border-radius: 0 12px 12px 12px;
  color: var(--pk-muted-fg);
  background: oklch(0.20 0.01 260);
}

.pk-chat-msg--right {
  flex-direction: row-reverse;
}

.pk-chat-msg--right .pk-chat-bubble {
  border-radius: 12px 0 12px 12px;
  background: oklch(0.78 0.16 182 / 0.15);
  color: #fff;
}

/* ----------------------------------------------------------
   19. Backoffice Dashboard Mockup
   ---------------------------------------------------------- */
.pk-dash {
  background: #000;
  border: 1px solid var(--pk-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.pk-dash-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid oklch(0.20 0.01 260);
  padding: 10px 0;
  font-size: 0.85rem;
  color: var(--pk-muted-fg);
}

.pk-dash-row:last-child {
  border: none;
}

.pk-dash-row strong {
  color: #fff;
}

/* ----------------------------------------------------------
   20. Masonry Testimonials
   ---------------------------------------------------------- */
.pk-masonry {
  column-count: 1;
  column-gap: 20px;
}

@media (min-width: 768px)  { .pk-masonry { column-count: 2; } }
@media (min-width: 1024px) { .pk-masonry { column-count: 3; } }

.pk-review {
  break-inside: avoid;
  margin-bottom: 20px;
}

.pk-review-stars {
  color: #fbbf24;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.pk-review-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.pk-review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pk-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pk-surface);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.pk-review-info strong {
  display: block;
  font-size: 0.9rem;
}

.pk-review-info span {
  font-size: 0.8rem;
  color: var(--pk-muted-fg);
}

/* ----------------------------------------------------------
   21. Logo Ticker
   ---------------------------------------------------------- */
.pk-ticker {
  overflow: hidden;
  padding: 40px 0;
  border-top: 1px solid var(--pk-border);
  border-bottom: 1px solid var(--pk-border);
  display: flex;
  white-space: nowrap;
}

.pk-ticker-track {
  display: flex;
  gap: 64px;
  align-items: center;
  animation: marquee 30s linear infinite;
}

.pk-ticker-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pk-muted-fg);
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
}

/* ----------------------------------------------------------
   22. Button System
   ---------------------------------------------------------- */
.pk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.pk-btn--primary {
  background: #fff;
  color: #000;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.pk-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 30px rgba(255, 255, 255, 0.25);
}

.pk-btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid oklch(0.30 0.012 260);
}

.pk-btn--ghost:hover {
  background: oklch(0.18 0.01 260);
}

.pk-btn--teal {
  background: var(--pk-primary);
  color: var(--pk-primary-fg);
}

.pk-btn--teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px oklch(0.78 0.16 182 / 0.3);
}

/* ----------------------------------------------------------
   23. Metrics Grid
   ---------------------------------------------------------- */
.pk-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: oklch(0.24 0.012 260 / 0.5);
  border-radius: 20px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .pk-metrics { grid-template-columns: 1fr; }
}

.pk-metric {
  background: var(--pk-bg);
  padding: 40px;
}

.pk-metric-value {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pk-metric-label {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--pk-muted-fg);
}

/* ----------------------------------------------------------
   24. Live Indicator
   ---------------------------------------------------------- */
.pk-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--pk-muted-fg);
}

.pk-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pk-gain);
  animation: pulse-soft 2s ease-in-out infinite;
}

/* ----------------------------------------------------------
   25. Viscous Liquid Canvas
   ---------------------------------------------------------- */
.pk-viscous-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.pk-viscous-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ----------------------------------------------------------
   26. CTA Bottom Section
   ---------------------------------------------------------- */
.pk-cta-final {
  text-align: center;
  padding: 80px 24px 160px;
}

.pk-cta-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 40px;
  border-radius: 24px;
}

/* ----------------------------------------------------------
   27. Responsive
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .pk-hero {
    padding: 100px 16px 60px;
  }

  .pk-section {
    padding: 60px 16px;
  }

  .pk-card {
    padding: 24px;
  }

  .pk-metric {
    padding: 24px;
  }
}
