/*
  Base styles (resets, html/body, typography defaults).
  Enforces uniformity across the site using tokens.
*/

/* 1. Reset / Normalize Tweaks */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--Grey-900);
    background-color: var(--White);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Typography Uniformity */

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--space-4);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--Grey-900);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    h1 { font-size: var(--font-size-4xl); }
    h2 { font-size: var(--font-size-3xl); }
    h3 { font-size: var(--font-size-2xl); }
}

p {
    margin-top: 0;
    margin-bottom: var(--space-4);
}

a {
    color: var(--teal-dark); /* Using teal as primary link color based on existing branding */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-main);
    text-decoration: underline;
}

small {
    font-size: var(--font-size-sm);
}

/* 3. Form Elements (Uniform Inputs) */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--Grey-900);
    background-color: var(--White);
    background-clip: padding-box;
    border: 1px solid var(--Grey-300);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--teal-medium);
    outline: 0;
    box-shadow: 0 0 0 3px var(--teal-light);
}

/* 4. Text Utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.fw-bold { font-weight: var(--font-weight-bold) !important; }
.fw-semibold { font-weight: var(--font-weight-semibold) !important; }
.fw-regular { font-weight: var(--font-weight-regular) !important; }

.text-grey-500 { color: var(--Grey-500) !important; }
.text-grey-700 { color: var(--Grey-700) !important; }
