/* Estilos complementares ao Tailwind (CDN): hero, formulário, painel de mercado, WhatsApp flutuante, acessibilidade */
:root {
  --green-900: #10281c;
  --gold: #d4a373;
  --gray-600: #55605a;
  --danger: #b3261e;
}

.skip-link { position: absolute; left: -999px; top: 8px; background: #1b4332; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.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; }
:focus-visible { outline: 3px solid #1b4332; outline-offset: 2px; }
.quotes :focus-visible, #diferenciais :focus-visible, .hero :focus-visible { outline-color: #f1d3a8; }
[hidden] { display: none !important; }
html { scroll-padding-top: 96px; }

.hero {
  background:
    linear-gradient(105deg, rgba(16,40,28,.95) 35%, rgba(27,67,50,.6)),
    url('producao-de-graos-no-brasil-2048x1365.jpg') center/cover;
}

/* WhatsApp flutuante: respeita áreas seguras e sai de cena sobre o formulário */
.wa-float {
  position: fixed; z-index: 50; width: 60px; height: 60px;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  transition: opacity .2s, transform .2s;
}
.wa-float.is-hidden { opacity: 0; pointer-events: none; transform: scale(.8); }

/* Formulário com labels flutuantes */
.field { position: relative; margin-bottom: 18px; }
.field input, .field select {
  width: 100%; padding: 22px 16px 8px; font: inherit; border: 1.5px solid #8b958f;
  border-radius: 12px; background: #fff; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field label {
  position: absolute; left: 17px; top: 16px; color: #4a554f; pointer-events: none;
  transition: all .18s; font-size: 1rem;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label, .field select + label {
  top: 6px; font-size: .72rem; font-weight: 600; color: #1b4332;
}
.field input:focus, .field select:focus { border-color: #1b4332; box-shadow: 0 0 0 4px rgba(27,67,50,.18); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.error { display: none; color: var(--danger); font-size: .85rem; margin-top: 5px; font-weight: 500; }
.field.invalid .error { display: block; }

fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span { display: inline-block; padding: 10px 20px; border: 1.5px solid #8b958f; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.pill input:checked + span { background: #1b4332; color: #fff; border-color: #1b4332; }
.pill input:focus-visible + span { outline: 3px solid #1b4332; outline-offset: 2px; }

/* Painel de mercado */
.quotes { background: var(--green-900); color: #fff; padding: 36px 0 44px; border-top: 1px solid rgba(255,255,255,.08); }
.container-q { width: min(1152px, 100% - 40px); margin-inline: auto; }
.quotes-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 20px; }
.quotes-head h2 { font-size: 1rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0; color: var(--gold); display: flex; align-items: center; gap: 10px; }
.quotes-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.7); animation: pulse 1.8s infinite; }
.quotes.offline .live-dot { background: #9aa59e; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
#quotes-updated { font-size: .85rem; color: #c3d4c9; }
.quotes-btn { font: inherit; font-size: .8rem; font-weight: 600; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.quotes-btn:hover { background: rgba(255,255,255,.12); }
.quotes[aria-busy="true"] .quotes-btn { opacity: .6; }
.quotes-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.quote { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 18px; min-width: 0; }
.quote .name { font-size: .9rem; color: #d3e1d8; font-weight: 700; margin: 0; }
.quote .price { font-weight: 700; letter-spacing: -.01em; font-size: 1.3rem; margin: 6px 0 2px; line-height: 1.25; overflow-wrap: anywhere; }
.quote .unit { font-size: .78rem; color: #c3d4c9; }
.quote .chg { font-size: .85rem; font-weight: 700; margin-top: 8px; min-height: 1.2em; }
.quote .src { font-size: .72rem; color: #aebfb4; margin-top: 8px; }
.quote.stale { border-style: dashed; }
.chg.up { color: #6ee7a0; } .chg.down { color: #ff9b94; } .chg.flat { color: #c3d4c9; }
.quotes-note { margin: 18px 0 0; font-size: .8rem; color: #c3d4c9; max-width: 820px; }
.quotes-link { font: inherit; background: none; border: 0; padding: 0; color: #f1d3a8; text-decoration: underline; cursor: pointer; margin-left: 6px; }
.quotes-cta { display: inline-block; font-weight: 700; color: #10281c; background: #d4a373; padding: 12px 22px; border-radius: 999px; text-decoration: none; }
.quotes-cta:hover { background: #fff; }
@media (max-width: 1100px) { .quotes-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .quotes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .quotes-grid { grid-template-columns: 1fr; } }

/* Metodologia */
.metodo { max-width: min(640px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.metodo::backdrop { background: rgba(16,40,28,.6); }
.metodo h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: #1b4332; margin: 0 0 12px; }
.metodo ul { padding-left: 18px; display: grid; gap: 10px; font-size: .92rem; color: #334139; }
.metodo-close { margin-top: 18px; background: #1b4332; color: #fff; border: 0; border-radius: 999px; padding: 10px 24px; font-weight: 700; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.quotes-sub { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #d3e1d8; margin: 22px 0 12px; }
.quotes-sub span { font-weight: 500; text-transform: none; letter-spacing: 0; color: #aebfb4; margin-left: 6px; }
.b3-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .b3-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .b3-grid { grid-template-columns: 1fr; } }

