/* =========================================================
   Design system — derivado da logo (verde #7DBF3C, carvão #151618)
   Ver DESIGN.md
   ========================================================= */
:root {
  /* cor */
  --verde: #7DBF3C;
  --verde-escuro: #4E8A22;
  --verde-profundo: #274A16;
  --verde-tinta: #E9F2DD;
  --carvao: #151618;
  --grafite: #232526;
  --grafite-2: #2E3133;
  --osso: #F4F6F1;
  --osso-2: #EAEDE6;
  --linha: #D9DDD4;
  --linha-escura: #33373A;
  --texto: #151618;
  --texto-2: #5C625B;
  --texto-3: #8A9088;
  --texto-inv: #F4F6F1;
  --texto-inv-2: #A8ADA6;
  --texto-inv-3: #6E746D;

  /* tipografia */
  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Onest", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-brand: "Poppins", "Montserrat", "Gilroy", "Helvetica Neue", Arial, sans-serif;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --t-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --t-3xl: clamp(2.4rem, 1.5rem + 3.4vw, 4.25rem);
  --t-4xl: clamp(2.8rem, 1.3rem + 5.4vw, 6rem);

  /* espaço (base 8) */
  --s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem; --s-5: 3rem;
  --s-6: 4rem; --s-7: 6rem; --s-8: 8rem; --s-9: 12rem;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max: 1440px;
  --r-1: 4px; --r-2: 10px; --r-3: 20px;
  --cut: 18px; /* chanfro derivado da logo */

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --dur: 700ms;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--osso);
  color: var(--texto);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--verde); outline-offset: 4px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- utilitários de composição ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--s-3); }
.section { position: relative; padding-block: var(--s-8); scroll-margin-top: 4rem; }
@media (max-width: 720px) { .section { padding-block: var(--s-7); } }
.dark { background: var(--carvao); color: var(--texto-inv); }
.dark .eyebrow { color: var(--verde); }
.dark .muted { color: var(--texto-inv-2); }
.muted { color: var(--texto-2); }
.eyebrow {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--verde-escuro);
  display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; flex: none; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%); }
.display { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.02; text-wrap: balance; }
.h2 { font-size: var(--t-3xl); }
.h3 { font-size: var(--t-2xl); }
.lead { font-size: var(--t-lg); line-height: 1.5; max-width: 34ch; text-wrap: pretty; }
.copy { max-width: 58ch; text-wrap: pretty; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.cut-bl { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-body); font-weight: 500; font-size: var(--t-sm); letter-spacing: .01em;
  padding: .95em 1.4em; border-radius: 999px;
  transition: transform .35s var(--ease-out), filter .25s, background-color .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline-offset: 2px; }
.btn-primary { background: var(--verde); color: var(--carvao); }
.btn-ghost { border: 1px solid var(--linha); color: var(--texto); }
.btn-ghost:hover { border-color: var(--texto); }
.btn-inv { border: 1px solid rgba(244,246,241,.35); color: var(--texto-inv); }
.btn-inv:hover { border-color: var(--texto-inv); }
.btn .arrow { width: 1em; height: 1em; transition: transform .35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- reveal (a partir de estado visível) ---------- */
.reveal { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(18px); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }

/* ---------- header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-block: var(--s-2);
  color: var(--texto-inv);
  transition: background-color .5s, color .5s, box-shadow .5s, padding .5s;
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.header.solid { background: color-mix(in srgb, var(--osso) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--texto); box-shadow: 0 1px 0 var(--linha); }
.header.solid.on-dark { background: rgba(10,14,10,.9); color: var(--texto-inv); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.brand { display: inline-flex; align-items: center; gap: .55em; }
.brand svg { width: 38px; height: auto; }
.brand .muzzle { fill: var(--osso); }
.brand-name { font-family: var(--f-brand); font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; color: currentColor; }
.nav { display: flex; gap: var(--s-4); font-size: var(--t-sm); }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: currentColor; opacity: .85; transition: opacity .25s, color .25s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: currentColor; transition: right .35s var(--ease-out); }
.nav a:hover, .nav a:focus-visible { opacity: 1; color: var(--verde); }
.nav a:hover::after, .nav a:focus-visible::after { right: 0; }
.header .btn { height: 40px; padding-block: 0; padding-inline: 1.1em; }
.menu-btn { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.menu-btn span { width: 20px; height: 1.5px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
@media (max-width: 860px) {
  .nav, .header .btn-primary { display: none; }
  .menu-btn { display: inline-flex; }
  .header.open .nav { display: flex; position: absolute; inset: 100% 0 auto 0; flex-direction: column; gap: 0; background: var(--carvao); color: var(--texto-inv); padding: var(--s-2) var(--gutter) var(--s-4); }
  .header.open .nav a { padding: .9em 0; border-bottom: 1px solid var(--linha-escura); font-size: var(--t-lg); }
}

/* ---------- HERO: vídeo scroll-scrub ---------- */
.hero { position: relative; height: 420vh; background: var(--carvao); color: var(--texto-inv); }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-canvas, .hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-poster { transition: opacity .6s; }
.hero-poster.hide { opacity: 0; }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(21,22,24,.5) 0%, rgba(21,22,24,.05) 30%, rgba(21,22,24,.0) 55%, rgba(21,22,24,.7) 100%); }
.hero-shade-end { position: absolute; inset: 0; pointer-events: none; background: var(--carvao); opacity: 0; }
.hero-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(21,22,24,.5) 100%); }

