/* ============================================================
   MUQUIRANA — tabloide popular × encarte de supermercado
   ============================================================ */
:root {
  --paper: #f4ecd8;
  --paper-dark: #e9dfc4;
  --ink: #1a1510;
  --red: #c8102e;
  --red-dark: #9a0c23;
  --yellow: #ffd100;
  --green: #1e7a3c;
  --dark: #141210;
  --dark-2: #201c17;
  --receipt: #fffdf5;
  --font-display: "Alfa Slab One", serif;
  --font-body: "Archivo Narrow", sans-serif;
  --font-mono: "Courier Prime", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.55;
  /* textura de papel-jornal: ruído + fibra */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(0,0,0,.035) 0 1px, transparent 1px),
    radial-gradient(circle at 74% 63%, rgba(0,0,0,.03) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(120,90,40,.05), rgba(120,90,40,0) 40%);
  background-size: 7px 7px, 11px 11px, 100% 100%;
}

::selection { background: var(--yellow); color: var(--ink); }

input[type="number"] {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  padding: .55rem .7rem;
  border: 2px solid var(--ink);
  background: var(--receipt);
  color: var(--ink);
  width: 100%;
  border-radius: 0;
}
input[type="number"]:focus {
  outline: 3px solid var(--yellow);
  outline-offset: 1px;
}
label { display: block; font-weight: 700; margin-bottom: .9rem; }
label small { display: block; font-weight: 400; font-style: italic; opacity: .75; margin-top: .2rem; }
label input { margin-top: .3rem; }

/* ============ MASTHEAD ============ */
.masthead {
  border-bottom: 4px double var(--ink);
  padding: 0 1rem 0;
  text-align: center;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(0,0,0,.025) 14px 15px),
    var(--paper);
}
.masthead-top {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding: .45rem 0;
  font-weight: 700;
}
.masthead-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 12vw, 8.5rem);
  line-height: 1.02;
  letter-spacing: .01em;
  margin: 1rem 0 .2rem;
  text-shadow: 4px 4px 0 var(--yellow);
}
.masthead-tm { font-size: .25em; vertical-align: super; }
.masthead-sub {
  font-size: clamp(.95rem, 2.5vw, 1.2rem);
  font-weight: 600;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink);
}
.masthead-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .2rem;
  padding: .55rem 0;
}
.masthead-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .82rem;
  padding: .35rem .8rem;
  border: 2px solid transparent;
  transition: all .15s;
}
.masthead-nav a:hover {
  background: var(--ink);
  color: var(--yellow);
  transform: rotate(-1.5deg);
}

