/* 
 * HSRP Agrotech - Modern CSS Reset
 * 
 * Provides a consistent baseline across browsers.
 */

/* Box-sizing reset */
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margins and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* HTML & Body */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    line-height: var(--line-height-normal);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg-white);
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix white space when WordPress admin bar is present */
body.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove all bottom spacing */
body,
html {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin-top: 0;
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base) var(--ease-out);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Lists */
ul,
ol {
    list-style: none;
}

/* Images & Media */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Forms */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Remove default button styles */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Prevent text overflow */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}