/* scrim dedicado à legibilidade do texto sobre a mídia — não opacidade no texto */
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgba(10,14,10,.85) 0%, rgba(10,14,10,.55) 45%, transparent 75%),
    linear-gradient(to top, rgba(10,14,10,.82) 0%, rgba(10,14,10,.4) 32%, transparent 58%);
}
@media (max-width: 720px) {
  .hero-scrim { background: linear-gradient(to top, rgba(10,14,10,.9) 0%, rgba(10,14,10,.58) 40%, transparent 70%); }
}

.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 0 clamp(4rem, 9vh, 6.5rem);
  will-change: transform, opacity;
  text-shadow: 0 1px 24px rgba(0,0,0,.4);
}
.hero-copy .grid { align-items: end; row-gap: var(--s-3); }
.hero-title { grid-column: 1 / 10; font-size: var(--t-4xl); }
.hero-side { grid-column: 10 / 13; display: grid; gap: var(--s-3); }
.hero-side .lead { font-size: var(--t-base); color: #E8EAE6; max-width: 28ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { height: 52px; padding-block: 0; padding-inline: 1.75em; justify-content: center; }
.hero-eyebrow { grid-column: 1 / -1; color: #AEE374; color: oklch(0.85 0.18 140); }
@media (max-width: 960px) {
  .hero-title { grid-column: 1 / -1; }
  .hero-side { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .hero-title br { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; height: 56px; }
}

/* frase de transição no fim do hero */
.hero-outro {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  opacity: 0; will-change: opacity, transform; pointer-events: none;
}
.hero-outro .display { font-size: var(--t-3xl); max-width: 16ch; line-height: 1.05; }
.hero-outro .eyebrow { margin-bottom: var(--s-2); justify-content: center; }

/* indicador de rolagem — cascata de 3 chevrons verdes, entre o eyebrow e o título */
.scroll-hint-row { grid-column: 1 / -1; display: flex; justify-content: center; }
.scroll-hint {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 11px; border: 0; background: none;
  color: oklch(0.82 0.19 140);
  opacity: 0; transform: translateY(-6px);
  animation: scrollHintIn .6s var(--ease-out) .9s forwards;
  transition: opacity .2s ease;
}
.scroll-hint:focus-visible { outline: 2px solid var(--verde); outline-offset: 4px; border-radius: 10px; }
.scroll-hint.is-scrolled { opacity: 0 !important; pointer-events: none; }
@keyframes scrollHintIn { to { opacity: 1; transform: translateY(0); } }

.scroll-hint-arrow { display: block; }
.scroll-hint-arrow:not(:first-child) { margin-top: -4px; }
.scroll-hint-arrow:nth-child(1) { opacity: .9; animation: scrollHintWave1 1.8s ease-in-out 0ms infinite; }
.scroll-hint-arrow:nth-child(2) { opacity: .55; animation: scrollHintWave2 1.8s ease-in-out 180ms infinite; }
.scroll-hint-arrow:nth-child(3) { opacity: .3; animation: scrollHintWave3 1.8s ease-in-out 360ms infinite; }
@keyframes scrollHintWave1 { 0%, 100% { opacity: .9; transform: translateY(0); } 50% { opacity: 1; transform: translateY(3px); } }
@keyframes scrollHintWave2 { 0%, 100% { opacity: .55; transform: translateY(0); } 50% { opacity: 1; transform: translateY(3px); } }
@keyframes scrollHintWave3 { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(3px); } }
@keyframes scrollHintWaveHover { 0%, 100% { opacity: 1; transform: translateY(0); } 50% { opacity: 1; transform: translateY(3px); } }
.scroll-hint:hover .scroll-hint-arrow:nth-child(1) { opacity: 1; animation: scrollHintWaveHover 1.8s ease-in-out 0ms infinite; }
.scroll-hint:hover .scroll-hint-arrow:nth-child(2) { opacity: 1; animation: scrollHintWaveHover 1.8s ease-in-out 120ms infinite; }
.scroll-hint:hover .scroll-hint-arrow:nth-child(3) { opacity: 1; animation: scrollHintWaveHover 1.8s ease-in-out 240ms infinite; }
.hero-loading { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--verde); transition: width .3s; }

/* ---------- 3. O problema ---------- */
.problem { padding-top: var(--s-6); }
.problem .grid { row-gap: var(--s-6); }
.problem-intro { grid-column: 1 / 6; }
.problem-intro .copy { margin-top: var(--s-3); color: var(--texto-inv-2); }
.stream { grid-column: 7 / 13; position: relative; height: 420px; overflow: hidden;
  mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
.stream ul { display: grid; gap: 0; will-change: transform; }
.stream li { display: grid; grid-template-columns: 5.5em 1fr auto; gap: var(--s-2); padding: .85em 0; border-top: 1px solid var(--linha-escura); font-size: var(--t-sm); align-items: baseline; }
.stream .t { font-family: var(--f-mono); color: var(--texto-inv-3); font-size: var(--t-xs); }
.stream .v { font-family: var(--f-mono); color: var(--verde); font-size: var(--t-xs); }
.facets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; border-top: 1px solid var(--linha-escura); padding-top: var(--s-4); }
.facets li { font-family: var(--f-display); font-size: var(--t-xl); font-weight: 500; letter-spacing: -.01em; color: var(--texto-inv-2); white-space: nowrap; padding: 8px 4px; border-bottom: 2px solid transparent; transition: color .5s, border-color .5s; }
.facets li.on { color: var(--texto-inv); border-bottom-color: var(--verde); }
@media (max-width: 720px) {
  .facets { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .facets::-webkit-scrollbar { display: none; }
  .facets li { scroll-snap-align: start; }
}
@media (max-width: 960px) { .problem-intro, .stream { grid-column: 1 / -1; } .stream { height: 320px; } }

/* ---------- 4. Solução: convergência ---------- */
.solution { overflow: hidden; }
.solution .grid { align-items: center; row-gap: var(--s-6); }
.solution-copy { grid-column: 1 / 5; }
.solution-copy .copy { margin-top: var(--s-3); }
.converge { grid-column: 5 / 13; position: relative; min-height: 560px; display: grid; place-items: center; }
.converge > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.converge > svg path { fill: none; stroke: var(--linha); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; }
.converge > svg .lit { stroke: var(--verde); stroke-width: 1.2; }
.converge .phone { position: relative; z-index: 1; }
.converge .node { position: absolute; font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); background: var(--osso); padding: .3em .5em; transform: translate(-50%, -50%); }
@media (max-width: 960px) { .solution-copy, .converge { grid-column: 1 / -1; } .converge { min-height: 520px; } }
@media (max-width: 720px) {
  .converge { min-height: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1); }
  .converge > svg { display: none; }
  .converge .node { position: static; transform: none; border: 1px solid var(--linha); padding: .45em .7em; border-radius: 999px; }
  /* moldura proporcional: reserva o espaço certo (9:19.5) e escala o mockup nativo (280px) por dentro, sem reflow */
  .converge .phone-frame {
    flex-basis: 100%; width: 100%; max-width: 320px; margin: var(--s-4) auto 0;
    aspect-ratio: 9 / 19.5; container-type: inline-size; position: relative;
  }
  .converge .phone {
    position: absolute; top: 0; left: 50%; margin: 0;
    width: 280px; aspect-ratio: 9 / 19.5;
    transform: translateX(-50%) scale(calc(100cqw / 280px));
    transform-origin: top center;
  }
  #phoneDash .ui { padding-top: 58px; }
}

