/* nutrimacro.in — India recipe pages
 * PREMIUM light editorial theme — mirrors /assets/css/premium.css so the
 * 4,500+ recipe pages match the nutrimacro.ie "premium" look without editing
 * the recipe HTML. Existing class names are preserved; only the styling changes.
 * Mobile-first (95% of Indian traffic is mobile). Noto Sans Devanagari kept for Hindi.
 */

/* ─── Premium design tokens (mirrors premium.css :root) ───────────────── */
:root {
  --font-display: "Canela", "Ivy Mode", "Editorial New", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", "Noto Sans Devanagari", Roboto, system-ui, sans-serif;

  --page-bg: #FCFAF5;
  --surface: #FFFFFF;
  --surface-soft: #F8F5EF;
  --surface-dark: #0A0A0A;

  --text-primary: #181818;
  --text-secondary: #5B544B;
  --text-muted: #9B948B;
  --on-dark: #F7F5F0;
  --on-dark-sub: rgba(255,255,255,0.66);

  --accent-primary: #C58A3A;
  --accent-secondary: #D8A94B;
  --accent-dark: #7B4A26;
  --accent-soft: rgba(197,138,58,0.12);

  --success: #34B56A;
  --success-soft: rgba(52,181,106,0.12);
  --warning: #D97706;
  --danger: #DC2626;

  --border-soft: rgba(24,24,24,0.08);
  --border-warm: rgba(197,138,58,0.18);

  --shadow-xs: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-sm: 0 8px 24px rgba(0,0,0,0.06);
  --shadow-md: 0 16px 48px rgba(0,0,0,0.08);
  --shadow-lg: 0 28px 80px rgba(0,0,0,0.12);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --cta-gradient: linear-gradient(135deg, #D8A94B 0%, #B67A36 100%);
  --page-gradient: linear-gradient(180deg, #FFFFFF 0%, #FCFAF5 45%, #F7F1E8 100%);
}

/* ─── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--page-bg);
  background-image: var(--page-gradient);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-primary); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* Skip-to-content link (a11y) — hidden until keyboard-focused */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--accent-primary); color: #fff; padding: 0.6rem 1rem; font-weight: 700; border-radius: 0 0 8px 0; text-decoration: none; }
.skip-link:focus { left: 0; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Nav (premium: sticky, blurred light, dark text) ───────────────── */
.nav {
  background: rgba(252,250,245,0.82);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--text-primary); }
.logo-mark { width: 30px; height: 30px; flex-shrink: 0; border-radius: 7px; }
.logo span { color: var(--accent-primary); font-weight: 700; }
.nav-links {
  display: flex;
  gap: 1.85rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.94rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--cta-gradient) !important;
  color: #1a1206 !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: var(--radius-pill);
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.9; color: #1a1206 !important; }

/* ─── Footer (premium: dark band) ───────────────────────────────── */
.footer {
  background: var(--surface-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--on-dark-sub);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer h4 { color: #fff; font-size: 0.88rem; font-weight: 700; margin-bottom: 1rem; }
.footer a {
  color: var(--on-dark-sub);
  display: block;
  padding: 0.2rem 0;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

/* ─── Hindi / Tamil text support ─────────────────────────────────── */
.hi { font-family: "Noto Sans Devanagari", var(--font-body); }

/* ─── Recipes hub / index — card grid (generated pages) ───────────── */
main.container > h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0.5rem 0 0.5rem;
  color: var(--text-primary);
}
main.container > p.lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 70ch;
  margin-bottom: 1.5rem;
}

.recipe-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2.5rem;
}
.recipe-list .rcard { margin: 0; }
.recipe-list .rcard > a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.recipe-list .rcard > a:hover {
  border-color: var(--border-warm);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}
/* Emoji "thumbnail" tile (stands in for a photo) */
.rcard-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 116px;
  font-size: 2.9rem;
  line-height: 1;
  background: radial-gradient(circle at 32% 28%, rgba(216,169,75,0.30), rgba(197,138,58,0.10));
  border-bottom: 1px solid var(--border-soft);
}
.rcard-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; padding: 0.8rem 0.95rem; }
.rcard-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; color: var(--text-primary); }
.rcard-sub { font-size: 0.8rem; color: var(--text-muted); }
.rcard-count {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  background: rgba(24,24,24,0.55);
  backdrop-filter: blur(2px);
  border-radius: var(--radius-pill);
  padding: 0.16rem 0.55rem;
}

