@font-face {
  font-family: 'Zilla Slab';
  src: url('./fonts/zilla-slab-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('./fonts/karla-variable.ttf') format('truetype-variations');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* Committed to a light look, like the reference brand site — not tied to OS dark preference. */
:root {
  --pasture: #fbfaf7;
  --pasture-deep: #f1efe7;
  --paper: #ffffff;
  --charcoal: #1c1a16;
  --charcoal-soft: #6e6a5c;
  --maroon: #7c2c33;
  --maroon-soft: #9a4a51;
  --pine: #2d4f3a;
  --pine-soft: #4d7059;
  --silverhorn: #b7b2a3;
  --rule: #e3ded0;
}

/* Only an explicit in-page theme toggle switches to dark — the OS preference alone does not. */
:root[data-theme="dark"] {
  --pasture: #1c1814;
  --pasture-deep: #161310;
  --paper: #262019;
  --charcoal: #efe7d8;
  --charcoal-soft: #b8b0a0;
  --maroon: #dd8188;
  --maroon-soft: #b96066;
  --pine: #7dab8d;
  --pine-soft: #5d8a6e;
  --silverhorn: #8a8477;
  --rule: #3a3327;
}

* { box-sizing: border-box; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ropeDraw {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 0.55; transform: scaleX(1); }
}

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--pasture);
  color: var(--charcoal);
  font-family: 'Karla', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.dossier {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 56px) 20px 64px;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
}
.dossier > * { min-width: 0; }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.divisions .placard + .placard { transition-delay: 0.1s; }
.gateway-grid .gateway-card + .gateway-card { transition-delay: 0.1s; }
.gallery figure:nth-child(2) { transition-delay: 0.06s; }
.gallery figure:nth-child(3) { transition-delay: 0.12s; }
.gallery figure:nth-child(4) { transition-delay: 0.18s; }

.section-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin: 0 0 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}
.back-link:hover { color: var(--maroon); transform: translateX(-3px); }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--pasture-deep), var(--pasture));
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(28px, 5vw, 44px);
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 36px);
  flex-wrap: wrap;
}
.mark {
  width: clamp(96px, 18vw, 132px);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
  animation: fadeUp 0.7s ease 0.05s both;
}
.mark--wide { width: clamp(140px, 30vw, 220px); }
.hero-text { min-width: 240px; flex: 1; }
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon-soft);
  margin: 0 0 10px;
  animation: fadeUp 0.7s ease 0.15s both;
}
h1 {
  font-family: 'Zilla Slab', Georgia, serif;
  font-weight: 700;
  font-size: clamp(32px, 6vw, 46px);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: var(--charcoal);
  text-wrap: balance;
  animation: fadeUp 0.7s ease 0.25s both;
}
.tagline {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--charcoal-soft);
  text-wrap: balance;
  animation: fadeUp 0.7s ease 0.35s both;
}
.tagline b { color: var(--pine); font-weight: 700; }

/* Rope rule */
.rope-rule {
  height: 10px;
  margin: 0;
  background: repeating-linear-gradient(-45deg, var(--silverhorn) 0 6px, transparent 6px 12px);
  opacity: 0.55;
  border-radius: 4px;
  transform-origin: left center;
  animation: ropeDraw 0.8s ease 0.45s both;
}

.intro { padding: 0 4px; }
.intro p {
  margin: 0;
  font-size: 16.5px;
  color: var(--charcoal-soft);
  max-width: 62ch;
}

/* Gateway cards (landing page) */
.gateway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.gateway-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 26px 26px 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.6s ease;
}
.gateway-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.08);
  border-color: var(--gateway-color, var(--pine));
}
.gateway-card img {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 0 18px;
}
.gateway-card--ganado { --gateway-color: var(--maroon); }
.gateway-card--dorper { --gateway-color: var(--pine); }
.gateway-card h2 {
  font-family: 'Zilla Slab', Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  color: var(--charcoal);
}
.gateway-card p {
  margin: 0;
  font-size: 15px;
  color: var(--charcoal-soft);
  flex: 1;
}
.gateway-cta {
  margin-top: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gateway-color, var(--pine));
  font-weight: 700;
}

