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

:root {
  --fratco-red: #BE1E2D;
  --fratco-red-dark: #8f1621;
  --ink: #1c1c1c;
  --charcoal: #2c2c2c;
  --gray-600: #5a5a5a;
  --gray-300: #d8d8d8;
  --gray-100: #f4f4f4;
  --white: #ffffff;
  --max-w: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  line-height: 1.5;
  background: var(--white);
}
h1, h2, h3, h4, .display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { color: var(--gray-600); }
a { color: var(--fratco-red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-gray { background: var(--gray-100); }
.section-dark { background: var(--charcoal); color: var(--white); }
.section-dark p { color: #cfcfcf; }
.section-dark h2 { color: var(--white); }

/* Header / nav */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 3px solid var(--fratco-red);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 14px 24px;
}
.logo-mark {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 1.7rem; color: var(--ink); text-decoration: none;
  letter-spacing: 0.02em;
}
.logo-mark span { color: var(--fratco-red); }
nav.primary-nav { display: flex; gap: 28px; align-items: center; }
nav.primary-nav a {
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.03em;
}
nav.primary-nav a:hover { color: var(--fratco-red); text-decoration: none; }
.btn {
  display: inline-block; background: var(--fratco-red); color: var(--white);
  padding: 12px 26px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 0.85rem; border: none; cursor: pointer;
  border-radius: 2px;
}
.btn:hover { background: var(--fratco-red-dark); text-decoration: none; color: var(--white); }
.btn-outline { background: transparent; border: 2px solid var(--fratco-red); color: var(--fratco-red); }
.btn-outline:hover { background: var(--fratco-red); color: var(--white); }

/* Hero */
.hero {
  background: var(--ink); color: var(--white);
  padding: 90px 0 70px;
  position: relative;
}
.hero .eyebrow {
  color: var(--fratco-red); font-weight: 700; letter-spacing: 0.08em;
  font-size: 0.85rem; text-transform: uppercase; margin-bottom: 14px; display: block;
}
.hero h1 { color: var(--white); max-width: 780px; }
.hero p.lede { color: #d5d5d5; max-width: 620px; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

/* Centennial banner */
.centennial-banner {
  background: var(--fratco-red); color: var(--white);
  text-align: center; padding: 14px 20px; font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem;
}
.centennial-banner strong { font-weight: 700; }

/* Grid cards */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } nav.primary-nav { display: none; } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--gray-300); padding: 26px; background: var(--white);
}
.card h3 { margin-bottom: 8px; }
.card .tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--fratco-red);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px;
}

.market-card {
  position: relative; overflow: hidden; min-height: 220px; color: var(--white);
  display: flex; align-items: flex-end; padding: 22px;
  background-size: cover; background-position: center;
}
.market-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.75));
}
.market-card .content { position: relative; z-index: 1; }
.market-card h3 { color: var(--white); margin-bottom: 6px; }
.market-card p { color: #e7e7e7; font-size: 0.92rem; margin: 0; }

/* Footer */
footer.site-footer { background: var(--ink); color: #cfcfcf; padding: 56px 0 24px; }
footer.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
footer.site-footer a { color: #cfcfcf; }
footer.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.plant-item { margin-bottom: 16px; font-size: 0.9rem; }
.plant-item strong { color: var(--white); display: block; }
.footer-bottom {
  border-top: 1px solid #3a3a3a; margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.82rem; color: #999;
}

/* Breadcrumb / page header */
.page-header { padding: 46px 0 30px; border-bottom: 1px solid var(--gray-300); }
.page-header .eyebrow { color: var(--fratco-red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }

/* Tables / calculators */
table.calc-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
table.calc-table th, table.calc-table td {
  border: 1px solid var(--gray-300); padding: 10px 12px; text-align: center; font-size: 0.92rem;
}
table.calc-table th { background: var(--ink); color: var(--white); font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.03em; }
table.calc-table td.highlight { background: #fbe9ea; font-weight: 700; color: var(--fratco-red-dark); }

.calc-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 18px; align-items: end; margin-bottom: 10px; }
@media (max-width: 700px) { .calc-form { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300); font-size: 1rem; font-family: inherit;
}
.calc-note { font-size: 0.82rem; color: var(--gray-600); margin-top: 14px; border-left: 3px solid var(--fratco-red); padding-left: 12px; }

/* Contact form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300); font-family: inherit; font-size: 1rem; min-height: 130px; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.ok { color: #1a7a3a; }
.form-status.err { color: var(--fratco-red); }

/* Doc library */
.doc-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.doc-filters button {
  background: var(--white); border: 1px solid var(--gray-300); padding: 8px 16px;
  font-weight: 600; font-size: 0.85rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.02em;
}
.doc-filters button.active { background: var(--fratco-red); color: var(--white); border-color: var(--fratco-red); }
.doc-search { width: 100%; padding: 12px 14px; border: 1px solid var(--gray-300); font-size: 1rem; margin-bottom: 20px; }
.doc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--gray-300);
}
.doc-row .doc-cat { font-size: 0.75rem; color: var(--fratco-red); font-weight: 700; text-transform: uppercase; }

/* AI assistant widget */
#fratco-assistant-btn {
  position: fixed; bottom: 22px; right: 22px; z-index: 100;
  background: var(--fratco-red); color: var(--white); border: none; border-radius: 50px;
  padding: 14px 22px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 0.85rem; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
#fratco-assistant-panel {
  position: fixed; bottom: 90px; right: 22px; width: 340px; max-width: 90vw; height: 460px;
  background: var(--white); border: 1px solid var(--gray-300); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25); display: none; flex-direction: column; z-index: 100; overflow: hidden;
}
#fratco-assistant-panel.open { display: flex; }
.assistant-header { background: var(--ink); color: var(--white); padding: 14px 16px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; display:flex; justify-content: space-between; align-items: center; }
.assistant-header button { background: none; border: none; color: white; font-size: 1.1rem; cursor: pointer; }
.assistant-body { flex: 1; padding: 14px; overflow-y: auto; font-size: 0.9rem; }
.assistant-msg { margin-bottom: 12px; }
.assistant-msg.user { text-align: right; }
.assistant-msg .bubble { display: inline-block; padding: 8px 12px; border-radius: 10px; max-width: 85%; }
.assistant-msg.assistant .bubble { background: var(--gray-100); }
.assistant-msg.user .bubble { background: var(--fratco-red); color: white; }
.assistant-input { display: flex; border-top: 1px solid var(--gray-300); }
.assistant-input input { flex: 1; border: none; padding: 12px; font-family: inherit; font-size: 0.9rem; }
.assistant-input button { border: none; background: var(--fratco-red); color: white; padding: 0 18px; cursor: pointer; font-weight: 700; }