/* Recipe search box (recipes hub) */
.recipe-search {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
  margin: 0.5rem 0 1.5rem;
  outline: none;
}
.recipe-search::placeholder { color: var(--text-muted); }
.recipe-search:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-soft); }
.rs-none { color: var(--text-secondary); font-style: italic; margin: 1rem 0 2rem; }

/* Recipe detail — hero "image" banner (large emoji on a themed gradient) */
.rhero {
  height: 200px;
  border-radius: var(--radius-lg);
  margin: 0.25rem 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 28%, var(--hb, #E2BF5A), var(--ha, #C58A3A));
  box-shadow: var(--shadow-sm);
}
.rhero-emoji { font-size: 6rem; line-height: 1; filter: drop-shadow(0 5px 12px rgba(0,0,0,0.22)); }

/* Real CC/Public-domain dish photos */
.rcard-photo, .rhero-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.img-credit {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: -0.9rem 0 1.1rem;
}
.img-credit a { color: var(--accent-primary); }

/* ─── Recipe detail — appetising reading experience ─────────────────── */
article { color: var(--text-secondary); }
.crumbs { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.85rem; }
.crumbs a { color: var(--accent-primary); }
.crumbs a:hover { color: var(--accent-dark); }
article h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0.3rem 0 0.5rem;
  color: var(--text-primary);
}
article h1 small { color: var(--text-muted); font-weight: 400; font-size: 1.05rem; }
.meta { color: var(--accent-primary); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.3rem; }
.times { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1.1rem; }
article > p { color: #2c2a26; line-height: 1.75; font-size: 1.05rem; }

article h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3.5vw, 1.7rem);
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 2.2rem 0 1.1rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--accent-primary);
  line-height: 1.2;
}

/* Ingredients — chip grid (scannable, not a wall of bullets) */
.recipe-ing {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.6rem;
}
.recipe-ing li {
  position: relative; padding: 0.75rem 0.9rem 0.75rem 1.95rem;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.94rem; line-height: 1.5;
  box-shadow: var(--shadow-xs);
}
.recipe-ing li::before {
  content: ''; position: absolute; left: 0.85rem; top: 1.1rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cta-gradient);
}

/* Steps — numbered cards with gold badges (inviting, easy to follow) */
.recipe-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.recipe-steps li {
  counter-increment: step; position: relative;
  padding: 1rem 1.15rem 1rem 3.7rem; margin-bottom: 0.7rem;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); line-height: 1.7; color: #2c2a26; font-size: 1rem;
  box-shadow: var(--shadow-xs);
}
.recipe-steps li::before {
  content: counter(step); position: absolute; left: 0.85rem; top: 0.85rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--cta-gradient); color: #1a1206;
  font-weight: 800; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-xs);
}

/* Nutrition table */
.macro-table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 0.4rem 0 1rem;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xs);
}
.macro-table th {
  background: var(--surface-soft); color: var(--accent-dark); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em; padding: 0.7rem 0.4rem; font-weight: 800;
  border-bottom: 1px solid var(--border-soft);
}
.macro-table td {
  text-align: center; padding: 0.8rem 0.4rem; font-weight: 700; color: var(--text-primary);
  border-top: 1px solid var(--border-soft);
}

/* CTA + disclaimer */
.cta {
  margin-top: 2rem; padding: 1.15rem 1.3rem;
  background: var(--accent-soft); border: 1px solid var(--border-warm);
  border-radius: var(--radius-md); color: var(--text-primary); line-height: 1.6;
}
.cta a { font-weight: 700; color: var(--accent-primary); }
.cta a:hover { color: var(--accent-dark); }
.disclaimer { font-size: 0.82rem; color: var(--text-muted); font-style: italic; }

