/* ============================================
   Carol's Homestead — Base Styles
   Reset, typography, and global foundations
   ============================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;600&display=swap');

/* ── CSS Reset / Normalize ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: linear-gradient(170deg,
            #1a3009 0%,
            #2d5016 20%,
            #5a7c29 40%,
            #8B6914 60%,
            #8B4513 80%,
            #6B1A00 100%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section {
    display: block;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

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

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-light);
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select,
button {
    font: inherit;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 2.75rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.35rem;
}

h5 {
    font-size: 1.15rem;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

strong,
b {
    font-weight: 600;
}

em,
i {
    font-style: italic;
}

small {
    font-size: 0.85rem;
}

blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(218, 165, 32, 0.06);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-light);
}

hr {
    border: none;
    height: 2px;
    background: var(--border-light);
    margin: 2rem 0;
}

/* ── Selection ── */
::selection {
    background: rgba(45, 80, 22, 0.2);
    color: var(--primary-dark);
}

::-moz-selection {
    background: rgba(45, 80, 22, 0.2);
    color: var(--primary-dark);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg);
}

/* ── Focus Styles ── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ── Utility Classes ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-light);
}

.text-accent {
    color: var(--accent);
}

.text-primary {
    color: var(--primary);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.w-100 {
    width: 100%;
}