/* ---------- telefone / interface conceitual ---------- */
.phone {
  width: 280px; aspect-ratio: 9 / 19; background: var(--carvao); color: var(--texto-inv);
  border-radius: 34px; padding: 10px; box-shadow: 0 30px 80px -30px rgba(21,22,24,.55), 0 0 0 1px rgba(21,22,24,.6), inset 0 0 0 1px rgba(255,255,255,.08);
  position: relative; flex: none;
}
.phone .screen { position: absolute; inset: 10px; border-radius: 26px; background: var(--osso); color: var(--texto); overflow: hidden; display: flex; flex-direction: column; }
.phone.dark-ui .screen { background: #1E2023; color: var(--texto-inv); }
.dark .phone { box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(244,246,241,.14), inset 0 0 0 1px rgba(255,255,255,.06); }
.phone .notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 84px; height: 22px; border-radius: 12px; background: var(--carvao); z-index: 2; }
.ui { padding: 52px 18px 18px; font-size: 12px; line-height: 1.35; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.ui-top { display: flex; justify-content: space-between; align-items: center; }
.ui-top .brand-mini { width: 22px; }
.ui-top .brand-mini .muzzle { fill: var(--grafite); }
.dark-ui .ui-top .brand-mini .muzzle { fill: var(--osso); }
.ui-h { font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: -.02em; line-height: 1.05; }
.ui-label { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-3); }
.dark-ui .ui-label { color: var(--texto-inv-3); }
.ui-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ui-kpi { padding: 10px 12px; border: 1px solid var(--linha); border-radius: var(--r-2); }
.dark-ui .ui-kpi { border-color: var(--linha-escura); }
.ui-kpi b { display: block; font-family: var(--f-display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ui-kpi small { color: var(--verde-escuro); font-family: var(--f-mono); font-size: 9.5px; }
.dark-ui .ui-kpi small { color: var(--verde); }
.ui-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid var(--linha); font-variant-numeric: tabular-nums; }
.dark-ui .ui-row { border-color: var(--linha-escura); }
.ui-row .n { font-family: var(--f-mono); font-size: 11px; }
.ui-row .s { font-size: 11px; color: var(--texto-2); }
.dark-ui .ui-row .s { color: var(--texto-inv-2); }
.ui-pill { font-family: var(--f-mono); font-size: 9.5px; padding: 3px 7px; border-radius: 999px; background: var(--verde-tinta); color: var(--verde-profundo); }
.dark-ui .ui-pill { background: rgba(125,191,60,.16); color: var(--verde); }
.ui-pill.warn { background: #F5EBD6; color: #7A5A12; }
.ui-spark { height: 64px; }
.ui-spark svg { width: 100%; height: 100%; overflow: visible; }
.ui-bars { display: flex; align-items: flex-end; gap: 5px; height: 70px; }
.ui-bars i { flex: 1; background: var(--verde-tinta); border-radius: 3px 3px 0 0; transform-origin: bottom; transition: transform 1s var(--ease-out); }
.ui-bars i.hi { background: var(--verde); }
.dark-ui .ui-bars i { background: rgba(125,191,60,.25); }
.dark-ui .ui-bars i.hi { background: var(--verde); }
.js .ui-bars:not(.in) i { transform: scaleY(0); }
.ui-tabs { margin-top: auto; display: flex; justify-content: space-around; padding-top: 10px; border-top: 1px solid var(--linha); font-family: var(--f-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3); }
.dark-ui .ui-tabs { border-color: var(--linha-escura); color: var(--texto-inv-3); }
.ui-tabs .on { color: var(--verde-escuro); }
.dark-ui .ui-tabs .on { color: var(--verde); }
.ui-animal { display: flex; gap: 10px; align-items: center; }
.ui-animal .id { width: 40px; height: 40px; border-radius: 10px; background: var(--verde); color: var(--carvao); display: grid; place-items: center; font-family: var(--f-mono); font-size: 10px; font-weight: 500; }
.ui-timeline li { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; padding: 7px 0; font-size: 11px; align-items: start; }
.ui-timeline li::before { content: ""; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--linha); }
.ui-timeline li.on::before { background: var(--verde); }
.ui-timeline .d { font-family: var(--f-mono); font-size: 9.5px; color: var(--texto-3); }
.ui-pen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ui-pen i { aspect-ratio: 1; border-radius: 6px; background: var(--osso-2); display: grid; place-items: center; font-family: var(--f-mono); font-size: 9px; color: var(--texto-2); }
.ui-pen i.full { background: var(--verde-tinta); color: var(--verde-profundo); }
.ui-pen i.hi { background: var(--verde); color: var(--carvao); }

/* ---------- 5. Gestão do rebanho ---------- */
.herd .grid { align-items: center; row-gap: var(--s-6); }
.herd-media { grid-column: 1 / 7; position: relative; }
.herd-media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.herd-media .phone { position: absolute; right: -8%; bottom: -10%; width: 240px; transform: rotate(-3deg); }
.herd-copy { grid-column: 8 / 13; }
.feature-list { margin-top: var(--s-4); border-top: 1px solid var(--linha); }
.feature-list li { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--linha); }
.feature-list b { font-weight: 500; }
.feature-list span { color: var(--texto-2); font-size: var(--t-sm); }
@media (max-width: 960px) { .herd-media, .herd-copy { grid-column: 1 / -1; } .herd-media { margin-bottom: var(--s-6); } .herd-media .phone { right: 0; width: 200px; } }
/* mobile: overlay no canto inferior esquerdo, sem cobrir o rosto do animal */
@media (max-width: 768px) {
  .herd-media {
    container-type: inline-size;
    padding-bottom: 64px; margin-bottom: 0;
  }
  .herd-media img { aspect-ratio: 4 / 5; object-position: 70% 25%; }
  .herd-media .phone {
    position: absolute; left: 4%; bottom: -8%; right: auto;
    width: 280px; aspect-ratio: 9 / 19.5;
    z-index: 2;
    transform-origin: bottom left;
    /* conteúdo nativo de 280px escalado para caber em 46% da composição (máx. 200px), sem reflow */
    transform: rotate(-5deg) scale(calc(min(46cqw, 200px) / 280px));
    box-shadow: 0 24px 48px -16px rgba(0,0,0,.55);
  }
}
@media (max-width: 600px) { .feature-list li { grid-template-columns: 1fr; gap: .25em; } }

