/* ==========================================================================
   Receitas da Vovó — Página Oficial do Projeto
   Sistema de tokens compartilhado com a diagramação do e-book (Etapa 12/extra)
   ========================================================================== */

:root {
  --paper: #FAF6EE;
  --paper-card: #FFFFFF;
  --paper-raised: #FFF7EC;
  --ink: #2E2013;
  --ink-soft: #5C4A38;
  --ink-faint: #8A7862;
  --olive: #9C4A26;
  --olive-dark: #6E3417;
  --clay: #D98B5F;
  --clay-dark: #B5673B;
  --gold: #C7A24A;
  --line: #E4D6C2;
  --line-soft: #EFE6D8;
  --shadow: 0 12px 32px -16px rgba(59, 46, 34, 0.28);
  --shadow-soft: 0 4px 16px -8px rgba(59, 46, 34, 0.18);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: Seravek, "Gill Sans Nova", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --max-width: 1120px;
  --max-width-text: 760px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #201810;
    --paper-card: #2A2016;
    --paper-raised: #31251A;
    --ink: #F3E8D8;
    --ink-soft: #D4C3AC;
    --ink-faint: #A8937A;
    --olive: #D98860;
    --olive-dark: #B5673B;
    --clay: #E3A97A;
    --clay-dark: #C7834F;
    --gold: #E0BE6F;
    --line: #44372A;
    --line-soft: #382C21;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #201810;
  --paper-card: #2A2016;
  --paper-raised: #31251A;
  --ink: #F3E8D8;
  --ink-soft: #D4C3AC;
  --ink-faint: #A8937A;
  --olive: #D98860;
  --olive-dark: #B5673B;
  --clay: #E3A97A;
  --clay-dark: #C7834F;
  --gold: #E0BE6F;
  --line: #44372A;
  --line-soft: #382C21;
  color-scheme: dark;
}

/* -------------------------------------------------------------------------
   Reset e base
   ------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--olive-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-col {
  max-width: var(--max-width-text);
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
a.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  color: var(--olive);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--olive-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  margin-left: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--olive);
  color: #FFFDF6;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--olive-dark); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--olive); color: var(--olive-dark); }

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */

.hero {
  padding: 96px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-dark);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--olive);
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  margin-bottom: 0.4em;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--paper-raised), var(--paper-card));
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.hero-figure svg { width: 100%; height: 100%; color: var(--olive); }

.stitched-line {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-left: 1px dashed var(--line);
  margin-left: 6%;
}

/* -------------------------------------------------------------------------
   Seções gerais
   ------------------------------------------------------------------------- */

section {
  padding: 88px 0;
  border-top: 1px solid var(--line-soft);
}

section:first-of-type { border-top: none; }

.section-head {
  max-width: var(--max-width-text);
  margin: 0 auto 48px;
  text-align: left;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-head .lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-alt {
  background: var(--paper-card);
}

/* Letter block (Carta da Francisca) */
.letter {
  max-width: var(--max-width-text);
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--ink);
}

.letter p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.6rem;
  float: left;
  line-height: 0.85;
  padding: 8px 10px 0 0;
  color: var(--clay);
}

.letter .signature {
  font-style: italic;
  margin-top: 24px;
  font-size: 1.2rem;
  color: var(--olive-dark);
}

.portrait-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
}

.portrait {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--paper-raised);
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--olive);
  flex-shrink: 0;
  overflow: hidden;
}
.portrait svg { width: 44px; height: 44px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.letter-figure {
  margin: 28px 0;
}
.letter-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: block;
}
.letter-figure figcaption {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
  font-family: var(--font-body);
  margin-top: 10px;
}

.portrait-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}
.portrait-role {
  color: var(--ink-faint);
  font-size: 0.9rem;
}

/* Divider ornament */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 56px 0;
  color: var(--olive);
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 140px;
  background: var(--line);
}
.divider svg { width: 26px; height: 26px; }

