/* ==========================================================================
   KCC MAIN.CSS — Global Tokens · Reset · Grid · Utilities
   Version: 2.0  |  Mobile-first  |  kccrc.org
   Brand: Navy #2b318c · Magenta #ec008c
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (CSS Custom Properties)
   -------------------------------------------------------------------------- */

:root {

  /* — Brand Palette — */
  --kcc-navy:       #2b318c;   /* primary brand blue (logo guide) */
  --kcc-magenta:    #ec008c;   /* primary brand magenta (logo guide) */
  --kcc-navy-dark:  #1e2368;   /* hover/pressed navy */
  --kcc-navy-light: #3d44b0;   /* lighter navy for variety */
  --kcc-magenta-dark: #c4006e; /* hover/pressed magenta */
  --kcc-magenta-pale: #fce8f4; /* tinted bg for magenta sections */

  /* — Neutrals — */
  --color-white:    #ffffff;
  --color-surface:  #fafafa;   /* off-white page background */
  --color-surface-2:#f3f4f8;   /* slightly blue-tinted surface */
  --color-border:   #e8e9f0;   /* subtle border */
  --color-border-strong: #cccdd8;

  /* — Text — */
  --color-text:          #1c1c30;  /* near-black, slightly blue */
  --color-text-secondary:#4a4a68;  /* secondary body */
  --color-text-muted:    #888899;  /* placeholders, captions */
  --color-text-inverse:  #ffffff;  /* on dark backgrounds */

  /* — Semantic — */
  --color-primary:   var(--kcc-navy);
  --color-accent:    var(--kcc-magenta);
  --color-success:   #059669;
  --color-warning:   #d97706;
  --color-error:     #dc2626;

  /* — Typography — */
  --font-sans:  'Sora', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;

  /* — Type Scale (fluid via clamp) — */
  --text-xs:   0.75rem;     /* 12px */
  --text-sm:   0.875rem;    /* 14px */
  --text-base: 1rem;        /* 16px */
  --text-lg:   1.125rem;    /* 18px */
  --text-xl:   1.25rem;     /* 20px */
  --text-2xl:  clamp(1.25rem, 3vw, 1.5rem);
  --text-3xl:  clamp(1.5rem, 4vw, 1.875rem);
  --text-4xl:  clamp(1.875rem, 5vw, 2.5rem);
  --text-5xl:  clamp(2.25rem, 6vw, 3.25rem);
  --text-6xl:  clamp(2.75rem, 8vw, 4.25rem);

  /* — Font Weights — */
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* — Line Heights — */
  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-relaxed:1.75;

  /* — Letter Spacing — */
  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-wider:   0.08em;
  --tracking-widest:  0.12em;

  /* — Spacing Scale — */
  --sp-1:  0.25rem;   /* 4px  */
  --sp-2:  0.5rem;    /* 8px  */
  --sp-3:  0.75rem;   /* 12px */
  --sp-4:  1rem;      /* 16px */
  --sp-5:  1.25rem;   /* 20px */
  --sp-6:  1.5rem;    /* 24px */
  --sp-8:  2rem;      /* 32px */
  --sp-10: 2.5rem;    /* 40px */
  --sp-12: 3rem;      /* 48px */
  --sp-16: 4rem;      /* 64px */
  --sp-20: 5rem;      /* 80px */
  --sp-24: 6rem;      /* 96px */
  --sp-32: 8rem;      /* 128px */

  /* — Border Radius — */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   28px;
  --radius-2xl:  40px;
  --radius-full: 9999px;

  /* — Shadows — */
  --shadow-xs:  0 1px 2px rgba(43,49,140,0.04);
  --shadow-sm:  0 2px 8px rgba(43,49,140,0.06);
  --shadow-md:  0 4px 20px rgba(43,49,140,0.09);
  --shadow-lg:  0 8px 40px rgba(43,49,140,0.12);
  --shadow-xl:  0 16px 60px rgba(43,49,140,0.15);

  /* — Transitions — */
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in-out:cubic-bezier(0.4, 0.0, 0.2, 1);
  --duration-fast:   150ms;
  --duration-base:   220ms;
  --duration-slow:   350ms;

  /* — Layout — */
  --container-max:    1180px;
  --container-narrow:  720px;
  --container-wide:   1400px;
  --nav-height:         68px;
  --section-pad-y:     var(--sp-20);

}


/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Images */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  object-fit: cover;
}

/* Forms */
input, button, textarea, select {
  font: inherit;
}

/* Lists */
ul, ol {
  list-style: none;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
}

/* Paragraphs */
p {
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

p + p {
  margin-top: var(--sp-4);
}

/* Strong, em */
strong { font-weight: var(--weight-semibold); color: var(--color-text); }
em { font-style: italic; }

/* Address */
address { font-style: normal; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--kcc-magenta);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}


/* --------------------------------------------------------------------------
   3. TYPOGRAPHY HELPERS
   -------------------------------------------------------------------------- */