/* ---------- 6. Confinamento ---------- */
.feedlot { padding-top: 0; }
.feedlot-hero { position: relative; height: 70vh; min-height: 420px; overflow: hidden; }
.feedlot-hero img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); will-change: transform; }
/* saída da foto: funde os últimos ~40% na cor sólida da seção (--carvao), sobre a imagem — não cria faixa */
.feedlot-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 45%, rgba(21,22,24,.6) 78%, var(--carvao) 100%);
}
.feedlot-hero .cap { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding-bottom: var(--s-5); background: linear-gradient(transparent, var(--carvao)); padding-top: var(--s-8); }
.feedlot-hero .cap .display { font-size: var(--t-3xl); max-width: 14ch; }
.feedlot-body { padding-top: var(--s-7); }
.feedlot-body .grid { row-gap: var(--s-6); }
.feedlot-steps { grid-column: 1 / 7; align-self: start; position: sticky; top: 18vh; }
.feedlot-steps .copy { color: var(--texto-inv-2); margin-top: var(--s-3); }
.steps { margin-top: var(--s-5); border-top: 1px solid var(--linha-escura); }
.steps li { padding: var(--s-2) 0; border-bottom: 1px solid var(--linha-escura); display: grid; grid-template-columns: 2.5em 1fr; gap: var(--s-2); color: var(--texto-inv-3); transition: color .4s; cursor: default; }
.steps li .k { font-family: var(--f-mono); font-size: var(--t-xs); padding-top: .45em; }
.steps li b { font-family: var(--f-display); font-weight: 500; font-size: var(--t-lg); display: block; }
.steps li span { font-size: var(--t-sm); display: block; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s var(--ease-out), opacity .5s, margin .5s; }
.steps li.on { color: var(--texto-inv); }
.steps li.on .k { color: var(--verde); }
.steps li.on span { max-height: 6em; opacity: 1; margin-top: .35em; color: var(--texto-inv-2); }
.feedlot-screens { grid-column: 8 / 13; display: grid; gap: 40vh; padding-block: 10vh; justify-items: center; }
.feedlot-screens .phone { width: 300px; }
.feedlot-dots { display: none; }
@media (max-width: 960px) {
  .feedlot-steps { grid-column: 1 / -1; position: static; }
  .feedlot-screens { grid-column: 1 / -1; gap: var(--s-6); padding-block: 0; }
  .steps li span { max-height: none; opacity: 1; margin-top: .35em; }
  .steps li { color: var(--texto-inv); }
}

