/* ============================================================
   COWCULATOR — Shared Stylesheet
   Import on every page:
   <link rel="stylesheet" href="/cowculator.css">
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── VARIABLES ── */
:root {
  --green:        #3A6B35;
  --green-dark:   #254D22;
  --green-light:  #EDF4EC;
  --gold:         #C8952A;
  --gold-dark:    #A57820;
  --gold-light:   #FDF6E9;
  --cream:        #F8F3EB;
  --brown:        #6B4C2A;
  --text:         #1C1C1C;
  --text-mid:     #4A4A4A;
  --text-light:   #7A7060;
  --border:       #DDD5C8;
  --white:        #FFFFFF;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.13);
  --radius:       10px;
  --radius-lg:    14px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ── NAVIGATION ── */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--green-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.nav-logo:hover { color: var(--green); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--green); }
.nav-links a.active {
  color: var(--green);
  font-weight: 600;
}
.nav-cta {
  background: var(--green) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: 6px;
  transition: background 0.2s !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--green-dark) !important; }
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.72);
  padding: 64px 24px 32px;
  margin-top: 80px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand-logo {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  display: block;
  margin-bottom: 14px;
}
.footer-brand-logo:hover { color: rgba(255,255,255,0.85); }
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.75;
}
.footer-col h4 {
  font-family: 'Lora', serif;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-col ul a {
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-1px); }
.btn-outline {
  background: var(--white);
  color: var(--green);
  border: 2px solid var(--green);
}
.btn-outline:hover { background: var(--green-light); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ── TAGS / BADGES ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tag-green  { background: var(--green-light); color: var(--green); }
.tag-gold   { background: var(--gold-light); color: #8A6318; }
.tag-white  { background: rgba(255,255,255,0.2); color: var(--white); }

/* ── SECTION UTILITY ── */
.section { padding: 80px 24px; }
.section-white { background: var(--white); }
.section-cream { background: var(--cream); }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 560px;
  line-height: 1.7;
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  padding: 72px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero h1 {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  position: relative;
}
.page-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

/* ── CALLOUT BOXES ── */
.callout {
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 1.8rem 0;
  border-left: 4px solid;
}
.callout-green { background: var(--green-light); border-color: var(--green); }
.callout-gold  { background: var(--gold-light);  border-color: var(--gold); }
.callout-gray  { background: #F3F3F0; border-color: #B0A898; }
.callout h4 { font-weight: 700; margin-bottom: 6px; font-size: 0.9rem; }
.callout-green h4 { color: var(--green-dark); }
.callout-gold h4  { color: #7A5A18; }
.callout p { font-size: 0.95rem; color: var(--text-mid); margin: 0; }

/* ── CARD ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── PROSE (blog content) ── */
.prose p  { font-size: 1.05rem; color: var(--text-mid); line-height: 1.85; margin-bottom: 1.4rem; }
.prose h2 { font-family: 'Lora', serif; font-size: 1.7rem; font-weight: 700; color: var(--text); margin: 2.8rem 0 1rem; padding-bottom: 10px; border-bottom: 2px solid var(--green-light); }
.prose h3 { font-family: 'Lora', serif; font-size: 1.2rem; font-weight: 600; color: var(--green-dark); margin: 2rem 0 0.75rem; }
.prose ul, .prose ol { margin: 0 0 1.4rem 1.5rem; color: var(--text-mid); }
.prose li { margin-bottom: 0.5rem; font-size: 1.05rem; line-height: 1.7; }
.prose a { color: var(--green); text-decoration: underline; }
.prose a:hover { color: var(--green-dark); }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { font-style: italic; }
.prose .formula {
  background: #1C1C1C;
  color: #D4F4C7;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  padding: 20px 24px;
  border-radius: 8px;
  margin: 1.5rem 0;
  line-height: 1.8;
  overflow-x: auto;
}

.page-hero::before{
    content: ""; /* Required for pseudo-elements */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
}

/* ── AD PLACEHOLDER ── */
.ad-slot {
  background: #F3F0EC;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ad-banner { height: 90px; }
.ad-rect   { height: 250px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 16px; }
  .nav-mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding: 56px 20px; }
}