.display-xl {
  font-family: var(--font-serif);
  font-size: var(--text-6xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
}

.display-lg {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
}

.display-md {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--color-primary);
}

/* Serif italic accent (the "Better Results." style) */
.display-accent {
  font-style: italic;
  color: var(--kcc-magenta);
}

.heading-xl  { font-size: var(--text-3xl); font-weight: var(--weight-bold); }
.heading-lg  { font-size: var(--text-2xl); font-weight: var(--weight-semibold); }
.heading-md  { font-size: var(--text-xl);  font-weight: var(--weight-semibold); }
.heading-sm  { font-size: var(--text-lg);  font-weight: var(--weight-semibold); }

/* Overline label (like "नेपालमा" or "COMPARE") */
.overline {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--kcc-magenta);
}

/* Nepali text support */
.lang-ne {
  font-family: 'Noto Sans Devanagari', 'Noto Serif Devanagari', var(--font-sans);
}


/* --------------------------------------------------------------------------
   4. LAYOUT — CONTAINER & GRID
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

@media (min-width: 640px) {
  .container { padding-inline: var(--sp-8); }
}

@media (min-width: 1024px) {
  .container { padding-inline: var(--sp-12); }
}

/* Grid */
.grid {
  display: grid;
  gap: var(--sp-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive grid defaults: 1 col mobile → expand */
.grid-auto {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-auto { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-auto { grid-template-columns: repeat(3, 1fr); }
}

/* Flex helpers */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-6  { gap: var(--sp-6); }
.gap-8  { gap: var(--sp-8); }


/* --------------------------------------------------------------------------
   5. SECTION LAYOUT
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--section-pad-y);
}

.section--sm {
  padding-block: var(--sp-12);
}

.section--lg {
  padding-block: calc(var(--section-pad-y) * 1.5);
}

/* Background variants */
.section--white    { background-color: var(--color-white); }
.section--surface  { background-color: var(--color-surface); }
.section--surface-2{ background-color: var(--color-surface-2); }
.section--navy     { background-color: var(--kcc-navy); color: var(--color-text-inverse); }
.section--magenta  { background-color: var(--kcc-magenta); color: var(--color-text-inverse); }
.section--magenta-pale { background-color: var(--kcc-magenta-pale); }

/* Section header — centered label + title pattern */
.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--sp-12);
}

.section-header .overline {
  margin-bottom: var(--sp-3);
}

.section-header p {
  margin-top: var(--sp-4);
  font-size: var(--text-lg);
}

/* Left-aligned section header */
.section-header--left {
  text-align: left;
  margin-inline: 0;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--sp-8);
}


/* --------------------------------------------------------------------------
   6. UTILITIES
   -------------------------------------------------------------------------- */

/* Display */
.block       { display: block; }
.inline-flex { display: inline-flex; }
.hidden      { display: none; }

/* Spacing */
.mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }

/* Text alignment */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Text colors */
.text-primary  { color: var(--color-primary); }
.text-accent   { color: var(--kcc-magenta); }
.text-muted    { color: var(--color-text-muted); }
.text-white    { color: var(--color-white); }
.text-secondary{ color: var(--color-text-secondary); }

/* Font size shortcuts */
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }

/* Weight */
.font-normal   { font-weight: var(--weight-normal); }
.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }

/* Italic */
.italic { font-style: italic; }

/* Width helpers */
.w-full  { width: 100%; }
.max-w-prose { max-width: 65ch; }

/* Visually hidden (accessible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive visibility */
.hide-mobile  { display: none; }
.hide-desktop { display: block; }

@media (min-width: 768px) {
  .hide-mobile  { display: block; }
  .hide-desktop { display: none; }
}

/* Smooth image loading */
img.lazy { opacity: 0; transition: opacity var(--duration-slow) var(--ease-out); }
img.lazy.loaded { opacity: 1; }


/* --------------------------------------------------------------------------
   7. BADGE / TAG / PILL
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
  white-space: nowrap;
}

.badge--navy     { background-color: var(--kcc-navy); color: var(--color-white); }
.badge--magenta  { background-color: var(--kcc-magenta); color: var(--color-white); }
.badge--outline  {
  background-color: transparent;
  border: 1.5px solid var(--color-border-strong);
  color: var(--color-text-secondary);
}
.badge--outline-magenta {
  background-color: transparent;
  border: 1.5px solid var(--kcc-magenta);
  color: var(--kcc-magenta);
}
.badge--surface  { background-color: var(--color-surface-2); color: var(--color-text-secondary); }
.badge--new      { background-color: var(--kcc-magenta-pale); color: var(--kcc-magenta); }


/* --------------------------------------------------------------------------
   8. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    background-color var(--duration-base) var(--ease-out),
    color            var(--duration-base) var(--ease-out),
    border-color     var(--duration-base) var(--ease-out),
    box-shadow       var(--duration-base) var(--ease-out),
    transform        var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

/* Primary — navy solid */
.btn--primary {
  background-color: var(--kcc-navy);
  color: var(--color-white);
  border-color: var(--kcc-navy);
}
.btn--primary:hover {
  background-color: var(--kcc-navy-dark);
  border-color: var(--kcc-navy-dark);
  box-shadow: var(--shadow-md);
}

