/* ============================================
   KAIG GROUP — Base Styles & Global Reset
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-secondary);
}

html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

html::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

html::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color var(--duration-slow) var(--ease-smooth),
                color var(--duration-slow) var(--ease-smooth);
}

body.no-scroll {
    overflow: hidden;
}

/* ── Links ── */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-colors);
}

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

/* ── Images ── */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ── Buttons ── */
button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

/* ── Inputs ── */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
}

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

h1 { font-size: clamp(2.5rem, 5vw, var(--text-7xl)); }
h2 { font-size: clamp(2rem, 4vw, var(--text-5xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--text-3xl)); }
h4 { font-size: clamp(1.25rem, 2.5vw, var(--text-2xl)); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    max-width: 75ch;
}

strong, b {
    font-weight: var(--weight-semibold);
}

/* ── Selection ── */
::selection {
    background-color: var(--primary);
    color: #FFFFFF;
}

/* ── Focus ── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ── Layout Utilities ── */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}

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

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

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

/* ── Section ── */
.section {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
    position: relative;
    overflow: hidden;
}

.section--dark {
    background-color: var(--bg-secondary);
}

.section--darker {
    background-color: var(--secondary-dark);
}

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

.section--accent .text-secondary,
.section--accent p {
    color: rgba(255, 255, 255, 0.8);
}

/* ── Section Header ── */
.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    margin-bottom: var(--space-4);
    position: relative;
    padding-left: 40px;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 2px;
    background: var(--primary);
}

.section-title {
    margin-bottom: var(--space-4);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    margin-left: auto;
    margin-right: auto;
}

/* ── Flex/Grid Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

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

/* ── Text Utilities ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary-color { color: var(--primary) !important; }
.text-white { color: #FFFFFF !important; }
.text-muted { color: var(--text-muted) !important; }
.text-uppercase { text-transform: uppercase; }
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Spacing Utilities ── */
.mt-auto { margin-top: auto; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

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

/* ── Custom Cursor (desktop only) ── */
.cursor-dot,
.cursor-ring {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    body {
        cursor: none;
    }

    a, button, [role="button"], input, textarea, select, label {
        cursor: none;
    }

    .cursor-dot {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 8px;
        height: 8px;
        background-color: var(--primary);
        border-radius: 50%;
        pointer-events: none;
        z-index: var(--z-cursor);
        transition: width 0.2s var(--ease-out), height 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
    }

    .cursor-ring {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 36px;
        height: 36px;
        border: 2px solid var(--primary);
        border-radius: 50%;
        pointer-events: none;
        z-index: calc(var(--z-cursor) - 1);
        transition: width 0.2s var(--ease-out), height 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
    }

    .cursor-dot.cursor-hover {
        background-color: transparent;
    }

    .cursor-ring.cursor-hover {
        width: 60px;
        height: 60px;
        background-color: rgba(220, 38, 38, 0.1);
        border-color: rgba(220, 38, 38, 0.3);
    }

    .cursor-dot.cursor-click {
        width: 4px;
        height: 4px;
    }

    .cursor-ring.cursor-click {
        width: 24px;
        height: 24px;
        background-color: rgba(220, 38, 38, 0.2);
    }
}

/* ── Mouse Glow Effect ── */
.mouse-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

.mouse-glow.active {
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .section {
        padding-top: var(--space-12);
        padding-bottom: var(--space-12);
    }

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

@media (max-width: 768px) {
    :root {
        --content-padding: var(--space-4);
    }

    .section {
        padding-top: var(--space-8);
        padding-bottom: var(--space-8);
    }

    .section-header {
        margin-bottom: var(--space-10);
    }

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

    .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
}

/* ── Custom Mobile Layout Overrides ── */
@media (max-width: 768px) {
    /* 1. About Us - Our Journey */
    #history .about-grid > div:nth-child(2) {
        margin-left: -15px;
        padding-left: 15px;
        padding-right: 15px;
        text-align: left;
    }
    #history .about-grid > div:nth-child(2) p,
    #history .about-grid > div:nth-child(2) .section-title,
    #history .about-grid > div:nth-child(2) .section-label {
        text-align: left;
    }

    /* 2. Home Page - KAIG Group */
    #about .about-grid > div:nth-child(2) {
        margin-left: -15px;
        margin-top: 24px;
        padding-left: 15px;
        padding-right: 15px;
        text-align: left;
    }
    #about .about-grid > div:nth-child(2) p,
    #about .about-grid > div:nth-child(2) .section-title {
        text-align: left;
    }

    /* 3. Chairman Page - Sudhin Mandanna */
    #chairman-detail .leader-section > div:last-child {
        margin-left: -15px;
        padding-left: 15px;
        padding-right: 15px;
        text-align: left;
    }
    #chairman-detail .leader-section > div:last-child p,
    #chairman-detail .leader-section > div:last-child .leader-name,
    #chairman-detail .leader-section > div:last-child .leader-role,
    #chairman-detail .leader-section > div:last-child .leader-quote {
        text-align: left;
    }

    /* 4. Contact Us - Send a Message */
    #contact-content .grid-2 > div:first-child {
        margin-left: 15px;
        padding-right: 15px;
    }

    /* 5. Contact Us - Contact Information */
    #contact-content .grid-2 > div:last-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    #contact-content .grid-2 > div:last-child > div:first-child {
        display: flex;
        flex-direction: column;
        gap: var(--space-6);
        width: 100%;
        align-items: center;
    }
    #contact-content .grid-2 > div:last-child .contact-info-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    #contact-content .grid-2 > div:last-child .contact-info-card .contact-info-icon {
        margin-right: 0;
        margin-bottom: var(--space-2);
    }
    #contact-content .grid-2 > div:last-child .map-embed {
        width: 100%;
        max-width: 400px;
        margin: var(--space-6) auto 0 auto;
    }
}
