/* ──────────────────────────────────────────────────────────────────────
   The Dirty Mule — base styles
   Reset, typography, root variables, accessibility
   ────────────────────────────────────────────────────────────────────── */

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--tdm-text);
    background: var(--tdm-offwhite);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--tdm-link);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover, a:focus {
    color: var(--tdm-link-hover);
}

/* Typography — slab serif headlines */
h1, h2, h3, h4, h5, h6,
.tdm-site-title, .tdm-card-title, .tdm-section-title,
.tdm-trail-hero-title, .tdm-archive-title, .tdm-post-title, .tdm-page-title,
.tdm-review-title, .tdm-hero-title, .tdm-404-title, .tdm-footer-title {
    font-family: 'Roboto Slab', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    line-height: 1.15;
    color: var(--tdm-text);
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
h6 { font-size: 0.9rem; }

p { margin: 0 0 1.2em; }

strong, b { font-weight: 600; }
em, i { font-style: italic; }
small { font-size: 0.85em; color: var(--tdm-text-muted); }

blockquote {
    border-left: 4px solid var(--tdm-gold);
    padding: 0.5em 1em 0.5em 1.5em;
    margin: 1.5em 0;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.15em;
    font-style: italic;
    color: var(--tdm-text);
}
blockquote cite {
    display: block;
    font-size: 0.85em;
    font-style: normal;
    color: var(--tdm-text-muted);
    margin-top: 0.5em;
}

code, pre, kbd, samp {
    font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.92em;
}
code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.1em 0.4em;
    border-radius: 3px;
}
pre {
    background: var(--tdm-charcoal);
    color: var(--tdm-cream);
    padding: 1em 1.5em;
    border-radius: 4px;
    overflow-x: auto;
    line-height: 1.5;
}
pre code { background: transparent; padding: 0; }

hr {
    border: none;
    border-top: 1px solid var(--tdm-border);
    margin: 2em 0;
}

ul, ol {
    margin: 0 0 1.2em;
    padding-left: 1.5em;
}
li { margin-bottom: 0.4em; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0 1.5em;
}
th, td {
    text-align: left;
    padding: 0.6em 0.8em;
    border-bottom: 1px solid var(--tdm-border);
}
th {
    font-family: 'Roboto Slab', Georgia, serif;
    font-weight: 600;
}

/* Forms */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
}
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], input[type="tel"], input[type="number"], input[type="date"],
textarea, select {
    width: 100%;
    padding: 0.7em 1em;
    border: 1px solid var(--tdm-border);
    border-radius: 3px;
    background: #fff;
    color: var(--tdm-text);
    transition: border-color 0.15s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--tdm-gold);
}

button, .tdm-btn {
    display: inline-block;
    padding: 0.85em 1.6em;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.02em;
}
.tdm-btn-primary {
    background: var(--tdm-charcoal);
    color: var(--tdm-cream) !important;
}
.tdm-btn-primary:hover, .tdm-btn-primary:focus {
    background: var(--tdm-gold);
    color: var(--tdm-charcoal) !important;
}
.tdm-btn-secondary {
    background: transparent;
    color: var(--tdm-charcoal) !important;
    border: 2px solid var(--tdm-charcoal);
}
.tdm-btn-secondary:hover {
    background: var(--tdm-charcoal);
    color: var(--tdm-cream) !important;
}
.tdm-btn-hero {
    background: var(--tdm-gold);
    color: var(--tdm-charcoal) !important;
    padding: 1em 2.4em;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.tdm-btn-hero:hover {
    background: var(--tdm-cream);
    color: var(--tdm-charcoal) !important;
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--tdm-charcoal);
    color: var(--tdm-cream);
    padding: 0.5em 1em;
    z-index: 100000;
}
.skip-link:focus { top: 0; }

:focus-visible {
    outline: 2px solid var(--tdm-gold);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--tdm-gold);
    color: var(--tdm-charcoal);
}