/* Accent — magenta solid */
.btn--accent {
  background-color: var(--kcc-magenta);
  color: var(--color-white);
  border-color: var(--kcc-magenta);
}
.btn--accent:hover {
  background-color: var(--kcc-magenta-dark);
  border-color: var(--kcc-magenta-dark);
  box-shadow: var(--shadow-md);
}

/* Outline navy */
.btn--outline {
  background-color: transparent;
  color: var(--kcc-navy);
  border-color: var(--kcc-navy);
}
.btn--outline:hover {
  background-color: var(--kcc-navy);
  color: var(--color-white);
}

/* Outline magenta */
.btn--outline-accent {
  background-color: transparent;
  color: var(--kcc-magenta);
  border-color: var(--kcc-magenta);
}
.btn--outline-accent:hover {
  background-color: var(--kcc-magenta);
  color: var(--color-white);
}

/* Ghost — no border, text only with arrow */
.btn--ghost {
  background-color: transparent;
  color: var(--kcc-magenta);
  border-color: transparent;
  padding-inline: var(--sp-2);
}
.btn--ghost:hover {
  color: var(--kcc-magenta-dark);
}

/* WhatsApp — green */
.btn--whatsapp {
  background-color: #25D366;
  color: var(--color-white);
  border-color: #25D366;
}
.btn--whatsapp:hover {
  background-color: #1ebe5d;
  border-color: #1ebe5d;
  box-shadow: var(--shadow-md);
}

/* Sizes */
.btn--sm  { padding: var(--sp-2) var(--sp-4); font-size: var(--text-xs); }
.btn--lg  { padding: var(--sp-4) var(--sp-8); font-size: var(--text-base); }
.btn--xl  { padding: var(--sp-5) var(--sp-10); font-size: var(--text-lg); }


/* --------------------------------------------------------------------------
   9. LINK ARROW (the "Learn more →" pattern from the design)
   -------------------------------------------------------------------------- */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--kcc-magenta);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: gap var(--duration-base) var(--ease-out), color var(--duration-base);
  text-decoration: none;
}
.link-arrow::after {
  content: '→';
  transition: transform var(--duration-base) var(--ease-out);
}
.link-arrow:hover {
  color: var(--kcc-magenta-dark);
}
.link-arrow:hover::after {
  transform: translateX(4px);
}


/* --------------------------------------------------------------------------
   10. FLOATING CONTACT BAR (mobile, like in the Replit design)
   -------------------------------------------------------------------------- */

.contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  background-color: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(43,49,140,0.10);
}

.contact-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-2);
  color: var(--color-text-secondary);
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  transition: color var(--duration-fast);
  cursor: pointer;
  border: none;
  background: none;
  text-decoration: none;
}
.contact-bar__item:hover { color: var(--kcc-magenta); }
.contact-bar__item svg   { width: 20px; height: 20px; }

/* Hide on desktop — contact bar is mobile-only */
@media (min-width: 1024px) {
  .contact-bar { display: none; }
  body { padding-bottom: 0; }
}

/* Offset body for contact bar on mobile */
body {
  padding-bottom: 64px;
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
}


/* --------------------------------------------------------------------------
   11. STAT / NUMBER HIGHLIGHT
   -------------------------------------------------------------------------- */

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

.stat-block__number {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  color: var(--kcc-magenta);
  line-height: 1;
  display: block;
}

.stat-block__label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--sp-2);
  line-height: var(--leading-snug);
}


/* --------------------------------------------------------------------------
   12. CHECKLIST ITEMS (the ✓ feature list from the design)
   -------------------------------------------------------------------------- */

.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-snug);
}

.checklist__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--kcc-magenta-pale);
  border-radius: var(--radius-full);
  color: var(--kcc-magenta);
  margin-top: 1px;
}

.checklist__icon svg {
  width: 12px;
  height: 12px;
}


/* --------------------------------------------------------------------------
   13. STEP COUNTER (01, 02, 03 pattern)
   -------------------------------------------------------------------------- */

.step-number {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  color: var(--kcc-magenta);
  opacity: 0.25;
  line-height: 1;
  user-select: none;
}


/* --------------------------------------------------------------------------
   14. SCHEMA-READY HIDDEN CONTENT
   -------------------------------------------------------------------------- */

/* Invisible to users but readable by crawlers */
.schema-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}


/* --------------------------------------------------------------------------
   15. PRINT
   -------------------------------------------------------------------------- */

@media print {
  .contact-bar,
  .navbar,
  .btn--whatsapp { display: none !important; }
  body { padding-bottom: 0; font-size: 12pt; }
  a[href]::after { content: " (" attr(href) ")"; }
}