/* Daily Bread by Feel Good Farms — dailybreadagent.com
   Matches the invoice redesign: navy slate + FGF green + generous whitespace.
*/

:root {
  --green-bright: #7FC242;
  --green-dark:   #2E7D32;
  --green-soft:   #EDF7E3;
  --navy:         #1F2D3D;
  --navy-soft:    #2C3E50;
  --ink:          #2D3748;
  --muted:        #718096;
  --border:       #E2E8F0;
  --bg:           #FAFAF7;
  --white:        #FFFFFF;
  --shadow-sm:    0 1px 2px rgba(31,45,61,.06), 0 1px 3px rgba(31,45,61,.08);
  --shadow-md:    0 4px 12px rgba(31,45,61,.08), 0 2px 4px rgba(31,45,61,.06);
  --radius:       8px;
  --radius-lg:    16px;
  --max-w:        1180px;
  --pad:          clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}
section { padding: clamp(48px, 8vw, 96px) 0; }
section.tight { padding: clamp(32px, 5vw, 56px) 0; }
.muted-bg { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.navy-bg  { background: var(--navy); color: #F0F4F8; }
.navy-bg h1, .navy-bg h2, .navy-bg h3 { color: white; }
.navy-bg .lead { color: #CBD5E0; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img { height: 44px; width: auto; }
.brand .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand .wordmark .top {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.brand .wordmark .sub {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

nav.primary {
  display: flex;
  align-items: center;
  gap: 6px;
}
nav.primary a {
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  padding: 10px 14px;
  border-radius: 6px;
}
nav.primary a:hover { background: var(--green-soft); color: var(--green-dark); }
nav.primary a.active { color: var(--green-dark); }
nav.primary a.cta {
  background: var(--green-bright);
  color: white;
  padding: 10px 18px;
  font-weight: 600;
}
nav.primary a.cta:hover { background: var(--green-dark); color: white; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: white;
  font-size: .8rem;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-family: inherit;
}
.lang-toggle button.active {
  background: var(--navy);
  color: white;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--navy);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top:  6px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  nav.primary {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    display: none;
  }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 12px; }
  nav.primary a.cta { text-align: center; margin-top: 4px; }
}

/* Hero */
.hero {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
  background:
    radial-gradient(circle at 90% 0%, rgba(127,194,66,.18), transparent 50%),
    radial-gradient(circle at 10% 100%, rgba(127,194,66,.12), transparent 55%),
    var(--bg);
}
.hero .eyebrow {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--green-dark);
  position: relative;
}
.hero h1 em::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 10px;
  background: var(--green-soft);
  z-index: -1;
  border-radius: 4px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stats .stat .n {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.hero-stats .stat .l {
  font-size: .85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary {
  background: var(--green-bright);
  color: white;
}
.btn-primary:hover { background: var(--green-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: white;
  color: var(--navy);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); }
.btn-ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,.3);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); color: white; }

/* Feature grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  align-items: start;
}
.feature {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
}
.feature h3 { margin: 0 0 8px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Product list */
.product-table {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 24px;
}
.product-table .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.product-table .row:last-child { border-bottom: none; }
.product-table .row.header {
  background: var(--bg);
  font-weight: 600;
  font-size: .85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 20px;
}
.product-table .row .name { font-weight: 500; }
.product-table .row .cat {
  font-size: .78rem;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.category-heading {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.15rem;
}
.category-heading::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 22px;
  background: var(--green-bright);
  border-radius: 3px;
}

/* Served areas */
.served-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.area {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.area .city {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}
.area .types {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Forms */
.form {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  max-width: 640px;
}
.form-row { margin-bottom: 20px; }
.form label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
  background: white;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(127,194,66,.2);
}
.form textarea { min-height: 120px; resize: vertical; }
.form .hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.form button[type="submit"] { margin-top: 8px; }

.form-status {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: .95rem;
  display: none;
}
.form-status.ok  { display: block; background: var(--green-soft); color: var(--green-dark); border: 1px solid #B8D99B; }
.form-status.err { display: block; background: #FEF2F2; color: #B91C1C; border: 1px solid #FCA5A5; }

/* Contact card */
.contact-card {
  background: var(--green-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.contact-card .item { display: flex; gap: 12px; align-items: start; }
.contact-card .item .lbl {
  font-size: .75rem;
  color: var(--green-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.contact-card .item .val { font-weight: 500; color: var(--navy); font-size: 1.05rem; }
.contact-card .icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: white;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}

/* Chat widget */
.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  background: var(--green-bright);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .15s, background .15s;
  font-family: inherit;
}
.chat-launcher:hover { background: var(--green-dark); transform: translateY(-1px); }
.chat-launcher .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.3);
}

.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: min(380px, calc(100vw - 40px));
  height: min(540px, calc(100vh - 120px));
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(31,45,61,.2);
  z-index: 50;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-head {
  background: var(--navy);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-head .t { font-weight: 600; }
.chat-head .s { font-size: .78rem; opacity: .7; }
.chat-head button {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0 4px;
}
.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}
.chat-msg {
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 85%;
  font-size: .92rem;
  line-height: 1.45;
}
.chat-msg.bot { background: white; border: 1px solid var(--border); align-self: flex-start; }
.chat-msg.user { background: var(--green-bright); color: white; align-self: flex-end; }
.chat-msg.meta { font-size: .78rem; color: var(--muted); align-self: center; background: transparent; padding: 4px 0; }
.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: white;
}
.chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: .95rem;
}
.chat-input input:focus { outline: none; border-color: var(--green-bright); }
.chat-input button {
  background: var(--green-bright);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #CBD5E0;
  padding: 56px 0 24px;
  margin-top: 40px;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.site-footer h4 {
  color: white;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer a { color: #CBD5E0; display: block; padding: 4px 0; font-size: .93rem; }
.site-footer a:hover { color: white; }
.site-footer .foot-logo img { height: 40px; margin-bottom: 14px; }
.site-footer .fine {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .82rem;
  color: #94A3B8;
}
@media (max-width: 700px) {
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
[data-hidden="true"] { display: none !important; }

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 2px;
  border-radius: 4px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
