/* Rest Day Kitchen — theme styles
   Tokens at the top, sections below. Inter loaded locally — no CDN. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/inter-700.woff2") format("woff2");
}

:root {
  --bg:           #FAF7F2;
  --card-bg:      #FFFFFF;
  --ink:          #2A2A28;
  --muted:        #7A7A75;
  --primary:      #5A6E3C;
  --primary-dark: #3F4F2A;
  --primary-soft: #ECEFE3;
  --line:         #EAE5DC;
  --shadow:       0 4px 14px rgba(0, 0, 0, 0.05);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 999px;

  --maxw: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--primary); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ─── HEADER ───────────────────────────────────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
}
.site-header .row {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-logo {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-grid; place-items: center;
  color: #fff; font-size: 0.9rem;
  flex: none;
}
.brand-logo svg { width: 20px; height: 20px; }
.footer-brand-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.footer-brand-row .brand-logo {
  width: 32px; height: 32px;
  background: #C9C3AE;
}
.footer-brand-row .brand-logo svg { width: 18px; height: 18px; }
.footer-brand-row .brand-name {
  color: #fff; font-size: 0.95rem;
  letter-spacing: 0.04em; font-weight: 700; text-transform: uppercase;
}
.brand-text { line-height: 1.2; }
.brand-name {
  font-weight: 700; letter-spacing: 0.04em; font-size: 0.95rem; text-transform: uppercase;
}
.brand-tag { font-size: 0.7rem; color: var(--muted); }

.nav-wrap { display: flex; align-items: center; gap: 1.5rem; }
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 2rem; align-items: center;
}
.nav-list a {
  font-size: 0.9rem; font-weight: 500; color: var(--ink);
}
.nav-search {
  background: none; border: none; cursor: pointer; padding: 0.25rem; color: var(--ink);
  display: flex; align-items: center; line-height: 0;
}
.nav-search:hover { color: var(--primary); }

/* ─── SECTION HEADINGS ─────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-narrow { padding: 3rem 0; }
.section-title {
  text-align: center; font-size: 2.25rem; font-weight: 600;
  letter-spacing: -0.01em; margin: 0 0 0.5rem;
}
.section-sub {
  text-align: center; color: var(--muted); margin: 0 0 3rem;
  font-size: 1rem;
}
.section-divider {
  width: 60px; height: 2px; background: var(--primary); border: 0; margin: 0.75rem auto 1.5rem;
}

/* ─── FEATURED RECIPES ─────────────────────────────────────── */
.recipe-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem;
}
.recipe-card {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.recipe-card .photo { aspect-ratio: 4 / 3; overflow: hidden; }
.recipe-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.recipe-card .body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.recipe-card h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.recipe-card .desc { font-size: 0.9rem; color: var(--muted); margin: 0; }
.macro-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0 0.75rem; }
.macro {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em;
  background: var(--primary-soft); color: var(--primary-dark);
  padding: 0.25rem 0.55rem; border-radius: var(--radius-lg);
}
.btn {
  display: inline-block; background: var(--primary); color: #fff !important;
  padding: 0.7rem 1.2rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  border: none; cursor: pointer; text-align: center;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-block { display: block; width: 100%; }

/* ─── WELCOME (2-COL) ──────────────────────────────────────── */
.welcome {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center;
}
.welcome-copy h2 {
  font-size: 1.75rem; margin: 0 0 1rem; font-weight: 600;
}
.welcome-copy p { color: #444; margin: 0 0 1rem; }
.welcome-image {
  position: relative;
  aspect-ratio: 4 / 3;
}
.welcome-image-main {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.welcome-image-accent {
  position: absolute;
  bottom: -2.5rem; left: -2.5rem;
  width: 40%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--bg);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}
@media (max-width: 900px) {
  .welcome-image-accent { display: none; }
}

/* ─── BROWSE CATEGORIES ────────────────────────────────────── */
.cat-row {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.5rem; margin-top: 1rem;
}
.cat-item { text-align: center; display: block; }
.cat-item .circle {
  /* Inline-block + 1:1 width:height + border-radius:50% gives a true circle.
     Aspect-ratio alone wasn't clipping in older WebKit; explicit padding-bottom
     trick avoids a regression. */
  display: block;
  width: 100%;
  padding-bottom: 100%;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  /* Subtle outer ring in primary color — matches the decorative accent
     on the mockup's category circles without adding any plate weight. */
  outline: 2px solid var(--primary-soft);
  outline-offset: 2px;
  box-shadow: var(--shadow);
  background: var(--primary-soft);
  transition: transform 0.2s ease, outline-color 0.2s ease;
}
.cat-item:hover .circle {
  transform: translateY(-2px);
  outline-color: var(--primary);
}
.cat-item .circle img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.cat-item .label {
  display: block; margin-top: 0.85rem; font-weight: 600; font-size: 0.95rem; color: var(--ink);
}
.cat-item:hover .label { color: var(--primary); }

/* ─── NEWSLETTER ───────────────────────────────────────────── */
.newsletter {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: center;
}
.newsletter-left { display: flex; gap: 1rem; align-items: flex-start; }
.newsletter-icon {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-size: 1.5rem;
}
.newsletter-left h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.newsletter-left p { margin: 0; font-size: 0.9rem; color: var(--muted); }
/* Newsletter form — overrides for the barron-contact ship layout
   so the homepage matches the mockup (email-only, green button). */
.newsletter-right form.barron-contact-form {
  display: flex; gap: 0.5rem; align-items: stretch; margin: 0 0 1rem; padding: 0;
  flex-wrap: nowrap;
}
.newsletter-right form.barron-contact-form .bc-row {
  /* Hide First/Last name fields on the homepage form. The plugin still
     receives the (empty) values; admin Messages page is unaffected. */
  display: none;
}
.newsletter-right form.barron-contact-form > label {
  flex: 1; display: block; margin: 0;
}
.newsletter-right form.barron-contact-form input[type="email"],
.newsletter-right form input[type="email"] {
  width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 0.95rem; font-family: var(--font);
  background: #fff; color: var(--ink); display: block;
}
.newsletter-right form.barron-contact-form input[type="email"]:focus {
  outline: none; border-color: var(--primary);
}
/* Hide the auto-rendered "Email" label text — the placeholder is enough */
.newsletter-right form.barron-contact-form > label {
  font-size: 0; line-height: 0;
}
.newsletter-right form.barron-contact-form > label input[type="email"] {
  font-size: 0.95rem; line-height: 1.4;
}
.newsletter-right form.barron-contact-form .bc-submit,
.newsletter-right form button[type="submit"] {
  flex: none; background: var(--primary); color: #fff;
  padding: 0 1.5rem; border-radius: var(--radius-sm); border: none;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s ease;
}
.newsletter-right form.barron-contact-form .bc-submit:hover,
.newsletter-right form button[type="submit"]:hover {
  background: var(--primary-dark);
}
.newsletter-right form.barron-contact-form .bc-status {
  font-size: 0.85rem; color: var(--muted); margin: 0.5rem 0 0;
}
.trust-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem 1rem;
  font-size: 0.75rem; color: var(--muted);
}
.trust-row .badge { display: flex; align-items: center; gap: 0.4rem; }
.trust-row .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none;
}

/* ─── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark); color: #E6E2D6;
  padding: 3rem 0 1.5rem; margin-top: 4rem;
}
.site-footer a { color: #E6E2D6; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-grid h4 {
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 1rem; color: #C9C3AE;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-brand { line-height: 1.5; }
.footer-brand .brand-name { color: #fff; font-size: 1rem; }
.footer-brand .brand-tag { color: #C9C3AE; }
.footer-bottom {
  text-align: center; padding-top: 1.5rem; font-size: 0.8rem; color: #C9C3AE;
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-list { display: none; }
  .recipe-grid { grid-template-columns: 1fr; }
  .welcome { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: repeat(3, 1fr); }
  .newsletter { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 1.75rem; }
}
@media (max-width: 480px) {
  .cat-row { grid-template-columns: repeat(2, 1fr); }
}
