/* Iron Creek Cattle — clean hand-written stylesheet */

:root {
  --text: #2a2a2a;
  --heading: #222;
  --bg: #fff;
  --section: #fafafa;
  --sale: #c19d7d;
  --catalog: #fff1e0;
  --footer-bg: #2a2a2a;
  --rule: #e5e5e5;
  --link-underline: rgba(0, 0, 0, .5);
  --max-width: 1366px;
  --header-height: 80px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 30px;
  color: var(--text);
  background: var(--bg);
}

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

h1, h2, h3 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 .5em;
}

h2 { font-size: 30px; line-height: 1.2; }
h3 { font-size: 22px; line-height: 1.3; }

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-underline); }
a:hover { opacity: .6; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 40px;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-height);
  padding: 0 40px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .05em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  display: block;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: .05em;
  padding: 6px 0;
}

.site-nav a[aria-current="page"] {
  border-bottom: 2px solid var(--heading);
}

/* dropdown sub-menus */
.site-nav li { position: relative; }
.site-nav li > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 220px;
  padding: 8px 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.site-nav li:hover > ul,
.site-nav li:focus-within > ul { display: flex; }
.site-nav li > ul a {
  padding: 8px 18px;
  text-transform: none;
  letter-spacing: 0;
  width: 100%;
}

/* hamburger */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle::before,
.nav-toggle::after,
.nav-toggle span {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--heading);
  transition: transform .2s, opacity .2s;
}
.nav-toggle::before { content: ""; top: 9px; }
.nav-toggle span { top: 15px; }
.nav-toggle::after { content: ""; top: 21px; }

/* ---------- hero ---------- */
.hero {
  background: url(../images/hero.jpg) center / cover no-repeat;
  min-height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}
.hero-inner { max-width: 600px; }
.hero-logo { width: 404px; max-width: 100%; margin: 0 auto 20px; }
.hero-contact {
  font-family: "Lora", serif;
  font-weight: 300;
  color: #d5d5d5;
  font-size: 18px;
}
.hero-contact a { color: #d5d5d5; }

/* ---------- social icons ---------- */
.social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
.social a {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #2a2a2a;
}
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- generic sections ---------- */
.section { background: var(--bg); }
.section--muted { background: var(--section); }
.section--catalog { background: var(--catalog); }
.section h2 { text-align: center; }

.lead { max-width: 820px; margin: 0 auto; text-align: justify; }

/* quick links row */
.quick-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  padding: 0;
  margin: 30px 0;
}
.quick-links a {
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.allied-logo { width: 311px; max-width: 100%; margin: 20px auto 0; }

/* tan sale banner */
.sale-banner {
  background: var(--sale);
  text-align: center;
  padding: 40px 20px;
}
.sale-banner p { margin: 0 0 .5em; }
.button {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 28px;
  background: #fff;
  color: var(--heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 14px;
  text-decoration: none;
  border-radius: 2px;
}

/* ---------- animal entries ---------- */
.section-links ul { padding-left: 20px; }
.section-links a { font-size: 18px; }

.animals { max-width: 1100px; margin: 0 auto; }

.animal {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
}
.animal:last-child { border-bottom: 0; }

.animal-photos {
  flex: 0 0 38%;
  max-width: 38%;
}
.animal-photo { margin: 0; }
.animal-photo + .animal-photo { margin-top: 20px; }
.animal-photo figcaption {
  font-size: 13px;
  text-align: center;
  margin-top: 6px;
  opacity: .8;
}
.animal-photo a { display: block; }

.animal-info { flex: 1 1 62%; }
.animal-name { margin-bottom: .25em; }
.animal-reg {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  margin-top: 4px;
}
.animal-info p { text-align: justify; }

/* ---------- forms ---------- */
.form {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.field { display: flex; flex-direction: column; flex: 1 1 100%; }
.field--half { flex: 1 1 calc(50% - 8px); }
.field label { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; }
.form .button { border: 0; cursor: pointer; background: var(--heading); color: #fff; }
.hidden { position: absolute; left: -9999px; }
.form-result { flex: 1 1 100%; font-weight: 700; }
.form-result.success { color: #2e7d32; }
.form-result.error { color: #c62828; }

/* ---------- catalog / sale page ---------- */
.catalog {
  background: var(--catalog);
  text-align: center;
}
.catalog img { margin: 0 auto 20px; max-width: 480px; }

/* ---------- two-column generic ---------- */
.two-col {
  display: flex;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.two-col > * { flex: 1; }

/* ---------- lightbox ---------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .85);
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 90vh; }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: #eee;
}
.site-footer .container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-logo { flex: 0 0 220px; }
.footer-logo img {
  width: 100%;
  background: #fff;
  padding: 12px 16px;
  border-radius: 6px;
  display: block;
}
.footer-nav { flex: 1 1 auto; }
.footer-nav ul {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.footer-nav a { color: #eee; font-weight: 700; }
.footer-credit { font-size: 13px; margin: 0; }
.footer-credit a { color: #eee; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    display: none;
  }
  .site-header.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li { border-top: 1px solid var(--rule); }
  .site-nav a { padding: 14px 24px; }
  .site-nav li > ul {
    display: flex;
    position: static;
    box-shadow: none;
    padding: 0 0 0 24px;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .container { padding: 30px 20px; }
  h2 { font-size: 28px; }
  .hero { min-height: 520px; }
  .hero-logo { width: 300px; }
  .animal { flex-direction: column; gap: 16px; }
  .animal-photos { flex-basis: auto; max-width: 100%; }
  .two-col { flex-direction: column; }
  .field--half { flex-basis: 100%; }
  .site-footer .container { flex-direction: column; text-align: center; }
  .footer-logo { flex-basis: auto; }
}