/* mobile: carrossel de rolagem horizontal com scroll-snap, sem empilhamento */
@media (max-width: 768px) {
  .feedlot-body .grid { row-gap: 0; }
  .feedlot-screens {
    display: flex; align-items: stretch;
    width: 100vw; margin-inline: calc(50% - 50vw);
    margin-top: 56px;
    overflow-x: auto; overflow-y: hidden;
    gap: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: calc((100vw - min(76vw, 300px)) / 2);
  }
  .feedlot-screens::-webkit-scrollbar { display: none; }
  .feedlot-screens .phone {
    flex: 0 0 auto; width: 76vw; max-width: 300px;
    aspect-ratio: 9 / 19.5;
    scroll-snap-align: center;
  }
  /* "Fornecimento": o gráfico ocupa o espaço que sobrava vazio entre o botão e as abas */
  .feedlot-screens .phone[data-screen="2"] .ui-chart { flex: 1; display: flex; flex-direction: column; }
  .feedlot-screens .phone[data-screen="2"] .ui-bars { flex: 1; height: auto; min-height: 110px; }
  .feedlot-dots {
    display: flex; grid-column: 1 / -1; justify-content: center; align-items: center; gap: 8px; margin-top: 24px;
  }
  .feedlot-dot {
    width: 6px; height: 6px; border-radius: 50%; border: 0; padding: 0;
    background: rgba(255,255,255,.20);
    transition: width .24s ease, border-radius .24s ease, background-color .24s ease;
  }
  .feedlot-dot.is-active { width: 20px; border-radius: 3px; background: var(--verde); }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .feedlot-screens { scroll-behavior: auto; }
}

