/* ==========================================================================
   TractorSpecs.info — Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Serif+Display&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Palette: warm industrial — green field, oxidized iron, cream paper */
  --bg: #f5f1e8;
  --bg-paper: #ede5d3;
  --ink: #1a1a16;
  --ink-soft: #4a4a42;
  --rust: #b54323;
  --rust-dark: #8a3219;
  --field: #2d4a2b;
  --field-bright: #4a7c3a;
  --gold: #d4a017;
  --line: #1a1a16;

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max: 1280px;
  --gutter: clamp(16px, 4vw, 32px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(181,67,35,0.04), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(45,74,43,0.05), transparent 50%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Container ===== */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ===== Header / Nav ===== */
.topbar {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 0;
  letter-spacing: 0.05em;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar span { opacity: 0.85; }

header.site {
  border-bottom: 2px solid var(--ink);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.logo .dot { color: var(--rust); }
.logo .tld { font-family: var(--font-mono); font-size: 13px; opacity: 0.6; letter-spacing: 0; }

nav.primary { display: flex; gap: 28px; align-items: center; }
nav.primary a {
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
nav.primary a:hover { color: var(--rust); }
nav.primary a.active { color: var(--rust); }
nav.primary a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rust);
}

.search-mini {
  display: flex;
  align-items: center;
  background: var(--bg-paper);
  border: 1.5px solid var(--ink);
  padding: 6px 12px;
  gap: 8px;
  min-width: 220px;
}
.search-mini input {
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  width: 100%;
}
.search-mini::before { content: '⌕'; font-size: 18px; opacity: 0.5; }

@media (max-width: 800px) {
  nav.primary { display: none; }
  .search-mini { display: none; }
}

/* ===== Hero ===== */
.hero {
  padding: 60px 0 80px;
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.hero .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 800px) { .hero .grid { grid-template-columns: 1fr; gap: 32px; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--rust);
}

h1.headline {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  color: var(--ink);
}
h1.headline em {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.78em;
  color: var(--rust);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.lede {
  font-size: 18px;
  max-width: 540px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 32px;
}

.bigsearch {
  display: flex;
  border: 2px solid var(--ink);
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
  margin-top: 8px;
}
.bigsearch input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 18px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  background: transparent;
}
.bigsearch button {
  background: var(--rust);
  color: #fff;
  border: 0;
  padding: 0 28px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s;
}
.bigsearch button:hover { background: var(--rust-dark); }

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 2px solid var(--ink);
  background: var(--bg-paper);
}
.stat {
  padding: 20px 24px;
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.stat:last-child { border-bottom: 0; }
.stat .num {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  color: var(--field);
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: right;
  max-width: 140px;
  color: var(--ink-soft);
}

/* ===== Section header ===== */
.section { padding: 80px 0; border-bottom: 2px solid var(--ink); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.section-head .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  border: 1.5px solid var(--rust);
  padding: 4px 10px;
}

/* ===== Brand grid ===== */
.brands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
  border: 2px solid var(--ink);
  background: var(--ink);
}
.brand {
  background: var(--bg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  transition: background 0.15s, color 0.15s;
  position: relative;
  cursor: pointer;
}
.brand:hover { background: var(--ink); color: var(--bg); }
.brand:hover .brand-meta { color: var(--bg); opacity: 0.7; }
.brand .brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.02em;
}
.brand .brand-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
}
.brand .brand-flag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 20px;
}

/* ===== Featured Models ===== */
.models {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.model-card {
  border: 2px solid var(--ink);
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.model-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
}
.model-card .img {
  background: linear-gradient(135deg, var(--field) 0%, var(--field-bright) 100%);
  height: 180px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.model-card .img svg { width: 70%; height: 70%; opacity: 0.95; }
.model-card .img .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border: 1.5px solid var(--ink);
}
.model-card .body { padding: 20px 22px; }
.model-card .brand-line {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rust);
  margin-bottom: 4px;
}
.model-card h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.model-card .specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  border-top: 1px solid var(--ink);
  padding-top: 14px;
  margin-top: 14px;
}
.model-card .spec-item { font-size: 13px; }
.model-card .spec-item span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.model-card .spec-item strong {
  font-weight: 600;
  font-size: 14px;
}

/* ===== Tools row ===== */
.tools-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border: 2px solid var(--ink);
}
.tool {
  padding: 32px 28px;
  border-right: 2px solid var(--ink);
  background: var(--bg-paper);
  transition: background 0.15s;
  cursor: pointer;
  position: relative;
}
.tool:last-child { border-right: 0; }
@media (max-width: 720px) {
  .tool { border-right: 0; border-bottom: 2px solid var(--ink); }
  .tool:last-child { border-bottom: 0; }
}
.tool:hover { background: var(--gold); }
.tool .icon {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--rust);
  line-height: 1;
  margin-bottom: 12px;
}
.tool h3 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.tool p { font-size: 14px; color: var(--ink-soft); }
.tool::after {
  content: '→';
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: 24px;
  color: var(--ink);
  opacity: 0.4;
}

