/* ==========================================================================
   Check-up de Gestão Gastronômica — Samir Anchite
   Folha de estilos única, mobile first, sem dependências externas.
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #08080a;
  --card: #121215;
  --card-2: #191a1e;
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.07);
  --paper: #f7f3ee;
  --muted: #b9b2ae;
  --muted-2: #9b9390;
  --red: #d4202b;
  --red-bright: #f0454f;
  --red-deep: #7d0f16;
  --font: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --maxw: 1080px;
  --pad: 20px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fundo: brilho vermelho difuso + textura sutil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(115% 70% at 88% -12%, rgba(168, 20, 30, 0.55), transparent 58%),
    radial-gradient(90% 60% at -10% 105%, rgba(96, 10, 16, 0.45), transparent 62%),
    linear-gradient(165deg, #0d0d10 0%, #08080a 55%, #060607 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, video { max-width: 100%; }

h1, h2, h3, p, blockquote, figure { margin: 0; }

button { font: inherit; color: inherit; }

::selection { background: var(--red); color: #fff; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============================ CABEÇALHO ============================ */

.site-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: flex; flex-direction: column; gap: 3px; }

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.head-tag {
  display: none;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ============================ TIPOGRAFIA ============================ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.eyebrow-rule {
  width: 22px;
  height: 2px;
  flex: none;
  background: var(--red-bright);
  display: none;
}

h1, .hero-title {
  margin: 14px 0 0;
  font-size: clamp(32px, 8.8vw, 44px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: none;
}

h1 em, .hero-title em {
  font-style: normal;
  color: var(--red-bright);
  display: inline;
}

.lead {
  margin-top: 16px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.pullquote {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--red);
  color: #e8e2dc;
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.45;
}

/* ============================ BOTÕES ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s, box-shadow 0.18s, opacity 0.18s;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, #e0323c 0%, #c01520 100%);
  border: 1px solid rgba(255, 130, 137, 0.55);
  box-shadow: 0 12px 28px -10px rgba(190, 20, 32, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover { background: linear-gradient(180deg, #f0424c 0%, #cf1a25 100%); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ded8d4;
  font-weight: 700;
}

.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.38); background: rgba(255, 255, 255, 0.03); }

.arrow, .arrow-back {
  display: inline-block;
  font-size: 15px;
  transition: transform 0.22s var(--ease);
}

.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-ghost:hover .arrow-back { transform: translateX(-3px); }

.hero-actions { margin-top: 22px; }

.meta {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted-2);
}

.meta i { font-style: normal; opacity: 0.55; padding: 0 4px; }

/* ============================ HERO ============================ */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px var(--pad) 34px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.portrait {
  position: relative;
  order: 2;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #17100f;
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, 0.95);
  isolation: isolate;
}

.portrait::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 70%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(214, 32, 43, 0.55), transparent);
  filter: blur(40px);
}

.portrait picture { display: block; }

.portrait img,
.portrait video {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 10%;
}

.portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0) 42%, rgba(8, 8, 10, 0.55) 72%, rgba(8, 8, 10, 0.94) 100%);
}

.portrait-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portrait-caption strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.portrait-caption span {
  font-size: 12px;
  color: #d5cfca;
  line-height: 1.35;
}

/* ============================ QUIZ ============================ */