/* Divisions / breed chips */
.divisions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.placard {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--placard-color, var(--pine));
  border-radius: 4px;
  padding: 24px 24px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.6s ease;
}
.placard:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.placard::before, .placard::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--placard-color, var(--pine));
  top: -2px;
}
.placard::before { left: -2px; border-right: none; border-bottom: none; }
.placard::after { right: -2px; border-left: none; border-bottom: none; }
.placard--bovina { --placard-color: var(--maroon); }
.placard--dorper { --placard-color: var(--pine); }
.placard-eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--placard-color, var(--pine));
  margin: 0 0 10px;
}
.placard h2 {
  font-family: 'Zilla Slab', Georgia, serif;
  font-weight: 700;
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  color: var(--charcoal);
}
.placard p { margin: 0; font-size: 15.5px; color: var(--charcoal-soft); }
.placard .since {
  display: block;
  margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--placard-color, var(--pine));
}

.trophy-row { display: flex; flex-wrap: wrap; gap: 8px; }
.trophy-row span {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--maroon-soft);
  border-radius: 3px;
  padding: 7px 12px;
  transition: transform 0.15s ease, border-left-color 0.15s ease;
}
.trophy-row span:hover { transform: translateY(-2px); border-left-color: var(--maroon); }

.breed-row { display: flex; flex-wrap: wrap; gap: 8px; }
.breed-row span {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--pasture);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px;
}

/* Photo gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.gallery figure {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.2s ease;
}
.gallery figure:hover { box-shadow: 0 8px 18px rgba(0,0,0,0.1); }
.gallery img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.5s ease; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--charcoal-soft);
  padding: 6px 8px;
  border-top: 1px solid var(--rule);
}

/* Contact */
.contact-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: clamp(22px, 4vw, 30px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 36px); }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 480px) { .contact-form { grid-template-columns: 1fr; } }
.field label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
}
.field input, .field select, .field textarea {
  font-family: 'Karla', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14.5px;
  color: var(--charcoal);
  background: var(--pasture);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 9px 11px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(45, 79, 58, 0.12);
}
.btn-submit {
  grid-column: 1 / -1;
  justify-self: start;
  font-family: 'Zilla Slab', Georgia, serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--maroon);
  color: #fdfaf5;
  border: none;
  border-radius: 4px;
  padding: 11px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-submit:hover { background: var(--pine); transform: translateY(-2px); }
.btn-submit:disabled { opacity: 0.6; cursor: default; transform: none; }
.form-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--pine-soft); margin: 2px 0 0; }

.contact-direct-label {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--charcoal-soft); font-weight: 700; margin: 0 0 10px;
}
.ledger-group + .ledger-group { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--rule); }
.ledger-group-label {
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--pine-soft); margin: 0 0 6px; font-weight: 700;
}
.ledger-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 6px 0; border-bottom: 1px dotted var(--rule);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ledger-group .ledger-row:last-child { border-bottom: none; }
.ledger-label { font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--charcoal-soft); white-space: nowrap; flex-shrink: 0; }
.ledger-value { font-size: 13.5px; color: var(--charcoal); text-decoration: none; text-align: right; transition: color 0.15s ease; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.ledger-value:hover { color: var(--maroon); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.social-icons { display: flex; gap: 10px; margin-top: 16px; }
.social-icons a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--pasture); color: var(--charcoal-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.social-icons a:hover { background: var(--pine); border-color: var(--pine); color: #fdfaf5; transform: translateY(-2px); }
.social-icons svg { width: 19px; height: 19px; }

.note {
  font-size: 12.5px; color: var(--charcoal-soft);
  border-top: 1px dotted var(--rule); padding-top: 14px; max-width: 66ch;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
