/* Recipal — commercial food production planner */
:root {
  --ink: #1c2b26;
  --muted: #5d7168;
  --paper: #fbfaf6;
  --card: #ffffff;
  --line: #dce5df;
  --brand: #1d7a4f;
  --brand-deep: #145c3a;
  --brand-soft: #e7f3ec;
  --dark: #14231d;
  --dark-2: #1d332a;
  --gold: #e8a33d;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.55; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 760px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6rem; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand-deep); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .5rem; }
.section { padding: 4.2rem 0; }
.section-dark { background: var(--dark); color: #e9f2ec; }
.section-dark .eyebrow { color: var(--gold); }
.section-dark .section-lede { color: #b9cdc2; }
.section-lede { color: var(--muted); max-width: 640px; font-size: 1.06rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251,250,246,.96); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; fill: var(--brand); }
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--brand-deep); }
.nav-account { display: inline-flex; gap: .5rem; align-items: center; }
.nav-user { font-weight: 700; font-size: .92rem; color: var(--brand-deep); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* Buttons */
.btn { display: inline-block; border: 1px solid transparent; border-radius: 999px; padding: .55rem 1.15rem; font: 600 .95rem inherit; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }
.section-dark .btn-ghost { color: #e9f2ec; border-color: #39544a; }
.btn-large { padding: .8rem 1.6rem; font-size: 1.02rem; }
.btn-wide { width: 100%; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--brand-soft), var(--paper) 65%); padding: 4.5rem 0 3.6rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 720px; }
.hero-lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.4rem 0 1.2rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; color: var(--brand-deep); font-weight: 600; font-size: .95rem; }
.hero-points li::before { content: "✓ "; color: var(--brand); }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.1rem; margin-top: 1.6rem; }
.feature-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.feature-card p { color: var(--muted); margin: 0; }

/* Steps */
.steps-list { counter-reset: step; padding-left: 1.2rem; }
.steps-list li { margin-bottom: 1rem; }

