/* App-specific styles — layered on top of theme.css variables */

/* NAV */
.app-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 8vw;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-brand {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--fg);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-link {
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--fg); }

/* WEEK BAR */
.week-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 8vw;
}
.week-bar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.week-bar-label {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-weight: 500;
  white-space: nowrap;
}
.week-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.week-tab {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.week-tab:hover { border-color: var(--accent); color: var(--accent); }
.week-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* RECIPES */
.recipes-container {
  padding: 3rem 8vw;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  margin-bottom: 2rem;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
}
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* RECIPE CARD */
.recipe-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.recipe-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}
.recipe-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.recipe-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}
.recipe-servings {
  font-size: 0.75rem;
  color: var(--fg-muted);
}
.recipe-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}
.recipe-macros {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.macro {
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--bg-alt);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--fg-muted);
}
.btn-view {
  margin-top: auto;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
.btn-view:hover { background: #b45309; }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-alt);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--border); }

.recipe-detail-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0.75rem 0 1.25rem;
  color: var(--fg);
}
.recipe-macros-lg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.macro-stat {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}
.macro-num {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
}
.macro-key {
  display: block;
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}
.recipe-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.recipe-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.ingredient-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ingredient-item {
  font-size: 0.88rem;
  color: var(--fg);
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.ingredient-qty {
  color: var(--accent);
  font-weight: 600;
  min-width: 80px;
  font-size: 0.82rem;
}
.btn-grocery {
  margin-top: 1rem;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.btn-grocery:hover { background: #b45309; }
.instruction-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  counter-reset: steps;
}
.instruction-item {
  font-size: 0.88rem;
  color: var(--fg);
  padding-left: 2rem;
  position: relative;
  line-height: 1.6;
}
.instruction-item::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0.1rem;
}

/* GROCERY LIST */
.grocery-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.grocery-copy-row {
  margin-bottom: 1.5rem;
}
.btn-copy {
  background: var(--fg);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.grocery-category { margin-bottom: 1.25rem; }
.grocery-cat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}
.grocery-items { list-style: none; }
.grocery-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.88rem;
  padding: 0.35rem 0;
  color: var(--fg);
}
.grocery-check {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.grocery-qty {
  color: var(--accent);
  font-weight: 600;
  min-width: 90px;
  font-size: 0.8rem;
}

/* SUBSCRIBE SECTION */
.subscribe-section {
  background: var(--fg);
  padding: 6rem 8vw;
  text-align: center;
}
.subscribe-inner { max-width: 600px; margin: 0 auto; }
.subscribe-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.subscribe-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.1;
}
.subscribe-sub {
  font-size: 1rem;
  color: #A8A29E;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.subscribe-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
}
.price-num {
  font-family: 'Syne', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
}
.price-per { font-size: 1.5rem; color: #A8A29E; }
.btn-subscribe {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 2.5rem;
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: background 0.15s;
}
.btn-subscribe:hover { background: #b45309; }
.subscribe-soon { color: #78716C; font-size: 0.9rem; margin-bottom: 1.5rem; }
.subscribe-features {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #A8A29E;
}

/* FOOTER */
.app-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 8vw;
  text-align: center;
}
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-brand {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--fg);
}
.footer-tagline { font-size: 0.85rem; color: var(--fg-muted); margin-bottom: 1rem; }
.footer-legal { font-size: 0.75rem; color: #A8A29E; }

/* RESPONSIVE */
@media (max-width: 700px) {
  .recipe-macros-lg { grid-template-columns: repeat(2, 1fr); }
  .recipe-sections { grid-template-columns: 1fr; }
  .subscribe-features { flex-direction: column; align-items: center; }
  .nav-links .nav-link { display: none; }
  .nav-links .nav-link:last-child { display: block; }
}