/**
 * RH Page Builder 2026 - Base Styles (Tailwind-like Preflight)
 * Modern CSS reset and base styles for clean foundation
 * Only loaded on pages using the RH Page Builder 2026 template
 */

/* ==========================================================================
   Tailwind-like Preflight / Modern Reset
   ========================================================================== */

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

/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
    margin: 0;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4, h5, h6,
button, input, label {
    line-height: 1.2;
}

/* Balance text wrapping on headings */
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
    font: inherit;
    color: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}

/* Remove animations for people who've turned them off */
@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;
    }
}

/* ==========================================================================
   Base Typography
   ========================================================================== */

html {
    font-size: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #002244;
    background-color: #ffffff;
}

/* ==========================================================================
   Base Form Elements
   ========================================================================== */

button {
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #006DC2;
    box-shadow: 0 0 0 3px rgba(0, 109, 194, 0.1);
}

/* ==========================================================================
   Base Links
   ========================================================================== */

a {
    color: #006DC2;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0058a3;
}

a:focus {
    outline: 2px solid #006DC2;
    outline-offset: 2px;
}

/* ==========================================================================
   Base Lists
   ========================================================================== */

ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   Base Tables
   ========================================================================== */

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* ==========================================================================
   Base Container
   ========================================================================== */

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1330px;
    }
}

/* ==========================================================================
   Base Utilities
   ========================================================================== */

.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;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
