/* Huber Homestead — shared site styles (palette + type sourced from huberhomestead.com) */

:root {
  --bg: #f7f2e3;
  --surface: #ffffff;
  --surface-2: #efe4c4;
  --text: #1a160f;
  --text-muted: #6b6a5d;
  --accent: #c2823e;
  --accent-ink: #241506;
  --accent-2: #34342e;
  --on-dark: #f7f2e3;
  --on-dark-muted: #cac4ac;
  --line: #e3d7b4;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130d;
    --surface: #201c14;
    --surface-2: #262117;
    --text: #efe8d5;
    --text-muted: #b3ac95;
    --accent: #d99a4d;
    --accent-ink: #201304;
    --accent-2: #4c4b41;
    --on-dark: #f7f2e3;
    --on-dark-muted: #cac4ac;
    --line: #38331f;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #16130d;
  --surface: #201c14;
  --surface-2: #262117;
  --text: #efe8d5;
  --text-muted: #b3ac95;
  --accent: #d99a4d;
  --accent-ink: #201304;
  --accent-2: #4c4b41;
  --on-dark: #f7f2e3;
  --on-dark-muted: #cac4ac;
  --line: #38331f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { background: var(--bg); }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Public Sans", "Trebuchet MS", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  text-wrap: balance;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5.2vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; max-width: 62ch; }
p.lede { font-size: 1.15rem; color: var(--text-muted); }

a { color: inherit; }

.eyebrow {
  display: inline-block;
  font-family: "Public Sans", sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6em;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: "Public Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85em 1.5em;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

.btn-gold { background: var(--accent); color: var(--accent-ink); }
.btn-gold:hover { background: #cf9151; }

.btn-line { background: transparent; border-color: currentColor; color: var(--on-dark); }
.btn-line:hover { background: rgba(247,242,227,0.12); }

.btn-outline-dark { background: transparent; border-color: var(--text); color: var(--text); }
.btn-outline-dark:hover { background: var(--text); color: var(--bg); }

/* ---------- Nav ---------- */
.site-nav {
  background: var(--bg);
  color: var(--text);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 1.5rem; }
.brand-mark { display: flex; align-items: center; text-decoration: none; }
.brand-mark img { height: 46px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2em; list-style: none; margin: 0; padding: 0; font-weight: 700; font-size: 0.92rem; letter-spacing: 0.02em; }
.nav-links a { text-decoration: none; color: var(--text-muted); padding: 0.4em 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 1.4em; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); padding: 0.5em; margin-right: -0.5em; cursor: pointer; }
.hamburger { display: flex; flex-direction: column; justify-content: space-between; width: 22px; height: 15px; }
.hamburger span { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 1px; }

@media (max-width: 780px) {
  .nav-links {
    position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--surface-2); padding: 0.5em 24px 1.2em; display: none;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.7em 0; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
}

/* ---------- Photo hero ---------- */
.hero-photo {
  position: relative;
  min-height: 78vw;
  max-height: 560px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero-photo.short { max-height: 340px; min-height: 46vw; }
@media (max-width: 640px) {
  .hero-photo, .hero-photo.short { max-height: none; min-height: 0; }
}
.hero-photo::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20,17,11,0.86) 22%, rgba(20,17,11,0.55) 52%, rgba(20,17,11,0.12) 82%);
}
.hero-photo .wrap { position: relative; z-index: 1; }
.hero-photo-content { max-width: 620px; padding-block: 3rem; }
.hero-photo-content .eyebrow { color: var(--accent); }
.hero-photo-content h1, .hero-photo-content h2 { color: var(--on-dark); }
.hero-photo-content p.lede { color: var(--on-dark-muted); }
.hero-actions { display: flex; gap: 1em; flex-wrap: wrap; margin-top: 1.6em; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-alt { background: var(--surface-2); }
.section-dark { background: var(--accent-2); color: var(--on-dark); }
.section-dark h2, .section-dark .eyebrow { color: var(--on-dark); }
.section-dark p { color: var(--on-dark-muted); }
.section-head { max-width: 640px; margin-bottom: 2.2em; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Product grid ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 780px) { .grid-2 { grid-template-columns: 1fr; } }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

.produce-card {
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.produce-card .photo { aspect-ratio: 4/3; overflow: hidden; }
.produce-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.produce-card .body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.produce-card .tag {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: 0.25em 0.6em; margin-bottom: 0.3em;
}
.produce-card h3 { margin-bottom: 0.15em; }
.produce-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0.6em; }
.produce-card .price { margin-top: auto; font-family: "Crimson Pro", serif; font-weight: 700; font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--accent); }
.produce-card .price span { font-family: "Public Sans", sans-serif; font-weight: 400; font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Kitchen gallery ---------- */
.kitchen-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 860px) { .kitchen-grid { grid-template-columns: repeat(2, 1fr); } }
.kitchen-item {
  position: relative; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 4/5; margin: 0;
  cursor: zoom-in; padding: 0; background: none; display: block; width: 100%; text-align: left; font: inherit;
}
.kitchen-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.kitchen-item:hover img { transform: scale(1.05); }
.kitchen-item:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.kitchen-item .kitchen-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.7em 0.8em 0.6em;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--on-dark);
  background: linear-gradient(to top, rgba(20,17,11,0.78), rgba(20,17,11,0));
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,9,6,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
}
.lightbox[hidden] { display: none; }
.lightbox-figure { position: relative; max-width: 92vw; max-height: 88vh; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.lightbox-figure img { max-width: 92vw; max-height: 76vh; width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox-figure figcaption { color: var(--on-dark); font-family: "Crimson Pro", serif; font-size: 1.1rem; text-align: center; }
.lightbox-close {
  position: absolute; top: -44px; right: -8px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(247,242,227,0.12); border: 1px solid rgba(247,242,227,0.4);
  color: var(--on-dark); font-size: 1.3rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox-close:hover { background: rgba(247,242,227,0.22); }
@media (max-width: 600px) { .lightbox-close { top: -50px; right: 0; } }

/* ---------- Pricing (products page) ---------- */
.price-card { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.price-card.popular { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2); }
.price-card .photo { aspect-ratio: 16/10; overflow: hidden; }
.price-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.price-card .body { padding: 1.8rem; display: flex; flex-direction: column; gap: 0.8rem; }
.price-card .popular-flag { align-self: flex-start; background: var(--accent-2); color: var(--on-dark); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25em 0.7em; }
.price-card .price-row { display: flex; align-items: baseline; gap: 0.4em; font-family: "Crimson Pro", serif; font-weight: 700; font-size: 2.1rem; font-variant-numeric: tabular-nums; color: var(--accent); }
.price-card .price-row small { font-family: "Public Sans", sans-serif; font-weight: 400; font-size: 0.85rem; color: var(--text-muted); }
.price-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5em; }
.price-card ul li { display: flex; gap: 0.6em; font-size: 0.92rem; color: var(--text-muted); }
.price-card ul li::before { content: "—"; color: var(--accent); flex: none; }
.menu-list { border-top: 1px solid var(--line); margin-top: 0.6em; padding-top: 0.2em; display: flex; flex-direction: column; font-size: 0.92rem; }
.menu-list .row { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; padding-block: 0.55em; border-bottom: 1px solid var(--line); }
.menu-list .row:last-child { border-bottom: none; }
.menu-list .row span:first-child { color: var(--text); }
.menu-list .row span:last-child { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; white-space: nowrap; }

/* ---------- Timeline (about) ---------- */
.timeline-item { display: grid; grid-template-columns: 64px 1fr; gap: 1.2rem; padding-block: 1.4rem; border-top: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-item .num { font-family: "Crimson Pro", serif; font-style: italic; font-weight: 700; font-size: 1.6rem; color: var(--accent); }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: 260px 1fr; gap: 2.4rem; align-items: stretch; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
@media (max-width: 700px) { .founder { grid-template-columns: 1fr; } }
.founder-portrait { width: 100%; height: 100%; min-height: 220px; overflow: hidden; }
.founder-portrait img { width: 100%; height: 100%; object-fit: cover; }
.founder-text { padding: 2rem 2rem 2rem 0; }
@media (max-width: 700px) { .founder-text { padding: 1.6rem; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.info-card { background: var(--accent-2); color: var(--on-dark); padding: 2rem; display: flex; flex-direction: column; gap: 1.4rem; position: sticky; top: calc(84px + env(safe-area-inset-top, 0px) + 24px); }
@media (max-width: 860px) { .info-card { position: static; } }
.info-card h3 { color: var(--on-dark); }
.info-row { display: flex; gap: 0.9em; align-items: flex-start; }
.info-row svg { flex: none; margin-top: 0.2em; }
.info-row a { color: var(--on-dark); text-decoration: none; }
.info-row a:hover { text-decoration: underline; }
.info-row span.muted { color: var(--on-dark-muted); }
.social-row { display: flex; gap: 0.8em; margin-top: 0.4em; }
.social-row a { width: 38px; height: 38px; border: 1px solid rgba(247,242,227,0.35); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.social-row a:hover { border-color: var(--accent); }

.order-form { background: var(--surface); border: 1px solid var(--line); padding: 2rem; }
.order-form fieldset { border: none; padding: 0; margin: 0 0 1.6rem; }
.order-form legend { font-family: "Crimson Pro", serif; font-weight: 700; font-size: 1.1rem; padding: 0 0 0.6em; color: var(--text); }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
@media (max-width: 480px) { .check-grid { grid-template-columns: 1fr; } }
.check-item { display: flex; align-items: center; gap: 0.7em; border: 1px solid var(--line); padding: 0.7em 0.9em; cursor: pointer; background: var(--bg); }
.check-item:has(input[type="checkbox"]:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.check-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent-2); flex: none; }
.check-item .label { display: flex; flex-direction: column; font-size: 0.92rem; font-weight: 700; }
.check-item .label small { font-weight: 400; color: var(--text-muted); font-size: 0.78rem; }
.check-item:not(.multi) { flex-wrap: wrap; }
.check-item:not(.multi) .check-item-main { display: flex; align-items: center; gap: 0.7em; flex: 1; cursor: pointer; }

.check-item.multi { flex-direction: column; align-items: stretch; cursor: default; gap: 0.6em; }
.check-item.multi .check-item-main { display: flex; align-items: center; gap: 0.7em; cursor: pointer; }
.check-item.multi .check-item-main input { width: 18px; height: 18px; accent-color: var(--accent-2); flex: none; }
.check-item.multi .label { font-size: 0.92rem; font-weight: 700; }
.qty-options { display: none; flex-wrap: wrap; gap: 0.5em; padding-left: 1.9rem; }
.qty-options.show { display: flex; }
.qty-options label { display: flex; align-items: center; gap: 0.4em; font-size: 0.8rem; font-weight: 400; color: var(--text-muted); border: 1px solid var(--line); padding: 0.3em 0.65em; cursor: pointer; background: var(--surface); }
.qty-options label:has(input:checked) { border-color: var(--accent); color: var(--text); font-weight: 700; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.qty-options input[type="radio"] { width: 14px; height: 14px; accent-color: var(--accent-2); flex: none; }

/* ---------- Quantity stepper ---------- */
.qty-stepper { display: none; align-items: center; gap: 0.3em; flex: none; }
.check-item:has(input[type="checkbox"]:checked) .qty-stepper { display: flex; }
.check-item:not(.multi) .qty-stepper { margin-left: auto; }
.check-item.multi .qty-stepper { padding-left: 1.9rem; }
.check-item.multi .qty-stepper::before { content: "Qty"; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); margin-right: 0.35em; }
.qty-btn {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 0.95rem; line-height: 1; cursor: pointer; padding: 0; border-radius: 2px;
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent-2); }
.qty-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.qty-input {
  width: 28px; text-align: center; border: none; background: transparent; color: var(--text);
  font: inherit; font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; padding: 0;
  -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }

.field { display: flex; flex-direction: column; gap: 0.4em; margin-bottom: 1.2rem; }
.field label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; }
.field input, .field textarea { font: inherit; padding: 0.75em 0.9em; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 2px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .two-col { grid-template-columns: 1fr; } }

.form-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.8em; }
.form-status { margin-top: 1em; font-size: 0.9rem; font-weight: 700; color: var(--accent); }

.map-block { border: 1px solid var(--line); background: var(--surface); padding: 2.2rem; display: flex; flex-direction: column; gap: 0.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); color: var(--text); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.6rem; padding-bottom: calc(1.6rem + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.4rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--text); font-family: "Public Sans", sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.9em; }
.footer-grid p, .footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-logo img { height: 40px; width: auto; margin-bottom: 0.9em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55em; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8em; padding-top: 1.4rem; font-size: 0.8rem; color: var(--text-muted); }
.footer .social-row a { border-color: var(--line); color: var(--text); }
.footer .social-row a:hover { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
