/**
 * ===========================================================
 * TAHIR COLLECTION — Base Styles (v2 — Warm Palette)
 * ===========================================================
 * CSS reset, global typography, body defaults, and base
 * element styling. Applied site-wide.
 * =========================================================== */

/* -------------------------------------------------------
 * CSS RESET — Normalize browser defaults
 * ------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* -------------------------------------------------------
 * TYPOGRAPHY — Headings
 * ------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
    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-md);
}

/* Responsive heading sizes */
@media (max-width: 768px) {
    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    h4 {
        font-size: var(--text-lg);
    }
}

/* -------------------------------------------------------
 * TYPOGRAPHY — Body Elements
 * ------------------------------------------------------- */
p {
    margin-bottom: var(--space-4);
    max-width: 75ch;
    /* Optimal reading line length */
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

strong,
b {
    font-weight: var(--weight-semibold);
}

/* -------------------------------------------------------
 * LISTS
 * ------------------------------------------------------- */
ul,
ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

li {
    margin-bottom: var(--space-2);
}

/* -------------------------------------------------------
 * IMAGES
 * ------------------------------------------------------- */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* -------------------------------------------------------
 * TABLES — Global table styling
 * ------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-8);
    font-size: var(--text-sm);
}

th,
td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: var(--weight-semibold);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 0.05em;
}

tr:nth-child(even) {
    background-color: var(--color-bg-alt);
}

tr:hover {
    background-color: var(--color-accent-glow);
}

/* -------------------------------------------------------
 * FORM ELEMENTS — Global form styling
 * ------------------------------------------------------- */
input,
select,
textarea {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
}

/* -------------------------------------------------------
 * SELECTION STYLING
 * ------------------------------------------------------- */
::selection {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* -------------------------------------------------------
 * SCROLLBAR STYLING (WebKit)
 * ------------------------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-cool);
}

::-webkit-scrollbar-thumb {
    background: var(--color-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* -------------------------------------------------------
 * SECTION TITLES — Reusable heading style for sections
 * ------------------------------------------------------- */
.section-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    text-align: center;
    margin-bottom: var(--space-4);
    color: var(--color-text);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    margin: var(--space-4) auto 0;
    border-radius: var(--radius-full);
}

.section-subtitle {
    text-align: center;
    color: var(--color-muted);
    font-size: var(--text-lg);
    max-width: 700px;
    margin: 0 auto var(--space-12);
}

/* -------------------------------------------------------
 * UTILITY CLASSES
 * ------------------------------------------------------- */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--color-muted);
}

.text-accent {
    color: var(--color-accent);
}

.text-primary {
    color: var(--color-primary);
}

.fw-bold {
    font-weight: var(--weight-bold);
}

.fw-semibold {
    font-weight: var(--weight-semibold);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mt-8 {
    margin-top: var(--space-8);
}

.hidden {
    display: none !important;
}

/* -------------------------------------------------------
 * ANIMATION: Scroll-triggered fade-in
 * Used with data-animate="fade-up" attribute
 * ------------------------------------------------------- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}