/* ---------- 7. Dados ---------- */
.data .grid { row-gap: var(--s-6); }
.data-head { grid-column: 1 / 8; }
.data-note { grid-column: 9 / 13; align-self: end; font-size: var(--t-sm); color: var(--texto-2); }
.chart { grid-column: span 6; display: grid; gap: var(--s-2); }
.chart.wide { grid-column: 1 / -1; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.chart-head h3 { font-family: var(--f-display); font-weight: 500; font-size: var(--t-lg); letter-spacing: -.01em; }
.chart-head .legend { display: flex; gap: var(--s-2); font-family: var(--f-mono); font-size: var(--t-xs); color: var(--texto-2); }
.legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: .5em; background: var(--verde); }
.legend i.alt { background: var(--texto-3); height: 1px; border-top: 1px dashed var(--texto-3); background: none; }
.chart svg { width: 100%; height: auto; overflow: visible; font-family: var(--f-mono); font-size: 11px; }
.chart .grid-l { stroke: var(--linha); stroke-width: 1; }
.chart .ax { fill: var(--texto-3); }
.chart .line { fill: none; stroke: var(--verde); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .line.meta { stroke: var(--texto-3); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .area { fill: url(#gArea); }
.chart .bar { fill: var(--verde-tinta); transition: fill .2s; }
.chart .bar.hi, .chart .bar:hover { fill: var(--verde); }
.chart .dot { fill: var(--osso); stroke: var(--verde); stroke-width: 2; }
.chart .hist rect { fill: var(--verde); opacity: .35; }
.chart .hist rect.mid { opacity: 1; }
.chart .tip { font-size: 11px; fill: var(--texto); }
.chart .tipbox { fill: var(--carvao); }
.chart .tiptext { fill: var(--osso); }
.chart-foot { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--texto-3); }
.big-kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-3); border-top: 1px solid var(--linha); padding-top: var(--s-4); }
.big-kpis b { font-family: var(--f-display); font-size: var(--t-2xl); font-weight: 600; letter-spacing: -.02em; display: block; font-variant-numeric: tabular-nums; }
.big-kpis span { font-size: var(--t-sm); color: var(--texto-2); }
@media (max-width: 960px) { .data-head, .data-note, .chart { grid-column: 1 / -1; } }

/* ---------- 8. Produto em uso ---------- */
.inuse .grid { align-items: center; row-gap: var(--s-6); }
.inuse-photo { grid-column: 1 / 8; position: relative; }
.inuse-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.inuse-card { position: absolute; right: -6%; bottom: 10%; width: min(300px, 80%); background: var(--osso); padding: var(--s-3); box-shadow: 0 30px 70px -30px rgba(21,22,24,.5); }
.inuse-card .ui-label { margin-bottom: 8px; }
.inuse-card .n { font-family: var(--f-display); font-size: 2rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.inuse-card .ui-row { font-size: var(--t-sm); }
.inuse-copy { grid-column: 9 / 13; }
.inuse-copy .copy { margin-top: var(--s-3); }
@media (max-width: 960px) { .inuse-photo, .inuse-copy { grid-column: 1 / -1; } .inuse-card { right: 0; top: auto; bottom: -8%; } .inuse-copy { margin-top: var(--s-5); } }

/* ---------- 9. Operação conectada ---------- */
.connected { text-align: center; }
.connected .lead { margin: var(--s-3) auto 0; }
.net { position: relative; max-width: 900px; margin: var(--s-6) auto 0; aspect-ratio: 9 / 5; }
.net svg { width: 100%; height: 100%; overflow: visible; }
.net .l { stroke: var(--linha-escura); stroke-width: 1; fill: none; }
.net .pulse { fill: var(--verde); }
.net .hub { fill: var(--verde); }
.net .nd { fill: var(--grafite-2); stroke: var(--linha-escura); }
.net text { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; fill: var(--texto-inv-2); text-anchor: middle; }
@media (max-width: 600px) { .net { aspect-ratio: 1; } .net text { font-size: 9px; } }

/* ---------- 10. Decisões ---------- */
.decide .display { font-size: var(--t-4xl); max-width: 12ch; }
.decide .grid { row-gap: var(--s-6); align-items: end; }
.decide-title { grid-column: 1 / 9; }
.decide-points { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); border-top: 1px solid var(--linha); padding-top: var(--s-4); }
.decide-points b { font-family: var(--f-display); font-weight: 500; font-size: var(--t-xl); display: block; margin-bottom: .4em; letter-spacing: -.01em; }
.decide-points p { color: var(--texto-2); max-width: 32ch; }
@media (max-width: 960px) { .decide-title { grid-column: 1 / -1; } .decide-points { grid-template-columns: 1fr; } }

/* ---------- 11. Mobile ---------- */
.mobile { overflow: hidden; }
.mobile-head { text-align: center; max-width: 60ch; margin-inline: auto; }
.mobile-head .display { max-width: 18ch; margin-inline: auto; }
.mobile-head .lead { margin: var(--s-3) auto 0; }
.phones { display: flex; justify-content: center; align-items: flex-end; gap: var(--s-4); margin-top: var(--s-7); }
.phones .phone { will-change: transform; }
.phones .phone:nth-child(1) { transform: translateY(40px) rotate(-4deg); }
.phones .phone:nth-child(3) { transform: translateY(40px) rotate(4deg); }
.phones-dots { display: none; }
@media (max-width: 960px) { .phones { gap: var(--s-2); } .phones .phone { width: 220px; } }

/* mobile: carrossel de rolagem horizontal com scroll-snap, sem empilhamento */
@media (max-width: 768px) {
  .phones {
    width: 100vw; margin-inline: calc(50% - 50vw);
    flex-wrap: nowrap; justify-content: flex-start; align-items: stretch;
    overflow-x: auto; overflow-y: hidden;
    gap: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: calc((100vw - min(78vw, 320px)) / 2);
  }
  .phones::-webkit-scrollbar { display: none; }
  .phones .phone {
    flex: 0 0 auto; width: 78vw; max-width: 320px;
    aspect-ratio: 9 / 19.5;
    scroll-snap-align: center;
    transform: none !important;
  }
  .phones-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 24px; }
  .phones-dot {
    width: 6px; height: 6px; border-radius: 50%; border: 0; padding: 0;
    background: rgba(0,0,0,.18);
    transition: width .24s ease, border-radius .24s ease, background-color .24s ease;
  }
  .phones-dot.is-active { width: 20px; border-radius: 3px; background: var(--verde); }
}

