/* =====================================================
KARUKATHA BRAND DESIGN SYSTEM
===================================================== */

:root {
  /* -----------------------------------------------------
  COLORS
  ----------------------------------------------------- */
  
  --color-brand: #65b743;
  --color-brand-dark: #4a8f2d;
  --color-brand-light: #b6f4a2;
  --color-brand-gradient: linear-gradient(135deg, #65b743, #4a8f2d);
  
  --color-black: #000;
  --color-white: #fff;
  
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-gold: #D4AF37;
  
  /* neutral palette */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  --color-text-dark: var(--gray-800);
  --color-text-muted: var(--gray-600);
  --color-text-light: var(--gray-500);
  
  --color-accent-soft: #f4f1e6;
  --color-accent-highlight: #e6ffcc;
  --color-bg-secondary: #f8fafc;
  
  /* -----------------------------------------------------
  FONTS
  ----------------------------------------------------- */
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Poppins", "Segoe UI", sans-serif;
  --font-serif: "Merriweather", Georgia, serif;
  --font-bengali: "Noto Serif Bengali", serif;
  --font-logo: "Dancing Script", cursive;
  
  /* -----------------------------------------------------
  TYPOGRAPHY
  ----------------------------------------------------- */
  
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  /* -----------------------------------------------------
  SPACING
  ----------------------------------------------------- */
  
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* -----------------------------------------------------
  BORDER RADIUS
  ----------------------------------------------------- */
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 28px;
  --radius-brand: 24px;
  --radius-full: 9999px;
  
  /* -----------------------------------------------------
  SHADOWS
  ----------------------------------------------------- */
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: 0 6px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, .12);
  --shadow-brand: 0 10px 25px rgba(101, 183, 67, .25);
  
  /* -----------------------------------------------------
  BORDERS
  ----------------------------------------------------- */
  
  --border-light: var(--gray-200);
  --border-dark: var(--color-brand);
  
  /* -----------------------------------------------------
  LAYOUT
  ----------------------------------------------------- */
  
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;
  
  /* -----------------------------------------------------
  TRANSITIONS
  ----------------------------------------------------- */
  
  --transition-fast: .15s ease;
  --transition-normal: .25s ease;
  --transition-slow: .35s ease;
  
  /* -----------------------------------------------------
  Z-INDEX SYSTEM
  ----------------------------------------------------- */
  
  --z-index-1: 10;
  --z-index-2: 20;
  --z-index-3: 30;
  --z-index-4: 40;
  --z-index-5: 50;
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-toast: 1060;
  --z-index-max: 9999;
}

/* =====================================================
GLOBAL RESET
===================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* =====================================================
MOBILE OVERFLOW FIX
===================================================== */

html,
body {
  width: 100%;
  overflow-x: hidden;
}

* {
  min-width: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.kk-container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: clamp(12px, 4vw, 24px);
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-dark);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =====================================================
TYPOGRAPHY
===================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
}

/* =====================================================
LAYOUT UTILITIES
===================================================== */

.kk-container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-12);
}

.section-sm {
  padding-block: var(--space-8);
}

/* =====================================================
BRAND UTILITIES
===================================================== */

.text-brand { color: var(--color-brand); }
.bg-brand { background: var(--color-brand); }
.bg-brand-gradient { background: var(--color-brand-gradient); }
.bg-brand-light { background: var(--color-brand-light); }

.rounded-brand { border-radius: var(--radius-brand); }
.shadow-brand { box-shadow: var(--shadow-brand); }

/* =====================================================
CARD
===================================================== */

.card-brand {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  will-change: transform;
}

.card-brand:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* =====================================================
BUTTON SYSTEM
===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-normal);
  outline: none;
}

button:focus,
.btn:focus {
  outline: none;
  box-shadow: none;
}

.btn-brand {
  background: var(--color-brand-gradient);
  color: #fff;
}

.btn-brand:hover {
  transform: translateY(-2px);
}

.btn.w-100 {
  width: 100%;
}

.btn i {
  font-size: 1rem;
  line-height: 1;
}

.btn-outline-brand {
  border: 2px solid var(--color-brand);
  color: var(--color-brand);
  background: transparent;
}

.btn-outline-brand:hover {
  background: var(--color-brand-light);
}

/* =====================================================
UTILITY CLASSES
===================================================== */

.flex { display: flex; }
.grid { display: grid; }
.text-center { text-align: center; }
.hidden { display: none; }
.block { display: block; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* =====================================================
TEXT CLAMP
===================================================== */

.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
GLOBAL INPUT GROUP & BRANDED BUTTON FIX
===================================================== */

.input-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
}

.input-group-text {
  background-color: var(--gray-100) !important;
  border: 1px solid var(--gray-300) !important;
  color: var(--color-brand-dark) !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.375rem 0.85rem !important;
  min-width: 46px;
}

.input-group > .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1% !important;
  min-width: 0;
}

.input-group > .input-group-text:first-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: none !important;
}

.input-group > .input-group-text:first-child + .form-control {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.input-group > .form-control:not(:last-child) {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.input-group > .input-group-text:last-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: none !important;
}

/* =====================================================
ACCESSIBILITY
===================================================== */

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* =====================================================
REMOVE BOOTSTRAP DEFAULT FOCUS RING
===================================================== */

/* INPUT / SELECT / TEXTAREA */
.form-control:focus,
.form-select:focus,
textarea:focus {
  outline: none !important;
  box-shadow: none !important; /* removes blue glow */
  border-color: var(--border-light); /* reset border */
}

/* BUTTONS */
.btn:focus,
.btn:active:focus,
.btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* SELECT2 */
.select2-container--focus .select2-selection {
  outline: none !important;
  box-shadow: none !important;
}

/* =====================================================
REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =====================================================
BRAND SCROLLBAR (PAGE)
===================================================== */

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
  background: var(--color-brand);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand-dark);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-brand) #f3f4f6;
}