.quiz {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 22px 18px 20px;
  background: linear-gradient(180deg, #151518 0%, #101013 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 40px 90px -46px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

#percent { color: var(--muted); }

.track {
  height: 4px;
  margin: 10px 0 24px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.bar {
  height: 100%;
  width: 11%;
  border-radius: 99px;
  background: linear-gradient(90deg, #b3121d, #f0454f);
  box-shadow: 0 0 16px rgba(240, 69, 79, 0.55);
  transition: width 0.5s var(--ease);
}

.quiz-body { position: relative; }

.quiz h2 {
  margin: 10px 0 20px;
  font-size: clamp(23px, 5.6vw, 33px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.quiz h2:focus { outline: none; }

.options { display: flex; flex-direction: column; gap: 9px; }

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 13px 15px;
  border: 1px solid #34343b;
  border-radius: 12px;
  background: #1a1a1f;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
  -webkit-tap-highlight-color: transparent;
}

.opt:hover { border-color: #5b5b66; background: #202027; }
.opt:active { transform: scale(0.995); }

.opt .key {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #4a4a54;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #c6c0bc;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.opt.is-selected {
  border-color: var(--red-bright);
  background: linear-gradient(90deg, rgba(196, 20, 33, 0.26) 0%, rgba(196, 20, 33, 0.07) 100%);
  box-shadow: 0 0 0 1px rgba(240, 69, 79, 0.25);
}

.opt.is-selected .key {
  background: var(--red);
  border-color: #ff8a90;
  color: #fff;
}

.opt .txt { flex: 1; }

/* Entrada da pergunta e das alternativas */
.quiz-body.is-entering .eyebrow,
.quiz-body.is-entering h2 {
  animation: fadeUp 0.26s var(--ease) both;
}

.quiz-body.is-entering .opt {
  animation: fadeUp 0.3s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 26ms + 30ms);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

.quiz-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.quiz-nav .btn-primary { flex: 1; }
.quiz-nav .btn-ghost { flex: none; padding: 0 16px; font-size: 12.5px; }

/* ============================ RESULTADO ============================ */

.result { padding-bottom: 22px; }

.result h2 {
  margin: 10px 0 18px;
  font-size: clamp(26px, 6.4vw, 36px);
}

.profile-card {
  padding: 16px 16px 16px 18px;
  border-left: 3px solid var(--red);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(100deg, rgba(196, 20, 33, 0.2), rgba(196, 20, 33, 0.02) 70%);
  animation: fadeUp 0.35s var(--ease) both;
}

.profile-name {
  font-size: clamp(22px, 5.6vw, 29px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.profile-advice {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #ddd6d1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.chip {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #d8d2ce;
}

.result-lead {
  margin: 20px 0 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.btn-whatsapp { margin-top: 2px; }

.notice {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-2);
}

.answers {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.answers summary {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.answers summary::-webkit-details-marker { display: none; }
.answers summary::after { content: ' +'; color: var(--red-bright); }
.answers[open] summary::after { content: ' −'; }

.answers ol {
  margin: 14px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.answers li { margin-bottom: 9px; }
.answers li b { display: block; font-weight: 600; color: #ddd7d3; }
.answers li span { color: #a9a2a0; }

.quiz-nav--end { margin-top: 20px; }
.quiz-nav--end .btn-ghost { flex: 1; font-size: 11.5px; padding: 0 10px; }

/* ============================ RODAPÉ ============================ */

.site-foot {
  padding: 22px var(--pad) calc(26px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8380;
  border-top: 1px solid var(--line-soft);
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================ TABLET ============================ */

@media (min-width: 620px) {
  :root { --pad: 28px; }

  .head-tag { display: block; }
  .brand-name { font-size: 17px; }
  .brand-sub { font-size: 9px; }

  .hero { padding-top: 34px; }

  .quiz { padding: 28px 26px 24px; }
  .opt { font-size: 15.5px; padding: 14px 16px; }
  .quiz-nav .btn-ghost { padding: 0 22px; font-size: 13px; }
  .quiz-nav--end .btn-ghost { font-size: 12.5px; }
  .meta { font-size: 12.5px; }
  .portrait img, .portrait video { aspect-ratio: 4 / 3; object-position: center 16%; }
  .eyebrow-rule { display: block; }
}

/* ============================ DESKTOP ============================ */

@media (min-width: 900px) {
  :root { --pad: 40px; }

  .site-head { padding: 24px var(--pad); }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 48px;
    align-items: center;
    padding: 54px var(--pad) 64px;
    min-height: calc(100svh - 90px);
  }

  .hero-title { font-size: clamp(38px, 6.2vw, 64px); }

  .portrait { order: 0; }

  .portrait img, .portrait video {
    aspect-ratio: 4 / 5;
    max-height: 560px;
    object-position: center 18%;
  }

  .lead { font-size: 17.5px; max-width: 40ch; }
  .pullquote { font-size: 16px; margin-top: 22px; }
  .hero-actions { margin-top: 30px; }

  .btn { font-size: 13px; }

  .hero-actions .btn { width: 100%; }

  .meta { text-align: left; margin-top: 14px; }

  .quiz {
    margin-top: 10px;
    margin-bottom: 56px;
    padding: 34px 36px 30px;
    border-radius: 20px;
  }

  .track { margin-bottom: 30px; }

  .opt { min-height: 60px; font-size: 16px; }

  .site-foot { padding-bottom: 30px; }
}

/* Telas muito estreitas */
@media (max-width: 359px) {
  .hero-title { font-size: 30px; }
  .opt { font-size: 14px; padding: 12px 13px; }
  .quiz { padding: 18px 14px 16px; }
}

/* Usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Impressão */
@media print {
  body { background: #fff; color: #111; }
  body::before, body::after { display: none; }
  .site-head, .site-foot, .quiz-nav, .btn, .answers { display: none !important; }
}
