/* ============================================================
   Weight Wellness Base — kitchen & table shop
   Fonts: DM Serif Display (headings) / Karla (body)
   ============================================================ */

:root {
  --butter: #FFF9EE;
  --charcoal: #22201B;
  --tomato: #D8502E;
  --tomato-deep: #B8401F;
  --sage: #7C9070;
  --sage-tint: #E9EDE0;
  --hairline: #EDE4D5;
  --muted: rgba(34, 32, 27, 0.66);
  --header-h: 68px;
  --body-font: "Karla", "Helvetica Neue", Arial, sans-serif;
  --serif-font: "DM Serif Display", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--butter);
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

:focus-visible { outline: 2px dashed var(--tomato); outline-offset: 3px; }

.icon {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.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;
}

/* ---------- Announcement bar ---------- */

.announce {
  background: var(--tomato);
  color: var(--butter);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.65rem 1rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled { box-shadow: 0 8px 28px rgba(34, 32, 27, 0.1); }

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-family: var(--serif-font);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  white-space: nowrap;
}

.logo-chip {
  font-family: var(--body-font);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  background: var(--charcoal);
  color: var(--butter);
  border-radius: 4px;
  padding: 0.32em 0.7em 0.26em;
  transform: translateY(1px);
}

.main-nav {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.main-nav a {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.main-nav a:hover {
  color: var(--tomato);
  border-color: var(--tomato);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: background 0.25s ease;
}

.cart-btn:hover { background: var(--sage-tint); }

.cart-btn .icon { width: 1.4rem; height: 1.4rem; }

.cart-count {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--tomato);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.menu-toggle .i-close { display: none; }

.menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--hairline);
  padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem;
  box-shadow: 0 24px 40px rgba(34, 32, 27, 0.12);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--hairline);
}

.mobile-nav a:last-child { border-bottom: 0; }

.mobile-nav a:hover { color: var(--tomato); }

/* ---------- Pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--charcoal);
  border-radius: 999px;
  padding: 0.62em 1.5em;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--charcoal);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  white-space: nowrap;
}

.pill:hover {
  background: var(--charcoal);
  color: var(--butter);
}

.pill:active { transform: translateY(1px); }

/* ---------- Compact centered hero ---------- */

.hero {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.25rem, 4vw, 2rem) clamp(3rem, 7vw, 5.5rem);
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tomato);
}