/* ===== Affiliate / parts section ===== */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.part-card {
  background: #fff;
  border: 2px solid var(--ink);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.part-card:hover { transform: translateY(-4px); }
.part-card .part-img {
  height: 120px;
  background: var(--bg-paper);
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 48px;
}
.part-card h4 {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.part-card .price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--field);
  margin-bottom: 14px;
}
.part-card .btn {
  margin-top: auto;
  background: #ff9900;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 10px 14px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: block;
}
.part-card .btn:hover { background: #f0ab23; }

/* ===== Ad slots (AdSense placeholders) ===== */
.adslot {
  border: 2px dashed var(--ink-soft);
  background: var(--bg-paper);
  padding: 28px;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 32px auto;
  max-width: 970px;
}
.adslot.leaderboard { min-height: 90px; display: flex; align-items: center; justify-content: center; }
.adslot.rectangle { min-height: 250px; max-width: 336px; display: flex; align-items: center; justify-content: center; }

/* ===== News strip ===== */
.news {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.news-card { padding-bottom: 24px; border-bottom: 1.5px solid var(--ink); }
.news-card .date {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rust);
  margin-bottom: 10px;
}
.news-card h4 {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.news-card p { font-size: 14px; color: var(--ink-soft); }
.news-card a.read {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  border-bottom: 1.5px solid var(--rust);
}

/* ===== Footer ===== */
footer.site {
  background: var(--ink);
  color: var(--bg);
  padding: 60px 0 30px;
}
footer.site .grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
}
@media (max-width: 800px) { footer.site .grid { grid-template-columns: 1fr 1fr; } }

footer.site h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  color: var(--gold);
}
footer.site ul { list-style: none; }
footer.site li { margin-bottom: 8px; }
footer.site a { font-size: 14px; opacity: 0.8; }
footer.site a:hover { opacity: 1; color: var(--gold); }
footer.site .brand-block { font-family: var(--font-display); font-size: 36px; line-height: 1; margin-bottom: 14px; }
footer.site .brand-block .dot { color: var(--rust); }
footer.site .tagline { font-size: 14px; opacity: 0.7; max-width: 280px; line-height: 1.5; }

footer.site .legal {
  border-top: 1px solid rgba(245,241,232,0.15);
  margin-top: 50px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ===== Page-specific: detail page ===== */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 16px 0;
  border-bottom: 1.5px solid var(--ink);
}
.breadcrumb a { color: var(--rust); }
.breadcrumb a:hover { text-decoration: underline; }

.detail-hero {
  padding: 50px 0;
  border-bottom: 2px solid var(--ink);
  background: var(--bg-paper);
}
.detail-hero .grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 800px) { .detail-hero .grid { grid-template-columns: 1fr; } }
.detail-hero .img-block {
  background: linear-gradient(135deg, var(--field), var(--field-bright));
  border: 2px solid var(--ink);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-hero .img-block svg { width: 75%; height: 75%; }
.detail-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.95;
  margin: 12px 0 18px;
}
.detail-hero .meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.detail-hero .pill {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1.5px solid var(--ink);
  padding: 5px 12px;
  background: #fff;
}
.detail-hero .summary { font-size: 17px; max-width: 540px; color: var(--ink-soft); }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid var(--ink);
  background: #fff;
}
.spec-table caption {
  font-family: var(--font-display);
  font-size: 28px;
  text-align: left;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.spec-table th, .spec-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink);
  text-align: left;
  font-size: 14px;
}
.spec-table th {
  background: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 35%;
  font-weight: 600;
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 40px;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.sidebar-block {
  border: 2px solid var(--ink);
  padding: 24px;
  background: #fff;
  margin-bottom: 24px;
}
.sidebar-block h4 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

/* Compare page */
.compare-board {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  border: 2px solid var(--ink);
  background: #fff;
  overflow-x: auto;
}
.compare-board > div {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  font-size: 14px;
}
.compare-board > div:nth-child(3n) { border-right: 0; }
.compare-board .label {
  background: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.compare-board .head {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
}

/* Static content pages */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 0;
}
.content h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
  margin-bottom: 12px;
}
.content .updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 32px;
}
.content h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  margin: 40px 0 14px;
  color: var(--rust);
}
.content h3 { font-family: var(--font-serif); font-size: 22px; margin: 28px 0 10px; }
.content p { margin-bottom: 16px; line-height: 1.7; }
.content ul { margin-left: 20px; margin-bottom: 16px; }
.content li { margin-bottom: 8px; line-height: 1.6; }

/* Search results filter bar */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--bg-paper);
  border: 2px solid var(--ink);
  margin-bottom: 32px;
}
.filter-bar select, .filter-bar input {
  padding: 10px 14px;
  border: 1.5px solid var(--ink);
  background: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: 0;
}
.filter-bar input { min-width: 200px; }

.no-results {
  padding: 60px;
  text-align: center;
  border: 2px dashed var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
}
