/* ==========================================================================
   Maa Jagdamba Stone Works — design tokens & base
   Shared by the public website and the admin panel.
   ========================================================================== */

:root {
    /* Brand colours */
    --primary: #122333;
    --primary-dark: #0B1823;
    --accent: #E88918;
    --accent-dark: #C96F08;
    --text: #17212B;
    --text-light: #5F6872;
    --white: #FFFFFF;
    --light-bg: #F5F5F3;
    --border: #E1E3E5;
    --whatsapp: #25D366;      /* WhatsApp's own green, only for WhatsApp buttons */
    --whatsapp-dark: #128C7E;

    /* Typography */
    --font-heading: "Montserrat", "Segoe UI", Arial, sans-serif;
    --font-body: "Inter", "Segoe UI", Arial, sans-serif;
    --fs-xs: 0.8125rem;   /* 13 */
    --fs-sm: 0.875rem;    /* 14 */
    --fs-base: 1rem;      /* 16 */
    --fs-lg: 1.125rem;    /* 18 */
    --fs-h4: 1.25rem;
    --fs-h3: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
    --fs-h2: clamp(1.75rem, 1.45rem + 1.1vw, 2.375rem);
    --fs-h1: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
    --lh-tight: 1.15;
    --lh-base: 1.65;

    /* Spacing & shape */
    --section-y: clamp(3.5rem, 2.5rem + 4vw, 6rem);
    --radius-sm: 3px;
    --radius: 6px;
    --shadow-sm: 0 1px 2px rgba(18, 35, 51, 0.06);
    --shadow: 0 10px 30px rgba(18, 35, 51, 0.08);
    --transition: 0.2s ease;
    --header-h: 96px;

    /* Bootstrap overrides */
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--white);
    --bs-border-color: var(--border);
    --bs-link-color: var(--accent-dark);
    --bs-link-color-rgb: 201, 111, 8;
    --bs-link-hover-color: var(--accent);
    --bs-link-hover-color-rgb: 232, 137, 24;
    --bs-primary-rgb: 232, 137, 24;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--lh-tight);
    color: var(--text);
    letter-spacing: -0.01em;
}
h1, .h1 { font-size: var(--fs-h1); font-weight: 800; }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: var(--fs-h4); }

p { margin-bottom: 1rem; }
.text-muted-mj { color: var(--text-light) !important; }
.text-accent { color: var(--accent) !important; }
.bg-light-mj { background: var(--light-bg) !important; }
.bg-primary-mj { background: var(--primary) !important; }

a { transition: color var(--transition); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden-focusable:focus {
    position: fixed; top: 0.5rem; left: 0.5rem; z-index: 2000;
    padding: 0.5rem 1rem; background: var(--primary); color: var(--white);
}

/* ---------- Buttons (x-button component) ---------- */
.btn-mj {
    --btn-bg: var(--accent);
    --btn-color: var(--white);
    --btn-border: var(--accent);
    --btn-hover-bg: var(--accent-dark);
    --btn-hover-color: var(--white);
    --btn-hover-border: var(--accent-dark);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    color: var(--btn-color);
    background: var(--btn-bg);
    border: 1.5px solid var(--btn-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-mj:hover, .btn-mj:focus-visible {
    color: var(--btn-hover-color);
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
}
.btn-mj .bi { font-size: 1.05em; transition: transform var(--transition); }
.btn-mj:hover .bi-arrow-right { transform: translateX(3px); }

.btn-mj--dark {
    --btn-bg: var(--primary); --btn-border: var(--primary);
    --btn-hover-bg: var(--primary-dark); --btn-hover-border: var(--primary-dark);
}
.btn-mj--outline {
    --btn-bg: transparent; --btn-color: var(--primary); --btn-border: var(--primary);
    --btn-hover-bg: var(--primary); --btn-hover-color: var(--white); --btn-hover-border: var(--primary);
}
.btn-mj--outline-accent {
    --btn-bg: transparent; --btn-color: var(--accent-dark); --btn-border: var(--accent);
    --btn-hover-bg: var(--accent); --btn-hover-color: var(--white); --btn-hover-border: var(--accent);
}
.btn-mj--outline-light {
    --btn-bg: transparent; --btn-color: var(--white); --btn-border: rgba(255, 255, 255, 0.85);
    --btn-hover-bg: var(--white); --btn-hover-color: var(--primary); --btn-hover-border: var(--white);
}
.btn-mj--sm { padding: 0.55rem 1rem; font-size: var(--fs-xs); }
.btn-mj--lg { padding: 0.95rem 1.85rem; font-size: var(--fs-base); }
.btn-mj--block { display: flex; width: 100%; }

/* ---------- Section title (x-section-title component) ---------- */
.section-title { margin-bottom: 2.5rem; max-width: 720px; }
.section-title--center { margin-inline: auto; text-align: center; }
.section-title__eyebrow {
    display: inline-block;
    margin-bottom: 0.6rem;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}
.section-title__heading { margin-bottom: 0.75rem; }
.section-title__text { margin-bottom: 0; color: var(--text-light); font-size: var(--fs-base); }
.section-title--light .section-title__heading { color: var(--white); }
.section-title--light .section-title__text { color: rgba(255, 255, 255, 0.75); }

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-color: var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    font-size: var(--fs-sm);
    color: var(--text);
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 137, 24, 0.15);
}
.form-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 137, 24, 0.15); }

/* ---------- Interaction polish (shared by website and admin) ---------- */
h1, h2, h3, .h1, .h2, .h3 { overflow-wrap: break-word; text-wrap: balance; }
p, li { overflow-wrap: break-word; }

.btn-mj:active:not(:disabled) { transform: translateY(1px); }
.btn-mj:disabled, .btn-mj.is-disabled, .btn-mj[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
/* Long button labels may wrap instead of overflowing on very small phones. */
@media (max-width: 399.98px) {
    .btn-mj { white-space: normal; text-align: center; }
}

/* Respect "reduce motion" system settings. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
