/* ============================================================
   LUHA MASSAS — 150 Receitas Saudáveis
   Design tokens extraídos da marca real (logo + fachada):
   amarelo #FFDF01, dourado #FDAE37, vermelho #D20F17
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500;1,9..144,600&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  /* cores da marca */
  --luha-yellow: #FFDF01;
  --luha-yellow-soft: #FFF1A8;
  --luha-gold: #FDAE37;
  --luha-gold-deep: #E08A15;
  --luha-red: #D20F17;
  --luha-red-deep: #9C0A10;

  /* neutros quentes */
  --cream: #FFFBF0;
  --cream-alt: #FFF3D6;
  --paper: #FFFFFF;
  --coffee: #2B1710;
  --coffee-70: #5A4132;
  --coffee-45: #8C7460;
  --line: #EBDFC2;

  /* tipografia */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  /* forma */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-tag: 0 10px 24px -12px rgba(43, 23, 16, 0.35);
  --shadow-soft: 0 2px 10px rgba(43, 23, 16, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--coffee);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- divisor de trigo (assinatura visual) ---------- */

.wheat-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 0;
  color: var(--luha-gold-deep);
  opacity: 0.85;
}
.wheat-divider svg { width: 22px; height: 22px; }
.wheat-divider::before,
.wheat-divider::after {
  content: "";
  height: 1px;
  width: 42px;
  background: var(--luha-gold);
  opacity: 0.55;
}

.wheat-row-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'%3E%3Cg fill='none' stroke='%23E08A15' stroke-width='1.3' opacity='0.5'%3E%3Cpath d='M10 30 L10 8'/%3E%3Cpath d='M10 10 L4 14'/%3E%3Cpath d='M10 10 L16 14'/%3E%3Cpath d='M10 15 L4 19'/%3E%3Cpath d='M10 15 L16 19'/%3E%3Cpath d='M10 20 L4 24'/%3E%3Cpath d='M10 20 L16 24'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 60px 20px;
}

/* ---------- topbar (visível só dentro de um capítulo) ---------- */

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.topbar.active { display: block; }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
}
.topbar-brand img {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--luha-gold);
}
.topbar-brand em {
  font-style: normal;
  font-weight: 500;
  color: var(--coffee-45);
  font-family: var(--font-body);
  font-size: 12.5px;
}

/* ---------- header / hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--luha-yellow) 0%, var(--luha-yellow) 62%, var(--cream) 100%);
  padding: 28px 0 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23D20F17' stroke-width='1' opacity='0.07'%3E%3Cpath d='M20 120 L20 40'/%3E%3Cpath d='M20 45 L8 53'/%3E%3Cpath d='M20 45 L32 53'/%3E%3Cpath d='M20 55 L8 63'/%3E%3Cpath d='M20 55 L32 63'/%3E%3Cpath d='M20 65 L8 73'/%3E%3Cpath d='M20 65 L32 73'/%3E%3Cpath d='M110 110 L110 30'/%3E%3Cpath d='M110 35 L98 43'/%3E%3Cpath d='M110 35 L122 43'/%3E%3Cpath d='M110 45 L98 53'/%3E%3Cpath d='M110 45 L122 53'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px 260px;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.brand-mark {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  margin: 0 auto 14px;
  box-shadow: var(--shadow-tag);
  border: 3px solid var(--paper);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--luha-red-deep);
  margin: 0 0 6px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.03;
  margin: 0 0 10px;
  color: var(--coffee);
}

.hero p.sub {
  font-size: 16px;
  color: var(--coffee-70);
  max-width: 480px;
  margin: 0 auto 18px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin: 8px 0 22px;
  flex-wrap: wrap;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--luha-red);
}
.hero-stats .stat span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--coffee-70);
}

/* ---------- grade de capítulos (etiquetas de padaria) ---------- */

.chapters {
  padding: 6px 0 40px;
}

.chapters-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  text-align: center;
  margin: 4px 0 20px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (min-width: 560px) {
  .chapter-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.chapter-tag {
  display: block;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 14px 14px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.chapter-tag:nth-child(odd) { transform: rotate(-0.6deg); }
.chapter-tag:nth-child(even) { transform: rotate(0.6deg); }
.chapter-tag:hover,
.chapter-tag:focus-visible {
  transform: translateY(-3px) rotate(0deg);
  box-shadow: var(--shadow-tag);
  outline: none;
}
.chapter-tag:focus-visible { outline: 2px solid var(--luha-red); outline-offset: 2px; }

.chapter-tag .num-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--luha-yellow);
  border: 2px solid var(--luha-gold-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--luha-red-deep);
  margin-bottom: 10px;
}