/* ─── Recipe detail v2 — meta cards, pills, checkboxes, callouts ─────── */
.lead-desc { color: var(--text-secondary) !important; font-size: 1.05rem !important; line-height: 1.7; margin: 0.5rem 0 1.1rem; }

/* Diet / difficulty pills */
.recipe-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1.1rem; }
.pill { font-size: 0.8rem; font-weight: 700; padding: 0.3rem 0.75rem; border-radius: var(--radius-pill);
  background: var(--surface-soft); border: 1px solid var(--border-soft); color: var(--text-secondary); }
.pill-veg, .pill-vegan { background: var(--success-soft); border-color: rgba(52,181,106,0.30); color: #1f7a45; }
.pill-nonveg { background: rgba(220,38,38,0.10); border-color: rgba(220,38,38,0.28); color: #b3261e; }
.pill-gf { background: var(--accent-soft); border-color: var(--border-warm); color: var(--accent-dark); }

/* Meta info cards (prep / cook / total / serves) */
.recipe-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 0.6rem; margin: 0 0 1.4rem; }
.info-card { display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.9rem 0.5rem; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.ic-emoji { font-size: 1.35rem; }
.ic-val { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); font-size: 1.05rem; }
.ic-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Print / save button (premium pill) */
.btn-print { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 1.5rem;
  padding: 0.65rem 1.3rem; background: var(--cta-gradient); color: #1a1206;
  border: 1px solid transparent; border-radius: var(--radius-pill); font-weight: 700; font-size: 0.9rem;
  cursor: pointer; box-shadow: var(--shadow-sm); }
.btn-print:hover { opacity: 0.92; }

/* Ingredient checkboxes (tick off while shopping/cooking) */
.recipe-ing li { padding-left: 0.9rem !important; }
.recipe-ing li::before { display: none; }
.recipe-ing li label { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }
.recipe-ing li input[type="checkbox"] { appearance: none; -webkit-appearance: none;
  flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; border-radius: 6px;
  border: 2px solid var(--accent-primary); background: transparent; cursor: pointer; position: relative; transition: background .15s; }
.recipe-ing li input[type="checkbox"]:checked { background: var(--cta-gradient); border-color: var(--accent-primary); }
.recipe-ing li input[type="checkbox"]:checked::after { content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; color: #1a1206; font-size: 0.8rem; font-weight: 900; }
.recipe-ing li input[type="checkbox"]:checked + span { color: var(--text-muted); text-decoration: line-through; }

/* Tips / cultural-notes callout cards */
.callout { margin: 1.6rem 0; padding: 0.4rem 1.3rem 1.1rem; border-radius: var(--radius-md); border: 1px solid; }
.callout h2 { border: 0 !important; padding: 0 !important; margin: 1rem 0 0.4rem !important; font-size: 1.2rem !important; }
.callout p { color: var(--text-secondary); line-height: 1.65; }
.callout-tip { background: rgba(217,119,6,0.06); border-color: rgba(217,119,6,0.22); }
.callout-culture { background: var(--accent-soft); border-color: var(--border-warm); }

@media (max-width: 480px) {
  .recipe-ing { grid-template-columns: 1fr; }
  .rhero { height: 160px; }
  .rhero-emoji { font-size: 4.5rem; }
  .recipe-steps li { padding-left: 3.4rem; }
  .recipe-list { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .rcard-emoji { height: 92px; font-size: 2.3rem; }
  .rcard-name { font-size: 0.92rem; }
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

/* Print: clean white sheet, hide chrome/ads */
@media print {
  body { background: #fff !important; background-image: none !important; color: #111 !important; }
  .nav, .footer, .btn-print, .adsbygoogle, .crumbs, .cta, .img-credit { display: none !important; }
  .rhero { height: 220px; }
  article, article p, .recipe-steps li, .recipe-ing li, .info-card, .macro-table td { color: #111 !important; background: #fff !important; border-color: #ddd !important; }
  article h1, article h2, .ic-val, .macro-table th { color: #111 !important; }
}

/* AdSense not configured yet (placeholder pub id ca-pub-0000…). Hide auto-format
   ad slots until a real AdSense publisher id is wired in. */
ins.adsbygoogle { display: none !important; }
