@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:          #F5F0E8;
  --bg-card:     #EDE5D4;
  --bg-hover:    #E2D8C4;
  --bg-dark:     #2E1A0E;
  --bg-dark-card:#3E2B1A;
  --border:      #C8B899;
  --border-dark: #4A3525;
  --rust:        #A0522D;
  --rust-dark:   #7A3D20;
  --rust-light:  #C8956C;
  --brown:       #2E1A0E;
  --brown-mid:   #5C3D1E;
  --brown-light: #7A5C40;
  --text:        #2E1A0E;
  --text-muted:  #3A2210;
  --text-dim:    #5C3D1E;
  --cream:       #FAF7F2;
  --ff-display:  'Playfair Display', Georgia, serif;
  --ff-body:     'Inter', system-ui, sans-serif;
  --radius:      6px;
  --max-w:       1100px;
  --nav-h:       76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--ff-body); font-size: 16px; line-height: 1.6; min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); background: rgba(245,240,232,0.97); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); z-index: 100; display: flex; align-items: center; padding: 0 2rem; gap: 2rem; }
.nav-logo { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.nav-logo img { width: 72px; height: 38px; object-fit: contain; }
.nav-logo-text { font-family: var(--ff-display); font-weight: 700; font-size: 1.2rem; color: var(--brown); letter-spacing: 0.04em; line-height: 1.15; }
.nav-logo-text span { display: block; font-size: 0.65rem; font-family: var(--ff-body); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--rust); }
.nav-links { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; }
.nav-links a { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brown-mid); padding: 0.4rem 0.65rem; border-radius: var(--radius); transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--rust); background: rgba(160,82,45,0.08); }
.nav-links .nav-dropdown { position: relative; }
.nav-links .nav-dropdown:hover .dropdown-menu { display: flex; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem; flex-direction: column; gap: 0.15rem; min-width: 160px; z-index: 200; box-shadow: 0 4px 16px rgba(46,26,14,0.12); }
.dropdown-menu a { font-size: 0.72rem; padding: 0.45rem 0.75rem; border-radius: 4px; color: var(--brown-mid); font-weight: 600; }
.dropdown-menu a:hover { color: var(--rust); background: rgba(160,82,45,0.06); }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; margin-left: auto; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--brown-mid); }
.nav-mobile { display: none; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--border); padding: 1rem 2rem 1.5rem; gap: 0.25rem; z-index: 99; overflow-y: auto; max-height: calc(100vh - var(--nav-h)); }
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brown-mid); padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.nav-mobile a:hover, .nav-mobile a.active { color: var(--rust); }
.nav-mobile .mobile-sub a { padding-left: 1.25rem; font-size: 0.78rem; color: var(--brown-light); }

/* PAGE */
.page { padding-top: var(--nav-h); min-height: 100vh; }
.page-hero { padding: 5rem 0 3rem; border-bottom: 1px solid var(--border); }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

/* DIVIDER */
.divider { display: flex; align-items: center; gap: 1rem; margin: 3.5rem 0 2.5rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider-icon { width: 56px; height: 30px; opacity: 1; object-fit: contain; }

/* TYPE */
.section-eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rust); margin-bottom: 0.5rem; }
.section-title { font-family: var(--ff-display); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: var(--brown); line-height: 1.2; }
.section-sub { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin-top: 0.75rem; line-height: 1.65; font-weight: 500; }

/* DARK SECTION */
.dark-section { background: var(--bg-dark); color: var(--cream); padding: 4rem 0; }
.dark-section .section-eyebrow { color: var(--rust-light); }
.dark-section .section-title { color: var(--cream); }
.dark-section .section-sub { color: #C4A882; }

/* CARDS */
.card { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: border-color 0.2s, box-shadow 0.2s; }
.card:hover { border-color: var(--rust-light); box-shadow: 0 2px 12px rgba(46,26,14,0.08); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.5rem; border-radius: var(--radius); font-family: var(--ff-body); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--rust); color: #FAF7F2; }
.btn-primary:hover { background: var(--rust-dark); }
.btn-outline { background: transparent; color: var(--rust); border: 2px solid var(--rust); }
.btn-outline:hover { background: rgba(160,82,45,0.08); }
.btn-outline-light { background: transparent; color: #FAF7F2; border: 2px solid rgba(255,255,255,0.5); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.8); }

/* TAGS */
.tag { display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 2px; background: rgba(160,82,45,0.12); color: var(--rust-dark); border: 1px solid rgba(160,82,45,0.3); }
.tag-red { background: rgba(139,32,32,0.1); color: #7A1A1A; border-color: rgba(139,32,32,0.25); }
.tag-green { background: rgba(30,90,30,0.1); color: #1A5A1A; border-color: rgba(30,90,30,0.25); }

/* ANIMAL CARDS */
.herd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; margin-bottom: 4rem; }
.animal-card { background: var(--cream); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; }
.animal-card:hover { border-color: var(--rust); box-shadow: 0 3px 16px rgba(46,26,14,0.12); }
.animal-card-header { padding: 1.25rem 1.25rem 0.75rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; background: var(--bg-card); border-bottom: 1.5px solid var(--border); }
.animal-name { font-family: var(--ff-display); font-size: 1.05rem; font-weight: 700; color: var(--brown); line-height: 1.2; }
.animal-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.3rem; }
.animal-body { padding: 1rem 1.25rem 1.25rem; background: var(--cream); }
.animal-detail { display: flex; justify-content: space-between; padding: 0.45rem 0; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.animal-detail:last-of-type { border-bottom: none; }
.animal-detail-label { color: var(--brown-mid); font-weight: 600; }
.animal-detail-val { color: var(--brown); font-weight: 600; }

/* CATTLE SUB NAV */
.cattle-sub-nav { display:flex; gap:0.5rem; flex-wrap:wrap; margin:2rem 0; }
.cattle-sub-nav a { font-size:0.72rem; font-weight:700; letter-spacing:0.12em; text-transform:uppercase; padding:0.4rem 1rem; border-radius:2px; border:2px solid var(--border); color:var(--brown-mid); transition:all 0.2s; }
.cattle-sub-nav a:hover, .cattle-sub-nav a.active { border-color:var(--rust); color:var(--rust); background:rgba(160,82,45,0.06); }

/* FOOTER */
.footer { background: var(--bg-dark); border-top: 3px solid var(--rust-dark); padding: 3rem 2rem 2rem; text-align: center; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-logo img { width: 80px; height: 42px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.85; }
.footer-logo span { font-family: var(--ff-display); font-size: 1.1rem; font-weight: 700; color: #E8D4B8; }
.footer p { font-size: 0.75rem; color: #9A7A60; letter-spacing: 0.06em; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin: 0.75rem 0; flex-wrap: wrap; }
.footer-links a { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #9A7A60; transition: color 0.2s; }
.footer-links a:hover { color: var(--rust-light); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .container { padding: 0 1.25rem; }
  .divider { margin: 2.5rem 0 2rem; }
}