.hero h1 {
  margin: 1rem auto 0;
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(2.7rem, 6.5vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
  max-width: 16ch;
}

.hero-sub {
  margin: 1.25rem auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-pills {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.hero-pill { background: #fff; }

.hero-pill:hover { background: var(--charcoal); }

/* ---------- Sticky tab bar ---------- */

.tabbar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: rgba(255, 249, 238, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.tabbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tab { padding: 0.5em 1.3em; }

.tab.is-active {
  background: var(--tomato);
  border-color: var(--tomato);
  color: #fff;
}

.tab.is-active:hover {
  background: var(--tomato-deep);
  border-color: var(--tomato-deep);
}

.grid-count {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-left: 0.75rem;
}

/* ---------- Product grid ---------- */

section[id] { scroll-margin-top: calc(var(--header-h) + 76px); }

.shop {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 2.5rem);
}

.product-grid {
  max-width: 1020px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.product-grid.filtering .card {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
}

.card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 0.85rem 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.3s ease;
}

.card.hidden { display: none; }

.card:hover { box-shadow: 0 16px 36px rgba(34, 32, 27, 0.1); }

.card-media {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover .card-media img { transform: scale(1.05); }

.card h3 {
  margin-top: 0.9rem;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.note {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Star ratings ---------- */

.rating {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stars {
  position: relative;
  display: inline-flex;
  line-height: 0;
}

.stars-row { display: inline-flex; gap: 2px; }

.star {
  width: 14px;
  height: 14px;
  fill: var(--tomato);
  flex-shrink: 0;
}

.stars-row.dim .star { fill: rgba(34, 32, 27, 0.14); }

.stars-row.fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  white-space: nowrap;
}

.rating-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.buy-row {
  margin-top: auto;
  padding-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.price {
  font-family: var(--serif-font);
  font-size: 1.4rem;
}

.add-btn {
  background: var(--tomato);
  color: #fff;
  border-radius: 999px;
  padding: 0.55em 1.35em;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.15s ease;
}

.add-btn:hover { background: var(--tomato-deep); }

.add-btn:active { transform: translateY(1px); }

.add-btn.added { background: var(--sage); }

/* ---------- Journal ---------- */

.journal {
  background: #fff;
  border-top: 1px solid var(--hairline);
  padding: clamp(4rem, 8vw, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
}

.section-head {
  max-width: 1020px;
  margin: 0 auto 2.5rem;
}

.section-title {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
}

.section-sub {
  margin-top: 0.5rem;
  max-width: 56ch;
  color: var(--muted);
}

.journal-grid {
  max-width: 1020px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.jcard-link {
  display: flex;
  flex-direction: column;
  background: var(--butter);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jcard-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(34, 32, 27, 0.1);
}

.jcard-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.jcard-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jcard-body {
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.tag {
  background: var(--sage);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.35em 0.95em;
}

.jcard h3 {
  margin-top: 0.75rem;
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.2;
}

.jcard-body p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.read {
  margin-top: auto;
  padding-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tomato);
}

.read .icon { transition: transform 0.25s ease; }

.jcard-link:hover .read .icon { transform: translateX(5px); }

/* ---------- Quote band ---------- */

.quote-band {
  background: var(--sage-tint);
  padding: clamp(4rem, 9vw, 7rem) clamp(1.25rem, 4vw, 2.5rem);
}

.quote {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.quote .star { width: 20px; height: 20px; }

.quote blockquote {
  font-family: var(--serif-font);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.4;
}

.quote figcaption {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.quote figcaption span {
  color: var(--sage);
  margin-left: 0.5rem;
}

/* ---------- Newsletter ---------- */

.newsletter {
  background: var(--charcoal);
  color: var(--butter);
  padding: clamp(4rem, 8vw, 6rem) clamp(1.25rem, 4vw, 2.5rem);
}

.newsletter-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.newsletter h2 {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.newsletter p {
  margin-top: 0.9rem;
  color: rgba(255, 249, 238, 0.78);
}

.newsletter form {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--butter);
  padding: 0.9em 1.2em;
  background: rgba(255, 249, 238, 0.08);
  border: 1.5px solid rgba(255, 249, 238, 0.35);
  border-radius: 999px;
}

.newsletter input::placeholder { color: rgba(255, 249, 238, 0.5); }

.newsletter input:focus {
  outline: none;
  border-color: var(--butter);
}

.btn {
  background: var(--tomato);
  color: #fff;
  border-radius: 999px;
  padding: 0.9em 2em;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.15s ease;
}

.btn:hover { background: var(--tomato-deep); }

.btn:active { transform: translateY(1px); }

.form-msg {
  margin-top: 1.1rem;
  min-height: 1.5em;
  font-weight: 700;
  color: #CBD9BC;
}

.form-msg.error { color: #F2A28D; }

/* ---------- Footer (warm, light) ---------- */

.site-footer {
  background: var(--butter);
  border-top: 1px solid var(--hairline);
  color: var(--charcoal);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 5rem) clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.footer-brand .logo { font-size: 1.25rem; }

.footer-brand p {
  margin-top: 1.1rem;
  max-width: 36ch;
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-col h3 {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--tomato);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  padding: 0.32rem 0;
  font-size: 0.92rem;
  color: rgba(34, 32, 27, 0.8);
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--tomato); }

.footer-mail { font-weight: 700; color: var(--charcoal) !important; }

.payments {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pay {
  width: 48px;
  height: 30px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--hairline);
}

.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding: 1.4rem clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 16px);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background: var(--charcoal);
  color: var(--butter);
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(34, 32, 27, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast .icon { color: var(--tomato); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease var(--d, 0s), transform 0.65s ease var(--d, 0s);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card-media img { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .main-nav { display: none; }

  .menu-toggle { display: inline-flex; }

  .product-grid { grid-template-columns: 1fr 1fr; }

  .journal-grid { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  :root { --header-h: 62px; }

  .logo { font-size: 1.1rem; }

  .product-grid { grid-template-columns: 1fr; }

  .journal-grid { grid-template-columns: 1fr; }

  .tabbar-inner { justify-content: flex-start; }

  .grid-count { width: 100%; margin: 0.25rem 0 0; }

  .newsletter form { flex-direction: column; }

  .newsletter .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .toast { width: max-content; max-width: calc(100vw - 2rem); }
}

/* ============================================================
   Footer redesign — "recipe card"
   ============================================================ */

.site-footer {
  border-top: 0;
  padding: clamp(3rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2rem) 0;
}

.rc-card {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 2px dashed var(--charcoal);
  padding: clamp(2.4rem, 5vw, 3.4rem) clamp(0.5rem, 2vw, 1.5rem) 0;
}

.rc-stamp {
  position: absolute;
  top: -36px;
  right: clamp(0.5rem, 3vw, 2rem);
  width: clamp(84px, 10vw, 116px);
  transform: rotate(-11deg);
  pointer-events: none;
}

.rc-stamp svg { width: 100%; height: auto; display: block; }

.rc-main {
  display: grid;
  grid-template-columns: 1.35fr 1.15fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 4vw, 2.8rem);
}

.rc-logo { font-size: clamp(2rem, 3.4vw, 2.9rem); }

.rc-logo .logo-chip { font-size: 0.68rem; }

.rc-brand p {
  margin-top: 0.9rem;
  max-width: 34ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.rc-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.rc-col h3 {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--tomato);
  margin-bottom: 0.9rem;
}

.rc-col a { font-size: 0.9rem; padding: 0.26rem 0; }

.rc-hours h3 {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--tomato);
  margin-bottom: 0.9rem;
}

.rc-time {
  font-family: var(--serif-font);
  font-size: 1.25rem;
  color: var(--charcoal);
}

.rc-mail {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--charcoal) !important;
}

.rc-pays { margin-top: 1.2rem; }

.rc-bottom {
  border-top: 1px solid var(--hairline);
  padding: 1.2rem 0 1.4rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.rc-bottom p { display: inline-flex; align-items: center; gap: 0.5rem; }

.rc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tomato);
  flex: none;
}

@media (max-width: 900px) {
  .rc-main { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 560px) {
  .rc-cols { gap: 1.5rem; }
}