/* ---------- 12. Onde estiver ---------- */
.anywhere { padding: 0; position: relative; min-height: 70vh; overflow: hidden; display: flex; align-items: flex-end; }
.anywhere img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); will-change: transform; }
.anywhere::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, var(--carvao) 100%); }
.anywhere .wrap { position: relative; z-index: 1; padding-bottom: var(--s-7); color: var(--texto-inv); }
.anywhere .display { font-size: var(--t-3xl); max-width: 14ch; }
.anywhere .lead { color: var(--texto-inv-2); margin-top: var(--s-3); }

/* ---------- 13. CTA ---------- */
.cta { padding: 0; padding-top: var(--s-7); position: relative; background: var(--carvao); display: grid; justify-items: center; text-align: center; overflow: hidden; }
.cta .wrap { position: relative; z-index: 1; color: var(--texto-inv); padding-bottom: var(--s-9); display: grid; justify-items: center; gap: var(--s-4); }
.cta .display { font-size: var(--t-4xl); max-width: 12ch; }
.cta .brand-big { width: 64px; }
.cta .brand-big .muzzle { fill: var(--osso); }
@media (max-width: 720px) { .cta { padding-top: var(--s-6); } }

/* ---------- 14. Footer ---------- */
.footer { padding-block: var(--s-5); font-size: var(--t-sm); color: var(--texto-inv-2); border-top: 1px solid var(--linha-escura); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.footer .brand svg { width: 30px; }
.footer .brand .muzzle { fill: var(--osso); }
.footer .brand-name { font-size: 1.1rem; color: var(--texto-inv); }
.footer nav { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.footer nav a:hover { color: var(--texto-inv); }
.footer .fine { font-family: var(--f-mono); font-size: var(--t-xs); }

/* ---------- performance ---------- */
.section:not(.hero):not(.problem) { content-visibility: auto; contain-intrinsic-size: auto 800px; }

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .js .reveal:not(.in) { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; opacity: 1; transform: none; }
  .scroll-hint-arrow { animation: none !important; transform: none; }
  .feedlot-hero img, .anywhere img { transform: none; }
  .js .ui-bars:not(.in) i { transform: none; }
  .hero { height: auto; }
  .hero-sticky { position: relative; height: 100svh; }
  .hero-canvas { display: none; }
  .hero-poster.hide { opacity: 1; }
  .hero-outro { display: none; }
  .hero-copy { transform: none !important; opacity: 1 !important; }
  .phones .phone { transform: none !important; }
  .phones { scroll-behavior: auto; }
}
