/**
 * DhanGenie Design System - Core Tokens & Global Framework
 * Conforms strictly to design.md (Modern SaaS • Clean Fintech • Enterprise Cloud Marketplace)
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Primary Brand Colors */
    --mst-primary: #2563eb;          /* Core Action Blue */
    --mst-primary-hover: #1d4ed8;    /* Deep Blue Hover */
    --mst-primary-light: #eff6ff;    /* Soft Tint Background */
    --mst-primary-border: #dbeafe;   /* Primary Badge Border */

    /* Neutrals & Typography */
    --mst-text-heading: #0f172a;     /* Deep Navy Headings */
    --mst-text-body: #172033;        /* Dark Charcoal Body */
    --mst-text-muted: #64748b;       /* Slate Secondary Text */
    --mst-text-subtle: #94a3b8;      /* Placeholder / Tertiary */

    /* Surfaces & Layout */
    --mst-bg: #f8fafc;               /* Page Background */
    --mst-bg-alt: #f6f8fb;           /* Alternate Canvas */
    --mst-card-bg: #ffffff;          /* Pure White Card Surface */
    --mst-border: #e2e8f0;           /* Subtle 1px Divider / Card Border */
    --mst-border-input: #dbe3ef;     /* Form Field Border */

    /* Semantic Statuses */
    --mst-success: #16a34a;          /* Active / Available / Verified */
    --mst-success-bg: #dcfce7;
    --mst-success-border: #bbf7d0;

    --mst-warning: #d97706;          /* Pending / Notice */
    --mst-warning-bg: #fef3c7;
    --mst-warning-border: #fde68a;

    --mst-danger: #ef4444;           /* Taken / Error / Alert */
    --mst-danger-bg: #fee2e2;
    --mst-danger-border: #fecaca;

    --mst-info: #0284c7;             /* Additional / Details */
    --mst-info-bg: #f0f9ff;
    --mst-info-border: #e0f2fe;

    /* Corner Radii */
    --mst-radius-card: 18px;         /* Standard Surface Radius */
    --mst-radius-input: 10px;        /* Controls & Selects */
    --mst-radius-button: 10px;       /* Action Buttons */
    --mst-radius-chip: 10px;         /* Icon Chips */
    --mst-radius-badge: 20px;        /* Status Pills */

    /* Elevation & Shadows */
    --mst-shadow-subtle: 0 4px 16px rgba(15, 23, 42, 0.03);
    --mst-shadow-card: 0 8px 24px rgba(15, 23, 42, 0.04);
    --mst-shadow-hover: 0 12px 32px rgba(15, 23, 42, 0.08);
    --mst-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.10);

    /* Fonts */
    --mst-font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mst-font-mono: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--mst-font-sans);
    background-color: var(--mst-bg);
    color: var(--mst-text-body);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

img, svg, video, iframe {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6, p, span, li, a, label, strong, b, em {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--mst-text-heading);
    font-family: var(--mst-font-sans);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
    color: var(--mst-text-body);
}

p.lead {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--mst-text-muted);
}

a {
    color: var(--mst-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--mst-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.container-narrow {
    max-width: 960px;
}

.section {
    padding: 70px 0;
}

.section-sm {
    padding: 40px 0;
}

.section-alt {
    background-color: var(--mst-bg-alt);
    border-top: 1px solid var(--mst-border);
    border-bottom: 1px solid var(--mst-border);
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px auto;
}

.section-label {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--mst-primary);
    background-color: var(--mst-primary-light);
    border: 1px solid var(--mst-primary-border);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.6rem, 2.5vw, 2.15rem);
    font-weight: 800;
    color: var(--mst-text-heading);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.section-title span.text-highlight {
    color: var(--mst-primary);
}

.section-desc {
    font-size: 14.5px;
    color: var(--mst-text-muted);
    line-height: 1.55;
    margin-bottom: 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: 24px;
}

.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)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.col-12 { grid-column: span 12; }
.col-11 { grid-column: span 11; }
.col-10 { grid-column: span 10; }
.col-9  { grid-column: span 9; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.col-2  { grid-column: span 2; }
.col-1  { grid-column: span 1; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--mst-primary) !important; }
.text-muted { color: var(--mst-text-muted) !important; }
.text-subtle { color: var(--mst-text-subtle) !important; }
.text-heading { color: var(--mst-text-heading) !important; }
.text-success { color: var(--mst-success) !important; }
.text-danger { color: var(--mst-danger) !important; }
.text-warning { color: var(--mst-warning) !important; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.w-100 { width: 100%; }
.my-0 { margin-top: 0; margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