/* ============ MANIFESTO ============ */
.manifesto {
  padding: 9rem 1.2rem 4rem;
  border-bottom: 4px solid var(--ink);
  overflow: hidden;
}
.manifesto-inner {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
}
.manifesto-headline {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5.2vw, 3.4rem);
  line-height: 1.12;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  animation: rise .7s ease both;
}
.highlight-yellow {
  background: var(--yellow);
  padding: 0 .18em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.manifesto-text {
  font-size: 1.15rem;
  max-width: 62ch;
  animation: rise .7s .15s ease both;
}
.manifesto-tickets {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.8rem;
}
.ticket {
  border: 2px dashed var(--ink);
  background: var(--receipt);
  padding: .5rem .9rem;
  font-weight: 700;
  font-size: .92rem;
  transform: rotate(-.6deg);
  animation: rise .6s .3s ease both;
}
.ticket:nth-child(2) { transform: rotate(.8deg); animation-delay: .4s; }
.ticket:nth-child(3) { transform: rotate(-1deg); animation-delay: .5s; }

.stamp {
  position: absolute;
  font-family: var(--font-display);
  color: var(--red);
  border: 4px solid var(--red);
  border-radius: 10px;
  padding: .5rem .9rem;
  text-align: center;
  line-height: 1.05;
  text-transform: uppercase;
  transform: rotate(12deg);
  opacity: .85;
  mask-image: radial-gradient(circle at 30% 40%, black 60%, rgba(0,0,0,.55) 100%);
  animation: stampIn .5s .6s cubic-bezier(.2, 2.2, .4, 1) both;
}
.stamp-hero {
  top: -8rem;
  right: 0;
  font-size: clamp(.8rem, 2.2vw, 1.25rem);
  z-index: 2;
  background: var(--paper);
}
@media (max-width: 640px) {
  .stamp-hero { right: auto; left: 0; }
}
@keyframes stampIn {
  from { transform: rotate(12deg) scale(2.4); opacity: 0; }
  to   { transform: rotate(12deg) scale(1); opacity: .85; }
}
@keyframes rise {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ============ SECTIONS ============ */
.section {
  padding: 4.2rem 1.2rem;
  border-bottom: 4px solid var(--ink);
}
.section-head { max-width: 880px; margin: 0 auto 2.4rem; }
.section-kicker {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  letter-spacing: .14em;
  font-size: .72rem;
  text-transform: uppercase;
  padding: .3rem .7rem;
  transform: rotate(-.8deg);
  margin-bottom: .9rem;
}
.section-kicker-light { background: var(--yellow); color: var(--ink); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.6vw, 2.9rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.underline-red {
  background-image: linear-gradient(transparent 72%, var(--red) 72% 92%, transparent 92%);
  background-size: 100% 100%;
}
.section-lead { font-size: 1.1rem; max-width: 68ch; }

.section-dark {
  background: var(--dark);
  color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,209,0,.05), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(200,16,46,.08), transparent 40%);
}
.section-dark .section-title { color: var(--paper); }
.section-yellow {
  background: var(--yellow);
  background-image: repeating-linear-gradient(-45deg, transparent 0 26px, rgba(0,0,0,.04) 26px 52px);
}

/* ============ REGRAS DE IMPORTAÇÃO ============ */
.rules-grid {
  max-width: 880px;
  margin: 0 auto 2.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.rule-card {
  border: 3px solid var(--ink);
  background: var(--receipt);
  padding: 1.1rem 1rem 1.2rem;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.rule-card:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
.rule-badge {
  display: inline-block;
  font-family: var(--font-display);
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: .15rem .55rem;
  font-size: .85rem;
  margin-bottom: .6rem;
  transform: rotate(-1.2deg);
}
.rule-badge-red { background: var(--red); color: #fff; }
.rule-badge-dark { background: var(--ink); color: var(--yellow); }

/* ============ CALCULADORAS ============ */
.calc-wrap {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: start;
}
@media (max-width: 720px) { .calc-wrap { grid-template-columns: 1fr; } }

.calc-form {
  border: 3px solid var(--ink);
  background: var(--receipt);
  padding: 1.4rem;
  box-shadow: 8px 8px 0 rgba(0,0,0,.9);
}
.calc-form-dark {
  background: var(--dark-2);
  border-color: var(--yellow);
  color: var(--paper);
  box-shadow: 8px 8px 0 rgba(255,209,0,.35);
}
.calc-form-dark input { background: #0e0c0a; color: var(--yellow); border-color: var(--yellow); }
.calc-form-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
  text-transform: uppercase;
}
.btn-main, .btn-secondary {
  font-family: var(--font-display);
  font-size: 1.05rem;
  padding: .8rem 1.4rem;
  border: 3px solid var(--ink);
  background: var(--red);
  color: #fff;
  cursor: pointer;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: .03em;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .1s, box-shadow .1s;
}
.btn-main:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-main:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-secondary {
  background: var(--ink);
  color: var(--yellow);
  width: auto;
  font-size: .9rem;
  padding: .6rem 1.2rem;
}
.btn-secondary:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 rgba(0,0,0,.4); }

/* ============ CUPOM FISCAL ============ */
.receipt {
  font-family: var(--font-mono);
  background: var(--receipt);
  color: var(--ink);
  padding: 1.4rem 1.2rem 2rem;
  font-size: .92rem;
  line-height: 1.5;
  position: relative;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.28));
  /* serrilha de cupom */
  --notch: 12px;
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 8px),
    95% 100%, 90% calc(100% - 8px), 85% 100%, 80% calc(100% - 8px),
    75% 100%, 70% calc(100% - 8px), 65% 100%, 60% calc(100% - 8px),
    55% 100%, 50% calc(100% - 8px), 45% 100%, 40% calc(100% - 8px),
    35% 100%, 30% calc(100% - 8px), 25% 100%, 20% calc(100% - 8px),
    15% 100%, 10% calc(100% - 8px), 5% 100%, 0 calc(100% - 8px)
  );
}
.receipt-center { max-width: 460px; margin: 2rem auto 0; }
.receipt-placeholder {
  text-align: center;
  opacity: .5;
  font-style: italic;
  padding: 2.5rem 0;
}
.receipt.printed { animation: printOut .55s ease both; }
@keyframes printOut {
  from { transform: translateY(-14px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.receipt h4 {
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: .12em;
  border-bottom: 1px dashed var(--ink);
  padding-bottom: .5rem;
  margin-bottom: .7rem;
}
.receipt .r-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.receipt .r-line span:last-child { white-space: nowrap; }
.receipt .r-sep { border-top: 1px dashed var(--ink); margin: .55rem 0; }
.receipt .r-total { font-weight: 700; font-size: 1.06rem; }
.receipt .r-bad { color: var(--red); font-weight: 700; }
.receipt .r-good { color: var(--green); font-weight: 700; }
.receipt .r-verdict {
  margin-top: .8rem;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid currentColor;
  padding: .5rem;
  transform: rotate(-1deg);
}
.receipt .r-note { font-size: .8rem; opacity: .75; margin-top: .6rem; font-style: italic; }
.receipt .r-barcode {
  margin-top: 1rem;
  height: 34px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 5px,
    var(--ink) 5px 8px, transparent 8px 10px,
    var(--ink) 10px 11px, transparent 11px 15px);
}

/* ============ COMPARADOR ============ */
.compare-box {
  max-width: 880px;
  margin: 2.4rem auto 0;
  border: 3px dashed var(--ink);
  padding: 1.4rem;
  background: var(--paper-dark);
}
.compare-title { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .4rem; }
.compare-lead { margin-bottom: 1rem; }
.compare-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.compare-row label { flex: 1 1 220px; margin-bottom: 0; }
.verdict {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1.08rem;
}
.verdict .stamp-inline {
  display: inline-block;
  font-family: var(--font-display);
  border: 3px solid currentColor;
  border-radius: 8px;
  padding: .3rem .8rem;
  transform: rotate(-2deg);
  margin-right: .6rem;
  animation: stampIn .4s cubic-bezier(.2,2.2,.4,1) both;
}
.verdict-good { color: var(--green); }
.verdict-bad { color: var(--red); }

/* ============ AVISO ============ */
.warning-strip {
  max-width: 880px;
  margin: 2.4rem auto 0;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  border: 8px solid transparent;
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    repeating-linear-gradient(-45deg, var(--yellow) 0 22px, var(--ink) 22px 44px) border-box;
  padding: 1rem 1.2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

/* ============ TABS DE CATEGORIA ============ */
.tabs {
  max-width: 880px;
  margin: 0 auto 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.tab {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: .55rem 1rem;
  border: 3px solid var(--ink);
  background: var(--receipt);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: all .12s;
}
.tab:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.tab.active {
  background: var(--ink);
  color: var(--yellow);
  transform: rotate(-1deg);
}
.tab-panels { max-width: 880px; margin: 0 auto; }
.tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  animation: rise .4s ease both;
}
.tip-card {
  border: 2px solid var(--ink);
  background: var(--receipt);
  padding: 1rem 1rem 1.1rem;
  position: relative;
}
.tip-card h4 { font-size: 1.05rem; margin-bottom: .35rem; padding-right: 3.2rem; }
.tip-card p { font-size: .95rem; }
.tip-level {
  position: absolute;
  top: .6rem;
  right: .7rem;
  font-size: .85rem;
  letter-spacing: -.05em;
}
.tip-save {
  display: inline-block;
  margin-top: .6rem;
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-weight: 700;
  font-size: .8rem;
  padding: .1rem .5rem;
  transform: rotate(-1deg);
}

/* ============ ETANOL ============ */
.fuel-calc {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--receipt);
  border: 3px solid var(--ink);
  padding: 1.4rem;
  box-shadow: 8px 8px 0 var(--ink);
}
.fuel-calc label { flex: 1 1 180px; margin-bottom: 0; }
.fuel-vs {
  font-family: var(--font-display);
  font-size: 1.4rem;
  padding-bottom: .4rem;
}
.fuel-verdict {
  flex: 1 1 100%;
  font-weight: 700;
  font-size: 1.15rem;
  border-top: 2px dashed var(--ink);
  padding-top: 1rem;
}
.fuel-verdict .big {
  font-family: var(--font-display);
  font-size: 1.3rem;
}

/* ============ QUIZ ============ */
.quiz { max-width: 720px; margin: 0 auto; }
.quiz-q {
  background: var(--dark-2);
  border: 2px solid var(--yellow);
  padding: 1.2rem 1.2rem 1.3rem;
  margin-bottom: 1rem;
}
.quiz-q h4 {
  font-size: 1.1rem;
  margin-bottom: .8rem;
  color: var(--yellow);
}
.quiz-q h4 .qnum {
  font-family: var(--font-display);
  margin-right: .5rem;
}
.quiz-opts { display: grid; gap: .5rem; }
.quiz-opt {
  text-align: left;
  font-family: var(--font-body);
  font-size: .98rem;
  padding: .55rem .8rem;
  background: transparent;
  border: 2px solid rgba(244,236,216,.35);
  color: var(--paper);
  cursor: pointer;
  transition: all .12s;
}
.quiz-opt:hover { border-color: var(--yellow); transform: translateX(4px); }
.quiz-opt.picked {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  border-color: var(--yellow);
}
.quiz-actions { text-align: center; margin-top: 1.4rem; }
.quiz-actions .btn-main { max-width: 380px; }

/* ============ FOOTER ============ */
.footer {
  padding: 3rem 1.2rem 3.4rem;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.footer-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: .8rem;
}
.footer p { margin-bottom: .6rem; font-size: .95rem; }
.footer-small { opacity: .6; font-style: italic; }

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