.chapter-tag h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.2;
}

.chapter-tag .count {
  font-size: 12px;
  color: var(--coffee-45);
  font-weight: 500;
}

.chapter-tag .guia-flag {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--luha-red);
  font-weight: 600;
}

/* ---------- view de receitas (por capítulo) ---------- */

.chapter-view { display: none; padding: 18px 0 60px; }
.chapter-view.active { display: block; }
.chapters.hidden { display: none; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--luha-red-deep);
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 6px;
}
.back-btn:hover { text-decoration: underline; }

.chapter-view-header {
  margin-bottom: 18px;
}
.chapter-view-header .num-badge-lg {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--luha-yellow);
  border: 2px solid var(--luha-gold-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  color: var(--luha-red-deep);
  margin-bottom: 10px;
}
.chapter-view-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 4px;
}
.chapter-view-header p {
  color: var(--coffee-70);
  font-size: 14px;
  margin: 0;
}

/* ---------- cartão de receita (accordion) ---------- */

.recipe-list { display: flex; flex-direction: column; gap: 10px; }

.recipe-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.recipe-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}
.recipe-card summary::-webkit-details-marker { display: none; }

.recipe-card .r-num {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cream-alt);
  color: var(--luha-red-deep);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

.recipe-card .r-name { flex: 1 1 auto; }

.recipe-card .chev {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  color: var(--luha-gold-deep);
  transition: transform 0.2s ease;
}
.recipe-card[open] .chev { transform: rotate(180deg); }

.recipe-body {
  padding: 0 16px 20px;
  border-top: 1px dashed var(--line);
}

.recipe-body .r-photo {
  margin: 14px 0 4px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--luha-yellow-soft), var(--cream-alt));
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--luha-gold-deep);
  font-size: 12px;
  gap: 8px;
  overflow: hidden;
}
.recipe-body .r-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.recipe-body .r-photo svg { width: 22px; height: 22px; }

.r-section { margin-top: 16px; }
.r-section h4 {
  font-family: var(--font-body);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--luha-red-deep);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.r-section h4 svg { width: 14px; height: 14px; }

.r-section ul, .r-section ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--coffee);
}
.r-section ul { list-style: none; padding-left: 2px; }
.r-section ul li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 5px;
}
.r-section ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--luha-gold);
  border-radius: 2px;
  transform: rotate(45deg);
}
.r-section ol li { margin-bottom: 6px; padding-left: 4px; }

.r-benefit {
  background: var(--cream-alt);
  border-left: 3px solid var(--luha-red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--coffee-70);
}
.r-benefit b { color: var(--coffee); }

.r-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.r-table caption {
  text-align: left;
  font-size: 12px;
  color: var(--coffee-45);
  margin-bottom: 6px;
  caption-side: top;
}
.r-table td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--line);
}
.r-table td:first-child { color: var(--coffee-70); }
.r-table td:last-child { text-align: right; font-weight: 600; }
.r-table tr:last-child td { border-bottom: none; }

/* ---------- guia de ingredientes (capítulo 6) ---------- */

.guide-list { display: flex; flex-direction: column; gap: 10px; }
.guide-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.guide-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-card h3 .r-num {
  width: 26px; height: 26px; font-size: 12px;
  background: var(--cream-alt); color: var(--luha-red-deep);
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 700;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  font-size: 13.5px;
  margin-bottom: 10px;
}
.guide-grid div b {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--coffee-45);
  margin-bottom: 2px;
  font-weight: 700;
}
.guide-card .r-benefit { margin-top: 10px; }
.guide-card .sub-note {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--coffee-70);
  font-style: italic;
}

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 30px 20px 44px;
  background: var(--luha-yellow-soft);
}
footer .brand-mark { width: 58px; height: 58px; margin-bottom: 12px; }
footer .fname {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 4px;
}
footer .ftag { font-size: 13px; color: var(--coffee-70); margin: 0 0 14px; }
footer .insta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--luha-red-deep);
  box-shadow: var(--shadow-soft);
}

/* ---------- loading / util ---------- */

.loading {
  text-align: center;
  padding: 40px 0;
  color: var(--coffee-45);
  font-size: 14px;
}

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