/* -------------------------------------------------------------------------
   Grids / cards
   ------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

.card-icon {
  width: 42px;
  height: 42px;
  color: var(--olive);
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin-bottom: 0;
}

.symptom-card {
  text-align: left;
  border-top: 3px solid var(--olive);
}
.symptom-card:nth-child(2) { border-top-color: var(--clay); }
.symptom-card:nth-child(3) { border-top-color: var(--gold); }
.symptom-card:nth-child(4) { border-top-color: var(--olive-dark); }
.symptom-card:nth-child(5) { border-top-color: var(--clay-dark); }

/* Preview / sumário */
.preview-frame {
  background: var(--paper-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow);
  max-width: var(--max-width-text);
  margin: 0 auto;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.toc-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px dotted var(--line);
  font-size: 0.98rem;
}
.toc-num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--clay);
  width: 1.6em;
  flex-shrink: 0;
}
.toc-title { color: var(--ink); flex: 1; }
.toc-tag {
  color: var(--ink-faint);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Recipe card */
.recipe-card {
  background: var(--paper-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: var(--max-width-text);
  margin: 0 auto;
}
.recipe-head {
  background: var(--olive);
  color: #FFFDF6;
  padding: 22px 32px;
}
.recipe-head .recipe-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}
.recipe-head h3 {
  color: #FFFDF6;
  margin: 4px 0 0;
  font-size: 1.5rem;
}
.recipe-body {
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
}
.recipe-body h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.6em;
}
.recipe-body ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--ink-soft);
}
.recipe-body li { margin-bottom: 0.4em; }
.recipe-freq {
  border-top: 1px solid var(--line-soft);
  padding: 18px 32px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  background: var(--paper-card);
}
.recipe-freq strong { color: var(--ink); }

/* Boxes */
.box {
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 32px auto;
  max-width: var(--max-width-text);
  border: 1px solid var(--line-soft);
  background: var(--paper-card);
}
.box--aviso { border-left: 4px solid var(--clay); }
.box--tradicao { border-left: 4px solid var(--gold); font-style: italic; font-family: var(--font-display); }
.box--dica { border-left: 4px solid var(--olive); }
.box h4 {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 0.5em;
}
.box p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------------------
   Confiança / Comunidade / Transparência strip
   ------------------------------------------------------------------------- */

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.trust-item {
  text-align: center;
  padding: 24px 12px;
}
.trust-item svg {
  width: 34px; height: 34px;
  color: var(--olive);
  margin: 0 auto 12px;
}
.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.trust-item span {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* -------------------------------------------------------------------------
   Apoio voluntário
   ------------------------------------------------------------------------- */

.support-panel {
  max-width: var(--max-width-text);
  margin: 0 auto;
  background: var(--paper-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow);
}

.support-cta {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.support-note {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-top: 16px;
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   FAQ (accordion)
   ------------------------------------------------------------------------- */

.faq-list {
  max-width: var(--max-width-text);
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--line-soft);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-question .faq-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: var(--olive);
  transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 4px 22px;
  color: var(--ink-soft);
  max-width: 66ch;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 32px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-footer { background: #17120C; }
}
:root[data-theme="dark"] .site-footer { background: #17120C; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .brand-name { color: var(--paper); font-size: 1.2rem; }
.footer-brand p {
  color: color-mix(in srgb, var(--paper) 65%, transparent);
  font-size: 0.92rem;
  max-width: 34ch;
  margin-top: 12px;
}

.footer-col h4 {
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: color-mix(in srgb, var(--paper) 78%, transparent);
  text-decoration: none;
  font-size: 0.94rem;
}
.footer-col a:hover { color: var(--paper); }

.footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
}

/* -------------------------------------------------------------------------
   Reveal on scroll
   ------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* -------------------------------------------------------------------------
   Responsivo
   ------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-figure { max-width: 380px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  section { padding: 64px 0; }
  .main-nav { position: fixed; inset: 68px 0 0 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 32px 24px; gap: 20px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .main-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .recipe-body { grid-template-columns: 1fr; }
  .support-panel, .preview-frame { padding: 28px; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
}
