/* 
   KH-BuHaS Website - Main Stylesheet (Genius Redesign)
   Premium SaaS / Bento Grid Style
*/

/* --- Variables & Design Tokens --- */
:root {
  /* Colors */
  --color-primary: #0f172a;
  /* Deep Slate */
  --color-primary-light: #1e293b;
  --color-secondary: #0891b2;
  /* Cyan */
  --color-secondary-trans: rgba(8, 145, 178, 0.1);
  --color-secondary-glow: rgba(8, 145, 178, 0.5);
  --color-accent: #f59e0b;
  /* Amber */

  --color-bg-white: #ffffff;
  --color-bg-light: #f8fafc;
  --color-bg-subtle: #f1f5f9;

  --color-text-main: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-text-light: #f8fafc;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;

  /* Layout */
  --container-width: 1400px;
  --section-padding: 80px 24px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Shadows & Glows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --glow-border: 0 0 0 1px rgba(8, 145, 178, 0.1);
  --glow-active: 0 0 20px rgba(8, 145, 178, 0.2);

  /* Animations */
  --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: var(--space-3);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: 1.75rem;
  margin-bottom: var(--space-2);
}

h4 {
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

p {
  margin-bottom: var(--space-3);
  max-width: 65ch;
  color: var(--color-text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

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

ul {
  list-style: none;
}

/* --- Layout --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding);
  position: relative;
}

.section-full {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.section-dark {
  background: var(--color-primary);
  color: white;
}

.section-dark p {
  color: var(--color-text-muted);
}

/* --- Bento Grid System --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  grid-auto-rows: minmax(180px, auto);
}

.col-span-12 {
  grid-column: span 12;
}

.col-span-8 {
  grid-column: span 8;
}

.col-span-6 {
  grid-column: span 6;
}

.col-span-4 {
  grid-column: span 4;
}

.col-span-3 {
  grid-column: span 3;
}

.row-span-2 {
  grid-row: span 2;
}

.fix {
  justify-content: center;
}

.fix-2 {
  height: max-content;
}

@media (max-width: 1024px) {

  .col-span-8,
  .col-span-4 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    display: flex;
    flex-direction: column;
  }

  .col-span-8,
  .col-span-6,
  .col-span-4,
  .col-span-3 {
    width: 100%;
  }
}

/* --- Cards & Glow Effects --- */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  border: 1px solid #e2e8f0;
  transition: all 0.4s var(--ease-smooth);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

/* Subtle Gradient Background for cards */
.card-gradient {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.card-dark {
  background: rgba(30, 41, 59, 0.7);
  /* More translucent for backdrop filter */
  backdrop-filter: blur(12px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-dark h3 {
  color: #f8fafc;
}

.card-dark p {
  color: #94a3b8;
}

.card-dark .card-icon {
  background: rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Spotlight Effect Class (JS will toggle variables) */
.card-spotlight {
  background: radial-gradient(600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
      rgba(255, 255, 255, 0.06),
      transparent 40%), var(--color-primary-light);
  /* Fallback color */
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-secondary-trans);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 24px;
  transition: 0.3s;
}

.card:hover .card-icon {
  background: var(--color-secondary);
  color: white;
  transform: scale(1.1);
}

/* Badge */
.badge {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--color-secondary-trans);
  color: var(--color-secondary);
  margin-bottom: 24px;
}

/* --- Typography Utilities --- */
.text-center {
  text-align: center;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-dark .text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  /* Reduced vertical padding */
  border-radius: 100px;
  /* Pill shape */
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s var(--ease-smooth);
  gap: 8px;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(8, 145, 178, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 14px 28px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Specific overwrite for section-dark context to ensure visibility */
.section-dark .btn-secondary {
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.section-dark .btn-secondary:hover {
  background: white;
  color: var(--color-primary);
  border-color: white;
}

/* --- Header & Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: 0.3s;
  background: rgba(255, 255, 255, 0.85);
  /* Visible by default */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  /* Subtle border */
}

.site-header.scrolled {
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}


.site-header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

/* --- Feature Ticker --- */
.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
  padding: 40px 0;
  background: var(--color-bg-subtle);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker {
  display: inline-block;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  display: inline-block;
  padding: 0 40px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #cbd5e1;
  font-style: italic;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
  will-change: opacity, transform;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

/* 3D Tilt Effect */
.card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

/* Mobile & Utility */
.hidden {
  display: none;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-2 {
  gap: 8px;
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

.gap-8 {
  gap: 32px;
}

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

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

/* Grid Utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

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

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sm\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

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

  .sm\:items-center {
    align-items: center;
  }

  .sm\:justify-center {
    justify-content: center;
  }
}

/* --- Pricing Table --- */
.price-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.price-header {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.price-amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin: 16px 0;
}

.price-period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.price-features {
  margin-bottom: 32px;
  flex-grow: 1;
}

.price-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.feature-check {
  color: var(--color-secondary);
  font-size: 1.1rem;
}

/* Dark Price Card Overrides */
.card-dark .price-header {
  border-color: rgba(255, 255, 255, 0.1);
}

.card-dark .price-amount {
  color: white;
}

/* Grid Background Pattern */
.bg-grid {
  background-size: 40px 40px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}
/* --- Mobile Menu Styles --- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 28px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 100px 24px 40px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active {
  transform: translateX(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-primary);
  text-decoration: none;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .section {
    padding: 60px 0;
  }

  .container {
    padding: 0 20px;
  }

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

  .hero-actions {
    justify-content: center;
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .fade-up {
    margin-top: 40px !important;
  }

  /* Grid Fixes */
  .grid-cols-4, .grid-cols-3, .grid-cols-2 {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}


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

.col-span-4 { grid-column: span 4 / span 4; }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-12 { grid-column: span 12 / span 12; }
.row-span-2 { grid-row: span 2 / span 2; }

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
  
  .col-span-8, .col-span-4, .col-span-12 {
    grid-column: span 1 / span 1;
  }
  
  .sm\:flex-col {
    flex-direction: column !important;
  }
  
  .sm\:items-center {
    align-items: center !important;
  }
  
  .sm\:text-center {
    text-align: center !important;
  }
  
  .sm\:w-full {
    width: 100% !important;
  }
}