/* App */
.app-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.4rem 0 1.2rem; }
.app-tab { background: transparent; border: 1px solid #39544a; color: #cfe0d6; border-radius: 999px; padding: .5rem 1.1rem; font: 600 .95rem inherit; cursor: pointer; }
.app-tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.modal .app-tab { border-color: var(--line); color: var(--ink); }
.modal .app-tab.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.app-panel { background: var(--dark-2); border: 1px solid #2c463a; border-radius: var(--radius); padding: 1.4rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h3 { margin: 0; }
.plan-note { background: #3a2f16; border: 1px solid var(--gold); color: #f3d9a4; border-radius: 9px; padding: .7rem 1rem; font-size: .92rem; }
.formula-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.formula-card { background: #22392f; border: 1px solid #33523f; border-radius: var(--radius); padding: 1.1rem 1.2rem; cursor: pointer; }
.formula-card:hover { border-color: var(--brand); }
.formula-card h4 { margin: 0 0 .35rem; font-size: 1.05rem; }
.formula-card p { margin: 0; color: #b9cdc2; font-size: .9rem; }
.sample-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: .1rem .55rem; margin-bottom: .5rem; }
.formula-detail { margin-top: 1.2rem; background: #22392f; border: 1px solid #33523f; border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.detail-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

/* Tables */
table.data-table { width: 100%; border-collapse: collapse; margin: .8rem 0 1rem; font-size: .95rem; }
table.data-table th, table.data-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid #33523f; }
table.data-table th { color: #9fc3ae; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
table.data-table td.num, table.data-table th.num { text-align: right; }
table.data-table tr.total-row td { font-weight: 800; border-top: 2px solid var(--brand); border-bottom: 0; }
.cost-summary { display: flex; gap: 2rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
.cost-summary div strong { display: block; font-size: 1.3rem; color: #fff; }
.cost-summary div span { font-size: .82rem; color: #9fc3ae; text-transform: uppercase; letter-spacing: .06em; }

/* Forms */
label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: .9rem; }
input, textarea, select { display: block; width: 100%; margin-top: .35rem; padding: .7rem .85rem; border: 1px solid #c9d8cf; border-radius: 9px; font: 1rem inherit; color: var(--ink); background: #fff; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); border-color: var(--brand-deep); }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; align-items: end; }
.app-form { margin-top: 1.4rem; background: #22392f; border: 1px solid #33523f; border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.app-form.inline-form { margin: 0 0 1.2rem; }
.ingredient-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: .6rem; align-items: end; margin-bottom: .2rem; }
.ingredient-row label { margin-bottom: .4rem; }
.row-remove { background: none; border: 1px solid #55705f; color: #cfe0d6; border-radius: 9px; padding: .65rem .8rem; cursor: pointer; font: inherit; margin-bottom: .4rem; }
.form-error { color: #ff9d94; font-size: .9rem; font-weight: 600; }
#contact .form-error, .modal .form-error { color: #b3261e; }
.form-note { font-size: .8rem; color: var(--muted); margin-top: .8rem; }
.form-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.form-thanks { border: 1px solid #bfe6d4; background: #eefaf3; border-radius: 9px; padding: 1.4rem; }
.form-thanks h3 { color: #1d6b3f; }
.steps-label { margin-top: 1rem; }
.unit-echo { display: block; padding: .7rem 0; font-weight: 700; }

/* Batch sheet + plan + purchasing */
.batch-sheet { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 1.5rem 1.6rem; margin-top: 1.2rem; }
.batch-sheet table.data-table th, .batch-sheet table.data-table td { border-color: var(--line); }
.batch-sheet table.data-table th { color: var(--muted); }
.batch-sheet .cost-summary div strong { color: var(--ink); }
.batch-sheet .cost-summary div span { color: var(--muted); }
.batch-sheet ol { padding-left: 1.3rem; }
.batch-sheet ol li { margin-bottom: .35rem; }
.plan-day { margin-bottom: 1.4rem; }
.plan-day h4 { color: var(--gold); margin-bottom: .4rem; }
.plan-run { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #22392f; border: 1px solid #33523f; border-radius: 9px; padding: .7rem 1rem; margin-bottom: .5rem; }
.plan-run p { margin: 0; }
.plan-run .run-meta { color: #9fc3ae; font-size: .88rem; }
.empty-note { color: #9fc3ae; font-style: italic; }
.purchasing-wrap { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-top: 1rem; }
.purchasing-wrap table.data-table th, .purchasing-wrap table.data-table td { border-color: var(--line); }
.purchasing-wrap table.data-table th { color: var(--muted); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 420px)); gap: 1.2rem; margin-top: 1.6rem; }
.price-card { background: var(--dark-2); border: 1px solid #33523f; border-radius: var(--radius); padding: 1.6rem 1.7rem; }
.price-card-pro { border-color: var(--gold); }
.price { font-size: 2.2rem; font-weight: 800; margin: .2rem 0 .4rem; }
.price-per { font-size: 1rem; font-weight: 600; color: #9fc3ae; }
.trial-note { color: var(--gold); font-weight: 600; }
.price-card ul { padding-left: 1.15rem; color: #cfe0d6; }
.price-card li { margin-bottom: .45rem; }

/* Footer */
.site-footer { background: var(--dark); color: #b9cdc2; padding: 2.4rem 0; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: .8rem; }
.footer-brand .brand-mark { fill: var(--gold); }
.footer-disclaimer { max-width: 720px; font-size: .92rem; }
.footer-copy { font-size: .85rem; color: #7d968a; margin: 0; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 16, .62); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; z-index: 80; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; max-width: 440px; width: 100%; padding: 1.8rem; position: relative; }
.modal-close { position: absolute; top: .6rem; right: .9rem; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.modal-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.modal-note { color: var(--muted); font-size: .92rem; }

/* Responsive */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); gap: .8rem; }
  .site-nav.open { display: flex; }
  .ingredient-row { grid-template-columns: 1fr 1fr; }
  .section { padding: 3rem 0; }
}

/* Print — batch sheet & purchasing list */
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0; margin: 0; box-shadow: none; }
  .no-print { display: none !important; }
}
